Skip to content

Commit c5fd9d5

Browse files
committed
More illegal opcode fixes.
1 parent fc2b510 commit c5fd9d5

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/MOS6502_illegal.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,18 @@ void MOS6502::RunIllegal(BYTE opcode) {
145145
}
146146

147147
// ---------------------------------------------------------------
148-
// ANE / XAA — A = (A | magic) & X & #imm (unstable on hardware)
149-
// LXA — A = X = (A | magic) & #imm (unstable on hardware)
150-
// The "magic" constant varies by die/temperature; 0xEE is the value
151-
// Blargg's test ROMs assume.
148+
// ANE / XAA (0x8B) — A = X & #imm
149+
// LXA / ATX (0xAB) — A = X = #imm
152150
// ---------------------------------------------------------------
153151

154152
case 0x8B:
155153
PollInterrupts();
156-
A = Flags((A | 0xEE) & X & Fetch());
154+
A = Flags(X & Fetch());
157155
break;
158156

159157
case 0xAB:
160158
PollInterrupts();
161-
A = X = Flags((A | 0xEE) & Fetch());
159+
A = X = Flags(Fetch());
162160
break;
163161

164162
// ---------------------------------------------------------------

0 commit comments

Comments
 (0)