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