1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-23 06:28:59 +00:00

The vertical blank flag now works again.

This commit is contained in:
Thomas Harte 2016-05-17 22:02:57 -04:00
parent a1e63e8320
commit b8708b805c

View File

@ -217,7 +217,7 @@ void Machine::output_pixels(unsigned int count)
{
OutputState state;
// determine which output will start in four cycles
// determine which output state will be active in four cycles from now
switch(_horizontalTimer >> 2)
{
case 56: case 0: case 1: case 2: state = OutputState::Blank; break;
@ -235,6 +235,11 @@ void Machine::output_pixels(unsigned int count)
state = (state = OutputState::Sync) ? OutputState::Blank : OutputState::Sync;
}
// honour the vertical blank flag
if(_vBlankEnabled && state == OutputState::Pixel) {
state = OutputState::Blank;
}
// write that state as the one that will become effective in four clocks
_upcomingEvents[(_upcomingEventsPointer+4)%number_of_upcoming_events].state = state;
@ -352,13 +357,6 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
output_pixels(cycles_run_for * 3);
// if(_hMoveWillCount) {
// _hMoveCounter = 0x0f;
// _hMoveFlags = 0x1f;
// _hMoveIsCounting = true;
// _hMoveWillCount = false;
// }
if(operation != CPU6502::BusOperation::Ready) {
// check for a paging access