1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-28 09:54:49 +00:00

Don't lose brown upon a blink.

This commit is contained in:
Thomas Harte 2023-12-07 14:53:59 -05:00
parent e691cc8723
commit 75b6030516

View File

@ -306,6 +306,9 @@ class CGA {
// Apply blink or background intensity.
if(control_ & 0x20) {
// Potentially remap dark yellow to brown.
colours[0] = yellow_to_brown(colours[0]);
if((attributes & 0x80) && (state.field_count & 16)) {
std::swap(colours[0], colours[1]);
}
@ -315,9 +318,6 @@ class CGA {
}
}
// Potentially remap dark yellow to brown.
colours[0] = yellow_to_brown(colours[0]);
// Draw according to ROM contents.
pixel_pointer[0] = (row & 0x80) ? colours[1] : colours[0];
pixel_pointer[1] = (row & 0x40) ? colours[1] : colours[0];