Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!nac.no!ifi.uio.no!sics.se!eua.ericsson.se!cnn.exu.ericsson.se!convex!cs.utexas.edu!howland.reston.ans.net!news.sprintlink.net!EU.net!uknet!comlab.ox.ac.uk!elliott
From: elliott%teaching.physics@ox.ac.uk (John Elliott)
Subject: Re: The .Z80 file format for ZX Spectrum snapshots
Message-ID: <1995Jan18.175524.5867@inca.comlab.ox.ac.uk>
X-Newsreader: TIN [version 1.2 PL2]
References: <3f0v97$k0m@rug4.cs.rug.nl> <5947.imc@uk.ac.ox.prg>
Date: Wed, 18 Jan 95 17:55:23 GMT
Lines: 51

In article <5947.imc@uk.ac.ox.prg>, Ian Collier (imc@comlab.ox.ac.uk) wrote:

: The compression and decompression algorithm used is very simple.  I think I
: would prefer the compression to be left to compression tools which can do a
: good job (if you really need the disk space, why not let the emulator call
: the decompressor to decompress it?...).

  I agree. CPCEMU lets you read disk images from within ZIP files. 

: Now, given that .Z80 exists and is the only common format that supports 128K
: (as far as I know), it would be silly to invent another.  But I think that
: .SNA should also be supported by 48K emulators as it seems to be the most
: commonly used format at the moment.

  There's also the Multiface 3 format. 

Arguments pro:
  It supports 128k and +3 snapshots (it contains the status of port 1FFDh) and
has plenty of space in it for emulator status (since the header is a dump of
an area of RAM the M3 uses for memory paging & scratchpads, there are many 
bytes it doesn't look at when loading).
  The format has been documented on this newsgroup.

Arguments con:
  For some reason the AY-3-8912 registers are stored in the BASIC loader
rather than the main datafile, so two files would have to be handled.
  The M3 doesn't save the border colour. This wouldn't be a problem for 
transfer between emulators, since you could just define a spare byte as the 
border colour, but it means that M3 -> emulator transfers won't preserve the 
border colour.
  M3 also compresses its datafiles in a similar manner to Z80. There is some 
excuse for the M3, since it's got to decompress each section of the file into
the space available for it with very small overheads, and it was designed to 
work on the +3 which was supplied with single-density drives.
  Return address saved on stack as well as in file.

  None of the formats I've seen so far contains a "magic number" to assist 
with identification. The M3 sort-of has one; M3 loaders have a +3DOS header  
and M3 datafiles usually begin with the bytes C0h, 03h. The first byte is a 
compression flag which is always set by the M3 (though not by M3CONV) and the
second byte is the start of a tape header which isn't used in disk snapshots
(somewhere to store the border colour?)

--
John Elliott                  
elliott.teaching@physics.oxford.ac.uk
----------------------------------------------------
 BLOODNOK: "But why have you got such a long face?"
 SEAGOON: "Heavy dentures, Sir!" 
                                   - The Goon Show 
:--------------------------------------------------)
