From 7c95c0f6c4a3f49c761c4dd55b81f037ac7c3703 Mon Sep 17 00:00:00 2001 From: tomcw Date: Sat, 6 Apr 2019 11:26:33 +0100 Subject: [PATCH] Fix read so that trigger paddles 555 timers reset (before was just ) --- source/Memory.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Memory.cpp b/source/Memory.cpp index 7beca0b3..9b63b340 100644 --- a/source/Memory.cpp +++ b/source/Memory.cpp @@ -552,9 +552,12 @@ static BYTE __stdcall IOWrite_C06x(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULON static BYTE __stdcall IORead_C07x(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles) { + // Apple//e TRM, pg-258: "Reading or writing any address in the range $C070-$C07F also triggers the paddle time and resets the VBLINT(*)." (*) //c only! + JoyResetPosition(pc, addr, bWrite, d, nExecutedCycles); //$C07X Analog input reset + switch (addr & 0xf) { - case 0x0: return JoyResetPosition(pc, addr, bWrite, d, nExecutedCycles); //$C070 Analog input reset + case 0x0: break; case 0x1: return IO_Null(pc, addr, bWrite, d, nExecutedCycles); case 0x2: return IO_Null(pc, addr, bWrite, d, nExecutedCycles); case 0x3: return IO_Null(pc, addr, bWrite, d, nExecutedCycles); @@ -580,7 +583,7 @@ static BYTE __stdcall IORead_C07x(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG static BYTE __stdcall IOWrite_C07x(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles) { // Apple//e TRM, pg-258: "Reading or writing any address in the range $C070-$C07F also triggers the paddle time and resets the VBLINT(*)." (*) //c only! - JoyResetPosition(pc, addr, bWrite, d, nExecutedCycles); + JoyResetPosition(pc, addr, bWrite, d, nExecutedCycles); //$C07X Analog input reset switch (addr & 0xf) {