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