Specification of the .SNA format

The .sna format is the simplest and least capable snapshot format for 48k Spectrum snapshots. The .z80 format is better in many ways; it supports 128k snapshots, for instance.

Here is the specification of the format and a bit of random text.

The file format

The first 27 bytes contain a register dump:
 Byte offset    Contents
    0          i  register
    1          l' register
    2          h' register
    3          e' register
    4          d' register
    5          c' register
    6          b' register
    7          f' register
    8          a' register
    9          l  register
   10          h  register
   11          e  register
   12          d  register
   13          c  register
   14          b  register
   15          iy low register
   16          iy high register
   17          ix low register
   18          ix high register
   19          bit 2 contains iff2
   20          r register
   21          flags register
   22          a register
   23          sp low register
   24          sp high register
   25          interrupt mode (0, 1 or 2)
   26          border colour (0..7).
Then a 49152-byte RAM dump follows.

When the registers have been loaded a RETN command is required to start the program. This means that two bytes are corrupted just below the stack pointer; regrettable but the format comes from the Mirage Microdriver, where no better solution was available.

IFF2 is short for interrupt flip-flop 2, and for all practical purposes is the interrupt-enabled flag. Set means enabled.

Note that Peter McGavin's Spectrum emulator for the Amiga doesn't set the border colour when writing snapshots.

Using .sna

Most of the emulators will read .sna files. A program called spconv can be used to convert snapshot between just about all formats, including .sna. Spconv is available for MS-DOS and for the Amiga; the MS-DOS version contains source code in ANSI C which can be compiled just about anywhere.

Specdisc is a PC program which reads files off Disciple/MGT/+D disks and optionally converts 48K SNP files to .sna files.

M3CONV converts .SNA files to/from Multiface 3 format; it runs under +3DOS. m3conv.sea is the self-extracting archive; m3conv.seb is the BASIC loader.

Example source code

JPP, Spconv, and xzx contain source code to read and write .sna files which should be free for most purposes.
Nettverksgruppa, 19/1-95, sinclair@nvg.ntnu.no