- The PPU generates the RAM palette index for use with a certain pixel. Example: ppu_pattern = 0001b ($3F01 color). This way, on emulation:
pixel_color_index = pallete_ram[ ppu_pattern ];
Let's say the color is $0A; if we're using a bitmap with 16-bit color depth, well... I use a table to convert the color from 8 to 16 bits...
pixel_16bit_color = palette_16[ pixel_color_index ];
Then...
bitmap = pixel_16bit_color.
I wonder if there's a faster way to handle this... -_-;;
pixel_color_index = pallete_ram[ ppu_pattern ];
Let's say the color is $0A; if we're using a bitmap with 16-bit color depth, well... I use a table to convert the color from 8 to 16 bits...
pixel_16bit_color = palette_16[ pixel_color_index ];
Then...
bitmap = pixel_16bit_color.
I wonder if there's a faster way to handle this... -_-;;