122-magic-update-spectrum.patch 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. Author: Adam Buchbinder <adam.buchbinder@gmail.com>
  2. Description: Updating magic for spectrum tap files (Closes: #501589).
  3. diff -Naurp file.orig/magic/Magdir/spectrum file/magic/Magdir/spectrum
  4. --- file.orig/magic/Magdir/spectrum 2009-03-21 09:20:03.000000000 +0000
  5. +++ file/magic/Magdir/spectrum 2009-03-21 17:24:09.000000000 +0000
  6. @@ -19,13 +19,17 @@
  7. # Tape file. This assumes the .TAP starts with a Spectrum-format header,
  8. # which nearly all will.
  9. #
  10. -0 string \023\000\000 Spectrum .TAP data
  11. ->4 string x "%-10.10s"
  12. ->3 byte 0 - BASIC program
  13. ->3 byte 1 - number array
  14. ->3 byte 2 - character array
  15. ->3 byte 3 - memory block
  16. ->>14 belong 0x001B0040 (screen)
  17. +# Update: Sanity-check string contents to be printable.
  18. +# -Adam Buchbinder <adam.buchbinder@gmail.com>
  19. +#
  20. +0 string \023\000\000
  21. +>4 string >\0
  22. +>>4 string <\177 Spectrum .TAP data "%-10.10s"
  23. +>>>3 byte 0 - BASIC program
  24. +>>>3 byte 1 - number array
  25. +>>>3 byte 2 - character array
  26. +>>>3 byte 3 - memory block
  27. +>>>>14 belong 0x001B0040 (screen)
  28. # The following three blocks are from pak21-spectrum@srcf.ucam.org
  29. # TZX tape images