From a473338abe03d254168eda8ffc7dc572dd99f6ef Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 3 Dec 2017 22:24:48 -0500 Subject: [PATCH] Makes minor type conversion fixes. --- Components/9918/9918.cpp | 10 +++++----- Components/9918/9918.hpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Components/9918/9918.cpp b/Components/9918/9918.cpp index 7ea9ab00c..ba2814a29 100644 --- a/Components/9918/9918.cpp +++ b/Components/9918/9918.cpp @@ -250,14 +250,14 @@ void TMS9918::run_for(const HalfCycles cycles) { // Set the fifth sprite bit and store the sprite if this is the first encountered. if(!(status_ & 0x40)) { status_ |= 0x40; - status_ = (status_ & ~31) | c; + status_ = static_cast((status_ & ~31) | c); } break; } } if(!(status_ & 0x40)) { - status_ = (status_ & ~31) | last_visible; + status_ = static_cast((status_ & ~31) | last_visible); } } } @@ -348,7 +348,7 @@ void TMS9918::run_for(const HalfCycles cycles) { while(output_column_ < pixels_end) { const int base = (output_column_ - first_pixel_column_); const int address = base / 6; - const uint8_t pattern = pattern_buffer_[address] << (base % 6); + const int pattern = pattern_buffer_[address] << (base % 6); *pixel_target_ = (pattern&0x80) ? palette[text_colour_] : palette[background_colour_]; pixel_target_ ++; @@ -479,7 +479,7 @@ void TMS9918::set_register(int address, uint8_t value) { switch(value & 7) { case 0: next_screen_mode_ = (next_screen_mode_ & 6) | ((low_write_ & 2) >> 1); - printf("NSM: %02x\n", next_screen_mode_); +// printf("NSM: %02x\n", next_screen_mode_); break; case 1: @@ -488,7 +488,7 @@ void TMS9918::set_register(int address, uint8_t value) { next_screen_mode_ = (next_screen_mode_ & 1) | ((low_write_ & 0x18) >> 3); sprites_16x16_ = !!(low_write_ & 0x02); sprites_magnified_ = !!(low_write_ & 0x01); - printf("NSM: %02x\n", next_screen_mode_); +// printf("NSM: %02x\n", next_screen_mode_); break; case 2: diff --git a/Components/9918/9918.hpp b/Components/9918/9918.hpp index 9cc8dbf07..853a510b3 100644 --- a/Components/9918/9918.hpp +++ b/Components/9918/9918.hpp @@ -96,7 +96,7 @@ class TMS9918 { uint8_t pattern_buffer_[40]; uint8_t colour_buffer_[40]; uint8_t sprite_locations_[32]; - uint8_t active_sprites_[4]; + int active_sprites_[4]; int access_pointer_ = 0; uint8_t pattern_name_ = 0;