mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-28 09:54:49 +00:00
ZX80/1: fix initial key state, wait line when NMI disabled.
This commit is contained in:
parent
62949d2f8b
commit
f05260b839
@ -101,6 +101,8 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
Memory::Fuzz(ram_);
|
Memory::Fuzz(ram_);
|
||||||
|
|
||||||
|
// Ensure valid initial key state.
|
||||||
|
clear_all_keys();
|
||||||
if(!target.loading_command.empty()) {
|
if(!target.loading_command.empty()) {
|
||||||
type_string(target.loading_command);
|
type_string(target.loading_command);
|
||||||
should_autorun_ = true;
|
should_autorun_ = true;
|
||||||
@ -163,6 +165,7 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
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(!nmi_is_enabled_) z80_.set_wait_line(false);
|
||||||
|
|
||||||
// The below emulates the ZonX AY expansion device.
|
// The below emulates the ZonX AY expansion device.
|
||||||
if constexpr (is_zx81) {
|
if constexpr (is_zx81) {
|
||||||
@ -255,8 +258,6 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
should_autorun_ = false;
|
should_autorun_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(address >= 0x24d && address < 0x256) printf("PC: %04x\n", address);
|
|
||||||
|
|
||||||
// Check for automatic tape control.
|
// Check for automatic tape control.
|
||||||
if(use_automatic_tape_motor_control_) {
|
if(use_automatic_tape_motor_control_) {
|
||||||
tape_player_.set_motor_control((address >= automatic_tape_motor_start_address_) && (address < automatic_tape_motor_end_address_));
|
tape_player_.set_motor_control((address >= automatic_tape_motor_start_address_) && (address < automatic_tape_motor_end_address_));
|
||||||
|
Loading…
Reference in New Issue
Block a user