mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Switches strategy for the ZX80.
This commit is contained in:
parent
645d198bee
commit
371c26251c
@ -250,12 +250,8 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(should_autorun_ && address == print_status_address_) {
|
if(should_autorun_ && address == finished_load_address_) {
|
||||||
const uint16_t status_code = z80_.get_value_of_register(CPU::Z80::Register::A);
|
type_string("r \n");
|
||||||
const uint16_t line_number = 0; // TODO.
|
|
||||||
if(!status_code && !line_number) {
|
|
||||||
type_string("r \n");
|
|
||||||
}
|
|
||||||
should_autorun_ = false;
|
should_autorun_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,10 +427,12 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
static constexpr uint16_t automatic_tape_motor_start_address_ = is_zx81 ? 0x340 : 0x206;
|
static constexpr uint16_t automatic_tape_motor_start_address_ = is_zx81 ? 0x340 : 0x206;
|
||||||
static constexpr uint16_t automatic_tape_motor_end_address_ = is_zx81 ? 0x3c3 : 0x24d;
|
static constexpr uint16_t automatic_tape_motor_end_address_ = is_zx81 ? 0x3c3 : 0x24d;
|
||||||
|
|
||||||
// When automatically loading, if the PC gets to the print_status_address_ in order to print 0/0
|
// When automatically loading, if the PC gets to the finished_load_address_ in order to print 0/0
|
||||||
// after loading from tape (i.e. loading completed, in context) then the emulator will automatically
|
// (so it's anything that indicates that loading completed, but the program did not autorun) then the
|
||||||
// RUN whatever has been loaded.
|
// emulator will automatically RUN whatever has been loaded.
|
||||||
static constexpr uint16_t print_status_address_ = is_zx81 ? 0x6d1 : 0x4a8;
|
static constexpr uint16_t finished_load_address_ = is_zx81 ?
|
||||||
|
0x6d1 : // ZX81: this is the routine that prints 0/0 (i.e. success).
|
||||||
|
0x256; // ZX80: this is the start of the list command; the ZX80 lists a program after loading.
|
||||||
bool should_autorun_ = false;
|
bool should_autorun_ = false;
|
||||||
|
|
||||||
std::vector<uint8_t> ram_;
|
std::vector<uint8_t> ram_;
|
||||||
|
Loading…
Reference in New Issue
Block a user