1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-24 12:30:17 +00:00

Extends fast loading support to the just-introduced models.

This commit is contained in:
Thomas Harte 2021-04-15 17:31:42 -04:00
parent f10ec80153
commit f5c7746493

View File

@ -239,7 +239,7 @@ template<Model model> class ConcreteMachine:
// Fast loading: ROM version. // Fast loading: ROM version.
// //
// The below patches over part of the 'LD-BYTES' routine from the 48kb ROM. // The below patches over part of the 'LD-BYTES' routine from the 48kb ROM.
if(use_fast_tape_hack_ && address == 0x056b && read_pointers_[0] == &rom_[0xc000]) { if(use_fast_tape_hack_ && address == 0x056b && read_pointers_[0] == &rom_[classic_rom_offset()]) {
// Stop pressing enter, if neccessry. // Stop pressing enter, if neccessry.
if(duration_to_press_enter_ > Cycles(0)) { if(duration_to_press_enter_ > Cycles(0)) {
duration_to_press_enter_ = Cycles(0); duration_to_press_enter_ = Cycles(0);
@ -733,6 +733,22 @@ template<Model model> class ConcreteMachine:
return true; return true;
} }
static constexpr int classic_rom_offset() {
switch(model) {
case Model::SixteenK:
case Model::FortyEightK:
return 0x0000;
case Model::OneTwoEightK:
case Model::Plus2:
return 0x4000;
case Model::Plus2a:
case Model::Plus3:
return 0xc000;
}
}
// MARK: - Disc. // MARK: - Disc.
JustInTimeActor<Amstrad::FDC, Cycles> fdc_; JustInTimeActor<Amstrad::FDC, Cycles> fdc_;