nestest - tests results location

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Darek554
Posts: 7
Joined: Tue Apr 13, 2021 11:03 pm

nestest - tests results location

Post by Darek554 »

Hi guys, sorry for spam, but this is only place i can get answers for my questions :D

So i have implemented CPU and fixed some bugs, now logs from my emulator looks pretty good, but i don't know are everything 100% accurate, because maybe i've missed something.
I know the results are stored somewhere - https://github.com/christopherpow/nes-t ... estest.txt - but i don't know am i correct about where these results are stored and how.

I understand it like this, results of tests are placed in location 0x0002 and 0x0003, then value of those bytes is determined by result of certain test for example, if 0x0002 byte has value 0x11 does it means that PHP instruction fails to set bits? Am i correct or missed something?

My second question is - because i don't want to create another topic - where to go next when i've implemented CPU? Mappers, PPU?

Thanks for help :)
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: nestest - tests results location

Post by Quietust »

Darek554 wrote: Tue Apr 20, 2021 5:15 am I understand it like this, results of tests are placed in location 0x0002 and 0x0003, then value of those bytes is determined by result of certain test for example, if 0x0002 byte has value 0x11 does it means that PHP instruction fails to set bits? Am i correct or missed something?
As the document explains, the number you see is for the last error it encountered, so whenever you see a nonzero value you should fix your CPU and then run it again, and eventually you should get to a point where both bytes are zero at the end of the test, and at that point you can be reasonably certain that your CPU is mostly bug-free.

However, some people have discovered that there are bugs that nestest does not catch, which is why there are a bunch of other CPU tests here on the wiki.
Darek554 wrote: Tue Apr 20, 2021 5:15 am My second question is - because i don't want to create another topic - where to go next when i've implemented CPU? Mappers, PPU?
Once you've got a working CPU, you should definitely work on the PPU next so you can see if programs are running correctly. You'll also want controller support so you can provide input, and after that you can work on audio. There are plenty of NROM games, so mapper support can easily wait until later.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
Darek554
Posts: 7
Joined: Tue Apr 13, 2021 11:03 pm

Re: nestest - tests results location

Post by Darek554 »

Thanks :D
Post Reply