From 0a91ac5af5599a8b8848fd46eeb924e2f9c9e1c2 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 27 Oct 2020 22:09:45 -0400 Subject: [PATCH] Adds some extra notes, starts getting into trying to run the IIgs. --- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 5 +++-- Machines/Apple/AppleIIgs/MemoryMap.hpp | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index d29cd7855..2f4a53e1f 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -85,11 +85,12 @@ class ConcreteMachine: forceinline Cycles perform_bus_operation(const CPU::WDC65816::BusOperation operation, const uint32_t address, uint8_t *const value) { const auto ®ion = MemoryMapRegion(memory_, address); + printf("%06x\n", address); + if(region.flags & MemoryMap::Region::IsIO) { // TODO: all IO accesses. + assert(false); } else { - // TODO: branching below is predicated on the idea that an extra 64kb of scratch write area - // and 64kb of 0xffs would be worse than branching due to the data set increase. Verify that? if(isReadOperation(operation)) { MemoryMapRead(region, address, value); } else { diff --git a/Machines/Apple/AppleIIgs/MemoryMap.hpp b/Machines/Apple/AppleIIgs/MemoryMap.hpp index a68d0aaa4..f6e171b90 100644 --- a/Machines/Apple/AppleIIgs/MemoryMap.hpp +++ b/Machines/Apple/AppleIIgs/MemoryMap.hpp @@ -204,6 +204,11 @@ class MemoryMap { } } + void access(uint16_t address, bool is_read) { + auxiliary_switches_.access(address, is_read); + if(address &0xfff0 == 0xc080) language_card_.access(address, is_read); + } + private: Apple::II::AuxiliaryMemorySwitches auxiliary_switches_; Apple::II::LanguageCardSwitches language_card_; @@ -436,6 +441,9 @@ class MemoryMap { // adjust as required. }; +// TODO: branching below on region.read/write is predicated on the idea that extra scratch space +// would be less efficient. Verify that? + #define MemoryMapRegion(map, address) map.regions[map.region_map[address >> 8]] #define MemoryMapRead(region, address, value) *value = region.read ? region.read[address] : 0xff #define MemoryMapWrite(map, region, address, value) \