ColinPitrat / caprice32

An emulator of the Amstrad CPC 8bit home computer range.
GNU General Public License v2.0
147 stars 32 forks source link

Burning rubber is displayed in color even though the CPC is set to black and white #203

Open cpcbegin opened 3 years ago

cpcbegin commented 3 years ago

You can see on this video at this point.

I try the lastest code of april 9, 2021 compiled in GNU/Linux (Ubuntu Mate 20.04).

ColinPitrat commented 3 years ago

Interesting. I checked and this is an old bug, not introduced by the migration to SDL2.

ColinPitrat commented 3 years ago

The problem is that in asic.cpp, when we set the palette, we do not check CPC.scr_tube. There's actually a TODO for it:

// TODO: deduplicate with code in video_set_palette + make it work in monochrome
ColinPitrat commented 3 years ago

The problem is that the Plus mode offers 4096 colors instead of just 32, so we need some generic code to convert the colors. Fortunately, https://github.com/ColinPitrat/caprice32/issues/135 provides just that. Currently we support two green modes but with the Plus, we may have to force the libretro one ... Or manage to find a formula that reproduces the original Caprice32 green mode.