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_; };