1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-09 17:29:36 +00:00

Fix 1: _horizontalTimer should be treated as read only out here.

This commit is contained in:
Thomas Harte 2015-07-19 16:51:11 -04:00
parent 6f78ecdc9c
commit 4d1e410150

View File

@ -129,12 +129,9 @@ void Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t ad
case 1: _vBlankEnabled = !!(*value & 0x02); break;
case 2: {
int pixelsToRun = 228 - _horizontalTimer;
_piaTimerValue -= pixelsToRun;
if (pixelsToRun > 160) pixelsToRun = 160;
output_pixels(pixelsToRun);
_horizontalTimer = 228;
const int cyclesToRunFor = 228 - _horizontalTimer;
_piaTimerValue -= cyclesToRunFor;
output_pixels(cyclesToRunFor);
} break;
case 3: _horizontalTimer = 0; break;