msx 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. #------------------------------------------------------------------------------
  2. # msx: file(1) magic for the MSX Home Computer
  3. # v1.1
  4. # Fábio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  5. ############## MSX Music file formats ##############
  6. # Gigamix MGSDRV music file
  7. 0 string MGS MSX Gigamix MGSDRV3 music file,
  8. >6 ubeshort 0x0D0A
  9. >>3 byte x \bv%c
  10. >>4 byte x \b.%c
  11. >>5 byte x \b%c
  12. >>8 string >\0 \b, title: %s
  13. 1 string mgs2\ MSX Gigamix MGSDRV2 music file
  14. >6 uleshort 0x80
  15. >>0x2E uleshort 0
  16. >>>0x30 string >\0 \b, title: %s
  17. # KSS music file
  18. 0 string KSCC KSS music file v1.03
  19. >0xE byte 0
  20. >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+)
  21. >>0xF byte&0x02 2 \b, soundchip(s): SN76489
  22. >>>0xF byte&0x04 4 stereo
  23. >>0xF byte&0x01 1 \b, YM2413
  24. >>0xF byte&0x08 8 \b, Y8950
  25. 0 string KSSX KSS music file v1.20
  26. >0xE byte&0xEF 0
  27. >>0xF byte&0x40 0x00 \b, 60Hz
  28. >>0xF byte&0x40 0x40 \b, 50Hz
  29. >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+)
  30. >>0xF byte&0x02 0x02 \b, soundchips: SN76489
  31. >>>0xF byte&0x04 0x04 stereo
  32. >>0xF byte&0x01 0x01 \b,
  33. >>>0xF byte&0x18 0x00 \bYM2413
  34. >>>0xF byte&0x18 0x08 \bYM2413, Y8950
  35. >>>0xF byte&0x18 0x18 \bYM2413+Y8950 pseudostereo
  36. >>0xF byte&0x18 0x10 \b, Majyutsushi DAC
  37. # Moonblaster for Moonsound
  38. 0 string MBMS
  39. >4 byte 0x10 MSX Moonblaster for MoonSound music
  40. # Music Player K-kaz
  41. 0 string MPK MSX Music Player K-kaz song
  42. >6 ubeshort 0x0D0A
  43. >>3 byte x v%c
  44. >>4 byte x \b.%c
  45. >>5 byte x \b%c
  46. # I don't know why these don't work
  47. #0 search/0xFFFF \r\n.FM9
  48. #>0 search/0xFFFF \r\n#FORMAT MSX Music Player K-kaz source MML file
  49. #0 search/0xFFFF \r\nFM1\ \=
  50. #>0 search/0xFFFF \r\nPSG1\=
  51. #>>0 search/0xFFFF \r\nSCC1\= MSX MuSiCa MML source file
  52. # OPX Music file
  53. 0x35 beshort 0x0d0a
  54. >0x7B beshort 0x0d0a
  55. >>0x7D byte 0x1a
  56. >>>0x87 uleshort 0 MSX OPX Music file
  57. >>>>0x86 byte 0 v1.5
  58. >>>>>0 string >\32 \b, title: %s
  59. >>>>0x86 byte 1 v2.4
  60. >>>>>0 string >\32 \b, title: %s
  61. # SCMD music file
  62. 0x8B string SCMD
  63. >0xCE uleshort 0 MSX SCMD Music file
  64. #>>-2 uleshort 0x6a71 ; The file must end with this value. How to code this here?
  65. >>0x8F string >\0 \b, title: %s
  66. 0 search/0xFFFF \r\n@title
  67. >&0 search/0xFFFF \r\n@m=[ MSX SCMD source MML file
  68. ############## MSX image file formats ##############
  69. # MSX raw VRAM dump
  70. 0 ubyte 0xFE
  71. >1 uleshort 0
  72. >>5 uleshort 0
  73. >>>3 uleshort 0x37FF MSX SC2/GRP raw image
  74. >>>3 uleshort 0x6A00 MSX Graph Saurus SR5 raw image
  75. >>>3 uleshort >0x769E
  76. >>>>3 uleshort <0x8000 MSX GE5/GE6 raw image
  77. >>>>>3 uleshort 0x7FFF \b, with sprite patterns
  78. >>>3 uleshort 0xD3FF MSX screen 7-12 raw image
  79. >>>3 uleshort 0xD400 MSX Graph Saurus SR7/SR8/SRS raw image
  80. # Graph Saurus compressed images
  81. 0 ubyte 0xFD
  82. >1 uleshort 0
  83. >>5 uleshort 0
  84. >>>3 uleshort >0x013D MSX Graph Saurus compressed image
  85. # Maki-chan Graphic format
  86. 0 string MAKI02\ \ Maki-chan image,
  87. >8 byte x system ID: %c
  88. >9 byte x \b%c
  89. >10 byte x \b%c
  90. >11 byte x \b%c,
  91. >13 search/0x200 \x1A
  92. # >>&3 ubyte 0 , video mode: PC-98 400 lines, 16 analog colors
  93. # >>&3 ubyte 1 , video mode: MSX SC7, 16 analog colors
  94. # >>&3 ubyte 2 , video mode: VM-98 400 lines, 8 analog colors
  95. # >>&3 ubyte 3 , video mode: PC-88 analog, 200 lines, 8 analog colors
  96. # >>&3 ubyte 4 , video mode: 400 lines, 16 digital colors
  97. # >>&3 ubyte 5 , video mode: 200 lines, 16 digital colors
  98. # >>&3 ubyte 6 , video mode: old PC-98 digital 400 lines, 8 colors
  99. # >>&3 ubyte 7 , video mode: PC-88 400 lines, 8 digital colors
  100. >>&8 uleshort+1 x %dx
  101. >>&10 uleshort+1 x \b%d,
  102. >>&3 ubyte&0x82 0x80 256 colors
  103. >>&3 ubyte&0x82 0x00 16 colors
  104. >>&3 ubyte&0x82 0x01 8 colors
  105. >>&3 ubyte&0x04 4 digital
  106. >>&3 ubyte&0x04 0 analog
  107. >>&3 ubyte&0x01 1 \b, 2:1 dot aspect ratio
  108. # Japanese PIC file
  109. 0 string PIC\x1A
  110. >4 lelong 0 Japanese PIC image file
  111. # MSX G9B image file
  112. 0 string G9B
  113. >1 uleshort 11
  114. >>3 uleshort >10
  115. >>>5 ubyte >0 MSX G9B image, depth=%d
  116. >>>>8 uleshort x \b, %dx
  117. >>>>10 uleshort x \b%d
  118. >>>>5 ubyte <9
  119. >>>>>6 ubyte 0
  120. >>>>>>7 ubyte x \b, codec=%d RGB color palettes
  121. >>>>>6 ubyte 64 \b, codec=RGB fixed color
  122. >>>>>6 ubyte 128 \b, codec=YJK
  123. >>>>>6 ubyte 192 \b, codec=YUV
  124. >>>>5 ubyte >8 codec=RGB fixed color
  125. >>>>12 ubyte 0 \b, raw
  126. >>>>12 ubyte 1 \b, bitbuster compression
  127. ############## Other MSX file formats ##############
  128. # MSX ROMs
  129. 0 string AB
  130. >2 uleshort 0x0010 MSX ROM
  131. >>2 uleshort x \b, init=0x%4x
  132. >>4 uleshort >0 \b, stat=0x%4x
  133. >>6 uleshort >0 \b, dev=0x%4x
  134. >>8 uleshort >0 \b, bas=0x%4x
  135. >2 uleshort 0x4010 MSX ROM
  136. >>2 uleshort x \b, init=0x%04x
  137. >>4 uleshort >0 \b, stat=0x%04x
  138. >>6 uleshort >0 \b, dev=0x%04x
  139. >>8 uleshort >0 \b, bas=0x%04x
  140. >2 uleshort 0x8010 MSX ROM
  141. >>2 uleshort x \b, init=0x%04x
  142. >>4 uleshort >0 \b, stat=0x%04x
  143. >>6 uleshort >0 \b, dev=0x%04x
  144. >>8 uleshort >0 \b, bas=0x%04x
  145. 0 string AB
  146. #>2 string 5JSuperLAYDOCK MSX Super Laydock ROM
  147. #>3 string @HYDLIDE3MSX MSX Hydlide-3 ROM
  148. #>3 string @3\x80IA862 Golvellius MSX1 ROM
  149. >2 uleshort >10
  150. >>10 string \0\0\0\0\0\0 MSX ROM
  151. >>>0x10 string YZ\0\0\0\0 Konami Game Master 2 MSX ROM
  152. >>>0x10 string CD \b, Konami RC-
  153. >>>>0x12 ubyte x \b%d
  154. >>>>0x13 ubyte/16 x \b%d
  155. >>>>0x13 ubyte&0xF x \b%d
  156. >>>0x10 string EF \b, Konami RC-
  157. >>>>0x12 ubyte x \b%d
  158. >>>>0x13 ubyte/16 x \b%d
  159. >>>>0x13 ubyte&0xF x \b%d
  160. >>>2 uleshort x \b, init=0x%04x
  161. >>>4 uleshort >0 \b, stat=0x%04x
  162. >>>6 uleshort >0 \b, dev=0x%04x
  163. >>>8 uleshort >0 \b, bas=0x%04x
  164. >2 uleshort 0
  165. >>4 uleshort 0
  166. >>>6 uleshort 0
  167. >>>>8 uleshort >0 MSX BASIC program in ROM, bas=0x%04x
  168. 0x4000 string AB
  169. >0x4002 uleshort >0x4010
  170. >>0x400A string \0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  171. >>0x4002 uleshort x \b, init=0x%04x
  172. >>0x4004 uleshort >0 \b, stat=0x%04x
  173. >>0x4006 uleshort >0 \b, dev=0x%04x
  174. >>0x4008 uleshort >0 \b, bas=0x%04x
  175. 0x8000 string AB
  176. >0x8002 uleshort >0x4010
  177. >>0x800A string \0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  178. >>0x8002 uleshort x \b, init=0x%04x
  179. >>0x8004 uleshort >0 \b, stat=0x%04x
  180. >>0x8006 uleshort >0 \b, dev=0x%04x
  181. >>0x8008 uleshort >0 \b, bas=0x%04x
  182. 0x3C000 string AB
  183. >0x3C008 string \0\0\0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  184. >>0x3C002 uleshort x \b, init=0x%04x
  185. >>0x3C004 uleshort >0 \b, stat=0x%04x
  186. >>0x3C006 uleshort >0 \b, dev=0x%04x
  187. >>0x3C008 uleshort >0 \b, bas=0x%04x
  188. # MSX BIN file
  189. #0 byte 0xFE
  190. #>1 uleshort >0x8000
  191. #>>3 uleshort >0x8004
  192. #>>>5 uleshort >0x8000 MSX BIN file
  193. # MSX-BASIC file
  194. 0 byte 0xFF
  195. >3 uleshort 0x000A
  196. >>1 uleshort >0x8000 MSX-BASIC program
  197. # MSX .CAS file
  198. 0 string \x1F\xA6\xDE\xBA\xCC\x13\x7D\x74 MSX cassette archive
  199. # Mega-Assembler file
  200. 0 byte 0xFE
  201. >1 uleshort 0x0001
  202. >>5 uleshort 0xffff
  203. >>>6 byte 0x0A MSX Mega-Assembler source
  204. # Execrom Patchfile
  205. 0 string ExecROM\ patchfile\x1A MSX ExecROM patchfile
  206. >0x12 ubyte/16 x v%d
  207. >0x12 ubyte&0xF x \b.%d
  208. >0x13 ubyte x \b, contains %d patches
  209. # Konami's King's Valley-2 custom stage (ELG file)
  210. 4 uleshort 0x0900
  211. >0xF byte 1
  212. >>0x14 byte 0
  213. >>>0x1E string \ \ \
  214. >>>>0x23 byte 1
  215. >>>>>0x25 byte 0
  216. >>>>>>0x15 string >\x30
  217. >>>>>>>0x15 string <\x5A Konami King's Valley-2 custom stage, title: "%-8.8s"
  218. >>>>>>>>0x1D byte <32 \b, theme: %d
  219. # Metal Gear 1 savegame
  220. #0x4F string \x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
  221. #>>0x60 string \xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
  222. #>>>0x7B string \0x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00 Metal Gear 1 savegame