xref: /freebsd/contrib/file/magic/Magdir/console (revision 3e41d09d08f5bfa2fc1386241f334b865d6da085)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*3e41d09dSXin LI# $File: console,v 1.24 2016/03/23 15:29:20 christos Exp $
4b6cee71dSXin LI# Console game magic
5b6cee71dSXin LI# Toby Deshane <hac@shoelace.digivill.net>
6b6cee71dSXin LI
7*3e41d09dSXin LI# ines: file(1) magic for Marat's iNES Nintendo Entertainment System ROM dump format
8*3e41d09dSXin LI# Updated by David Korth <gerbilsoft@gerbilsoft.com>
9*3e41d09dSXin LI# References:
10*3e41d09dSXin LI# - http://wiki.nesdev.com/w/index.php/INES
11*3e41d09dSXin LI# - http://wiki.nesdev.com/w/index.php/NES_2.0
12*3e41d09dSXin LI0	string		NES\x1A		iNES ROM image
13*3e41d09dSXin LI>7	byte&0x0C	=0x8		(NES 2.0)
14*3e41d09dSXin LI>4	byte		x		\b: %ux16k PRG
15*3e41d09dSXin LI>5	byte		x		\b, %ux16k CHR
16*3e41d09dSXin LI>6	byte&0x08	=0x8		[4-Scr]
17*3e41d09dSXin LI>6	byte&0x09	=0x0		[H-mirror]
18*3e41d09dSXin LI>6	byte&0x09	=0x1		[V-mirror]
19*3e41d09dSXin LI>6	byte&0x02	=0x2		[SRAM]
20*3e41d09dSXin LI>6	byte&0x04	=0x4		[Trainer]
21*3e41d09dSXin LI>7	byte&0x03	=0x2		[PC10]
22*3e41d09dSXin LI>7	byte&0x03	=0x1		[VS
23*3e41d09dSXin LI>>7	byte&0x0C	=0x8
24*3e41d09dSXin LI# NES 2.0: VS PPU
25*3e41d09dSXin LI>>>13	byte&0x0F	=0x0		\b, RP2C03B
26*3e41d09dSXin LI>>>13	byte&0x0F	=0x1		\b, RP2C03G
27*3e41d09dSXin LI>>>13	byte&0x0F	=0x2		\b, RP2C04-0001
28*3e41d09dSXin LI>>>13	byte&0x0F	=0x3		\b, RP2C04-0002
29*3e41d09dSXin LI>>>13	byte&0x0F	=0x4		\b, RP2C04-0003
30*3e41d09dSXin LI>>>13	byte&0x0F	=0x5		\b, RP2C04-0004
31*3e41d09dSXin LI>>>13	byte&0x0F	=0x6		\b, RP2C03B
32*3e41d09dSXin LI>>>13	byte&0x0F	=0x7		\b, RP2C03C
33*3e41d09dSXin LI>>>13	byte&0x0F	=0x8		\b, RP2C05-01
34*3e41d09dSXin LI>>>13	byte&0x0F	=0x9		\b, RP2C05-02
35*3e41d09dSXin LI>>>13	byte&0x0F	=0xA		\b, RP2C05-03
36*3e41d09dSXin LI>>>13	byte&0x0F	=0xB		\b, RP2C05-04
37*3e41d09dSXin LI>>>13	byte&0x0F	=0xC		\b, RP2C05-05
38*3e41d09dSXin LI# TODO: VS protection hardware?
39*3e41d09dSXin LI>>7	byte		x		\b]
40*3e41d09dSXin LI# NES 2.0-specific flags.
41*3e41d09dSXin LI>7	byte&0x0C	=0x8
42*3e41d09dSXin LI>>12	byte&0x03	=0x0		[NTSC]
43*3e41d09dSXin LI>>12	byte&0x03	=0x1		[PAL]
44*3e41d09dSXin LI>>12	byte&0x02	=0x2		[NTSC+PAL]
45*3e41d09dSXin LI
46*3e41d09dSXin LI#------------------------------------------------------------------------------
47*3e41d09dSXin LI# unif: file(1) magic for UNIF-format Nintendo Entertainment System ROM images
48*3e41d09dSXin LI# Reference: http://wiki.nesdev.com/w/index.php/UNIF
49*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
50*3e41d09dSXin LI# TODO commit on 2016/03/21
51*3e41d09dSXin LI#
52*3e41d09dSXin LI# NOTE: The UNIF format uses chunks instead of a fixed header,
53*3e41d09dSXin LI# so most of the data isn't easily parseable.
54*3e41d09dSXin LI#
55*3e41d09dSXin LI0	string	UNIF
56*3e41d09dSXin LI4	lelong	<16	UNIF v%d format NES ROM image
57b6cee71dSXin LI
58b6cee71dSXin LI#------------------------------------------------------------------------------
59b6cee71dSXin LI# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format
60*3e41d09dSXin LI# Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header
61b6cee71dSXin LI#
62*3e41d09dSXin LI0x104		bequad		0xCEED6666CC0D000B	Game Boy ROM image
63*3e41d09dSXin LI>0x143		byte&0x80	0x80
64*3e41d09dSXin LI>>0x134		string		>\0			\b: "%.15s"
65*3e41d09dSXin LI>0x143		byte&0x80	!0x80
66*3e41d09dSXin LI>>0x134		string		>\0			\b: "%.16s"
67*3e41d09dSXin LI>0x14c		byte		x			(Rev.%02u)
68b6cee71dSXin LI
69*3e41d09dSXin LI# Machine type. (SGB, CGB, SGB+CGB)
70*3e41d09dSXin LI>0x14b		byte		0x33
71*3e41d09dSXin LI>>0x146		byte		0x03
72*3e41d09dSXin LI>>>0x143	byte&0x80	0x80	[SGB+CGB]
73*3e41d09dSXin LI>>>0x143	byte&0x80	!0x80	[SGB]
74*3e41d09dSXin LI>>0x146		byte		!0x03
75*3e41d09dSXin LI>>>0x143	byte&0xC0	0x80	[CGB]
76*3e41d09dSXin LI>>>0x143	byte&0xC0	0xC0	[CGB ONLY]
77*3e41d09dSXin LI
78*3e41d09dSXin LI# Mapper.
79*3e41d09dSXin LI>0x147 byte 0x00  [ROM ONLY]
80*3e41d09dSXin LI>0x147 byte 0x01  [MBC1]
81*3e41d09dSXin LI>0x147 byte 0x02  [MBC1+RAM]
82*3e41d09dSXin LI>0x147 byte 0x03  [MBC1+RAM+BATT]
83*3e41d09dSXin LI>0x147 byte 0x05  [MBC2]
84*3e41d09dSXin LI>0x147 byte 0x06  [MBC2+BATTERY]
85*3e41d09dSXin LI>0x147 byte 0x08  [ROM+RAM]
86*3e41d09dSXin LI>0x147 byte 0x09  [ROM+RAM+BATTERY]
87*3e41d09dSXin LI>0x147 byte 0x0B  [MMM01]
88*3e41d09dSXin LI>0x147 byte 0x0C  [MMM01+SRAM]
89*3e41d09dSXin LI>0x147 byte 0x0D  [MMM01+SRAM+BATT]
90*3e41d09dSXin LI>0x147 byte 0x0F  [MBC3+TIMER+BATT]
91*3e41d09dSXin LI>0x147 byte 0x10  [MBC3+TIMER+RAM+BATT]
92*3e41d09dSXin LI>0x147 byte 0x11  [MBC3]
93*3e41d09dSXin LI>0x147 byte 0x12  [MBC3+RAM]
94*3e41d09dSXin LI>0x147 byte 0x13  [MBC3+RAM+BATT]
95*3e41d09dSXin LI>0x147 byte 0x19  [MBC5]
96*3e41d09dSXin LI>0x147 byte 0x1A  [MBC5+RAM]
97*3e41d09dSXin LI>0x147 byte 0x1B  [MBC5+RAM+BATT]
98*3e41d09dSXin LI>0x147 byte 0x1C  [MBC5+RUMBLE]
99*3e41d09dSXin LI>0x147 byte 0x1D  [MBC5+RUMBLE+SRAM]
100*3e41d09dSXin LI>0x147 byte 0x1E  [MBC5+RUMBLE+SRAM+BATT]
101*3e41d09dSXin LI>0x147 byte 0xFC  [Pocket Camera]
102*3e41d09dSXin LI>0x147 byte 0xFD  [Bandai TAMA5]
103*3e41d09dSXin LI>0x147 byte 0xFE  [Hudson HuC-3]
104*3e41d09dSXin LI>0x147 byte 0xFF  [Hudson HuC-1]
105*3e41d09dSXin LI
106*3e41d09dSXin LI# ROM size.
107b6cee71dSXin LI>0x148 byte 0     \b, ROM: 256Kbit
108b6cee71dSXin LI>0x148 byte 1     \b, ROM: 512Kbit
109b6cee71dSXin LI>0x148 byte 2     \b, ROM: 1Mbit
110b6cee71dSXin LI>0x148 byte 3     \b, ROM: 2Mbit
111b6cee71dSXin LI>0x148 byte 4     \b, ROM: 4Mbit
112b6cee71dSXin LI>0x148 byte 5     \b, ROM: 8Mbit
113b6cee71dSXin LI>0x148 byte 6     \b, ROM: 16Mbit
114*3e41d09dSXin LI>0x148 byte 7     \b, ROM: 32Mbit
115b6cee71dSXin LI>0x148 byte 0x52  \b, ROM: 9Mbit
116b6cee71dSXin LI>0x148 byte 0x53  \b, ROM: 10Mbit
117b6cee71dSXin LI>0x148 byte 0x54  \b, ROM: 12Mbit
118b6cee71dSXin LI
119*3e41d09dSXin LI# RAM size.
120b6cee71dSXin LI>0x149 byte 1     \b, RAM: 16Kbit
121b6cee71dSXin LI>0x149 byte 2     \b, RAM: 64Kbit
122b6cee71dSXin LI>0x149 byte 3     \b, RAM: 128Kbit
123b6cee71dSXin LI>0x149 byte 4     \b, RAM: 1Mbit
124*3e41d09dSXin LI>0x149 byte 5     \b, RAM: 512Kbit
125b6cee71dSXin LI
126b6cee71dSXin LI#------------------------------------------------------------------------------
127*3e41d09dSXin LI# genesis: file(1) magic for various Sega Mega Drive / Genesis ROM image and disc formats
128*3e41d09dSXin LI# Updated by David Korth <gerbilsoft@gerbilsoft.com>
129*3e41d09dSXin LI# References:
130*3e41d09dSXin LI# - http://www.retrodev.com/segacd.html
131*3e41d09dSXin LI# - http://devster.monkeeh.com/sega/32xguide1.txt
132b6cee71dSXin LI#
133*3e41d09dSXin LI
134*3e41d09dSXin LI# Common Sega Mega Drive header format.
135*3e41d09dSXin LI# FIXME: Name fields are 48 bytes, but have spaces for padding instead of 00s.
136*3e41d09dSXin LI0		name	sega-mega-drive-header
137*3e41d09dSXin LI# ROM title. (Use domestic if present; if not, use international.)
138*3e41d09dSXin LI>0x120		byte	>0x20
139*3e41d09dSXin LI>>0x120		string	>\0	\b: "%.16s"
140*3e41d09dSXin LI>0x120		byte	<0x21
141*3e41d09dSXin LI>>0x150		string	>\0	\b: "%.16s"
142*3e41d09dSXin LI# Other information.
143*3e41d09dSXin LI>0x180		string	>\0	(%.14s
144*3e41d09dSXin LI>>0x110		string  >\0	\b, %.16s
145*3e41d09dSXin LI>0x180		byte	0
146*3e41d09dSXin LI>>0x110		string  >\0	(%.16s
147*3e41d09dSXin LI>0		byte	x	\b)
148*3e41d09dSXin LI
149*3e41d09dSXin LI# TODO: Check for 32X CD?
150*3e41d09dSXin LI# Sega Mega CD disc images: 2048-byte sectors.
151*3e41d09dSXin LI0	string	SEGADISCSYSTEM\ \ 	Sega Mega CD disc image
152*3e41d09dSXin LI>0	use	sega-mega-drive-header
153*3e41d09dSXin LI>0	byte	x			\b, 2048-byte sectors
154*3e41d09dSXin LI0	string	SEGABOOTDISC\ \ \ \ 	Sega Mega CD disc image
155*3e41d09dSXin LI>0	use	sega-mega-drive-header
156*3e41d09dSXin LI>0	byte	x			\b, 2048-byte sectors
157*3e41d09dSXin LI# Sega Mega CD disc images: 2352-byte sectors.
158*3e41d09dSXin LI0x10	string	SEGADISCSYSTEM\ \ 	Sega Mega CD disc image
159*3e41d09dSXin LI>0x10	use	sega-mega-drive-header
160*3e41d09dSXin LI>0	byte	x			\b, 2352-byte sectors
161*3e41d09dSXin LI0x10	string	SEGABOOTDISC\ \ \ \ 	Sega Mega CD disc image
162*3e41d09dSXin LI>0x10	use	sega-mega-drive-header
163*3e41d09dSXin LI>0	byte	x			\b, 2352-byte sectors
164*3e41d09dSXin LI
165*3e41d09dSXin LI# Sega Mega Drive, 32X, Pico, and Mega CD Boot ROM images.
166*3e41d09dSXin LI0x100		string	SEGA
167*3e41d09dSXin LI>0x3C0		bequad	0x4D41525320434845	Sega 32X ROM image
168*3e41d09dSXin LI>>0		use	sega-mega-drive-header
169*3e41d09dSXin LI>0x3C0		bequad	!0x4D41525320434845
170*3e41d09dSXin LI>>0x105		belong	0x5049434F	Sega Pico ROM image
171*3e41d09dSXin LI>>>0		use	sega-mega-drive-header
172*3e41d09dSXin LI>>0x105		belong	!0x5049434F
173*3e41d09dSXin LI>>>0x180	beshort	0x4252		Sega Mega CD Boot ROM image
174*3e41d09dSXin LI>>>0x180	beshort	!0x4252		Sega Mega Drive / Genesis ROM image
175*3e41d09dSXin LI>>>0		use	sega-mega-drive-header
176b6cee71dSXin LI
177b6cee71dSXin LI#------------------------------------------------------------------------------
178b6cee71dSXin LI# genesis: file(1) magic for the Super MegaDrive ROM dump format
179b6cee71dSXin LI#
180*3e41d09dSXin LI
181*3e41d09dSXin LI# NOTE: Due to interleaving, we can't display anything
182*3e41d09dSXin LI# other than the copier header information.
183*3e41d09dSXin LI0      name    sega-genesis-smd-header
184b6cee71dSXin LI>0     byte    x       %dx16k blocks
185b6cee71dSXin LI>2     byte    0       \b, last in series or standalone
186b6cee71dSXin LI>2     byte    >0      \b, split ROM
187*3e41d09dSXin LI
188*3e41d09dSXin LI# "Sega Genesis" header.
189*3e41d09dSXin LI0x280	string EAGN
190*3e41d09dSXin LI>8	beshort	0xAABB	Sega Mega Drive / Genesis ROM image (SMD format):
191*3e41d09dSXin LI>>0	use     sega-genesis-smd-header
192*3e41d09dSXin LI
193*3e41d09dSXin LI# "Sega Mega Drive" header.
194*3e41d09dSXin LI0x280	string EAMG
195*3e41d09dSXin LI>8	beshort	0xAABB	Sega Mega Drive / Genesis ROM image (SMD format):
196*3e41d09dSXin LI>>0	use     sega-genesis-smd-header
197b6cee71dSXin LI
198b6cee71dSXin LI#------------------------------------------------------------------------------
199*3e41d09dSXin LI# smsgg:  file(1) magic for Sega Master System and Game Gear ROM images
200*3e41d09dSXin LI# Detects all Game Gear and export Sega Master System ROM images,
201*3e41d09dSXin LI# and some Japanese Sega Master System ROM images.
202*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
203*3e41d09dSXin LI# Reference: http://www.smspower.org/Development/ROMHeader
204b6cee71dSXin LI#
205*3e41d09dSXin LI
206*3e41d09dSXin LI# General SMS header rule.
207*3e41d09dSXin LI# The SMS boot ROM checks the header at three locations.
208*3e41d09dSXin LI0	name	sega-master-system-rom-header
209*3e41d09dSXin LI# Machine type.
210*3e41d09dSXin LI>0x0F	byte&0xF0	0x30	Sega Master System
211*3e41d09dSXin LI>0x0F	byte&0xF0	0x40	Sega Master System
212*3e41d09dSXin LI>0x0F	byte&0xF0	0x50	Sega Game Gear
213*3e41d09dSXin LI>0x0F	byte&0xF0	0x60	Sega Game Gear
214*3e41d09dSXin LI>0x0F	byte&0xF0	0x70	Sega Game Gear
215*3e41d09dSXin LI>0x0F	byte&0xF0	<0x30	Sega Master System / Game Gear
216*3e41d09dSXin LI>0x0F	byte&0xF0	>0x70	Sega Master System / Game Gear
217*3e41d09dSXin LI>0	byte		x	ROM image:
218*3e41d09dSXin LI# Product code.
219*3e41d09dSXin LI>0x0E	byte&0xF0	0x10	1
220*3e41d09dSXin LI>0x0E	byte&0xF0	0x20	2
221*3e41d09dSXin LI>0x0E	byte&0xF0	0x30	3
222*3e41d09dSXin LI>0x0E	byte&0xF0	0x40	4
223*3e41d09dSXin LI>0x0E	byte&0xF0	0x50	5
224*3e41d09dSXin LI>0x0E	byte&0xF0	0x60	6
225*3e41d09dSXin LI>0x0E	byte&0xF0	0x70	7
226*3e41d09dSXin LI>0x0E	byte&0xF0	0x80	8
227*3e41d09dSXin LI>0x0E	byte&0xF0	0x90	9
228*3e41d09dSXin LI>0x0E	byte&0xF0	0xA0	10
229*3e41d09dSXin LI>0x0E	byte&0xF0	0xB0	11
230*3e41d09dSXin LI>0x0E	byte&0xF0	0xC0	12
231*3e41d09dSXin LI>0x0E	byte&0xF0	0xD0	13
232*3e41d09dSXin LI>0x0E	byte&0xF0	0xE0	14
233*3e41d09dSXin LI>0x0E	byte&0xF0	0xF0	15
234*3e41d09dSXin LI# If the product code is 5 digits, we'll need to backspace here.
235*3e41d09dSXin LI>0x0E	byte&0xF0	!0
236*3e41d09dSXin LI>>0x0C	leshort		x	\b%04x
237*3e41d09dSXin LI>0x0E	byte&0xF0	0
238*3e41d09dSXin LI>>0x0C	leshort		x	%04x
239*3e41d09dSXin LI# Revision.
240*3e41d09dSXin LI>0x0E	byte&0x0F	x	(Rev.%02d)
241*3e41d09dSXin LI# ROM size. (Used for the boot ROM checksum routine.)
242*3e41d09dSXin LI>0x0F	byte&0x0F	0x0A	(8 KB)
243*3e41d09dSXin LI>0x0F	byte&0x0F	0x0B	(16 KB)
244*3e41d09dSXin LI>0x0F	byte&0x0F	0x0C	(32 KB)
245*3e41d09dSXin LI>0x0F	byte&0x0F	0x0D	(48 KB)
246*3e41d09dSXin LI>0x0F	byte&0x0F	0x0E	(64 KB)
247*3e41d09dSXin LI>0x0F	byte&0x0F	0x0F	(128 KB)
248*3e41d09dSXin LI>0x0F	byte&0x0F	0x00	(256 KB)
249*3e41d09dSXin LI>0x0F	byte&0x0F	0x01	(512 KB)
250*3e41d09dSXin LI>0x0F	byte&0x0F	0x02	(1 MB)
251*3e41d09dSXin LI
252*3e41d09dSXin LI# SMS/GG header locations.
253*3e41d09dSXin LI0x7FF0	string	TMR\ SEGA
254*3e41d09dSXin LI>0x7FF0	use	sega-master-system-rom-header
255*3e41d09dSXin LI0x3FF0	string	TMR\ SEGA
256*3e41d09dSXin LI>0x3FF0	use	sega-master-system-rom-header
257*3e41d09dSXin LI0x1FF0	string	TMR\ SEGA
258*3e41d09dSXin LI>0x1FF0	use	sega-master-system-rom-header
259b6cee71dSXin LI
260b6cee71dSXin LI#------------------------------------------------------------------------------
261*3e41d09dSXin LI# saturn: file(1) magic for the Sega Saturn disc image format.
262*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
263b6cee71dSXin LI#
264*3e41d09dSXin LI
265*3e41d09dSXin LI# Common Sega Saturn disc header format.
266*3e41d09dSXin LI# NOTE: Title is 112 bytes, but we're only showing 32 due to space padding.
267*3e41d09dSXin LI# TODO: Release date, device information, region code, others?
268*3e41d09dSXin LI0	name	sega-saturn-disc-header
269*3e41d09dSXin LI>0x60	string	>\0	\b: "%.32s"
270*3e41d09dSXin LI>0x20	string	>\0	(%.10s
271*3e41d09dSXin LI>>0x2A	string	>\0	\b, %.6s)
272*3e41d09dSXin LI>>0x2A	byte	0	\b)
273*3e41d09dSXin LI
274*3e41d09dSXin LI# 2048-byte sector version.
275*3e41d09dSXin LI0	string	SEGA\ SEGASATURN\ 	Sega Saturn disc image
276*3e41d09dSXin LI>0	use	sega-saturn-disc-header
277*3e41d09dSXin LI>0	byte	x			(2048-byte sectors)
278*3e41d09dSXin LI# 2352-byte sector version.
279*3e41d09dSXin LI0x10	string	SEGA\ SEGASATURN\ 	Sega Saturn disc image
280*3e41d09dSXin LI>0x10	use	sega-saturn-disc-header
281*3e41d09dSXin LI>0	byte	x			(2352-byte sectors)
282*3e41d09dSXin LI
283*3e41d09dSXin LI#------------------------------------------------------------------------------
284*3e41d09dSXin LI# dreamcast: file(1) magic for the Sega Dreamcast disc image format.
285*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
286*3e41d09dSXin LI# Reference: http://mc.pp.se/dc/ip0000.bin.html
287b6cee71dSXin LI#
288*3e41d09dSXin LI
289*3e41d09dSXin LI# Common Sega Dreamcast disc header format.
290*3e41d09dSXin LI# NOTE: Title is 128 bytes, but we're only showing 32 due to space padding.
291*3e41d09dSXin LI# TODO: Release date, device information, region code, others?
292*3e41d09dSXin LI0	name	sega-dreamcast-disc-header
293*3e41d09dSXin LI>0x80	string	>\0	\b: "%.32s"
294*3e41d09dSXin LI>0x40	string	>\0	(%.10s
295*3e41d09dSXin LI>>0x4A	string	>\0	\b, %.6s)
296*3e41d09dSXin LI>>0x4A	byte	0	\b)
297*3e41d09dSXin LI
298*3e41d09dSXin LI# 2048-byte sector version.
299*3e41d09dSXin LI0	string	SEGA\ SEGAKATANA\ 	Sega Dreamcast disc image
300*3e41d09dSXin LI>0	use	sega-dreamcast-disc-header
301*3e41d09dSXin LI>0	byte	x			(2048-byte sectors)
302*3e41d09dSXin LI# 2352-byte sector version.
303*3e41d09dSXin LI0x10	string	SEGA\ SEGAKATANA\ 	Sega Dreamcast disc image
304*3e41d09dSXin LI>0x10	use	sega-dreamcast-disc-header
305*3e41d09dSXin LI>0	byte	x			(2352-byte sectors)
306b6cee71dSXin LI
307b6cee71dSXin LI#------------------------------------------------------------------------------
308b6cee71dSXin LI# dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
309b6cee71dSXin LI#
310b6cee71dSXin LI0 belong 0x21068028   Sega Dreamcast VMU game image
311b6cee71dSXin LI0 string LCDi         Dream Animator file
312b6cee71dSXin LI
313b6cee71dSXin LI#------------------------------------------------------------------------------
314*3e41d09dSXin LI# z64: file(1) magic for the Z64 format N64 ROM dumps
315*3e41d09dSXin LI# Reference: http://forum.pj64-emu.com/showthread.php?t=2239
316*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
317b6cee71dSXin LI#
318*3e41d09dSXin LI0	bequad	0x803712400000000F	Nintendo 64 ROM image
319*3e41d09dSXin LI>0x20	string	>\0	\b: "%.20s"
320*3e41d09dSXin LI>0x3B	string	x	(%.4s
321*3e41d09dSXin LI>0x3F	byte	x	\b, Rev.%02u)
322b6cee71dSXin LI
323*3e41d09dSXin LI#------------------------------------------------------------------------------
324*3e41d09dSXin LI# v64: file(1) magic for the V64 format N64 ROM dumps
325*3e41d09dSXin LI# Same as z64 format, but with 16-bit byteswapping.
326*3e41d09dSXin LI#
327*3e41d09dSXin LI0	bequad	0x3780401200000F00	Nintendo 64 ROM image (V64)
328*3e41d09dSXin LI
329*3e41d09dSXin LI#------------------------------------------------------------------------------
330*3e41d09dSXin LI# n64-swap2: file(1) magic for the swap2 format N64 ROM dumps
331*3e41d09dSXin LI# Same as z64 format, but with swapped 16-bit words.
332*3e41d09dSXin LI#
333*3e41d09dSXin LI0	bequad	0x12408037000F0000	Nintendo 64 ROM image (wordswapped)
334*3e41d09dSXin LI
335*3e41d09dSXin LI#------------------------------------------------------------------------------
336*3e41d09dSXin LI# n64-le32: file(1) magic for the 32-bit byteswapped format N64 ROM dumps
337*3e41d09dSXin LI# Same as z64 format, but with 32-bit byteswapping.
338*3e41d09dSXin LI#
339*3e41d09dSXin LI0	bequad	0x401237800F000000	Nintendo 64 ROM image (32-bit byteswapped)
340*3e41d09dSXin LI
341*3e41d09dSXin LI#------------------------------------------------------------------------------
342*3e41d09dSXin LI# gba: file(1) magic for the Nintendo Game Boy Advance raw ROM format
343*3e41d09dSXin LI# Reference: http://problemkaputt.de/gbatek.htm#gbacartridgeheader
344*3e41d09dSXin LI#
345*3e41d09dSXin LI# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
346*3e41d09dSXin LI# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
347*3e41d09dSXin LI#
348*3e41d09dSXin LI4	bequad	0x24FFAE51699AA221	Game Boy Advance ROM image
349*3e41d09dSXin LI>0xA0	string	>\0	\b: "%.12s"
350*3e41d09dSXin LI>0xAC	string	x	(%.6s
351*3e41d09dSXin LI>0xBC	byte	x	\b, Rev.%02u)
352*3e41d09dSXin LI
353*3e41d09dSXin LI#------------------------------------------------------------------------------
354*3e41d09dSXin LI# nds: file(1) magic for the Nintendo DS(i) raw ROM format
355*3e41d09dSXin LI# Reference: http://problemkaputt.de/gbatek.htm#dscartridgeheader
356*3e41d09dSXin LI#
357*3e41d09dSXin LI# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
358*3e41d09dSXin LI# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
359*3e41d09dSXin LI#
360*3e41d09dSXin LI0xC0	bequad	0x24FFAE51699AA221	Nintendo DS ROM image
361*3e41d09dSXin LI>0x00	string	>\0		\b: "%.12s"
362*3e41d09dSXin LI>0x0C	string	x		(%.6s
363*3e41d09dSXin LI>0x1E	byte	x		\b, Rev.%02u)
364*3e41d09dSXin LI>0x12	byte	2		(DSi enhanced)
365*3e41d09dSXin LI>0x12	byte	3		(DSi only)
366*3e41d09dSXin LI
367*3e41d09dSXin LI#------------------------------------------------------------------------------
368*3e41d09dSXin LI# nds_passme: file(1) magic for Nintendo DS ROM images for GBA cartridge boot.
369*3e41d09dSXin LI# This is also used for loading .nds files using the MSET exploit on 3DS.
370*3e41d09dSXin LI# Reference: https://github.com/devkitPro/ndstool/blob/master/source/ndscreate.cpp
371*3e41d09dSXin LI0xC0	bequad	0xC8604FE201708FE2	Nintendo DS Slot-2 ROM image (PassMe)
372*3e41d09dSXin LI
373*3e41d09dSXin LI#------------------------------------------------------------------------------
374*3e41d09dSXin LI# ngp: file(1) magic for the Neo Geo Pocket (Color) raw ROM format.
375*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
376*3e41d09dSXin LI# References:
377*3e41d09dSXin LI# - https://neogpc.googlecode.com/svn-history/r10/trunk/src/core/neogpc.cpp
378*3e41d09dSXin LI# - http://www.devrs.com/ngp/files/ngpctech.txt
379*3e41d09dSXin LI#
380*3e41d09dSXin LI0x0A	string	BY\ SNK\ CORPORATION	Neo Geo Pocket
381*3e41d09dSXin LI>0x23	byte	0x10			Color
382*3e41d09dSXin LI>0	byte	x			ROM image
383*3e41d09dSXin LI>0x24	string	>\0			\b: "%.12s"
384*3e41d09dSXin LI>0x1F	byte	0xFF			(debug mode enabled)
385b6cee71dSXin LI
386b6cee71dSXin LI#------------------------------------------------------------------------------
387b6cee71dSXin LI# msx: file(1) magic for MSX game cartridge dumps
388b6cee71dSXin LI# Too simple - MPi
389b6cee71dSXin LI#0 beshort 0x4142 MSX game cartridge dump
390b6cee71dSXin LI
391b6cee71dSXin LI#------------------------------------------------------------------------------
392b6cee71dSXin LI# Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
393b6cee71dSXin LI0	string	PS-X\ EXE	Sony Playstation executable
394*3e41d09dSXin LI>16	lelong	x		PC=0x%08x,
395*3e41d09dSXin LI>20	lelong	!0		GP=0x%08x,
396*3e41d09dSXin LI>24	lelong	!0		.text=[0x%08x,
397*3e41d09dSXin LI>>28	lelong	x		\b0x%x],
398*3e41d09dSXin LI>32	lelong	!0		.data=[0x%08x,
399*3e41d09dSXin LI>>36	lelong	x		\b0x%x],
400*3e41d09dSXin LI>40	lelong	!0		.bss=[0x%08x,
401*3e41d09dSXin LI>>44	lelong	x		\b0x%x],
402*3e41d09dSXin LI>48	lelong	!0		Stack=0x%08x,
403*3e41d09dSXin LI>48	lelong	=0		No Stack!,
404*3e41d09dSXin LI>52	lelong	!0		StackSize=0x%x,
405*3e41d09dSXin LI#>76	string	>\0		(%s)
406b6cee71dSXin LI#  Area:
407b6cee71dSXin LI>113	string	x		(%s)
408b6cee71dSXin LI
409*3e41d09dSXin LI# CPE executables
410*3e41d09dSXin LI0	string	CPE		CPE executable
411*3e41d09dSXin LI>3	byte	x		(version %d)
412*3e41d09dSXin LI
413b6cee71dSXin LI#------------------------------------------------------------------------------
414b6cee71dSXin LI# Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>)
415b6cee71dSXin LI0       string          XBEH            XBE, Microsoft Xbox executable
416b6cee71dSXin LI# probabilistic checks whether signed or not
417b6cee71dSXin LI>0x0004 ulelong =0x0
418b6cee71dSXin LI>>&2    ulelong =0x0
419b6cee71dSXin LI>>>&2   ulelong =0x0  \b, not signed
420b6cee71dSXin LI>0x0004 ulelong >0
421b6cee71dSXin LI>>&2    ulelong >0
422b6cee71dSXin LI>>>&2   ulelong >0    \b, signed
423b6cee71dSXin LI# expect base address of 0x10000
424b6cee71dSXin LI>0x0104               ulelong =0x10000
425b6cee71dSXin LI>>(0x0118-0x0FF60)    ulelong&0x80000007  0x80000007 \b, all regions
426b6cee71dSXin LI>>(0x0118-0x0FF60)    ulelong&0x80000007  !0x80000007
427b6cee71dSXin LI>>>(0x0118-0x0FF60)   ulelong >0           (regions:
428b6cee71dSXin LI>>>>(0x0118-0x0FF60)  ulelong &0x00000001  NA
429b6cee71dSXin LI>>>>(0x0118-0x0FF60)  ulelong &0x00000002  Japan
430b6cee71dSXin LI>>>>(0x0118-0x0FF60)  ulelong &0x00000004  Rest_of_World
431b6cee71dSXin LI>>>>(0x0118-0x0FF60)  ulelong &0x80000000  Manufacturer
432b6cee71dSXin LI>>>(0x0118-0x0FF60)   ulelong >0           \b)
433b6cee71dSXin LI
434b6cee71dSXin LI# --------------------------------
435b6cee71dSXin LI# Microsoft Xbox data file formats
436b6cee71dSXin LI0       string          XIP0            XIP, Microsoft Xbox data
437b6cee71dSXin LI0       string          XTF0            XTF, Microsoft Xbox data
438b6cee71dSXin LI
439b6cee71dSXin LI# Atari Lynx cartridge dump (EXE/BLL header)
440b6cee71dSXin LI# From: "Stefan A. Haubenthal" <polluks@web.de>
441b6cee71dSXin LI
442b6cee71dSXin LI# Double-check that the image type matches too, 0x8008 conflicts with
443b6cee71dSXin LI# 8 character OMF-86 object file headers.
444b6cee71dSXin LI0	beshort		0x8008
445b6cee71dSXin LI>6	string		BS93		Lynx homebrew cartridge
446b6cee71dSXin LI>>2	beshort		x		\b, RAM start $%04x
447b6cee71dSXin LI>6	string		LYNX		Lynx cartridge
448b6cee71dSXin LI>>2	beshort		x		\b, RAM start $%04x
449b6cee71dSXin LI
450b6cee71dSXin LI# Opera file system that is used on the 3DO console
451b6cee71dSXin LI# From: Serge van den Boom <svdb@stack.nl>
452b6cee71dSXin LI0	string		\x01ZZZZZ\x01	3DO "Opera" file system
453b6cee71dSXin LI
4545f0216bdSXin LI# From: Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
4555f0216bdSXin LI# From: David Pflug <david@pflug.email>
4565f0216bdSXin LI# is the offset 12 or the offset 16 correct?
4575f0216bdSXin LI# GBS (Game Boy Sound) magic
4585f0216bdSXin LI# ftp://ftp.modland.com/pub/documents/format_documentation/\
4595f0216bdSXin LI# Gameboy%20Sound%20System%20(.gbs).txt
460b6cee71dSXin LI0	string		GBS		Nintendo Gameboy Music/Audio Data
4615f0216bdSXin LI#12	string		GameBoy\ Music\ Module	Nintendo Gameboy Music Module
4625f0216bdSXin LI>16	string		>\0	("%s" by
4635f0216bdSXin LI>48	string		>\0	%s, copyright
4645f0216bdSXin LI>80	string		>\0	%s),
4655f0216bdSXin LI>3	byte		x	version %d,
4665f0216bdSXin LI>4	byte		x	%d tracks
467b6cee71dSXin LI
468b6cee71dSXin LI# Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
469b6cee71dSXin LI0	string	PPF30			Playstation Patch File version 3.0
470b6cee71dSXin LI>5	byte	0			\b, PPF 1.0 patch
471b6cee71dSXin LI>5	byte	1			\b, PPF 2.0 patch
472b6cee71dSXin LI>5	byte	2			\b, PPF 3.0 patch
473b6cee71dSXin LI>>56	byte	0			\b, Imagetype BIN (any)
474b6cee71dSXin LI>>56	byte	1			\b, Imagetype GI (PrimoDVD)
475b6cee71dSXin LI>>57	byte	0			\b, Blockcheck disabled
476b6cee71dSXin LI>>57	byte	1			\b, Blockcheck enabled
477b6cee71dSXin LI>>58	byte	0			\b, Undo data not available
478b6cee71dSXin LI>>58	byte	1			\b, Undo data available
479b6cee71dSXin LI>6	string	x			\b, description: %s
480b6cee71dSXin LI
481b6cee71dSXin LI0	string	PPF20			Playstation Patch File version 2.0
482b6cee71dSXin LI>5	byte	0			\b, PPF 1.0 patch
483b6cee71dSXin LI>5	byte	1			\b, PPF 2.0 patch
484b6cee71dSXin LI>>56	lelong	>0			\b, size of file to patch %d
485b6cee71dSXin LI>6	string	x			\b, description: %s
486b6cee71dSXin LI
487b6cee71dSXin LI0	string	PPF10			Playstation Patch File version 1.0
488b6cee71dSXin LI>5	byte	0			\b, Simple Encoding
489b6cee71dSXin LI>6	string	x			\b, description: %s
490b6cee71dSXin LI
491b6cee71dSXin LI# From: Daniel Dawson <ddawson@icehouse.net>
492b6cee71dSXin LI# SNES9x .smv "movie" file format.
493b6cee71dSXin LI0		string		SMV\x1A	SNES9x input recording
494b6cee71dSXin LI>0x4		lelong		x	\b, version %d
495b6cee71dSXin LI# version 4 is latest so far
496b6cee71dSXin LI>0x4		lelong		<5
497b6cee71dSXin LI>>0x8		ledate		x	\b, recorded at %s
498b6cee71dSXin LI>>0xc		lelong		>0	\b, rerecorded %d times
499b6cee71dSXin LI>>0x10		lelong		x	\b, %d frames long
500b6cee71dSXin LI>>0x14		byte		>0	\b, data for controller(s):
501b6cee71dSXin LI>>>0x14		byte		&0x1	#1
502b6cee71dSXin LI>>>0x14		byte		&0x2	#2
503b6cee71dSXin LI>>>0x14		byte		&0x4	#3
504b6cee71dSXin LI>>>0x14		byte		&0x8	#4
505b6cee71dSXin LI>>>0x14		byte		&0x10	#5
506b6cee71dSXin LI>>0x15		byte		^0x1	\b, begins from snapshot
507b6cee71dSXin LI>>0x15		byte		&0x1	\b, begins from reset
508b6cee71dSXin LI>>0x15		byte		^0x2	\b, NTSC standard
509b6cee71dSXin LI>>0x15		byte		&0x2	\b, PAL standard
510b6cee71dSXin LI>>0x17		byte		&0x1    \b, settings:
511b6cee71dSXin LI# WIP1Timing not used as of version 4
512b6cee71dSXin LI>>>0x4		lelong		<4
513b6cee71dSXin LI>>>>0x17	byte		&0x2	WIP1Timing
514b6cee71dSXin LI>>>0x17		byte		&0x4	Left+Right
515b6cee71dSXin LI>>>0x17		byte		&0x8	VolumeEnvX
516b6cee71dSXin LI>>>0x17		byte		&0x10	FakeMute
517b6cee71dSXin LI>>>0x17		byte		&0x20	SyncSound
518b6cee71dSXin LI# New flag as of version 4
519b6cee71dSXin LI>>>0x4		lelong		>3
520b6cee71dSXin LI>>>>0x17	byte		&0x80	NoCPUShutdown
521b6cee71dSXin LI>>0x4		lelong		<4
522b6cee71dSXin LI>>>0x18		lelong		>0x23
523b6cee71dSXin LI>>>>0x20	leshort		!0
524b6cee71dSXin LI>>>>>0x20	lestring16	x	\b, metadata: "%s"
525b6cee71dSXin LI>>0x4		lelong		>3
526b6cee71dSXin LI>>>0x24		byte		>0	\b, port 1:
527b6cee71dSXin LI>>>>0x24	byte		1	joypad
528b6cee71dSXin LI>>>>0x24	byte		2	mouse
529b6cee71dSXin LI>>>>0x24	byte		3	SuperScope
530b6cee71dSXin LI>>>>0x24	byte		4	Justifier
531b6cee71dSXin LI>>>>0x24	byte		5	multitap
532b6cee71dSXin LI>>>0x24		byte		>0	\b, port 2:
533b6cee71dSXin LI>>>>0x25	byte		1	joypad
534b6cee71dSXin LI>>>>0x25	byte		2	mouse
535b6cee71dSXin LI>>>>0x25	byte		3	SuperScope
536b6cee71dSXin LI>>>>0x25	byte		4	Justifier
537b6cee71dSXin LI>>>>0x25	byte		5	multitap
538b6cee71dSXin LI>>>0x18		lelong		>0x43
539b6cee71dSXin LI>>>>0x40	leshort		!0
540b6cee71dSXin LI>>>>>0x40	lestring16	x	\b, metadata: "%s"
541b6cee71dSXin LI>>0x17		byte		&0x40   \b, ROM:
542b6cee71dSXin LI>>>(0x18.l-26)	lelong		x	CRC32 0x%08x
543b6cee71dSXin LI>>>(0x18.l-23)	string		x	"%s"
544b6cee71dSXin LI
545b6cee71dSXin LI# Type: scummVM savegame files
546b6cee71dSXin LI# From: Sven Hartge <debian@ds9.argh.org>
547b6cee71dSXin LI0	string	SCVM	ScummVM savegame
548b6cee71dSXin LI>12	string	>\0	"%s"
549*3e41d09dSXin LI
550*3e41d09dSXin LI#------------------------------------------------------------------------------
551*3e41d09dSXin LI# Nintendo GameCube / Wii file formats.
552*3e41d09dSXin LI#
553*3e41d09dSXin LI
554*3e41d09dSXin LI# Type: Nintendo GameCube/Wii common disc header data.
555*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
556*3e41d09dSXin LI# Reference: http://wiibrew.org/wiki/Wii_Disc
557*3e41d09dSXin LI0	name	nintendo-gcn-disc-common
558*3e41d09dSXin LI>0x20	string	x	"%.64s"
559*3e41d09dSXin LI>0x00	string	x	(%.6s
560*3e41d09dSXin LI>0x06	byte	>0
561*3e41d09dSXin LI>>0x06	byte	1	\b, Disc 2
562*3e41d09dSXin LI>>0x06	byte	2	\b, Disc 3
563*3e41d09dSXin LI>>0x06	byte	3	\b, Disc 4
564*3e41d09dSXin LI>0x07	byte	x	\b, Rev.%02u)
565*3e41d09dSXin LI
566*3e41d09dSXin LI# Type: Nintendo GameCube disc image
567*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
568*3e41d09dSXin LI# Reference: http://wiibrew.org/wiki/Wii_Disc
569*3e41d09dSXin LI0x1C	belong	0xC2339F3D	Nintendo GameCube disc image:
570*3e41d09dSXin LI>0	use	nintendo-gcn-disc-common
571*3e41d09dSXin LI
572*3e41d09dSXin LI# Type: Nintendo Wii disc image
573*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
574*3e41d09dSXin LI# Reference: http://wiibrew.org/wiki/Wii_Disc
575*3e41d09dSXin LI0x18	belong	0x5D1C9EA3	Nintendo Wii disc image:
576*3e41d09dSXin LI>0	use	nintendo-gcn-disc-common
577*3e41d09dSXin LI
578*3e41d09dSXin LI# Type: Nintendo Wii disc image (WBFS format)
579*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
580*3e41d09dSXin LI# Reference: http://wiibrew.org/wiki/Wii_Disc
581*3e41d09dSXin LI0	string	WBFS
582*3e41d09dSXin LI>0x218	belong	0x5D1C9EA3	Nintendo Wii disc image (WBFS format):
583*3e41d09dSXin LI>>0x200	use	nintendo-gcn-disc-common
584*3e41d09dSXin LI
585*3e41d09dSXin LI#------------------------------------------------------------------------------
586*3e41d09dSXin LI# Nintendo 3DS file formats.
587*3e41d09dSXin LI#
588*3e41d09dSXin LI
589*3e41d09dSXin LI# Type: Nintendo 3DS "NCCH" header.
590*3e41d09dSXin LI# Contained within either a CXI executable or an NCSD image.
591*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
592*3e41d09dSXin LI# Reference: https://www.3dbrew.org/wiki/NCCH
593*3e41d09dSXin LI0		name		nintendo-3ds-NCCH
594*3e41d09dSXin LI>0x100		string		NCCH
595*3e41d09dSXin LI>>0x150		string		>\0	\b: "%.16s"
596*3e41d09dSXin LI>>0x112		leshort		x	(v%u)
597*3e41d09dSXin LI>>0x18C		byte		2	(New3DS only)
598*3e41d09dSXin LI
599*3e41d09dSXin LI# Type: Nintendo 3DS "NCSD" image. (game cards and eMMC)
600*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
601*3e41d09dSXin LI# Reference: https://www.3dbrew.org/wiki/NCSD
602*3e41d09dSXin LI0x100		string		NCSD
603*3e41d09dSXin LI>0x118		lequad		0		Nintendo 3DS Game Card image
604*3e41d09dSXin LI>>0x1000	use		nintendo-3ds-NCCH
605*3e41d09dSXin LI>>0x18D		byte		0		(inner device)
606*3e41d09dSXin LI>>0x18D		byte		1		(Card1)
607*3e41d09dSXin LI>>0x18D		byte		2		(Card2)
608*3e41d09dSXin LI>>0x18D		byte		3		(extended device)
609*3e41d09dSXin LI>0x118		bequad		0x0102020202000000	Nintendo 3DS eMMC dump (Old3DS)
610*3e41d09dSXin LI>0x118		bequad		0x0102020203000000	Nintendo 3DS eMMC dump (New3DS)
611*3e41d09dSXin LI
612*3e41d09dSXin LI# Type: Nintendo 3DS "NCCH" container.
613*3e41d09dSXin LI# https://www.3dbrew.org/wiki/NCCH
614*3e41d09dSXin LI0x100	string	NCCH		Nintendo 3DS
615*3e41d09dSXin LI>0x18D	byte&2	0		File Archive (CFA)
616*3e41d09dSXin LI>0x18D	byte&2	2		Executable Image (CXI)
617*3e41d09dSXin LI>0	use	nintendo-3ds-NCCH
618*3e41d09dSXin LI
619*3e41d09dSXin LI# Type: Nintendo 3DS "SMDH" file. (application description)
620*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
621*3e41d09dSXin LI# Reference: https://3dbrew.org/wiki/SMDH
622*3e41d09dSXin LI0		string		SMDH		Nintendo 3DS SMDH file
623*3e41d09dSXin LI>0x208		leshort		!0
624*3e41d09dSXin LI>>0x208		lestring16	x		\b: "%.128s"
625*3e41d09dSXin LI>>0x388		leshort		!0
626*3e41d09dSXin LI>>>0x388	lestring16	x		by %.128s
627*3e41d09dSXin LI>0x208		leshort		0
628*3e41d09dSXin LI>>0x008		leshort		!0
629*3e41d09dSXin LI>>>0x008	lestring16	x		\b: "%.128s"
630*3e41d09dSXin LI>>>0x188	leshort		!0
631*3e41d09dSXin LI>>>>0x188	lestring16	x		by %.128s
632*3e41d09dSXin LI
633*3e41d09dSXin LI# Type: Nintendo 3DS Homebrew Application.
634*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
635*3e41d09dSXin LI# Refernece: https://3dbrew.org/wiki/3DSX_Format
636*3e41d09dSXin LI0	string	3DSX	Nintendo 3DS Homebrew Application (3DSX)
637*3e41d09dSXin LI
638*3e41d09dSXin LI#------------------------------------------------------------------------------
639*3e41d09dSXin LI# a7800: file(1) magic for the Atari 7800 raw ROM format.
640*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
641*3e41d09dSXin LI# Reference: https://sites.google.com/site/atari7800wiki/a78-header
642*3e41d09dSXin LI
643*3e41d09dSXin LI0	byte	>0
644*3e41d09dSXin LI>0	byte	<3
645*3e41d09dSXin LI>>1	string	ATARI7800	Atari 7800 ROM image
646*3e41d09dSXin LI>>>0x11	string	>\0	\b: "%.32s"
647*3e41d09dSXin LI# Display type.
648*3e41d09dSXin LI>>>0x39	byte	0	(NTSC)
649*3e41d09dSXin LI>>>0x39	byte	1	(PAL)
650*3e41d09dSXin LI>>>0x36	byte&1	1	(POKEY)
651*3e41d09dSXin LI
652*3e41d09dSXin LI#------------------------------------------------------------------------------
653*3e41d09dSXin LI# vectrex: file(1) magic for the GCE Vectrex raw ROM format.
654*3e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com>
655*3e41d09dSXin LI# Reference: http://www.playvectrex.com/designit/chrissalo/hello1.htm
656*3e41d09dSXin LI#
657*3e41d09dSXin LI# NOTE: Title is terminated with 0x80, not 0.
658*3e41d09dSXin LI# The header is terminated with a 0, so that will
659*3e41d09dSXin LI# terminate the title as well.
660*3e41d09dSXin LI#
661*3e41d09dSXin LI0	string	g\ GCE	Vectrex ROM image
662*3e41d09dSXin LI>0x11	string	>\0	\b: "%.16s"
663