From 267dd59a59d5198b308fa2c6022e7bd960f30aa3 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 27 Oct 2020 22:31:58 -0400 Subject: [PATCH] Gets as far as seemingly yet another memory-map setting. Tomorrow, maybe? --- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 2f4a53e1f..6f2f734ec 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -85,11 +85,25 @@ 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); + switch(address & 0xffff) { + + // New video register. + case 0xc029: + if(isReadOperation(operation)) { + *value = 0; + } else { + printf("New video: %02x\n", *value); + // TODO: this bit should affect memory bank selection, somehow? + // Cf. Page 90. + } + break; + + default: + // TODO: all other IO accesses. + printf("Unhandled IO: %04x\n", address); + assert(false); + } } else { if(isReadOperation(operation)) { MemoryMapRead(region, address, value); @@ -98,6 +112,8 @@ class ConcreteMachine: } } + printf("%06x [%02x]\n", address, *value); + Cycles duration = Cycles(5); // TODO: determine the cost of this access.