spectrum 3.2 KB

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