From 2b23b5cbaf15bccc2aae0ff3ee91cedd26f101bd Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Mon, 17 Dec 2012 20:59:21 -0500 Subject: Switch to the more complete Snes9x 1.53 documentation. --- source/docs/snapshots.txt | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 source/docs/snapshots.txt (limited to 'source/docs/snapshots.txt') diff --git a/source/docs/snapshots.txt b/source/docs/snapshots.txt new file mode 100644 index 0000000..ef0d1fd --- /dev/null +++ b/source/docs/snapshots.txt @@ -0,0 +1,84 @@ +***** Important notice ******************************************************** + This document describes the snapshot file format for Snes9x 1.52 and later, + not compatible with 1.51. +******************************************************************************* + + Snes9x snapshot file format: (may be gzip-compressed) + + Begins with fixed length signature, consisting of a string, ':', a 4-digit + decimal version, and a '\n'. + +#!s9xsnp:0006 <-- '\n' after the 6 + + Then we have various blocks. The block format is: 3-character block name, + ':', 6-digit length, ':', then the data. Blocks are written in a defined + order. Structs are written packed with their members in a defined order, in + big-endian order where applicable. + +NAM:000019:Chrono Trigger.zip + + Currently defined blocks (in order) are: + + Essential parts: + NAM - ROM filename, from Memory.ROMFilename. 0-terminated string. + CPU - struct SCPUState, CPU internal state variables. + REG - struct SRegisters, emulated CPU registers. + PPU - struct SPPU, PPU internal variables. Note that IPPU is never saved. + DMA - struct SDMA, DMA/HDMA state variables. + VRA - Memory.VRAM, 0x10000 bytes. + RAM - Memory.RAM, 0x20000 bytes (WRAM). + SRA - Memory.SRAM, 0x20000 bytes. + FIL - Memory.FillRAM, 0x8000 bytes (register backing store). + SND - All of sound emulated registers and state valiables. + CTL - struct SControlSnapshot, controller emulation. + TIM - struct STimings, variables about timings between emulated events. + + Optional parts: + SFX - struct FxRegs_s, Super FX. + SA1 - struct SSA1, SA1 internal state variables. + SAR - struct SSA1Registers, SA1 emulated registers. + DP1 - struct SDSP1, DSP-1. + DP2 - struct SDSP2, DSP-2. + DP4 - struct SDSP4, DSP-4. + CX4 - Memory.C4RAM, 0x2000 bytes. + ST0 - struct SST010, ST-010. + OBC - struct SOBC1, OBC1 internal state variables. + OBM - Memory.OBC1RAM, 0x2000 byts. + S71 - struct SSPC7110Snapshot, SPC7110. + SRT - struct SSRTCSnapshot, S-RTC internal state variables. + CLK - struct SRTCData, S-RTC emulated registers. + BSX - struct SBSX, BS-X. + SHO - rendered SNES screen. + MOV - struct SnapshotMovieInfo. + MID - Some block of data the movie subsystem. + +================== + +Without changing the snapshot version number: +--------------------------------------------- + +Blocks may be safely added at the END of the file, as anything after the last +block is ignored. Blocks may not be moved or removed. + +Blocks may not decrease in size. Say you decrease from 10 bytes to 5. Then +later you increase back to 8. The only way you could safely do this is if +bytes 5-7 still mean the same thing they meant when the block was 10 bytes +long. + +Blocks may increase in size as you wish, as long as you can handle old +savestates with the old shorter size. + +Struct members may not change in interpretation. New struct members may be +added (at the END!) only if you can cope with them being binary-0 in older +savestates. Struct members may not be removed or changed in size/type. + +With changing the snapshot version number: +------------------------------------------ + +Blocks may be added, moved, or removed at will. + +Blocks may decrease in size. + +Struct members may be added, moved, or deleted, and their +interpretations/types may be changed. Use the 'debuted_in' and 'deleted_in' +fields to indicate when the new member debuted or the old member went away. -- cgit v1.2.3