1 2#------------------------------------------------------------------------------
| 1 2#------------------------------------------------------------------------------
|
| 3# $File: spectrum,v 1.7 2010/09/20 18:55:20 rrt Exp $
|
3# spectrum: file(1) magic for Spectrum emulator files. 4# 5# John Elliott <jce@seasip.demon.co.uk> 6 7# 8# Spectrum +3DOS header 9# 100 string PLUS3DOS\032 Spectrum +3 data 11>15 byte 0 - BASIC program 12>15 byte 1 - number array 13>15 byte 2 - character array 14>15 byte 3 - memory block 15>>16 belong 0x001B0040 (screen) 16>15 byte 4 - Tasword document 17>15 string TAPEFILE - ZXT tapefile 18# 19# Tape file. This assumes the .TAP starts with a Spectrum-format header, 20# which nearly all will. 21#
| 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#
|
220 string \023\000\000 Spectrum .TAP data 23>4 string x "%-10.10s" 24>3 byte 0 - BASIC program 25>3 byte 1 - number array 26>3 byte 2 - character array 27>3 byte 3 - memory block 28>>14 belong 0x001B0040 (screen)
| 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)
|
29 30# The following three blocks are from pak21-spectrum@srcf.ucam.org 31# TZX tape images 320 string ZXTape!\x1a Spectrum .TZX data 33>8 byte x version %d 34>9 byte x \b.%d 35 36# RZX input recording files
--- 13 unchanged lines hidden --- | 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
--- 13 unchanged lines hidden --- |