Hello again everyone
I have been going through the step-debug mode in FCEU Ultra that has shown me that there is an improper thing going on in my emulator. I have dumped the code as I have been running it in an easy to read format... here it is (this is SMB1):
The problem is at address $8012, it should loop back to $800F, as it does in FCEU. At one point, I think it DID do this, and maybe I thought it was a bug. I am assuming that I am improperly calculating the flags at one point, but I was wondering if any of you could help me find out where. If you need any other information, i'd be glad to help.
Thanks!
I have been going through the step-debug mode in FCEU Ultra that has shown me that there is an improper thing going on in my emulator. I have dumped the code as I have been running it in an easy to read format... here it is (this is SMB1):
Code:
$8000 | implied6502 | SEI
[Accumulator: 0000] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8001 | implied6502 | CLD
[Accumulator: 0000] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8002 | immediate6502 | LDA $10
[Accumulator: 0010] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8004 | abs6502 | STA $00,$20
[Accumulator: 0010] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8007 | immediate6502 | LDX $FF
[Accumulator: 0010] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$8009 | implied6502 | TXS
[Accumulator: 0010] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$800A | abs6502 | LDA $02,$20
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$800D | relative6502 | BPL $FB
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$800F | abs6502 | LDA $02,$20
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$8012 | relative6502 | BPL $FB
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$8014 | immediate6502 | LDY $FE
[Accumulator: 2002] [X: FF] [Y: FE] [SP: FF] [FLAGS: 000000A4]
$8016 | immediate6502 | LDX $05
[Accumulator: 2002] [X: 05] [Y: FE] [SP: FF] [FLAGS: 00000024]
[Accumulator: 0000] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8001 | implied6502 | CLD
[Accumulator: 0000] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8002 | immediate6502 | LDA $10
[Accumulator: 0010] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8004 | abs6502 | STA $00,$20
[Accumulator: 0010] [X: 00] [Y: 00] [SP: FF] [FLAGS: 00000024]
$8007 | immediate6502 | LDX $FF
[Accumulator: 0010] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$8009 | implied6502 | TXS
[Accumulator: 0010] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$800A | abs6502 | LDA $02,$20
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$800D | relative6502 | BPL $FB
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$800F | abs6502 | LDA $02,$20
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$8012 | relative6502 | BPL $FB
[Accumulator: 2002] [X: FF] [Y: 00] [SP: FF] [FLAGS: 000000A4]
$8014 | immediate6502 | LDY $FE
[Accumulator: 2002] [X: FF] [Y: FE] [SP: FF] [FLAGS: 000000A4]
$8016 | immediate6502 | LDX $05
[Accumulator: 2002] [X: 05] [Y: FE] [SP: FF] [FLAGS: 00000024]
The problem is at address $8012, it should loop back to $800F, as it does in FCEU. At one point, I think it DID do this, and maybe I thought it was a bug. I am assuming that I am improperly calculating the flags at one point, but I was wondering if any of you could help me find out where. If you need any other information, i'd be glad to help.
Thanks!