ZST file format

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
drewsears

ZST file format

Post by drewsears »

Hi,

Is there any documentation available on the structure of a ZST file? Specifically, I'm looking to extract the "preview image" of the save; the screenshot taken when the save was created. Is the image data located at a predictable byte offset within the file? Thanks!
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

If there is an image present, it will be the last 7168 bytes in the file.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

The preview pic is a 64x56x16bpp image. Hence the size.
I *think* it's 565 RGB.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

This is an open source project. Things like this should be documented in some sort of dev doc somewhere. It really bothers me that ZSNES is open source, but really sucks as an open source project.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Richard C.
Lurker
Posts: 151
Joined: Wed Oct 06, 2004 9:09 pm
Location: Georgia, USA
Contact:

Post by Richard C. »

heh
Latest ZSNES release: [url=http://zsnes.ipherswipsite.com]ZSNES 11/12/06 WIP[/url]
Latest NSRT release: [url=http://nsrt.edgeemu.com/]NSRT 3.3 Final[/url]
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Nightcrawler wrote:This is an open source project. Things like this should be documented in some sort of dev doc somewhere.
Ok, ok: In order...
(What - how big)
Header - header size
5a22 regs and stuff - PH65816regsize
SPC timers - 8 bytes
PPU regs and stuff - 3019 bytes
WRAM - 128kB
VRAM - 64kB
if sound enabled:
# SPC700 RAM and stuff - PHspcsave
# BRR buffer and some DSP stuff - PHdspsave
# DSP memory - size of DSP memory
if ROM has C4 chip:
# C4 WRAM - 8kB
if ROM has SFX/SFX2 chip:
# SFX WRAM - 128kB
# SFX regs status - PHnum2writesfxreg
if ROM has SA1 chip:
# some SA1 regs and stuff - PHnum2writesa1reg
# SA1 RAM - 128kB
# SA1 Status - 3 bytes
# other SA1 regs - 4 bytes
# SA1 dma stuff - 8 bytes
if ROM has DSP-1/2/3/4 chip:
# opcodes status - 2874 bytes
if ROM has SETA chip:
# SETA RAM - 4kB
if ROM has SPC7110 chip:
# SPC7110 WRAM - 64kB
# SPC7110 regs and stuff - PHnum2writespc7110reg
ZSNES emu vars - 227 bytes
SRAM - sram size
preview pic - 7kB
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Post Reply