RAM/WRAM test

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

Moderator: Moderators

Post Reply
sdwave
Posts: 27
Joined: Mon Feb 13, 2012 1:20 am

RAM/WRAM test

Post by sdwave » Fri Feb 17, 2012 5:46 pm

Have any of you written a test for MMC3 WRAM to ensure that each byte is functional? Would writing 00, test for 00, write ff, test for ff be sufficient?

User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Fri Feb 17, 2012 6:15 pm

No, I don't believe that is necessarily sufficient. Are you using WRAM with a battery to store data? If so you should generate a checksum to help ensure validity. You could also use a checksum as part of just verifying if RAM is working by writing a known pattern of data into RAM and then performing a checksum or other hashing operation.

You could also go ahead and just loop through every single byte writing every possible value and reading it back to see that it stores each value.

hcs
Posts: 31
Joined: Mon Nov 27, 2006 11:34 pm
Location: NYC
Contact:

Post by hcs » Sat Feb 18, 2012 5:35 am

You could also go ahead and just loop through every single byte writing every possible value and reading it back to see that it stores each value.
Which won't necessarily tell you if writing one byte isn't annihilating some other byte (though I don't know how common this might be with these types of RAM). Something like what memtest86 does, writing random data and then checking it again (several passes), might be a better bet. An LFSR would seem to be a good psuedo-random generator to try, as mentioned here.

2600
Posts: 95
Joined: Tue Aug 07, 2007 10:28 am

Post by 2600 » Sat Feb 18, 2012 6:17 am

I've been meaning to do something like this as well. The test programs by Nintendo may be a good spot to look. A program that where you could enter an address and a value would also be kinda useful.

Another suggestion is to write values like $A5 so that you can easily detect data lines.

Post Reply