xref: /freebsd/contrib/file/magic/Magdir/spectrum (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1
2#------------------------------------------------------------------------------
3# $File: spectrum,v 1.8 2017/09/11 23:51:12 christos Exp $
4# spectrum:  file(1) magic for Spectrum emulator files.
5#
6# John Elliott <jce@seasip.demon.co.uk>
7
8#
9# Spectrum +3DOS header
10#
110       string          PLUS3DOS\032    Spectrum +3 data
12>15     byte            0               - BASIC program
13>15     byte            1               - number array
14>15     byte            2               - character array
15>15     byte            3               - memory block
16>>16    belong          0x001B0040      (screen)
17>15     byte            4               - Tasword document
18>15     string          TAPEFILE        - ZXT tapefile
19#
20# Tape file. This assumes the .TAP starts with a Spectrum-format header,
21# which nearly all will.
22#
23# Update: Sanity-check string contents to be printable.
24#  -Adam Buchbinder <adam.buchbinder@gmail.com>
25#
260       string          \023\000\000
27>4      string          >\0
28>>4     string          <\177           Spectrum .TAP data "%-10.10s"
29>>>3    byte            0               - BASIC program
30>>>3    byte            1               - number array
31>>>3    byte            2               - character array
32>>>3    byte            3               - memory block
33>>>>14  belong          0x001B0040      (screen)
34
35# The following three blocks are from pak21-spectrum@srcf.ucam.org
36# TZX tape images
370      string          ZXTape!\x1a     Spectrum .TZX data
38>8     byte            x               version %d
39>9     byte            x               \b.%d
40
41# RZX input recording files
420      string          RZX!            Spectrum .RZX data
43>4     byte            x               version %d
44>5     byte            x               \b.%d
45
46# Floppy disk images
470      string          MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
480      string          MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
490      string          EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
500      string          SINCLAIR        Spectrum .SCL Betadisk image
51
52# Hard disk images
530      string          RS-IDE\x1a      Spectrum .HDF hard disk image
54>7     byte            x               \b, version 0x%02x
55
56# SZX snapshots (fuse and spectaculator)
57# Martin M. S. Pedersen <martin@linux.com>
58# http://www.spectaculator.com/docs/zx-state/header.shtml
59#
600      string		ZXST	       zx-state snapshot
61>4     byte		x	       version %d
62>5     byte		x	       \b.%d
63>>6    byte		0	       16k ZX Spectrum
64>>6    byte		1	       48k ZX Spectrum/ZX Spectrum+
65>>6    byte		2	       ZX Spectrum 128
66>>6    byte		3	       ZX Spectrum +2
67>>6    byte		4	       ZX Spectrum +2A/+2B
68>>6    byte		5	       ZX Spectrum +3
69>>6    byte		6	       ZX Spectrum +3e
70>>6    byte		7	       Pentagon 128
71>>6    byte		8	       Timex Sinclair TC2048
72>>6    byte		9	       Timex Sinclair TC2068
73>>6    byte	       10	       Scorpion ZS-256
74>>6    byte	       11	       ZX Spectrum SE
75>>6    byte	       12	       Timex Sinclair TS2068
76>>6    byte	       13	       Pentagon 512
77>>6    byte	       14	       Pentagon 1024
78>>6    byte	       15	       48k ZX Spectrum (NTSC)
79>>6    byte	       16	       ZX Spectrum 12Ke
80>>>7   byte		1	       (alternate timings)
81