From 620cc1aa04aa3eb4417d036315eeb10fb7c21276 Mon Sep 17 00:00:00 2001 From: Brad Grantham Date: Wed, 30 Nov 2016 10:42:36 -0800 Subject: [PATCH] More instructions: DOS Master boots (crashes to Monitor) ORA abs, Y ROR abs, X --- apple2e.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apple2e.cpp b/apple2e.cpp index 195e08b..7059afe 100644 --- a/apple2e.cpp +++ b/apple2e.cpp @@ -1770,6 +1770,15 @@ struct CPU6502 break; } + case 0x19: { // ORA abs, Y + int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256; + m = bus.read(addr + y); + if((addr + y) / 256 != addr / 256) + clk++; + set_flags(N | Z, a = a | m); + break; + } + case 0x1D: { // ORA abs, X int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256; m = bus.read(addr + x); @@ -1856,6 +1865,16 @@ struct CPU6502 break; } + case 0x7E: { // ROR abs, X + int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256; + m = bus.read(addr + x); + bool c = isset(C); + flag_change(C, m & 0x80); + set_flags(N | Z, m = (c ? 0x80 : 0x00) | (m >> 1)); + bus.write(addr + x, m); + break; + } + case 0x3E: { // ROL abs, X int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256; m = bus.read(addr + x);