1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Made an attempt to prevent spurious border colour pushes.

This commit is contained in:
Thomas Harte 2016-06-29 21:22:26 -04:00
parent ff53accca0
commit 5c85366de2

View File

@ -129,14 +129,17 @@ void MOS6560::set_register(int address, uint8_t value)
break;
case 0xf:
if(_this_state == State::Border)
{
uint8_t new_border_colour = _colours[value & 0x07];
if(_this_state == State::Border && new_border_colour != _registers.borderColour)
{
output_border(_cycles_in_state * 4);
_cycles_in_state = 0;
}
_registers.invertedCells = !((value >> 3)&1);
_registers.borderColour = _colours[value & 0x07];
_registers.borderColour = new_border_colour;
_registers.backgroundColour = _colours[value >> 4];
}
break;
// TODO: the lightpen, etc