Back to Page
Revision 3 (current)
Edited by CloakTheLurker on 3/18/2024 5:22 AM
Current versions of BizHawk use a .zip archive for storing binary format savestates (text savestates and movie anchorstates still use all classic formats). A rough description of the format is as follows:
* Vanilla zip file, with extension ".state"
* Contents are stored uncompressed, but this could change if desired.
* Contains the following lumps:
** "BizState 1.0" - empty file marking this as a savestate.
** "Core" - Binary file containing whatever the emulation core wants to put in it.
** "Framebuffer" - flat framebuffer. 32 bit rgba raw pixels, nothing else.
** "Input Log" - Only when the savestate is part of a movie record; a text file containing the input record similarly to a movie. See the bottom of this page for an example.
There has been discussion of expanding this format to also be used for text-mode savestates and movies:
* Text Mode Savestates - The "Core" lump would be core-specific text.
* Movies - Would additionally have a "Movie Header" lump, and possibly other lumps like "Subtitles". Would have a "Core" lump only if the movie was savestate anchored. Could have an "SRAM" lump for sram-anchored movies. Probably wouldn't have a "Framebuffer" lump.
There are some issues and fragile code in BizHawk at the moment all relating to the fact that text savestates and movies are both text files with no overall delineation. Different parts of the code inadvertently pick up wrong parts of the text file, causing all sorts of havok.
Such a change would be for the BizHawk 1.6 release at the earliest. Old savestates would probably be no longer supported, but old non-savestate anchored movies would be still supported as a legacy load. Old savestate anchored movies are very problematical; automatic conversion might not be possible.
!Input Log Example:
Frame 91
[[Input]]
GUID 5a0fec6b-afa0-41af-abb0-5641f2250a70
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
|.|.............. 000, 000|.............. 000, 000|.............. 000, 000|.............. 000, 000|
[[/Input]]