Why DO you have to hold reset while turning power off?

Started by Protoman, August 30, 2011, 11:29:27 am

Previous topic - Next topic

Protoman

With SNES or FDS you don't have to do that... I don't get it.

UglyJoe

My understanding, which is not 100%, is that as the console is powering down, the processor may receive some errant commands and end up writing some junk data to part of the save-ram (that is, the memory on the cart that is being backed-up by the battery in the cart).  That would corrupt the save data, and the game would erase it the next time it tries to load it. 

By holding down reset, you are sending the processor an interrupt that is forcing it to ignore other commands and jump to the reset vector.  If it's trapped in the reset vector, then it can't execute the errant commands, thereby protecting your save data.

It's also possible that the transition from the power supply to the battery (and vice versa) can "zap" the memory and cause corruption.  Not sure if holding reset will help in that regard.

Both problems are solvable in hardware, and I'm pretty sure some later cartridges did have some protection (at least for the zapping issue).  This is why later cartridge-based consoles don't require you to do anything: they made more reliable hardware.

The FDS is a different beast altogether, since it's writing to a magnetic disk media rather than battery backed-up RAM.

P

Quote from: UglyJoe on August 30, 2011, 11:50:15 am
I'm pretty sure some later cartridges did have some protection (at least for the zapping issue).


Yeah I read in an old NES magazine (It was the Swedish "Nintendo Magasinet" I don't remember which issue) long ago that a technique that allowed you to skip using reset when turning off on battery backup games. I never heard of such a famicom game that uses such techniques though.

133MHz

Quote from: UglyJoe on August 30, 2011, 11:50:15 am
It's also possible that the transition from the power supply to the battery (and vice versa) can "zap" the memory and cause corruption.  Not sure if holding reset will help in that regard.

Both problems are solvable in hardware, and I'm pretty sure some later cartridges did have some protection (at least for the zapping issue).  This is why later cartridge-based consoles don't require you to do anything: they made more reliable hardware.


You nailed it. The very first battery backed up boards just connected the 3V from the battery and the 5V from the console directly to the SRAM through diodes to prevent backflow. The abrupt transition between one voltage and the other could cause data corruption. Later boards added a resistor and a capacitor to smooth out the transition which greatly improved reliability.

Lastly, especially in the 16 bit era it became common to use a custom chip as a "power manager" which ensures clean power to the SRAM and blocks errant commands from getting to it.

...and our game saves still get erased from time to time ::)