console 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. #------------------------------------------------------------------------------
  2. # $File: console,v 1.18 2010/09/20 19:19:17 rrt Exp $
  3. # Console game magic
  4. # Toby Deshane <hac@shoelace.digivill.net>
  5. # ines: file(1) magic for Marat's iNES Nintendo Entertainment System
  6. # ROM dump format
  7. 0 string NES\032 iNES ROM dump,
  8. >4 byte x %dx16k PRG
  9. >5 byte x \b, %dx8k CHR
  10. >6 byte&0x01 =0x1 \b, [Vert.]
  11. >6 byte&0x01 =0x0 \b, [Horiz.]
  12. >6 byte&0x02 =0x2 \b, [SRAM]
  13. >6 byte&0x04 =0x4 \b, [Trainer]
  14. >6 byte&0x04 =0x8 \b, [4-Scr]
  15. #------------------------------------------------------------------------------
  16. # gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format
  17. #
  18. 0x104 belong 0xCEED6666 Gameboy ROM:
  19. >0x134 string >\0 "%.16s"
  20. >0x146 byte 0x03 \b,[SGB]
  21. >0x147 byte 0x00 \b, [ROM ONLY]
  22. >0x147 byte 0x01 \b, [ROM+MBC1]
  23. >0x147 byte 0x02 \b, [ROM+MBC1+RAM]
  24. >0x147 byte 0x03 \b, [ROM+MBC1+RAM+BATT]
  25. >0x147 byte 0x05 \b, [ROM+MBC2]
  26. >0x147 byte 0x06 \b, [ROM+MBC2+BATTERY]
  27. >0x147 byte 0x08 \b, [ROM+RAM]
  28. >0x147 byte 0x09 \b, [ROM+RAM+BATTERY]
  29. >0x147 byte 0x0B \b, [ROM+MMM01]
  30. >0x147 byte 0x0C \b, [ROM+MMM01+SRAM]
  31. >0x147 byte 0x0D \b, [ROM+MMM01+SRAM+BATT]
  32. >0x147 byte 0x0F \b, [ROM+MBC3+TIMER+BATT]
  33. >0x147 byte 0x10 \b, [ROM+MBC3+TIMER+RAM+BATT]
  34. >0x147 byte 0x11 \b, [ROM+MBC3]
  35. >0x147 byte 0x12 \b, [ROM+MBC3+RAM]
  36. >0x147 byte 0x13 \b, [ROM+MBC3+RAM+BATT]
  37. >0x147 byte 0x19 \b, [ROM+MBC5]
  38. >0x147 byte 0x1A \b, [ROM+MBC5+RAM]
  39. >0x147 byte 0x1B \b, [ROM+MBC5+RAM+BATT]
  40. >0x147 byte 0x1C \b, [ROM+MBC5+RUMBLE]
  41. >0x147 byte 0x1D \b, [ROM+MBC5+RUMBLE+SRAM]
  42. >0x147 byte 0x1E \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
  43. >0x147 byte 0x1F \b, [Pocket Camera]
  44. >0x147 byte 0xFD \b, [Bandai TAMA5]
  45. >0x147 byte 0xFE \b, [Hudson HuC-3]
  46. >0x147 byte 0xFF \b, [Hudson HuC-1]
  47. >0x148 byte 0 \b, ROM: 256Kbit
  48. >0x148 byte 1 \b, ROM: 512Kbit
  49. >0x148 byte 2 \b, ROM: 1Mbit
  50. >0x148 byte 3 \b, ROM: 2Mbit
  51. >0x148 byte 4 \b, ROM: 4Mbit
  52. >0x148 byte 5 \b, ROM: 8Mbit
  53. >0x148 byte 6 \b, ROM: 16Mbit
  54. >0x148 byte 0x52 \b, ROM: 9Mbit
  55. >0x148 byte 0x53 \b, ROM: 10Mbit
  56. >0x148 byte 0x54 \b, ROM: 12Mbit
  57. >0x149 byte 1 \b, RAM: 16Kbit
  58. >0x149 byte 2 \b, RAM: 64Kbit
  59. >0x149 byte 3 \b, RAM: 128Kbit
  60. >0x149 byte 4 \b, RAM: 1Mbit
  61. #>0x14e long x \b, CRC: %x
  62. #------------------------------------------------------------------------------
  63. # genesis: file(1) magic for the Sega MegaDrive/Genesis raw ROM format
  64. #
  65. 0x100 string SEGA Sega MegaDrive/Genesis raw ROM dump
  66. >0x120 string >\0 Name: "%.16s"
  67. >0x110 string >\0 %.16s
  68. >0x1B0 string RA with SRAM
  69. #------------------------------------------------------------------------------
  70. # genesis: file(1) magic for the Super MegaDrive ROM dump format
  71. #
  72. 0x280 string EAGN Super MagicDrive ROM dump
  73. >0 byte x %dx16k blocks
  74. >2 byte 0 \b, last in series or standalone
  75. >2 byte >0 \b, split ROM
  76. >8 byte 0xAA
  77. >9 byte 0xBB
  78. #------------------------------------------------------------------------------
  79. # genesis: file(1) alternate magic for the Super MegaDrive ROM dump format
  80. #
  81. 0x280 string EAMG Super MagicDrive ROM dump
  82. >0 byte x %dx16k blocks
  83. >2 byte x \b, last in series or standalone
  84. >8 byte 0xAA
  85. >9 byte 0xBB
  86. #------------------------------------------------------------------------------
  87. # smsgg: file(1) magic for Sega Master System and Game Gear ROM dumps
  88. #
  89. # Does not detect all images. Very preliminary guesswork. Need more data
  90. # on format.
  91. #
  92. # FIXME: need a little more info...;P
  93. #
  94. #0 byte 0xF3
  95. #>1 byte 0xED Sega Master System/Game Gear ROM dump
  96. #>1 byte 0x31 Sega Master System/Game Gear ROM dump
  97. #>1 byte 0xDB Sega Master System/Game Gear ROM dump
  98. #>1 byte 0xAF Sega Master System/Game Gear ROM dump
  99. #>1 byte 0xC3 Sega Master System/Game Gear ROM dump
  100. #------------------------------------------------------------------------------
  101. # dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format
  102. #
  103. 0 belong 0x21068028 Sega Dreamcast VMU game image
  104. 0 string LCDi Dream Animator file
  105. #------------------------------------------------------------------------------
  106. # v64: file(1) uncertain magic for the V64 format N64 ROM dumps
  107. #
  108. 0 belong 0x37804012 V64 Nintendo 64 ROM dump
  109. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  110. # Nintendo .nds
  111. 192 string \044\377\256Qi\232 Nintendo DS Game ROM Image
  112. # Nintendo .gba
  113. 0 string \056\000\000\352$\377\256Qi Nintendo Game Boy Advance ROM Image
  114. #------------------------------------------------------------------------------
  115. # msx: file(1) magic for MSX game cartridge dumps
  116. # Too simple - MPi
  117. #0 beshort 0x4142 MSX game cartridge dump
  118. #------------------------------------------------------------------------------
  119. # Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
  120. 0 string PS-X\ EXE Sony Playstation executable
  121. # Area:
  122. >113 string x (%s)
  123. #------------------------------------------------------------------------------
  124. # Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia@cc.hut.fi>)
  125. 0 string XBEH XBE, Microsoft Xbox executable
  126. # probabilistic checks whether signed or not
  127. >0x0004 ulelong =0x0
  128. >>&2 ulelong =0x0
  129. >>>&2 ulelong =0x0 \b, not signed
  130. >0x0004 ulelong >0
  131. >>&2 ulelong >0
  132. >>>&2 ulelong >0 \b, signed
  133. # expect base address of 0x10000
  134. >0x0104 ulelong =0x10000
  135. >>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
  136. >>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
  137. >>>(0x0118-0x0FF60) ulelong >0 (regions:
  138. >>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
  139. >>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
  140. >>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
  141. >>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
  142. >>>(0x0118-0x0FF60) ulelong >0 \b)
  143. # --------------------------------
  144. # Microsoft Xbox data file formats
  145. 0 string XIP0 XIP, Microsoft Xbox data
  146. 0 string XTF0 XTF, Microsoft Xbox data
  147. # Atari Lynx cartridge dump (EXE/BLL header)
  148. # From: "Stefan A. Haubenthal" <polluks@web.de>
  149. # Double-check that the image type matches too, 0x8008 conflicts with
  150. # 8 character OMF-86 object file headers.
  151. 0 beshort 0x8008
  152. >6 string BS93 Lynx homebrew cartridge
  153. >>2 beshort x \b, RAM start $%04x
  154. >6 string LYNX Lynx cartridge
  155. >>2 beshort x \b, RAM start $%04x
  156. # Opera file system that is used on the 3DO console
  157. # From: Serge van den Boom <svdb@stack.nl>
  158. 0 string \x01ZZZZZ\x01 3DO "Opera" file system
  159. # From Gürkan Sengün <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  160. 0 string GBS Nintendo Gameboy Music/Audio Data
  161. 12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module
  162. # Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
  163. 0 string PPF30 Playstation Patch File version 3.0
  164. >5 byte 0 \b, PPF 1.0 patch
  165. >5 byte 1 \b, PPF 2.0 patch
  166. >5 byte 2 \b, PPF 3.0 patch
  167. >>56 byte 0 \b, Imagetype BIN (any)
  168. >>56 byte 1 \b, Imagetype GI (PrimoDVD)
  169. >>57 byte 0 \b, Blockcheck disabled
  170. >>57 byte 1 \b, Blockcheck enabled
  171. >>58 byte 0 \b, Undo data not available
  172. >>58 byte 1 \b, Undo data available
  173. >6 string x \b, description: %s
  174. 0 string PPF20 Playstation Patch File version 2.0
  175. >5 byte 0 \b, PPF 1.0 patch
  176. >5 byte 1 \b, PPF 2.0 patch
  177. >>56 lelong >0 \b, size of file to patch %d
  178. >6 string x \b, description: %s
  179. 0 string PPF10 Playstation Patch File version 1.0
  180. >5 byte 0 \b, Simple Encoding
  181. >6 string x \b, description: %s
  182. # From: Daniel Dawson <ddawson@icehouse.net>
  183. # SNES9x .smv "movie" file format.
  184. 0 string SMV\x1A SNES9x input recording
  185. >0x4 lelong x \b, version %d
  186. # version 4 is latest so far
  187. >0x4 lelong <5
  188. >>0x8 ledate x \b, recorded at %s
  189. >>0xc lelong >0 \b, rerecorded %d times
  190. >>0x10 lelong x \b, %d frames long
  191. >>0x14 byte >0 \b, data for controller(s):
  192. >>>0x14 byte &0x1 #1
  193. >>>0x14 byte &0x2 #2
  194. >>>0x14 byte &0x4 #3
  195. >>>0x14 byte &0x8 #4
  196. >>>0x14 byte &0x10 #5
  197. >>0x15 byte ^0x1 \b, begins from snapshot
  198. >>0x15 byte &0x1 \b, begins from reset
  199. >>0x15 byte ^0x2 \b, NTSC standard
  200. >>0x15 byte &0x2 \b, PAL standard
  201. >>0x17 byte &0x1 \b, settings:
  202. # WIP1Timing not used as of version 4
  203. >>>0x4 lelong <4
  204. >>>>0x17 byte &0x2 WIP1Timing
  205. >>>0x17 byte &0x4 Left+Right
  206. >>>0x17 byte &0x8 VolumeEnvX
  207. >>>0x17 byte &0x10 FakeMute
  208. >>>0x17 byte &0x20 SyncSound
  209. # New flag as of version 4
  210. >>>0x4 lelong >3
  211. >>>>0x17 byte &0x80 NoCPUShutdown
  212. >>0x4 lelong <4
  213. >>>0x18 lelong >0x23
  214. >>>>0x20 leshort !0
  215. >>>>>0x20 lestring16 x \b, metadata: "%s"
  216. >>0x4 lelong >3
  217. >>>0x24 byte >0 \b, port 1:
  218. >>>>0x24 byte 1 joypad
  219. >>>>0x24 byte 2 mouse
  220. >>>>0x24 byte 3 SuperScope
  221. >>>>0x24 byte 4 Justifier
  222. >>>>0x24 byte 5 multitap
  223. >>>0x24 byte >0 \b, port 2:
  224. >>>>0x25 byte 1 joypad
  225. >>>>0x25 byte 2 mouse
  226. >>>>0x25 byte 3 SuperScope
  227. >>>>0x25 byte 4 Justifier
  228. >>>>0x25 byte 5 multitap
  229. >>>0x18 lelong >0x43
  230. >>>>0x40 leshort !0
  231. >>>>>0x40 lestring16 x \b, metadata: "%s"
  232. >>0x17 byte &0x40 \b, ROM:
  233. >>>(0x18.l-26) lelong x CRC32 0x%08x
  234. >>>(0x18.l-23) string x "%s"
  235. # Type: scummVM savegame files
  236. # From: Sven Hartge <debian@ds9.argh.org>
  237. 0 string SCVM ScummVM savegame
  238. >12 string >\0 "%s"