1284194Sdelphij 2284194Sdelphij#------------------------------------------------------------------------------ 3284194Sdelphij# $File: spectrum,v 1.7 2010/09/20 18:55:20 rrt Exp $ 4284194Sdelphij# spectrum: file(1) magic for Spectrum emulator files. 5284194Sdelphij# 6284194Sdelphij# John Elliott <jce@seasip.demon.co.uk> 7284194Sdelphij 8284194Sdelphij# 9284194Sdelphij# Spectrum +3DOS header 10284194Sdelphij# 11284194Sdelphij0 string PLUS3DOS\032 Spectrum +3 data 12284194Sdelphij>15 byte 0 - BASIC program 13284194Sdelphij>15 byte 1 - number array 14284194Sdelphij>15 byte 2 - character array 15284194Sdelphij>15 byte 3 - memory block 16284194Sdelphij>>16 belong 0x001B0040 (screen) 17284194Sdelphij>15 byte 4 - Tasword document 18284194Sdelphij>15 string TAPEFILE - ZXT tapefile 19284194Sdelphij# 20284194Sdelphij# Tape file. This assumes the .TAP starts with a Spectrum-format header, 21284194Sdelphij# which nearly all will. 22284194Sdelphij# 23284194Sdelphij# Update: Sanity-check string contents to be printable. 24284194Sdelphij# -Adam Buchbinder <adam.buchbinder@gmail.com> 25284194Sdelphij# 26284194Sdelphij0 string \023\000\000 27284194Sdelphij>4 string >\0 28284194Sdelphij>>4 string <\177 Spectrum .TAP data "%-10.10s" 29284194Sdelphij>>>3 byte 0 - BASIC program 30284194Sdelphij>>>3 byte 1 - number array 31284194Sdelphij>>>3 byte 2 - character array 32284194Sdelphij>>>3 byte 3 - memory block 33284194Sdelphij>>>>14 belong 0x001B0040 (screen) 34284194Sdelphij 35284194Sdelphij# The following three blocks are from pak21-spectrum@srcf.ucam.org 36284194Sdelphij# TZX tape images 37284194Sdelphij0 string ZXTape!\x1a Spectrum .TZX data 38284194Sdelphij>8 byte x version %d 39284194Sdelphij>9 byte x \b.%d 40284194Sdelphij 41284194Sdelphij# RZX input recording files 42284194Sdelphij0 string RZX! Spectrum .RZX data 43284194Sdelphij>4 byte x version %d 44284194Sdelphij>5 byte x \b.%d 45284194Sdelphij 46284194Sdelphij# Floppy disk images 47284194Sdelphij0 string MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data 48284194Sdelphij0 string MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data 49284194Sdelphij0 string EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data 50284194Sdelphij0 string SINCLAIR Spectrum .SCL Betadisk image 51284194Sdelphij 52284194Sdelphij# Hard disk images 53284194Sdelphij0 string RS-IDE\x1a Spectrum .HDF hard disk image 54284194Sdelphij>7 byte x \b, version 0x%02x 55