mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-17 17:25:18 +00:00
Slightly simplified ready line release logic.
This commit is contained in:
parent
82f392fada
commit
77ed4ddc05
@ -63,9 +63,6 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
|||||||
cycles_since_speaker_update_ += cycles_run_for;
|
cycles_since_speaker_update_ += cycles_run_for;
|
||||||
cycles_since_video_update_ += cycles_run_for;
|
cycles_since_video_update_ += cycles_run_for;
|
||||||
|
|
||||||
if(!tia_->get_cycles_until_horizontal_blank(cycles_since_video_update_))
|
|
||||||
set_ready_line(false);
|
|
||||||
|
|
||||||
if(operation != CPU6502::BusOperation::Ready) {
|
if(operation != CPU6502::BusOperation::Ready) {
|
||||||
|
|
||||||
// check for a paging access
|
// check for a paging access
|
||||||
@ -137,10 +134,7 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
|||||||
case 0x00: update_video(); tia_->set_sync(*value & 0x02); break;
|
case 0x00: update_video(); tia_->set_sync(*value & 0x02); break;
|
||||||
case 0x01: update_video(); tia_->set_blank(*value & 0x02); break;
|
case 0x01: update_video(); tia_->set_blank(*value & 0x02); break;
|
||||||
|
|
||||||
case 0x02:
|
case 0x02: set_ready_line(true); break;
|
||||||
if(tia_->get_cycles_until_horizontal_blank(cycles_since_video_update_))
|
|
||||||
set_ready_line(true);
|
|
||||||
break;
|
|
||||||
case 0x03: update_video(); tia_->reset_horizontal_counter(); break;
|
case 0x03: update_video(); tia_->reset_horizontal_counter(); break;
|
||||||
// TODO: audio will now be out of synchronisation — fix
|
// TODO: audio will now be out of synchronisation — fix
|
||||||
|
|
||||||
@ -204,6 +198,7 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!tia_->get_cycles_until_horizontal_blank(cycles_since_video_update_)) set_ready_line(false);
|
||||||
mos6532_.run_for_cycles(cycles_run_for / 3);
|
mos6532_.run_for_cycles(cycles_run_for / 3);
|
||||||
|
|
||||||
return cycles_run_for / 3;
|
return cycles_run_for / 3;
|
||||||
|
Loading…
Reference in New Issue
Block a user