From 43448014b11a8627bd95ff174a224b9820907460 Mon Sep 17 00:00:00 2001 From: Lawrence Kesteloot Date: Sun, 5 Aug 2018 23:17:00 -0700 Subject: [PATCH] Add ORA (ind) 65C02 instructions. --- apple2e.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apple2e.cpp b/apple2e.cpp index 01b569e..530f46d 100644 --- a/apple2e.cpp +++ b/apple2e.cpp @@ -2190,6 +2190,14 @@ struct CPU6502 break; } + case 0x12: { // ORA (ind), 65C02 instruction + unsigned char zpg = read_pc_inc(bus); + int addr = bus.read(zpg) + bus.read((zpg + 1) & 0xFF) * 256; + m = bus.read(addr); + set_flags(N | Z, a = a | m); + break; + } + case 0x05: { // ORA zpg unsigned char zpg = read_pc_inc(bus); m = bus.read(zpg); @@ -2750,7 +2758,7 @@ struct CPU6502 } default: - printf("unhandled instruction %02X\n", inst); + printf("unhandled instruction %02X at %04X\n", inst, pc - 1); fflush(stdout); exit(1); } if(debug & DEBUG_STATE) {