Hello,
I'm developing a nes emulator in c++ and recently finished my Cpu emulation.I tried running nestest in Automation mode and got it to the point where it hit the last intruction, but still has Error code 15 in $2, And when looking at the logs in winmerge i saw that the accumulator is different from the known good log, starting at ce1e.(I formatted both logs because i didn't want to adjust the logging for each intruction adding "XX XX LDA $XX")
This is because the Lda instruction loads a value from $0180 (a stack adress) which i verified in the debugger is zero at the time of execution. Now i can't figure out why because i already checked all the stack instructions before it and they all seem fine.
Has anyone else had a similar issue, or know what might solve this problem?
Nestest Accumulator missmatch
Moderator: Moderators
Re: Nestest Accumulator missmatch
But it shouldn't be zero, because at address $CE06 (which is a PHA instruction) it gets set to #$33 (because A=$33 and SP=$80).
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: Nestest Accumulator missmatch
Yes, but for me it gets pulled of the stack at $CE14 (which happens in the nestest log to) before it can be loaded into the accumulator at $CE1E. This is how the stack looks after pushing the $33 to $0180 at $CE06(numbers in decimal):
is it supposed to look like that? Unfortunately nestest doesn't provide a log of the stack at every cycle, so i can't really check.Re: Nestest Accumulator missmatch
Pulling a value from the stack doesn't change the contents of the stack memory.
Re: Nestest Accumulator missmatch
thanks i didn't know that, that fixed my problem!