From 8c1bfa5a0589503d23e63058735a0735bccaee62 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 7 Jan 2016 20:36:27 -0500 Subject: [PATCH] This is the bare minimum to prove that the ROM is trying properly to boot. --- Machines/Electron/Electron.cpp | 40 +++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 7967c06a6..1d6a16378 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -23,8 +23,6 @@ Machine::~Machine() unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value) { - printf("%04x\n", address); - if(address < 32768) { if(isReadOperation(operation)) @@ -40,7 +38,43 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin { if(address > 49152) { - if(isReadOperation(operation)) *value = os[address - 49152]; + if((address & 0xff00) == 0xfe00) + { + printf("%c: %02x: ", isReadOperation(operation) ? 'r' : 'w', *value); + + switch(address&0xf) + { + case 0x0: + printf("Interrupt status or control\n"); + break; + case 0x1: + break; + case 0x2: + case 0x3: + printf("Screen start address\n"); + break; + case 0x4: + printf("Cassette\n"); + break; + case 0x5: + printf("Interrupt clear and paging\n"); + break; + case 0x6: + printf("Counter\n"); + break; + case 0x7: + printf("Misc. control\n"); + break; + default: + printf("Palette\n"); + break; + } + } + else + { + if(isReadOperation(operation)) + *value = os[address - 49152]; + } } else {