1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-10 11:25:23 +00:00

Ensures neither the ColecoVision nor the MSX processes mid-cycles.

This commit is contained in:
Thomas Harte
2018-09-21 22:53:35 -04:00
parent e511261b04
commit d9e65cd758
2 changed files with 276 additions and 271 deletions

View File

@@ -197,6 +197,8 @@ class ConcreteMachine:
time_since_vdp_update_ += length;
time_since_sn76489_update_ += length;
// Act only if necessary.
if(cycle.is_terminal()) {
uint16_t address = cycle.address ? *cycle.address : 0x0000;
switch(cycle.operation) {
case CPU::Z80::PartialMachineCycle::ReadOpcode:
@@ -323,6 +325,7 @@ class ConcreteMachine:
default: break;
}
}
if(time_until_interrupt_ > 0) {
time_until_interrupt_ -= length;

View File

@@ -361,6 +361,7 @@ class ConcreteMachine:
memory_slots_[2].cycles_since_update += total_length;
memory_slots_[3].cycles_since_update += total_length;
if(cycle.is_terminal()) {
uint16_t address = cycle.address ? *cycle.address : 0x0000;
switch(cycle.operation) {
case CPU::Z80::PartialMachineCycle::ReadOpcode:
@@ -539,6 +540,7 @@ class ConcreteMachine:
default: break;
}
}
if(!tape_player_is_sleeping_)
tape_player_.run_for(cycle.length.as_int());