From 885fae153416fb0b2877330bb5942a1af2a9f9a8 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 28 Oct 2020 21:23:45 -0400 Subject: [PATCH] Stubs in a speed register. --- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 080e3ee71..5ec91ca81 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -69,6 +69,9 @@ class ConcreteMachine: ram_.resize(ram_size * 1024); memory_.set_storage(ram_, rom_); + + // Sync up initial values. + memory_.set_speed_register(speed_register_); } void run_for(const Cycles cycles) override { @@ -99,6 +102,17 @@ class ConcreteMachine: } break; + // Speed register. + case 0xc036: + if(isReadOperation(operation)) { + *value = speed_register_; + } else { + memory_.set_speed_register(*value); + speed_register_ = *value; + printf("[Unimplemented] most of speed register: %02x\n", *value); + } + break; + default: // TODO: all other IO accesses. printf("Unhandled IO: %04x\n", address); @@ -136,9 +150,10 @@ class ConcreteMachine: int fast_access_phase_ = 0; int slow_access_phase_ = 0; + uint8_t speed_register_ = 0x00; + // MARK: - Memory storage. - // Actual memory storage. std::vector ram_; std::vector rom_; };