diff --git a/src/common/tv_filters/NTSCFilter.cxx b/src/common/tv_filters/NTSCFilter.cxx index dfb9f2e7e..71d98b559 100644 --- a/src/common/tv_filters/NTSCFilter.cxx +++ b/src/common/tv_filters/NTSCFilter.cxx @@ -41,7 +41,7 @@ void NTSCFilter::setTIAPalette(const uInt32* palette) // The TIA palette consists of 128 colours, but the palette array actually // contains 256 entries, where only every second value is a valid colour uInt8* ptr = myTIAPalette; - for(int i = 0; i < 256; i+=2) + for(int i = 0; i < 256; i++) { *ptr++ = (palette[i] >> 16) & 0xff; *ptr++ = (palette[i] >> 8) & 0xff; diff --git a/src/common/tv_filters/NTSCFilter.hxx b/src/common/tv_filters/NTSCFilter.hxx index 19915d9b0..a187ae4b2 100644 --- a/src/common/tv_filters/NTSCFilter.hxx +++ b/src/common/tv_filters/NTSCFilter.hxx @@ -140,7 +140,7 @@ class NTSCFilter Preset myPreset; // 128 colours by 3 components per colour - uInt8 myTIAPalette[128 * 3]; + uInt8 myTIAPalette[256 * 3]; struct AdjustableTag { const char* type; diff --git a/src/common/tv_filters/atari_ntsc.h b/src/common/tv_filters/atari_ntsc.h index 4880aecea..5294de704 100644 --- a/src/common/tv_filters/atari_ntsc.h +++ b/src/common/tv_filters/atari_ntsc.h @@ -56,7 +56,7 @@ extern atari_ntsc_setup_t const atari_ntsc_svideo; /* color bleeding only */ extern atari_ntsc_setup_t const atari_ntsc_rgb; /* crisp image */ extern atari_ntsc_setup_t const atari_ntsc_bad; /* badly adjusted TV */ -enum { atari_ntsc_palette_size = 128 }; +enum { atari_ntsc_palette_size = 256 }; /* Initializes and adjusts parameters. Can be called multiple times on the same atari_ntsc_t object. Can pass NULL for either parameter. */ @@ -130,7 +130,7 @@ struct atari_ntsc_t { atari_ntsc_rgb_t table [atari_ntsc_palette_size] [atari_ntsc_entry_size]; }; -#define ATARI_NTSC_ENTRY_( ntsc, n ) (ntsc)->table [n >> 1 & 0x7F] +#define ATARI_NTSC_ENTRY_( ntsc, n ) (ntsc)->table [n] /* common 3->7 ntsc macros */ #define ATARI_NTSC_BEGIN_ROW_6_( pixel0, pixel1, ENTRY, table ) \