This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

RAM/WRAM test

RAM/WRAM test
by on (#90113)
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?

by on (#90115)
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.

by on (#90136)
Quote:
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.

by on (#90138)
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.