I know this kind of thing has been asked before, but why haven't some of the rarer illegal opcodes been tested before. I know that some people say the the opcodes in the 2A03 are identical to those of the 6502 across the whole board, and others say they are not. Regardless, why have they not been tested before, or are there any test ROMs out now? It seems to me the following opcodes (including the legal BRK one) are yet to be tested; AAC, AAX, ARR, ASR, ATX, AXA, AXS, LAR, SXA, SYA, XAA and XAS (opcode names taken from here). As for the KIL opcode, I think that it could be emulated, using reset to pull the CPU out of its stuck state and back to reality, with some code at the reset vector to carry on where it left off (perhaps a message saying 'If you can read this then...).
I ask this mainly because I have passed all of nestest apart from my ISC which is supposed to be increment a memory address and then perform a SBC with the value.
But all I get in nestest is a fail ($BD) (which is utterly useless as it does not tell you what the actual problem is). I've got about three different documents each telling me to set/not set set flag x and so forth. What am I doing wrong?
I ask this mainly because I have passed all of nestest apart from my ISC which is supposed to be increment a memory address and then perform a SBC with the value.
Code:
CPU.Databus++;
temp = 1 - CPU.CF;
temp2 = (char)CPU.A8 - (char)CPU.Databus - temp;
if( temp2 < -128 || temp2 > 127 )
CPU.OF = 0x40; else CPU.OF = 0x00;
CPU.SF = CPU.ZF = CPU.A8 = CPU.CF = CPU.A8 - CPU.Databus - temp;
if( CPU.CF > -1 )
CPU.CF = 1; else CPU.CF = 0;
temp = 1 - CPU.CF;
temp2 = (char)CPU.A8 - (char)CPU.Databus - temp;
if( temp2 < -128 || temp2 > 127 )
CPU.OF = 0x40; else CPU.OF = 0x00;
CPU.SF = CPU.ZF = CPU.A8 = CPU.CF = CPU.A8 - CPU.Databus - temp;
if( CPU.CF > -1 )
CPU.CF = 1; else CPU.CF = 0;
But all I get in nestest is a fail ($BD) (which is utterly useless as it does not tell you what the actual problem is). I've got about three different documents each telling me to set/not set set flag x and so forth. What am I doing wrong?