mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-28 07:29:45 +00:00
Moved line counter reset logic; I think this is actually correct.
This commit is contained in:
parent
4509c3ce34
commit
87658e83c1
@ -77,8 +77,10 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) {
|
|||||||
case CPU::Z80::PartialMachineCycle::Output:
|
case CPU::Z80::PartialMachineCycle::Output:
|
||||||
if(!(address & 2)) nmi_is_enabled_ = false;
|
if(!(address & 2)) nmi_is_enabled_ = false;
|
||||||
if(!(address & 1)) nmi_is_enabled_ = is_zx81_;
|
if(!(address & 1)) nmi_is_enabled_ = is_zx81_;
|
||||||
if((address&3) == 3) line_counter_ = 0;
|
|
||||||
if(!nmi_is_enabled_) {
|
if(!nmi_is_enabled_) {
|
||||||
|
// Line counter reset is held low while vsync is active; simulate that lazily by performing
|
||||||
|
// an instant reset upon the transition from active to inactive.
|
||||||
|
if(vsync_) line_counter_ = 0;
|
||||||
set_vsync(false);
|
set_vsync(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user