8
edits
Junebug12851 (talk | contribs) m (Added further clarification to Playtime) |
Alivebacon (talk | contribs) (Fixed stuff that sounded too informal.) |
||
Line 2: | Line 2: | ||
{{cleanup}} | {{cleanup}} | ||
The '''save data structure''' for [[Generation I]] is stored in the cartridge's volatile | The '''save data structure''' for [[Generation I]] is stored in the cartridge's volatile | ||
battery-backed RAM chip (SRAM), or as a ".sav" file | battery-backed RAM chip (SRAM), or as a ".sav" file by most emulators. The | ||
structure consists of 32 KB of data divided between 4 banks each 8KB or 0x2000 | structure consists of 32 KB of data divided between 4 banks each 8KB, or 0x2000, | ||
and overall contains potentially hundreds of variables, though there are quite a | and overall contains potentially hundreds of variables, though there are quite a | ||
few areas that are either completely left alone, only read from, or only written | few areas that are either completely left alone, only read from, or only written | ||
to. There are also a number of areas that are only used in certain game states | to. There are also a number of areas that are only used in certain game states | ||
that can't | that can't be saved to, including various runtime-only data. | ||
Most areas | Most areas can freely be written to with custom data or at the very | ||
least cleared out. Most of these areas will | least cleared out. Most of these areas will not be altered by the game unless | ||
the | the "Clear Save Dialog" is triggered on the title screen. Some sections | ||
of the data will | of the data will load untouched into the in-game memory during gameplay and | ||
re-saved back on each save | re-saved back on each save. | ||
Sections of the data are protected with a simple integrity check using a | |||
checksum to verify data corruption such as the | checksum to verify data corruption in cases such as the power being lost during the saving process. | ||
PC boxes have additional checksums for each box's contents on the bank in addition to the normal whole-bank checksum. The Hall of Fame is the only section of used data which doesn't have a checksum and furthermore lies on an unusual bank number because it's so large. | |||
boxes have additional checksums for each box contents on the bank in addition to the normal whole-bank checksum. The Hall of Fame is the only section of used data which | |||
doesn't have a checksum and furthermore lies on an unusual bank number | |||
because it's so large. | |||
==Save Data Structure== | ==Save Data Structure== |
edits