Post subject: Question about initial memory state (NES)
Jigwally
He/Him
Active player (428)
Joined: 3/11/2012
Posts: 119
I have been reading about games that don't initialize all of their RAM properly & I was hoping to learn more info about how the memory values start out. Are they essentially assigned random byte values (00-FF) or are there certain values that are more common or impossible? I was still thinking about the pre-beaten boss incident w/ Blaster Master JP (Meta Fight) & I saw that the way the game knows if it's performing a soft reset is if #$23 is written into $3F4; otherwise the game knows to clear out memory $000-$7FFF. However it seems to me that if you happened to have a boot-up state where this memory address just happened to be #$23, the game would mistake a power-on for a soft reset & retain whatever happened to be initially set for its other flags. Does this make sense or am I misunderstanding how this works?
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
This article should answer all your questions: http://tasvideos.org/Nach/MemoryInit.html
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
The initial state of RAM is an interesting topic which has been discussed a few times on this site. For starters, in general, the initial state of RAM is not all 0's and not all 1's (speaking in bits of course). So if the boot state just happens to have the values the game uses to determine a soft reset, then yes, the game will acknowledge it as such. Now, the question how likely this is to happen is a very different one. In general, there isn't a 50/50 chance of a bit being 0 or 1 on boot. Even the assumption that every console would be the same is wrong. For more information on that, it's indeed best to read Nach's page on that. Since our emulators want to assure determinism, they use a fixed starting state. And due to the non-trivial randomness involved, we don't allow setting a custom starting state for an advantage.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)