diff --git a/apple2e.cpp b/apple2e.cpp index 45d1ad6..a39f800 100644 --- a/apple2e.cpp +++ b/apple2e.cpp @@ -501,6 +501,16 @@ struct CPU6502 break; } + case 0xB5: { + unsigned char zpg = read_pc_inc(bus); + if(debug & DEBUG_DECODE) printf("LDA %02x, X\n", zpg); + int addr = zpg + y; + a = bus.read(addr & 0xFF); + flag_change(Z, a == 0x00); + flag_change(N, a & 0x80); + break; + } + case 0xB1: { unsigned char zpg = read_pc_inc(bus); if(debug & DEBUG_DECODE) printf("LDA (%02x), Y\n", zpg); @@ -768,6 +778,15 @@ struct CPU6502 break; } + case 0xB4: { + unsigned char zpg = read_pc_inc(bus); + if(debug & DEBUG_DECODE) printf("LDY %02X,X\n", zpg); + y = bus.read(zpg + x); + flag_change(N, y & 0x80); + flag_change(Z, y == 0); + break; + } + case 0xA4: { unsigned char zpg = read_pc_inc(bus); if(debug & DEBUG_DECODE) printf("LDY %02X\n", zpg);