From 6c54699c4406b0b675a00a3efb4b97e6d040f6ab Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 28 Oct 2020 22:07:34 -0400 Subject: [PATCH] Connects up an SCC. Thereby putting my IIgs into its first perpetual loop. Trying to do something with the SCC I haven't implemented yet perhaps? --- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 6da471b6b..229d35c9d 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -14,6 +14,9 @@ #include "../../../Analyser/Static/AppleIIgs/Target.hpp" #include "MemoryMap.hpp" +#include "../../../Components/8530/z8530.hpp" +#include "../../../Components/DiskII/IWM.hpp" + #include #include @@ -149,6 +152,15 @@ class ConcreteMachine: #undef LanguageRead #undef SwitchRead + // The SCC. + case 0xc038: case 0xc039: case 0xc03a: case 0xc03b: + if(isReadOperation(operation)) { + *value = scc_.read(int(address)); + } else { + scc_.write(int(address), *value); + } + break; + // These were all dealt with by the call to memory_.access. // TODO: subject to read data? Does vapour lock apply? case 0xc000: case 0xc001: case 0xc002: case 0xc003: case 0xc004: case 0xc005: @@ -206,6 +218,9 @@ class ConcreteMachine: std::vector ram_; std::vector rom_; + + // MARK: - Other components. + Zilog::SCC::z8530 scc_; }; }