aboutsummaryrefslogtreecommitdiff
path: root/magic/Magdir/console
diff options
context:
space:
mode:
Diffstat (limited to 'magic/Magdir/console')
-rw-r--r--magic/Magdir/console93
1 files changed, 65 insertions, 28 deletions
diff --git a/magic/Magdir/console b/magic/Magdir/console
index ab2954f0b5af..5e5e5816ecc9 100644
--- a/magic/Magdir/console
+++ b/magic/Magdir/console
@@ -1,14 +1,14 @@
#------------------------------------------------------------------------------
-# $File: console,v 1.40 2018/06/23 16:40:40 christos Exp $
+# $File: console,v 1.45 2019/04/19 00:42:27 christos Exp $
# Console game magic
# Toby Deshane <hac@shoelace.digivill.net>
# ines: file(1) magic for Marat's iNES Nintendo Entertainment System ROM dump format
# Updated by David Korth <gerbilsoft@gerbilsoft.com>
# References:
-# - http://wiki.nesdev.com/w/index.php/INES
-# - http://wiki.nesdev.com/w/index.php/NES_2.0
+# - https://wiki.nesdev.com/w/index.php/INES
+# - https://wiki.nesdev.com/w/index.php/NES_2.0
# Common header for iNES, NES 2.0, and Wii U iNES.
0 name nes-rom-image-ines
@@ -57,7 +57,7 @@
#------------------------------------------------------------------------------
# unif: file(1) magic for UNIF-format Nintendo Entertainment System ROM images
-# Reference: http://wiki.nesdev.com/w/index.php/UNIF
+# Reference: https://wiki.nesdev.com/w/index.php/UNIF
# From: David Korth <gerbilsoft@gerbilsoft.com>
#
# NOTE: The UNIF format uses chunks instead of a fixed header,
@@ -69,7 +69,7 @@
#------------------------------------------------------------------------------
# fds: file(1) magic for Famciom Disk System disk images
-# Reference: http://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#.FDS_format
+# Reference: https://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#.FDS_format
# From: David Korth <gerbilsoft@gerbilsoft.com>
# TODO: Check "Disk info block" and get info from that in addition to the optional header.
@@ -186,7 +186,7 @@
# genesis: file(1) magic for various Sega Mega Drive / Genesis ROM image and disc formats
# Updated by David Korth <gerbilsoft@gerbilsoft.com>
# References:
-# - http://www.retrodev.com/segacd.html
+# - https://www.retrodev.com/segacd.html
# - http://devster.monkeeh.com/sega/32xguide1.txt
#
@@ -269,7 +269,7 @@
# Detects all Game Gear and export Sega Master System ROM images,
# and some Japanese Sega Master System ROM images.
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://www.smspower.org/Development/ROMHeader
+# Reference: https://www.smspower.org/Development/ROMHeader
#
# General SMS header rule.
@@ -359,7 +359,7 @@
#------------------------------------------------------------------------------
# dreamcast: file(1) magic for the Sega Dreamcast disc image format.
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://mc.pp.se/dc/ip0000.bin.html
+# Reference: https://mc.pp.se/dc/ip0000.bin.html
#
# Common Sega Dreamcast disc header format.
@@ -422,7 +422,7 @@
#------------------------------------------------------------------------------
# gba: file(1) magic for the Nintendo Game Boy Advance raw ROM format
-# Reference: http://problemkaputt.de/gbatek.htm#gbacartridgeheader
+# Reference: https://problemkaputt.de/gbatek.htm#gbacartridgeheader
#
# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
@@ -435,7 +435,7 @@
#------------------------------------------------------------------------------
# nds: file(1) magic for the Nintendo DS(i) raw ROM format
-# Reference: http://problemkaputt.de/gbatek.htm#dscartridgeheader
+# Reference: https://problemkaputt.de/gbatek.htm#dscartridgeheader
#
# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
@@ -469,7 +469,7 @@
# From: David Korth <gerbilsoft@gerbilsoft.com>
# References:
# - https://neogpc.googlecode.com/svn-history/r10/trunk/src/core/neogpc.cpp
-# - http://www.devrs.com/ngp/files/ngpctech.txt
+# - https://www.devrs.com/ngp/files/ngpctech.txt
#
0x0A string BY\ SNK\ CORPORATION Neo Geo Pocket
!:mime application/x-neo-geo-pocket-rom
@@ -507,7 +507,21 @@
#------------------------------------------------------------------------------
# Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>)
-0 string XBEH XBE, Microsoft Xbox executable
+0 string XBEH Microsoft Xbox executable
+# expect base address of 0x10000
+>0x0104 ulelong =0x10000
+>>(0x0118.l-0x0FFF4) lestring16 x \b: "%.40s"
+>>(0x0118.l-0x0FFF5) byte x (%c
+>>(0x0118.l-0x0FFF6) byte x \b%c-
+>>(0x0118.l-0x0FFF8) uleshort x \b%03u)
+>>(0x0118.l-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
+>>(0x0118.l-0x0FF60) ulelong&0x80000007 !0x80000007
+>>>(0x0118.l-0x0FF60) ulelong >0 (regions:
+>>>>(0x0118.l-0x0FF60) ulelong &0x00000001 NA
+>>>>(0x0118.l-0x0FF60) ulelong &0x00000002 Japan
+>>>>(0x0118.l-0x0FF60) ulelong &0x00000004 Rest_of_World
+>>>>(0x0118.l-0x0FF60) ulelong &0x80000000 Manufacturer
+>>>(0x0118.l-0x0FF60) ulelong >0 \b)
# probabilistic checks whether signed or not
>0x0004 ulelong =0x0
>>&2 ulelong =0x0
@@ -515,22 +529,43 @@
>0x0004 ulelong >0
>>&2 ulelong >0
>>>&2 ulelong >0 \b, signed
-# expect base address of 0x10000
->0x0104 ulelong =0x10000
->>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
->>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
->>>(0x0118-0x0FF60) ulelong >0 (regions:
->>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
->>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
->>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
->>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
->>>(0x0118-0x0FF60) ulelong >0 \b)
# --------------------------------
# Microsoft Xbox data file formats
0 string XIP0 XIP, Microsoft Xbox data
0 string XTF0 XTF, Microsoft Xbox data
+#------------------------------------------------------------------------------
+# Microsoft Xbox 360 executables (.xex)
+# From: David Korth <gerbilsoft@gerbilsoft.com>
+# References:
+# - https://free60project.github.io/wiki/XEX.html
+# - https://github.com/xenia-project/xenia/blob/HEAD/src/xenia/kernel/util/xex2_info.h
+
+# Title ID (part of Execution ID section)
+0 name xbox-360-xex-execution-id
+>(0.L+0xC) byte x (%c
+>(0.L+0xD) byte x \b%c
+>(0.L+0xE) beshort x \b-%04u)
+
+0 string XEX2 Microsoft Xbox 360 executable
+>0x18 search/0x100 \x00\x04\x00\x06
+>>&0 use xbox-360-xex-execution-id
+>(0x010.L+0x178) ubelong 0xFFFFFFFF \b, all regions
+>(0x010.L+0x178) ubelong !0xFFFFFFFF
+>>(0x010.L+0x178) ubelong >0 (regions:
+>>(0x010.L+0x178) ubelong&0x000000FF 0x000000FF USA
+>>(0x010.L+0x178) ubelong&0x00000100 0x00000100 Japan
+>>(0x010.L+0x178) ubelong&0x00000200 0x00000200 China
+>>(0x010.L+0x178) ubelong&0x0000FC00 0x0000FC00 Asia
+>>(0x010.L+0x178) ubelong&0x00FF0000 0x00FF0000 PAL
+>>(0x010.L+0x178) ubelong&0x00FF0000 0x00FE0000 PAL [except AU/NZ]
+>>(0x010.L+0x178) ubelong&0x00FF0000 0x00010000 AU/NZ
+>>(0x010.L+0x178) ubelong&0xFF000000 0xFF000000 Other
+>>(0x010.L+0x178) ubelong >0 \b)
+
+
+
# Atari Lynx cartridge dump (EXE/BLL header)
# From: "Stefan A. Haubenthal" <polluks@web.de>
@@ -563,7 +598,7 @@
>4 byte x %u tracks
# IPS Patch Files from: From: Thomas Klausner <tk@giga.or.at>
-# see http://zerosoft.zophar.net/ips.php
+# see https://zerosoft.zophar.net/ips.php
0 string PATCH IPS patch file
# Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
@@ -654,7 +689,7 @@
# Type: Nintendo GameCube/Wii common disc header data.
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://wiibrew.org/wiki/Wii_Disc
+# Reference: https://wiibrew.org/wiki/Wii_Disc
0 name nintendo-gcn-disc-common
>0x20 string x "%.64s"
>0x00 string x (%.6s
@@ -668,7 +703,7 @@
# Type: Nintendo GameCube disc image
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://wiibrew.org/wiki/Wii_Disc
+# Reference: https://wiibrew.org/wiki/Wii_Disc
0x1C belong 0xC2339F3D Nintendo GameCube disc image:
!:mime application/x-gamecube-rom
>0 use nintendo-gcn-disc-common
@@ -685,13 +720,13 @@
# Type: Nintendo Wii disc image
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://wiibrew.org/wiki/Wii_Disc
+# Reference: https://wiibrew.org/wiki/Wii_Disc
0x18 belong 0x5D1C9EA3 Nintendo Wii disc image:
>0 use nintendo-gcn-disc-common
# Type: Nintendo Wii disc image (WBFS format)
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://wiibrew.org/wiki/Wii_Disc
+# Reference: https://wiibrew.org/wiki/Wii_Disc
0 string WBFS
>0x218 belong 0x5D1C9EA3 Nintendo Wii disc image (WBFS format):
!:mime application/x-wii-rom
@@ -754,13 +789,15 @@
# Type: Nintendo GameCube/Wii disc image (with SDK header)
# From: David Korth <gerbilsoft@gerbilsoft.com>
-# Reference: http://wiibrew.org/wiki/Wii_Disc
+# Reference: https://wiibrew.org/wiki/Wii_Disc
0 belong 0xFFFF0000
>0x18 belong 0x00000000
>>0x1C belong 0x00000000
>>>0x8018 belong 0x5D1C9EA3 Nintendo Wii SDK disc image:
+!:mime application/x-wii-rom
>>>>0x8000 use nintendo-gcn-disc-common
>>>0x801C belong 0xC2339F3D Nintendo GameCube SDK disc image:
+!:mime application/x-gamecube-rom
>>>>0x8000 use nintendo-gcn-disc-common
#------------------------------------------------------------------------------