2 #------------------------------------------------------------------------------
3 # $File: spectrum,v 1.7 2010/09/20 18:55:20 rrt Exp $
4 # spectrum: file(1) magic for Spectrum emulator files.
6 # John Elliott <jce@seasip.demon.co.uk>
9 # Spectrum +3DOS header
11 0 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
20 # Tape file. This assumes the .TAP starts with a Spectrum-format header,
21 # which nearly all will.
23 # Update: Sanity-check string contents to be printable.
24 # -Adam Buchbinder <adam.buchbinder@gmail.com>
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)
35 # The following three blocks are from pak21-spectrum@srcf.ucam.org
37 0 string ZXTape!\x1a Spectrum .TZX data
41 # RZX input recording files
42 0 string RZX! Spectrum .RZX data
47 0 string MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
48 0 string MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
49 0 string EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
50 0 string SINCLAIR Spectrum .SCL Betadisk image
53 0 string RS-IDE\x1a Spectrum .HDF hard disk image
54 >7 byte x \b, version 0x%02x