CLChambers00 wrote:So from your first paragraph you seem to be saying that when you power off, this 002D address value is not retained but reverts to some kind of default value that is particular to the brand of chip used? And if so, why does it change or revert back this state, if it is power cycled quickly. Does it really bleed off so quickly?
There's nothing special about "this 002D address" (meaning: $002D isn't anything unique, it's just a memory address) when talking about the NES. It may be unique for a specific game, but not the console. It's just an address located within the $0000 to $07FF memory region of the NES, which is mapped to a physical 2KByte SRAM chip within the NES console itself. The NES memory map is here:
https://wiki.nesdev.com/w/index.php/CPU_memory_map
Nintendo used whatever SRAM chips were available on the market at the time (this is not uncommon even today, for any company). They didn't stick with just one company, but they probably used a set list of manufacturers (i.e. they probably didn't just go to Akihabara and buy random chips some shady guy on the street was selling ;-) ); I believe some companies/brands were mentioned in the past but I can't remember who they were. Anyway, unbeknownst to folks who weren't old enough to remember, during the 80s, particularly around the time of the Famicom and NES, there were IC shortages occurring (
reference), which is why in a lot of electronics from that time period you'll find differences in IC manufacturer (ex. some expensive 80s gadget might have Sony chips, but the one your friend bought a month later might have Mitsubishi chips).
Different manufacturers' chips behave slightly differently. Yes, they're all SRAM, but power-on values and how fast values dissipate from SRAM once voltage has been lost vary. Voltage, timing/interval/duration, and overall manufacturing implementation all seem to matter. There was
a StackExchange discussion about this very thing (warning: low-level hardware discussion). I'm not a hardware engineer -- there are many here better suited to talk about this behaviour in detail. My point is that there are several factors involved, and it's impossible to get a 100% reproducible test case that can be used reliably (re: for speedrunners).
rainwarrior writing a program that shows RAM contents on reset (particularly for power-on) is useful because possibly someone with a lot of time and money (i.e. possession of many variations of NES consoles, Famicom consoles, Dendy consoles, etc.) could potentially see if there is a common behaviour. At this time all that's known is what's been discussed here on the nesdev forum, and
what's on the Wiki.
The one exception are devices like the PowerPak, which use sthe NES's RAM for several purposes (ex. menu interface, etc.), and as such, $0000-07FF may contain values that the PowerPak itself set/used (i.e. different than ones at power-on). I assume the EverDrive N8 is the same way. From a software (game developer) perspective, non-battery-backed RAM contents on power-on should be treated as unstable/unknown, so if a constant startup value is needed, the game code must initialise it. The NES (in software) does not have a way to differentiate power-on vs. pressing of the reset button. Common practise is for a game to zero $0000-07FF on reset, but some games didn't do this, while others *intentionally* don't zero certain addresses -- a good example is Zanac, where
if you press Reset thirteen (13) times, you can get a stage select -- the way this works is that the game's reset handler increments a value in RAM every time reset is pressed, and has code to say if the value >= 13 then allow for a stage select. Could that RAM location used for storing how many times reset has been pressed happen to have a power-on value of, say, 11 due to SRAM variance, thus the person would only have to hit Reset 2 times? Sure, absolutely. That's just the reality (risk) of the programmer doing that. The same risk applies to games which tried to use "random power-on values in RAM" as a form of RNG seed -- it's a bizarre/faulty thought process, but it's what some did.
CLChambers00 wrote:Even the runners who have biased outcomes experience some variance. So maybe, if it is powered off for 10 or more seconds, it will go back to this natural raw state, but if you do 5 to 9 second wait time between power cycles maybe there is some retention. This would explain both a kind of consistency, and the variance.
Does this seem to be a fair assessment?
Sure, I suppose. Just understand there's not going to be any kind of 100% reliable consistency to it, because there are just too many factors. Games which don't initialise RAM on power-on/reset are "dangerous" like that. The best you can do is tell all speedrunners to power off the NES units for some arbitrary time (10 seconds seems reasonable), power the systems on, and pray the values in RAM are all zero. If that's good enough for a tournament (I don't make the rules), then thumbs up!