mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Merge pull request #419 from TomHarte/ZXLineCounter
Simplifies the test for resetting the ZX80/81 line counter.
This commit is contained in:
commit
af0cf0d40a
@ -124,14 +124,12 @@ template<bool is_zx81> class ConcreteMachine:
|
||||
bool is_opcode_read = false;
|
||||
switch(cycle.operation) {
|
||||
case CPU::Z80::PartialMachineCycle::Output:
|
||||
if(!(address & 2)) nmi_is_enabled_ = false;
|
||||
if(!(address & 1)) nmi_is_enabled_ = is_zx81_;
|
||||
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;
|
||||
line_counter_ = 0;
|
||||
set_vsync(false);
|
||||
}
|
||||
if(!(address & 2)) nmi_is_enabled_ = false;
|
||||
if(!(address & 1)) nmi_is_enabled_ = is_zx81_;
|
||||
|
||||
// The below emulates the ZonX AY expansion device.
|
||||
if(is_zx81) {
|
||||
|
Loading…
Reference in New Issue
Block a user