Question about Memblers' NES Test Program v1.3

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

Question about Memblers' NES Test Program v1.3

Post by jwdonal »

I have a question regarding membler's NES register/memory test program. You can find it here:

http://nesdev.com/test.zip

I think there may be a bug in it. When I run this on my emulator, no matter what value I enter into any register the program _always_ writes all 1's to register $4015. You don't even have to change anything after boot up and you don't even have to have address $4015 listed on the screen. Just load the ROM and press 'B' (which is apparently how you're supposed to say, "Go write the data I entered").

It's really weird, it just always writes 11111 to bits [4:0] (the only bits used in $4015 writes) no matter I do. I suppose it could be something wrong with my emulator but I can't see what would be causing something so incorrect as this. And I also tested writing to the $40XX registers with my own test ROM and did not see this problem.

Can someone verify that they see/have the same issue? I don't know of a software emulator that will show you the state of the memory/registers its using. Is there one that does this?

Pz!

Jonathon
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox »

It was probably primarily meant to test the APU registers.. so it's simply enabling all channels every time. Just guessing.

Have you tried using an emulator with a debugger like Nintendulator? You can easily set breakpoints on memory access (like $4015) to see what the program is doing.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Memblers
Site Admin
Posts: 3902
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

Woah, that was a long time ago. thefox is right, when I wrote it I only cared about the sound registers. I forgot that I always had it writing to $4015. I didn't check the source/disassembly (I'm at work), but that sounds right to me.
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

ok

Post by jwdonal »

Oh OK. Well, that explains that then. Haha. There was nothing in the Wiki description to let me know this. It just sounded like a generic register/RAM test app to me. Thanks for the info!

Members, is there any chance of getting the source code for this? Or if you could modify the source to treat $4015 just like any other register/memory address (i.e. only write the value that the user wants to write to it). It would make the app even more useful - especially for APU debugging, since the user could have total customizable control. Any chance of this? Please? :)

Thanks!

Jonathon
User avatar
Memblers
Site Admin
Posts: 3902
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

I have it but it's not the same version, in 2005 I put it back into use for testing my Squeedo sound synth, so there is a CLI instruction you should remove as well as other stuff like writes/reads to $5xxx. I don't know if I had changed anything else. This is a really long-lived test program, heheh.

Source is in pcm.s
http://www.parodius.com/~memblers/nes/testregs.zip
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

awesome!

Post by jwdonal »

A-W-E-S-O-M-E! Thanks so much Memblers!

I'm not surprised the app is so long-lived. It has a very simple interface but is also incredibly useful at the same time.

Thanks again!

Jonathon
Post Reply