Home » Personal collection » Acorn hard disk » apps » Emulators » !Spectrum/PCSNAPS/SPECUT~1/SNAPINFO

!Spectrum/PCSNAPS/SPECUT~1/SNAPINFO

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » apps » Emulators
Filename: !Spectrum/PCSNAPS/SPECUT~1/SNAPINFO
Read OK:
File size: 156D bytes
Load address: 0000
Exec address: 0000
File contents
                            .Z80 files

The .Z80 files are a slightly packed Spectrum memory dump format. A .Z80 file
starts off with a 30-byte header-block. In this block, the status of the
emulated Z80 processor at the point at which the Z80-emulator was stopped by
the user is specified. A few extra environmental variables complete the
header.

        Byte    Length  Description
        0       1       A register
        1       1       F register
        2       2       BC register pair (LSB, i.e. C, first)
        4       2       HL register pair
        6       2       Program counter
        8       2       Stack pointer
        10      1       Interrupt register
        11      1       Refresh register (Bit 7 is not significant!)
        12      1       Bit 0  : Bit 7 of the R-register
                        Bit 1-3: Border colour
                        Bit 4  : 1=SamRom switched in
                        Bit 5  : 1=Block of data is 'squeezed'
                        Bit 6-7: No meaning
        13      2       DE register pair
        15      2       BC' register pair
        17      2       DE' register pair
        19      2       HL' register pair
        21      1       A' register
        22      1       F' register
        23      2       IY register (Again LSB first)
        25      2       IX register
        27      1       Interrupt flipflop, 0=DI, otherwise EI
        28      1       IFF2 (not particularly important...)
        29      1       Bit 0-1: Interrupt mode (0, 1 or 2)
                        Bit 2  : 1=Issue 2 emulation
                        Bit 3  : 1=Double interrupt frequency
                        Bit 4-5: 1=High video synchronisation
                                 3=Low video synchronisation
                                 0,2=Normal
                        Bit 6-7: 0=Cursor/Protek/AGF joystick
                                 1=Kempston joystick
                                 2=Sinclair 1 joystick
                                 3=Sinclair 2 joystick

After these 30 bytes, a memory dump of the emulated Spectrum follows,
consisting of the bytes at address 16384 up to 65535.  The first versions of
the Spectrum Emulator just dumped the full  48K after the header. These
versions therefore produced .Z80  files that were 49182 bytes (=48K + 30
bytes) in length. The  shareware versions of the Emulator all use a slightly
different  method of storing the 48K datablock, thereby reducing the size  of
the .Z80 files. In effect, the method consists of finding all  sequences of
equal bytes, and replacing them by a code of four  bytes, "ED ED xx yy" which
tells that byte yy is to repeated xx  times. An example will make it clear:

                ED 00 44 ED ED 05 00 02 ...             (.Z80 file)

        is translated back into

                ED 00 44 00 00 00 00 00 02 ...          (Spec-memory)

Obviously, only sequences of length at least 4 will be coded, for otherwise
there would be no gain in the number of stored bytes. Sequences of 'ED' are
treated separately: the minimum length of an 'ED'-sequence to be coded is 2,
to avoid problems when translating back. And lastly, if a single 'ED' is
encountered, thus an 'ED' followed by a different byte, then this byte
following the 'ED' will not be included in a block. This is done to avoid 'ED
00 00 00 00 00' to be translated into 'ED ED ED 05 00' which would not be
translated back correctly. This particular sequence of bytes will be coded
into 'ED 00 ED ED 04 00'. 

                    The snapshot file format
                    ========================

This format (filetype .SNA) is the format used by the Mirage 
Microdriver "Dump" command.  It is also used by Peter McGavin's 
Spectrum emulator for the Amiga.

 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).
 27..49178     48 kbytes ram dump

  Since Peter's emulator stores rubbish in byte 26 JPP sets the 
border to black if byte 26 is larger than 7.





	        	ARC   SPECULATOR
                        ================

Snapshots are 64.25k long!!!! The first 256 bytes hold the processor state
(and other details?). The next 65536 bytes contain a complete image of the
whole spectrum memory map, including the ROM!
Note that the program counter stored value is 256 less than the actual value?

 
00: = REG A
04: = REG F?
08: = REG B
0C: = REG C
10: = REG D
14: = REG E
18: = REG H
1C: = REG L
20: = PC LO
21: = PC HI -1
28: = SP LO
29: = SC HI

9C: = BORDER COLOUR

A4: = Imode?
BE: = REG I
BF: = IFF ??

EC: = REG A'
ED: = REG F'?
F0: = REG B'
F1: = REG C'
F4: = REG D'
F5: = REG E'
F6: = REG H'
F7: = REG L'
F8: = REG IX LO
F9: = REG IX HI
FC: = REG IY LO
FD: = REG IY HI

   
??: = Refresh register

00000000  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 2e 5a 38  |             .Z8|
00000020  30 20 66 69 6c 65 73 0a  0a 54 68 65 20 2e 5a 38  |0 files..The .Z8|
00000030  30 20 66 69 6c 65 73 20  61 72 65 20 61 20 73 6c  |0 files are a sl|
00000040  69 67 68 74 6c 79 20 70  61 63 6b 65 64 20 53 70  |ightly packed Sp|
00000050  65 63 74 72 75 6d 20 6d  65 6d 6f 72 79 20 64 75  |ectrum memory du|
00000060  6d 70 20 66 6f 72 6d 61  74 2e 20 41 20 2e 5a 38  |mp format. A .Z8|
00000070  30 20 66 69 6c 65 0a 73  74 61 72 74 73 20 6f 66  |0 file.starts of|
00000080  66 20 77 69 74 68 20 61  20 33 30 2d 62 79 74 65  |f with a 30-byte|
00000090  20 68 65 61 64 65 72 2d  62 6c 6f 63 6b 2e 20 49  | header-block. I|
000000a0  6e 20 74 68 69 73 20 62  6c 6f 63 6b 2c 20 74 68  |n this block, th|
000000b0  65 20 73 74 61 74 75 73  20 6f 66 20 74 68 65 0a  |e status of the.|
000000c0  65 6d 75 6c 61 74 65 64  20 5a 38 30 20 70 72 6f  |emulated Z80 pro|
000000d0  63 65 73 73 6f 72 20 61  74 20 74 68 65 20 70 6f  |cessor at the po|
000000e0  69 6e 74 20 61 74 20 77  68 69 63 68 20 74 68 65  |int at which the|
000000f0  20 5a 38 30 2d 65 6d 75  6c 61 74 6f 72 20 77 61  | Z80-emulator wa|
00000100  73 20 73 74 6f 70 70 65  64 20 62 79 0a 74 68 65  |s stopped by.the|
00000110  20 75 73 65 72 20 69 73  20 73 70 65 63 69 66 69  | user is specifi|
00000120  65 64 2e 20 41 20 66 65  77 20 65 78 74 72 61 20  |ed. A few extra |
00000130  65 6e 76 69 72 6f 6e 6d  65 6e 74 61 6c 20 76 61  |environmental va|
00000140  72 69 61 62 6c 65 73 20  63 6f 6d 70 6c 65 74 65  |riables complete|
00000150  20 74 68 65 0a 68 65 61  64 65 72 2e 0a 0a 20 20  | the.header...  |
00000160  20 20 20 20 20 20 42 79  74 65 20 20 20 20 4c 65  |      Byte    Le|
00000170  6e 67 74 68 20 20 44 65  73 63 72 69 70 74 69 6f  |ngth  Descriptio|
00000180  6e 0a 20 20 20 20 20 20  20 20 30 20 20 20 20 20  |n.        0     |
00000190  20 20 31 20 20 20 20 20  20 20 41 20 72 65 67 69  |  1       A regi|
000001a0  73 74 65 72 0a 20 20 20  20 20 20 20 20 31 20 20  |ster.        1  |
000001b0  20 20 20 20 20 31 20 20  20 20 20 20 20 46 20 72  |     1       F r|
000001c0  65 67 69 73 74 65 72 0a  20 20 20 20 20 20 20 20  |egister.        |
000001d0  32 20 20 20 20 20 20 20  32 20 20 20 20 20 20 20  |2       2       |
000001e0  42 43 20 72 65 67 69 73  74 65 72 20 70 61 69 72  |BC register pair|
000001f0  20 28 4c 53 42 2c 20 69  2e 65 2e 20 43 2c 20 66  | (LSB, i.e. C, f|
00000200  69 72 73 74 29 0a 20 20  20 20 20 20 20 20 34 20  |irst).        4 |
00000210  20 20 20 20 20 20 32 20  20 20 20 20 20 20 48 4c  |      2       HL|
00000220  20 72 65 67 69 73 74 65  72 20 70 61 69 72 0a 20  | register pair. |
00000230  20 20 20 20 20 20 20 36  20 20 20 20 20 20 20 32  |       6       2|
00000240  20 20 20 20 20 20 20 50  72 6f 67 72 61 6d 20 63  |       Program c|
00000250  6f 75 6e 74 65 72 0a 20  20 20 20 20 20 20 20 38  |ounter.        8|
00000260  20 20 20 20 20 20 20 32  20 20 20 20 20 20 20 53  |       2       S|
00000270  74 61 63 6b 20 70 6f 69  6e 74 65 72 0a 20 20 20  |tack pointer.   |
00000280  20 20 20 20 20 31 30 20  20 20 20 20 20 31 20 20  |     10      1  |
00000290  20 20 20 20 20 49 6e 74  65 72 72 75 70 74 20 72  |     Interrupt r|
000002a0  65 67 69 73 74 65 72 0a  20 20 20 20 20 20 20 20  |egister.        |
000002b0  31 31 20 20 20 20 20 20  31 20 20 20 20 20 20 20  |11      1       |
000002c0  52 65 66 72 65 73 68 20  72 65 67 69 73 74 65 72  |Refresh register|
000002d0  20 28 42 69 74 20 37 20  69 73 20 6e 6f 74 20 73  | (Bit 7 is not s|
000002e0  69 67 6e 69 66 69 63 61  6e 74 21 29 0a 20 20 20  |ignificant!).   |
000002f0  20 20 20 20 20 31 32 20  20 20 20 20 20 31 20 20  |     12      1  |
00000300  20 20 20 20 20 42 69 74  20 30 20 20 3a 20 42 69  |     Bit 0  : Bi|
00000310  74 20 37 20 6f 66 20 74  68 65 20 52 2d 72 65 67  |t 7 of the R-reg|
00000320  69 73 74 65 72 0a 20 20  20 20 20 20 20 20 20 20  |ister.          |
00000330  20 20 20 20 20 20 20 20  20 20 20 20 20 20 42 69  |              Bi|
00000340  74 20 31 2d 33 3a 20 42  6f 72 64 65 72 20 63 6f  |t 1-3: Border co|
00000350  6c 6f 75 72 0a 20 20 20  20 20 20 20 20 20 20 20  |lour.           |
00000360  20 20 20 20 20 20 20 20  20 20 20 20 20 42 69 74  |             Bit|
00000370  20 34 20 20 3a 20 31 3d  53 61 6d 52 6f 6d 20 73  | 4  : 1=SamRom s|
00000380  77 69 74 63 68 65 64 20  69 6e 0a 20 20 20 20 20  |witched in.     |
00000390  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000003a0  20 20 20 42 69 74 20 35  20 20 3a 20 31 3d 42 6c  |   Bit 5  : 1=Bl|
000003b0  6f 63 6b 20 6f 66 20 64  61 74 61 20 69 73 20 27  |ock of data is '|
000003c0  73 71 75 65 65 7a 65 64  27 0a 20 20 20 20 20 20  |squeezed'.      |
000003d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000003e0  20 20 42 69 74 20 36 2d  37 3a 20 4e 6f 20 6d 65  |  Bit 6-7: No me|
000003f0  61 6e 69 6e 67 0a 20 20  20 20 20 20 20 20 31 33  |aning.        13|
00000400  20 20 20 20 20 20 32 20  20 20 20 20 20 20 44 45  |      2       DE|
00000410  20 72 65 67 69 73 74 65  72 20 70 61 69 72 0a 20  | register pair. |
00000420  20 20 20 20 20 20 20 31  35 20 20 20 20 20 20 32  |       15      2|
00000430  20 20 20 20 20 20 20 42  43 27 20 72 65 67 69 73  |       BC' regis|
00000440  74 65 72 20 70 61 69 72  0a 20 20 20 20 20 20 20  |ter pair.       |
00000450  20 31 37 20 20 20 20 20  20 32 20 20 20 20 20 20  | 17      2      |
00000460  20 44 45 27 20 72 65 67  69 73 74 65 72 20 70 61  | DE' register pa|
00000470  69 72 0a 20 20 20 20 20  20 20 20 31 39 20 20 20  |ir.        19   |
00000480  20 20 20 32 20 20 20 20  20 20 20 48 4c 27 20 72  |   2       HL' r|
00000490  65 67 69 73 74 65 72 20  70 61 69 72 0a 20 20 20  |egister pair.   |
000004a0  20 20 20 20 20 32 31 20  20 20 20 20 20 31 20 20  |     21      1  |
000004b0  20 20 20 20 20 41 27 20  72 65 67 69 73 74 65 72  |     A' register|
000004c0  0a 20 20 20 20 20 20 20  20 32 32 20 20 20 20 20  |.        22     |
000004d0  20 31 20 20 20 20 20 20  20 46 27 20 72 65 67 69  | 1       F' regi|
000004e0  73 74 65 72 0a 20 20 20  20 20 20 20 20 32 33 20  |ster.        23 |
000004f0  20 20 20 20 20 32 20 20  20 20 20 20 20 49 59 20  |     2       IY |
00000500  72 65 67 69 73 74 65 72  20 28 41 67 61 69 6e 20  |register (Again |
00000510  4c 53 42 20 66 69 72 73  74 29 0a 20 20 20 20 20  |LSB first).     |
00000520  20 20 20 32 35 20 20 20  20 20 20 32 20 20 20 20  |   25      2    |
00000530  20 20 20 49 58 20 72 65  67 69 73 74 65 72 0a 20  |   IX register. |
00000540  20 20 20 20 20 20 20 32  37 20 20 20 20 20 20 31  |       27      1|
00000550  20 20 20 20 20 20 20 49  6e 74 65 72 72 75 70 74  |       Interrupt|
00000560  20 66 6c 69 70 66 6c 6f  70 2c 20 30 3d 44 49 2c  | flipflop, 0=DI,|
00000570  20 6f 74 68 65 72 77 69  73 65 20 45 49 0a 20 20  | otherwise EI.  |
00000580  20 20 20 20 20 20 32 38  20 20 20 20 20 20 31 20  |      28      1 |
00000590  20 20 20 20 20 20 49 46  46 32 20 28 6e 6f 74 20  |      IFF2 (not |
000005a0  70 61 72 74 69 63 75 6c  61 72 6c 79 20 69 6d 70  |particularly imp|
000005b0  6f 72 74 61 6e 74 2e 2e  2e 29 0a 20 20 20 20 20  |ortant...).     |
000005c0  20 20 20 32 39 20 20 20  20 20 20 31 20 20 20 20  |   29      1    |
000005d0  20 20 20 42 69 74 20 30  2d 31 3a 20 49 6e 74 65  |   Bit 0-1: Inte|
000005e0  72 72 75 70 74 20 6d 6f  64 65 20 28 30 2c 20 31  |rrupt mode (0, 1|
000005f0  20 6f 72 20 32 29 0a 20  20 20 20 20 20 20 20 20  | or 2).         |
00000600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 42  |               B|
00000610  69 74 20 32 20 20 3a 20  31 3d 49 73 73 75 65 20  |it 2  : 1=Issue |
00000620  32 20 65 6d 75 6c 61 74  69 6f 6e 0a 20 20 20 20  |2 emulation.    |
00000630  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000640  20 20 20 20 42 69 74 20  33 20 20 3a 20 31 3d 44  |    Bit 3  : 1=D|
00000650  6f 75 62 6c 65 20 69 6e  74 65 72 72 75 70 74 20  |ouble interrupt |
00000660  66 72 65 71 75 65 6e 63  79 0a 20 20 20 20 20 20  |frequency.      |
00000670  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000680  20 20 42 69 74 20 34 2d  35 3a 20 31 3d 48 69 67  |  Bit 4-5: 1=Hig|
00000690  68 20 76 69 64 65 6f 20  73 79 6e 63 68 72 6f 6e  |h video synchron|
000006a0  69 73 61 74 69 6f 6e 0a  20 20 20 20 20 20 20 20  |isation.        |
000006b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006c0  20 20 20 20 20 20 20 20  20 33 3d 4c 6f 77 20 76  |         3=Low v|
000006d0  69 64 65 6f 20 73 79 6e  63 68 72 6f 6e 69 73 61  |ideo synchronisa|
000006e0  74 69 6f 6e 0a 20 20 20  20 20 20 20 20 20 20 20  |tion.           |
000006f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000700  20 20 20 20 20 20 30 2c  32 3d 4e 6f 72 6d 61 6c  |      0,2=Normal|
00000710  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000720  20 20 20 20 20 20 20 20  20 42 69 74 20 36 2d 37  |         Bit 6-7|
00000730  3a 20 30 3d 43 75 72 73  6f 72 2f 50 72 6f 74 65  |: 0=Cursor/Prote|
00000740  6b 2f 41 47 46 20 6a 6f  79 73 74 69 63 6b 0a 20  |k/AGF joystick. |
00000750  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000770  31 3d 4b 65 6d 70 73 74  6f 6e 20 6a 6f 79 73 74  |1=Kempston joyst|
00000780  69 63 6b 0a 20 20 20 20  20 20 20 20 20 20 20 20  |ick.            |
00000790  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000007a0  20 20 20 20 20 32 3d 53  69 6e 63 6c 61 69 72 20  |     2=Sinclair |
000007b0  31 20 6a 6f 79 73 74 69  63 6b 0a 20 20 20 20 20  |1 joystick.     |
000007c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000007d0  20 20 20 20 20 20 20 20  20 20 20 20 33 3d 53 69  |            3=Si|
000007e0  6e 63 6c 61 69 72 20 32  20 6a 6f 79 73 74 69 63  |nclair 2 joystic|
000007f0  6b 0a 0a 41 66 74 65 72  20 74 68 65 73 65 20 33  |k..After these 3|
00000800  30 20 62 79 74 65 73 2c  20 61 20 6d 65 6d 6f 72  |0 bytes, a memor|
00000810  79 20 64 75 6d 70 20 6f  66 20 74 68 65 20 65 6d  |y dump of the em|
00000820  75 6c 61 74 65 64 20 53  70 65 63 74 72 75 6d 20  |ulated Spectrum |
00000830  66 6f 6c 6c 6f 77 73 2c  0a 63 6f 6e 73 69 73 74  |follows,.consist|
00000840  69 6e 67 20 6f 66 20 74  68 65 20 62 79 74 65 73  |ing of the bytes|
00000850  20 61 74 20 61 64 64 72  65 73 73 20 31 36 33 38  | at address 1638|
00000860  34 20 75 70 20 74 6f 20  36 35 35 33 35 2e 20 20  |4 up to 65535.  |
00000870  54 68 65 20 66 69 72 73  74 20 76 65 72 73 69 6f  |The first versio|
00000880  6e 73 20 6f 66 0a 74 68  65 20 53 70 65 63 74 72  |ns of.the Spectr|
00000890  75 6d 20 45 6d 75 6c 61  74 6f 72 20 6a 75 73 74  |um Emulator just|
000008a0  20 64 75 6d 70 65 64 20  74 68 65 20 66 75 6c 6c  | dumped the full|
000008b0  20 20 34 38 4b 20 61 66  74 65 72 20 74 68 65 20  |  48K after the |
000008c0  68 65 61 64 65 72 2e 20  54 68 65 73 65 0a 76 65  |header. These.ve|
000008d0  72 73 69 6f 6e 73 20 74  68 65 72 65 66 6f 72 65  |rsions therefore|
000008e0  20 70 72 6f 64 75 63 65  64 20 2e 5a 38 30 20 20  | produced .Z80  |
000008f0  66 69 6c 65 73 20 74 68  61 74 20 77 65 72 65 20  |files that were |
00000900  34 39 31 38 32 20 62 79  74 65 73 20 28 3d 34 38  |49182 bytes (=48|
00000910  4b 20 2b 20 33 30 0a 62  79 74 65 73 29 20 69 6e  |K + 30.bytes) in|
00000920  20 6c 65 6e 67 74 68 2e  20 54 68 65 20 20 73 68  | length. The  sh|
00000930  61 72 65 77 61 72 65 20  76 65 72 73 69 6f 6e 73  |areware versions|
00000940  20 6f 66 20 74 68 65 20  45 6d 75 6c 61 74 6f 72  | of the Emulator|
00000950  20 61 6c 6c 20 75 73 65  20 61 20 73 6c 69 67 68  | all use a sligh|
00000960  74 6c 79 0a 64 69 66 66  65 72 65 6e 74 20 20 6d  |tly.different  m|
00000970  65 74 68 6f 64 20 6f 66  20 73 74 6f 72 69 6e 67  |ethod of storing|
00000980  20 74 68 65 20 34 38 4b  20 64 61 74 61 62 6c 6f  | the 48K datablo|
00000990  63 6b 2c 20 74 68 65 72  65 62 79 20 72 65 64 75  |ck, thereby redu|
000009a0  63 69 6e 67 20 74 68 65  20 73 69 7a 65 20 20 6f  |cing the size  o|
000009b0  66 0a 74 68 65 20 2e 5a  38 30 20 66 69 6c 65 73  |f.the .Z80 files|
000009c0  2e 20 49 6e 20 65 66 66  65 63 74 2c 20 74 68 65  |. In effect, the|
000009d0  20 6d 65 74 68 6f 64 20  63 6f 6e 73 69 73 74 73  | method consists|
000009e0  20 6f 66 20 66 69 6e 64  69 6e 67 20 61 6c 6c 20  | of finding all |
000009f0  20 73 65 71 75 65 6e 63  65 73 20 6f 66 0a 65 71  | sequences of.eq|
00000a00  75 61 6c 20 62 79 74 65  73 2c 20 61 6e 64 20 72  |ual bytes, and r|
00000a10  65 70 6c 61 63 69 6e 67  20 74 68 65 6d 20 62 79  |eplacing them by|
00000a20  20 61 20 63 6f 64 65 20  6f 66 20 66 6f 75 72 20  | a code of four |
00000a30  20 62 79 74 65 73 2c 20  22 45 44 20 45 44 20 78  | bytes, "ED ED x|
00000a40  78 20 79 79 22 20 77 68  69 63 68 0a 74 65 6c 6c  |x yy" which.tell|
00000a50  73 20 74 68 61 74 20 62  79 74 65 20 79 79 20 69  |s that byte yy i|
00000a60  73 20 74 6f 20 72 65 70  65 61 74 65 64 20 78 78  |s to repeated xx|
00000a70  20 20 74 69 6d 65 73 2e  20 41 6e 20 65 78 61 6d  |  times. An exam|
00000a80  70 6c 65 20 77 69 6c 6c  20 6d 61 6b 65 20 69 74  |ple will make it|
00000a90  20 63 6c 65 61 72 3a 0a  0a 20 20 20 20 20 20 20  | clear:..       |
00000aa0  20 20 20 20 20 20 20 20  20 45 44 20 30 30 20 34  |         ED 00 4|
00000ab0  34 20 45 44 20 45 44 20  30 35 20 30 30 20 30 32  |4 ED ED 05 00 02|
00000ac0  20 2e 2e 2e 20 20 20 20  20 20 20 20 20 20 20 20  | ...            |
00000ad0  20 28 2e 5a 38 30 20 66  69 6c 65 29 0a 0a 20 20  | (.Z80 file)..  |
00000ae0  20 20 20 20 20 20 69 73  20 74 72 61 6e 73 6c 61  |      is transla|
00000af0  74 65 64 20 62 61 63 6b  20 69 6e 74 6f 0a 0a 20  |ted back into.. |
00000b00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 45  |               E|
00000b10  44 20 30 30 20 34 34 20  30 30 20 30 30 20 30 30  |D 00 44 00 00 00|
00000b20  20 30 30 20 30 30 20 30  32 20 2e 2e 2e 20 20 20  | 00 00 02 ...   |
00000b30  20 20 20 20 20 20 20 28  53 70 65 63 2d 6d 65 6d  |       (Spec-mem|
00000b40  6f 72 79 29 0a 0a 4f 62  76 69 6f 75 73 6c 79 2c  |ory)..Obviously,|
00000b50  20 6f 6e 6c 79 20 73 65  71 75 65 6e 63 65 73 20  | only sequences |
00000b60  6f 66 20 6c 65 6e 67 74  68 20 61 74 20 6c 65 61  |of length at lea|
00000b70  73 74 20 34 20 77 69 6c  6c 20 62 65 20 63 6f 64  |st 4 will be cod|
00000b80  65 64 2c 20 66 6f 72 20  6f 74 68 65 72 77 69 73  |ed, for otherwis|
00000b90  65 0a 74 68 65 72 65 20  77 6f 75 6c 64 20 62 65  |e.there would be|
00000ba0  20 6e 6f 20 67 61 69 6e  20 69 6e 20 74 68 65 20  | no gain in the |
00000bb0  6e 75 6d 62 65 72 20 6f  66 20 73 74 6f 72 65 64  |number of stored|
00000bc0  20 62 79 74 65 73 2e 20  53 65 71 75 65 6e 63 65  | bytes. Sequence|
00000bd0  73 20 6f 66 20 27 45 44  27 20 61 72 65 0a 74 72  |s of 'ED' are.tr|
00000be0  65 61 74 65 64 20 73 65  70 61 72 61 74 65 6c 79  |eated separately|
00000bf0  3a 20 74 68 65 20 6d 69  6e 69 6d 75 6d 20 6c 65  |: the minimum le|
00000c00  6e 67 74 68 20 6f 66 20  61 6e 20 27 45 44 27 2d  |ngth of an 'ED'-|
00000c10  73 65 71 75 65 6e 63 65  20 74 6f 20 62 65 20 63  |sequence to be c|
00000c20  6f 64 65 64 20 69 73 20  32 2c 0a 74 6f 20 61 76  |oded is 2,.to av|
00000c30  6f 69 64 20 70 72 6f 62  6c 65 6d 73 20 77 68 65  |oid problems whe|
00000c40  6e 20 74 72 61 6e 73 6c  61 74 69 6e 67 20 62 61  |n translating ba|
00000c50  63 6b 2e 20 41 6e 64 20  6c 61 73 74 6c 79 2c 20  |ck. And lastly, |
00000c60  69 66 20 61 20 73 69 6e  67 6c 65 20 27 45 44 27  |if a single 'ED'|
00000c70  20 69 73 0a 65 6e 63 6f  75 6e 74 65 72 65 64 2c  | is.encountered,|
00000c80  20 74 68 75 73 20 61 6e  20 27 45 44 27 20 66 6f  | thus an 'ED' fo|
00000c90  6c 6c 6f 77 65 64 20 62  79 20 61 20 64 69 66 66  |llowed by a diff|
00000ca0  65 72 65 6e 74 20 62 79  74 65 2c 20 74 68 65 6e  |erent byte, then|
00000cb0  20 74 68 69 73 20 62 79  74 65 0a 66 6f 6c 6c 6f  | this byte.follo|
00000cc0  77 69 6e 67 20 74 68 65  20 27 45 44 27 20 77 69  |wing the 'ED' wi|
00000cd0  6c 6c 20 6e 6f 74 20 62  65 20 69 6e 63 6c 75 64  |ll not be includ|
00000ce0  65 64 20 69 6e 20 61 20  62 6c 6f 63 6b 2e 20 54  |ed in a block. T|
00000cf0  68 69 73 20 69 73 20 64  6f 6e 65 20 74 6f 20 61  |his is done to a|
00000d00  76 6f 69 64 20 27 45 44  0a 30 30 20 30 30 20 30  |void 'ED.00 00 0|
00000d10  30 20 30 30 20 30 30 27  20 74 6f 20 62 65 20 74  |0 00 00' to be t|
00000d20  72 61 6e 73 6c 61 74 65  64 20 69 6e 74 6f 20 27  |ranslated into '|
00000d30  45 44 20 45 44 20 45 44  20 30 35 20 30 30 27 20  |ED ED ED 05 00' |
00000d40  77 68 69 63 68 20 77 6f  75 6c 64 20 6e 6f 74 20  |which would not |
00000d50  62 65 0a 74 72 61 6e 73  6c 61 74 65 64 20 62 61  |be.translated ba|
00000d60  63 6b 20 63 6f 72 72 65  63 74 6c 79 2e 20 54 68  |ck correctly. Th|
00000d70  69 73 20 70 61 72 74 69  63 75 6c 61 72 20 73 65  |is particular se|
00000d80  71 75 65 6e 63 65 20 6f  66 20 62 79 74 65 73 20  |quence of bytes |
00000d90  77 69 6c 6c 20 62 65 20  63 6f 64 65 64 0a 69 6e  |will be coded.in|
00000da0  74 6f 20 27 45 44 20 30  30 20 45 44 20 45 44 20  |to 'ED 00 ED ED |
00000db0  30 34 20 30 30 27 2e 20  0a 0a 20 20 20 20 20 20  |04 00'. ..      |
00000dc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 54 68  |              Th|
00000dd0  65 20 73 6e 61 70 73 68  6f 74 20 66 69 6c 65 20  |e snapshot file |
00000de0  66 6f 72 6d 61 74 0a 20  20 20 20 20 20 20 20 20  |format.         |
00000df0  20 20 20 20 20 20 20 20  20 20 20 3d 3d 3d 3d 3d  |           =====|
00000e00  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000e10  3d 3d 3d 0a 0a 54 68 69  73 20 66 6f 72 6d 61 74  |===..This format|
00000e20  20 28 66 69 6c 65 74 79  70 65 20 2e 53 4e 41 29  | (filetype .SNA)|
00000e30  20 69 73 20 74 68 65 20  66 6f 72 6d 61 74 20 75  | is the format u|
00000e40  73 65 64 20 62 79 20 74  68 65 20 4d 69 72 61 67  |sed by the Mirag|
00000e50  65 20 0a 4d 69 63 72 6f  64 72 69 76 65 72 20 22  |e .Microdriver "|
00000e60  44 75 6d 70 22 20 63 6f  6d 6d 61 6e 64 2e 20 20  |Dump" command.  |
00000e70  49 74 20 69 73 20 61 6c  73 6f 20 75 73 65 64 20  |It is also used |
00000e80  62 79 20 50 65 74 65 72  20 4d 63 47 61 76 69 6e  |by Peter McGavin|
00000e90  27 73 20 0a 53 70 65 63  74 72 75 6d 20 65 6d 75  |'s .Spectrum emu|
00000ea0  6c 61 74 6f 72 20 66 6f  72 20 74 68 65 20 41 6d  |lator for the Am|
00000eb0  69 67 61 2e 0a 0a 20 42  79 74 65 20 6f 66 66 73  |iga... Byte offs|
00000ec0  65 74 20 20 20 20 43 6f  6e 74 65 6e 74 73 0a 0a  |et    Contents..|
00000ed0  20 20 20 20 30 20 20 20  20 20 20 20 20 20 20 69  |    0          i|
00000ee0  20 20 72 65 67 69 73 74  65 72 0a 20 20 20 20 31  |  register.    1|
00000ef0  20 20 20 20 20 20 20 20  20 20 6c 27 20 72 65 67  |          l' reg|
00000f00  69 73 74 65 72 0a 20 20  20 20 32 20 20 20 20 20  |ister.    2     |
00000f10  20 20 20 20 20 68 27 20  72 65 67 69 73 74 65 72  |     h' register|
00000f20  0a 20 20 20 20 33 20 20  20 20 20 20 20 20 20 20  |.    3          |
00000f30  65 27 20 72 65 67 69 73  74 65 72 0a 20 20 20 20  |e' register.    |
00000f40  34 20 20 20 20 20 20 20  20 20 20 64 27 20 72 65  |4          d' re|
00000f50  67 69 73 74 65 72 0a 20  20 20 20 35 20 20 20 20  |gister.    5    |
00000f60  20 20 20 20 20 20 63 27  20 72 65 67 69 73 74 65  |      c' registe|
00000f70  72 0a 20 20 20 20 36 20  20 20 20 20 20 20 20 20  |r.    6         |
00000f80  20 62 27 20 72 65 67 69  73 74 65 72 0a 20 20 20  | b' register.   |
00000f90  20 37 20 20 20 20 20 20  20 20 20 20 66 27 20 72  | 7          f' r|
00000fa0  65 67 69 73 74 65 72 0a  20 20 20 20 38 20 20 20  |egister.    8   |
00000fb0  20 20 20 20 20 20 20 61  27 20 72 65 67 69 73 74  |       a' regist|
00000fc0  65 72 0a 20 20 20 20 39  20 20 20 20 20 20 20 20  |er.    9        |
00000fd0  20 20 6c 20 20 72 65 67  69 73 74 65 72 0a 20 20  |  l  register.  |
00000fe0  20 31 30 20 20 20 20 20  20 20 20 20 20 68 20 20  | 10          h  |
00000ff0  72 65 67 69 73 74 65 72  0a 20 20 20 31 31 20 20  |register.   11  |
00001000  20 20 20 20 20 20 20 20  65 20 20 72 65 67 69 73  |        e  regis|
00001010  74 65 72 0a 20 20 20 31  32 20 20 20 20 20 20 20  |ter.   12       |
00001020  20 20 20 64 20 20 72 65  67 69 73 74 65 72 0a 20  |   d  register. |
00001030  20 20 31 33 20 20 20 20  20 20 20 20 20 20 63 20  |  13          c |
00001040  20 72 65 67 69 73 74 65  72 0a 20 20 20 31 34 20  | register.   14 |
00001050  20 20 20 20 20 20 20 20  20 62 20 20 72 65 67 69  |         b  regi|
00001060  73 74 65 72 0a 20 20 20  31 35 20 20 20 20 20 20  |ster.   15      |
00001070  20 20 20 20 69 79 20 6c  6f 77 20 72 65 67 69 73  |    iy low regis|
00001080  74 65 72 0a 20 20 20 31  36 20 20 20 20 20 20 20  |ter.   16       |
00001090  20 20 20 69 79 20 68 69  67 68 20 72 65 67 69 73  |   iy high regis|
000010a0  74 65 72 0a 20 20 20 31  37 20 20 20 20 20 20 20  |ter.   17       |
000010b0  20 20 20 69 78 20 6c 6f  77 20 72 65 67 69 73 74  |   ix low regist|
000010c0  65 72 0a 20 20 20 31 38  20 20 20 20 20 20 20 20  |er.   18        |
000010d0  20 20 69 78 20 68 69 67  68 20 72 65 67 69 73 74  |  ix high regist|
000010e0  65 72 0a 20 20 20 31 39  20 20 20 20 20 20 20 20  |er.   19        |
000010f0  20 20 62 69 74 20 32 20  63 6f 6e 74 61 69 6e 73  |  bit 2 contains|
00001100  20 69 66 66 32 0a 20 20  20 32 30 20 20 20 20 20  | iff2.   20     |
00001110  20 20 20 20 20 72 20 72  65 67 69 73 74 65 72 0a  |     r register.|
00001120  20 20 20 32 31 20 20 20  20 20 20 20 20 20 20 66  |   21          f|
00001130  6c 61 67 73 20 72 65 67  69 73 74 65 72 0a 20 20  |lags register.  |
00001140  20 32 32 20 20 20 20 20  20 20 20 20 20 61 20 72  | 22          a r|
00001150  65 67 69 73 74 65 72 0a  20 20 20 32 33 20 20 20  |egister.   23   |
00001160  20 20 20 20 20 20 20 73  70 20 6c 6f 77 20 72 65  |       sp low re|
00001170  67 69 73 74 65 72 0a 20  20 20 32 34 20 20 20 20  |gister.   24    |
00001180  20 20 20 20 20 20 73 70  20 68 69 67 68 20 72 65  |      sp high re|
00001190  67 69 73 74 65 72 0a 20  20 20 32 35 20 20 20 20  |gister.   25    |
000011a0  20 20 20 20 20 20 69 6e  74 65 72 72 75 70 74 20  |      interrupt |
000011b0  6d 6f 64 65 20 28 30 2c  20 31 20 6f 72 20 32 29  |mode (0, 1 or 2)|
000011c0  0a 20 20 20 32 36 20 20  20 20 20 20 20 20 20 20  |.   26          |
000011d0  62 6f 72 64 65 72 20 63  6f 6c 6f 75 72 20 28 30  |border colour (0|
000011e0  2e 2e 37 29 2e 0a 20 32  37 2e 2e 34 39 31 37 38  |..7).. 27..49178|
000011f0  20 20 20 20 20 34 38 20  6b 62 79 74 65 73 20 72  |     48 kbytes r|
00001200  61 6d 20 64 75 6d 70 0a  0a 20 20 53 69 6e 63 65  |am dump..  Since|
00001210  20 50 65 74 65 72 27 73  20 65 6d 75 6c 61 74 6f  | Peter's emulato|
00001220  72 20 73 74 6f 72 65 73  20 72 75 62 62 69 73 68  |r stores rubbish|
00001230  20 69 6e 20 62 79 74 65  20 32 36 20 4a 50 50 20  | in byte 26 JPP |
00001240  73 65 74 73 20 74 68 65  20 0a 62 6f 72 64 65 72  |sets the .border|
00001250  20 74 6f 20 62 6c 61 63  6b 20 69 66 20 62 79 74  | to black if byt|
00001260  65 20 32 36 20 69 73 20  6c 61 72 67 65 72 20 74  |e 26 is larger t|
00001270  68 61 6e 20 37 2e 0a 0a  0a 0a 0a 0a 09 20 20 20  |han 7........   |
00001280  20 20 20 20 20 09 41 52  43 20 20 20 53 50 45 43  |     .ARC   SPEC|
00001290  55 4c 41 54 4f 52 0a 20  20 20 20 20 20 20 20 20  |ULATOR.         |
000012a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3d  |               =|
000012b0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 0a  |===============.|
000012c0  0a 53 6e 61 70 73 68 6f  74 73 20 61 72 65 20 36  |.Snapshots are 6|
000012d0  34 2e 32 35 6b 20 6c 6f  6e 67 21 21 21 21 20 54  |4.25k long!!!! T|
000012e0  68 65 20 66 69 72 73 74  20 32 35 36 20 62 79 74  |he first 256 byt|
000012f0  65 73 20 68 6f 6c 64 20  74 68 65 20 70 72 6f 63  |es hold the proc|
00001300  65 73 73 6f 72 20 73 74  61 74 65 0a 28 61 6e 64  |essor state.(and|
00001310  20 6f 74 68 65 72 20 64  65 74 61 69 6c 73 3f 29  | other details?)|
00001320  2e 20 54 68 65 20 6e 65  78 74 20 36 35 35 33 36  |. The next 65536|
00001330  20 62 79 74 65 73 20 63  6f 6e 74 61 69 6e 20 61  | bytes contain a|
00001340  20 63 6f 6d 70 6c 65 74  65 20 69 6d 61 67 65 20  | complete image |
00001350  6f 66 20 74 68 65 0a 77  68 6f 6c 65 20 73 70 65  |of the.whole spe|
00001360  63 74 72 75 6d 20 6d 65  6d 6f 72 79 20 6d 61 70  |ctrum memory map|
00001370  2c 20 69 6e 63 6c 75 64  69 6e 67 20 74 68 65 20  |, including the |
00001380  52 4f 4d 21 0a 4e 6f 74  65 20 74 68 61 74 20 74  |ROM!.Note that t|
00001390  68 65 20 70 72 6f 67 72  61 6d 20 63 6f 75 6e 74  |he program count|
000013a0  65 72 20 73 74 6f 72 65  64 20 76 61 6c 75 65 20  |er stored value |
000013b0  69 73 20 32 35 36 20 6c  65 73 73 20 74 68 61 6e  |is 256 less than|
000013c0  20 74 68 65 20 61 63 74  75 61 6c 20 76 61 6c 75  | the actual valu|
000013d0  65 3f 0a 0a 20 0a 30 30  3a 20 3d 20 52 45 47 20  |e?.. .00: = REG |
000013e0  41 0a 30 34 3a 20 3d 20  52 45 47 20 46 3f 0a 30  |A.04: = REG F?.0|
000013f0  38 3a 20 3d 20 52 45 47  20 42 0a 30 43 3a 20 3d  |8: = REG B.0C: =|
00001400  20 52 45 47 20 43 0a 31  30 3a 20 3d 20 52 45 47  | REG C.10: = REG|
00001410  20 44 0a 31 34 3a 20 3d  20 52 45 47 20 45 0a 31  | D.14: = REG E.1|
00001420  38 3a 20 3d 20 52 45 47  20 48 0a 31 43 3a 20 3d  |8: = REG H.1C: =|
00001430  20 52 45 47 20 4c 0a 32  30 3a 20 3d 20 50 43 20  | REG L.20: = PC |
00001440  4c 4f 0a 32 31 3a 20 3d  20 50 43 20 48 49 20 2d  |LO.21: = PC HI -|
00001450  31 0a 32 38 3a 20 3d 20  53 50 20 4c 4f 0a 32 39  |1.28: = SP LO.29|
00001460  3a 20 3d 20 53 43 20 48  49 0a 0a 39 43 3a 20 3d  |: = SC HI..9C: =|
00001470  20 42 4f 52 44 45 52 20  43 4f 4c 4f 55 52 0a 0a  | BORDER COLOUR..|
00001480  41 34 3a 20 3d 20 49 6d  6f 64 65 3f 0a 42 45 3a  |A4: = Imode?.BE:|
00001490  20 3d 20 52 45 47 20 49  0a 42 46 3a 20 3d 20 49  | = REG I.BF: = I|
000014a0  46 46 20 3f 3f 0a 0a 45  43 3a 20 3d 20 52 45 47  |FF ??..EC: = REG|
000014b0  20 41 27 0a 45 44 3a 20  3d 20 52 45 47 20 46 27  | A'.ED: = REG F'|
000014c0  3f 0a 46 30 3a 20 3d 20  52 45 47 20 42 27 0a 46  |?.F0: = REG B'.F|
000014d0  31 3a 20 3d 20 52 45 47  20 43 27 0a 46 34 3a 20  |1: = REG C'.F4: |
000014e0  3d 20 52 45 47 20 44 27  0a 46 35 3a 20 3d 20 52  |= REG D'.F5: = R|
000014f0  45 47 20 45 27 0a 46 36  3a 20 3d 20 52 45 47 20  |EG E'.F6: = REG |
00001500  48 27 0a 46 37 3a 20 3d  20 52 45 47 20 4c 27 0a  |H'.F7: = REG L'.|
00001510  46 38 3a 20 3d 20 52 45  47 20 49 58 20 4c 4f 0a  |F8: = REG IX LO.|
00001520  46 39 3a 20 3d 20 52 45  47 20 49 58 20 48 49 0a  |F9: = REG IX HI.|
00001530  46 43 3a 20 3d 20 52 45  47 20 49 59 20 4c 4f 0a  |FC: = REG IY LO.|
00001540  46 44 3a 20 3d 20 52 45  47 20 49 59 20 48 49 0a  |FD: = REG IY HI.|
00001550  0a 20 20 20 0a 3f 3f 3a  20 3d 20 52 65 66 72 65  |.   .??: = Refre|
00001560  73 68 20 72 65 67 69 73  74 65 72 0a 0a           |sh register..|
0000156d