From 24c80060c88c80759a2b0f01a850747f31b8c2a0 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 20 Dec 2023 16:04:48 -0500 Subject: [PATCH] Revise guess on JMP (abs, x). --- Processors/6502/Implementation/6502Storage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Processors/6502/Implementation/6502Storage.cpp b/Processors/6502/Implementation/6502Storage.cpp index 1bb88d5c9..34aab45b5 100644 --- a/Processors/6502/Implementation/6502Storage.cpp +++ b/Processors/6502/Implementation/6502Storage.cpp @@ -346,11 +346,14 @@ ProcessorStorage::ProcessorStorage(Personality personality) { } // Correct JMP (abs) and install JMP (abs, x). + // + // Guess: JMP (abs, x) uses the faster abs,x of ASL, LSL, etc rather than the older, slower of INC and DEC. Install(0x6c, Program(CycleReadAddressHLoadAddressL, CycleReadPCLFromAddress, CycleReadPCHFromAddressLowInc, CycleReadPCHFromAddressFixed)); Install(0x7c, Program( CycleReadAddressHLoadAddressL, // (3) read second byte of (addr) - CycleAddXToAddressLowRead, // (4) calculate addr+x, read from (addr+x) with high byte not yet calculated - OperationCorrectAddressHigh, CycleReadPCLFromAddress, // (5) read from real (addr+x) + CycleAddYToAddressLow, + OperationCorrectAddressHigh, // (4?) read from incorrectly-calculated address + CycleReadPCLFromAddress, // (4/5) read from real (addr+x) CycleReadPCHFromAddressInc // (6) read from addr+x+1 ));