It is currently Sat Dec 16, 2017 5:35 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Oct 05, 2015 3:01 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
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


Last edited by rainwarrior on Mon Oct 05, 2015 3:18 pm, edited 1 time in total.
Top
 Profile  
 
PostPosted: Mon Oct 05, 2015 3:09 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
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.


Top
 Profile  
 
PostPosted: Mon Oct 05, 2015 3:13 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6535
Location: Seattle
Your archive includes your build scripts but not the source code...


Top
 Profile  
 
PostPosted: Mon Oct 05, 2015 3:18 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
Thanks. Fixed.


Top
 Profile  
 
PostPosted: Mon Oct 05, 2015 3:28 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10166
Location: Rio de Janeiro - Brazil
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.


Top
 Profile  
 
PostPosted: Mon Oct 05, 2015 3:43 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
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.


Top
 Profile  
 
PostPosted: Mon Oct 05, 2015 8:08 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
Previous relevant topics.

Two more


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group