From 78d3f650b2ca507e3d5376d3cad4d93df1901569 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Sun, 3 Dec 2023 21:03:44 +1100 Subject: making CPU more correct, STILL not working --- src/cpu/addressing.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cpu/addressing.c') diff --git a/src/cpu/addressing.c b/src/cpu/addressing.c index f381e51..fd9bf7e 100644 --- a/src/cpu/addressing.c +++ b/src/cpu/addressing.c @@ -11,13 +11,14 @@ void* current_instruction; address fAddressGetAddress(Addressing mode, short x) { switch(mode){ case eImplied: - case eIndirectAbsolute: case eRelative: case eImmediate: case eAccumulator: return 0x0000; case eAbsolute: return x; + case eIndirectAbsolute: + return GetMemory(x) + ((address)GetMemory(x+1) << 8); case eAbsoluteIndexedX: return x + X; case eAbsoluteIndexedY: -- cgit v1.2.3