nesdev.com
http://forums.nesdev.com/

Simple ROM to test power on or reset RAM state
http://forums.nesdev.com/viewtopic.php?f=3&t=13334
Page 1 of 1

Author:  rainwarrior [ Mon Oct 05, 2015 3:01 pm ]
Post subject:  Simple ROM to test power on or reset RAM state

I found this ROM I made a while back for testing the RAM startup/reset state on my NES. Sharing it in case anybody would find it useful.

It clobbers the low 3 bytes of ZP, and also the top couple of bytes of the stack page, but otherwise just shows RAM on the screen, and you can press up/down to browse the 8 pages. (B and A fill the page with ascending or descending values, was used to test reset state.)

Attachments:
ram_retain.zip [4.53 KiB]
Downloaded 192 times

Author:  rainwarrior [ Mon Oct 05, 2015 3:09 pm ]
Post subject:  Re: Simple ROM to test power on or reset RAM state

I posted on the Wiki about this, but just in case it's useful to anybody here:

Quote:
I tested my NES and Famicom today with a simple ROM that just displays the contents of RAM. I get widely varying results at power-on. I tried leaving the system off for varying amounts of time between powerings, but I don't see much consistency at all. Here's some examples of what I've seen:
  • Mostly $FF.
  • Mostly some specific byte, e.g. $E7.
  • Repeating patterns like $00 $FF $00 FF, often in consistent lines of 16 or 32 bytes.
  • Often I get groups with a specific byte value, especially in columns (using rows of 16).

All of these patterns are heavily subject to noise. Sometimes a lot of noise, sometimes only a little. Really I don't see much consistent behaviour at all on my NES.

My Famicom usually powers up with mostly a repeating 16 byte pattern of 00FF00FF00FF00FFFF00FF00FF00FF00, often with one or many columns of bytes (using rows of 16) that look completely random in contrast to that pattern. Occasionally the Famicom powers up with different patterns than this too.

The recommendation for specific values at $0008/9/A/F seems bizarre to me. Why is this in the article at all? These bytes are not particularly consistent on either of my machines, and certainly don't match these magic values. A few quick power cycles sometimes seems to leave some bytes alone, but I don't see anything special about 8/9/A/F?

I'm not certain the idea that it should be "mostly FF" is particularly good either. On my Famicom, it looks like 50/50 for a randomly selected bit (though with a high probability of fitting the pattern listed for any specific bit). On my NES, I'd guess there's might be a slight bias toward 1 bits, but I really don't think that's a very useful piece of information given how random it is, and how often there are repetitive (and different) patterns in the bits.

I'm curious what other people might see on their machines.

Author:  lidnariq [ Mon Oct 05, 2015 3:13 pm ]
Post subject:  Re: Simple ROM to test power on or reset RAM state

Your archive includes your build scripts but not the source code...

Author:  rainwarrior [ Mon Oct 05, 2015 3:18 pm ]
Post subject:  Re: Simple ROM to test power on or reset RAM state

Thanks. Fixed.

Author:  tokumaru [ Mon Oct 05, 2015 3:28 pm ]
Post subject:  Re: Simple ROM to test power on or reset RAM state

rainwarrior wrote:
  • Mostly $FF.
  • Mostly some specific byte, e.g. $E7.
  • Repeating patterns like $00 $FF $00 FF, often in consistent lines of 16 or 32 bytes.
  • Often I get groups with a specific byte value, especially in columns (using rows of 16).

I never expected the power up state of RAM to vary so much.

Author:  rainwarrior [ Mon Oct 05, 2015 3:43 pm ]
Post subject:  Re: Simple ROM to test power on or reset RAM state

Yeah, I'm completely baffled by it. I'm surprised how often I seem to get repeating 4 bit or 8 bit patterns, in many different arrangements. Every now and then it looks completely random, but most of the time it's got patterned groups-- but what really surprises me is how the patterns change! Maybe it has to do with the physical organization of the chip itself, like it seems like often every 16th bit has mostly the same value, or every 16th or 32nd byte has the same group, etc, but not always! Sometimes it's a pattern in mosty columns and then one column or a few columns are completely random looking.

Author:  Myask [ Mon Oct 05, 2015 8:08 pm ]
Post subject:  Re: Simple ROM to test power on or reset RAM state

Previous relevant topics.

Two more

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/