| The tab is there to disconnect the battery while the toy is in it's package. The battery is a standard button cell type and there is a little metal spring that touches the battery to complete the circuit. The plastic tab acts as an insulator between the battery surface, and the conductive spring. Pulling the plastic tab out may cause the spring to bounce a couple of times on the battery surface, effectively closing and breaking the circuit a couple of times before it settles. 'Bounce' is a well-known phenomenon in electrical engineering, and designing 'debouncing' circuits and software is common practice. The problem here is that due to capacitive charges the CPU in the Tamagotchi may not fully reset during the short power-loss times when the battery spring bounces. This is known as a 'brownout' event. A brownout may cause memory corruption, which makes behavior of the software unpredictable. It is also possible that the RAM resets, but the CPU doesn't, this causes the software to run on garbage data as the memory initialization doesn't happen. Since the state of the software (so effectively the 'soul' of your virtual pet) is stored in RAM, corrupting the RAM influences the state of the virtual pet. It is typical for RAM to flip it's bits to the '1' state on brownout/reset, thus suddenly your pet now has all values set to its maximum (99 age, 99 health, etc). Normally, a reset circuit is placed in the electronic design of a computer, that holds the CPU in reset for a short time during power-up. And brownout detection may be implemented to prevent the CPU from memory corruption. But since Tamagotchis were designed to be as cheap as possible to produce, I highly doubt there was any reset circuitry or brownout detection. |