spectrum 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #------------------------------------------------------------------------------
  2. # $File: spectrum,v 1.6 2009/09/19 16:28:12 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 0x%02x