More instructions: DOS Master boots (crashes to Monitor)

ORA abs, Y
ROR abs, X
This commit is contained in:
Brad Grantham 2016-11-30 10:42:36 -08:00
parent 824459f575
commit 620cc1aa04

View File

@ -1770,6 +1770,15 @@ struct CPU6502
break; 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 case 0x1D: { // ORA abs, X
int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256; int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256;
m = bus.read(addr + x); m = bus.read(addr + x);
@ -1856,6 +1865,16 @@ struct CPU6502
break; 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 case 0x3E: { // ROL abs, X
int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256; int addr = read_pc_inc(bus) + read_pc_inc(bus) * 256;
m = bus.read(addr + x); m = bus.read(addr + x);