summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Plazas <kekun.plazas@laposte.net>2015-08-30 00:21:45 +0200
committerBastien Nocera <hadess@hadess.net>2015-09-01 12:16:23 +0200
commita47c0eb7a2c4799a6e06ff7e57b37a14967299df (patch)
tree47089ea3417d6d44eef00b89cf54f562e6bb4686
parentfc806c5a84a4b346077e07cb3a14d64477bf56fa (diff)
Add magic and tests to application/x-gameboy-rom
Check the first 24 bytes of the Nintendo logo magic number. Also add tests for Game Boy and Game Boy Color games. https://bugs.freedesktop.org/show_bug.cgi?id=91824
-rw-r--r--freedesktop.org.xml.in3
-rw-r--r--tests/game-boy-color-test.gbcbin0 -> 1024 bytes
-rw-r--r--tests/game-boy-test.gbbin0 -> 1024 bytes
-rw-r--r--tests/list4
4 files changed, 7 insertions, 0 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index c93ac55..8ba9570 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -1993,6 +1993,9 @@ command to generate the output files.
<mime-type type="application/x-gameboy-rom">
<_comment>Game Boy ROM</_comment>
<generic-icon name="application-x-executable"/>
+ <magic priority="50">
+ <match type="string" value="\xce\xed\x66\x66\xcc\x0d\x00\x0b\x03\x73\x00\x83\x00\x0c\x00\x0d\x00\x08\x11\x1f\x88\x89\x00\x0e" offset="260"/>
+ </magic>
<glob pattern="*.gb"/>
<glob pattern="*.gbc"/>
<glob pattern="*.cgb"/>
diff --git a/tests/game-boy-color-test.gbc b/tests/game-boy-color-test.gbc
new file mode 100644
index 0000000..fc640c5
--- /dev/null
+++ b/tests/game-boy-color-test.gbc
Binary files differ
diff --git a/tests/game-boy-test.gb b/tests/game-boy-test.gb
new file mode 100644
index 0000000..986c4b0
--- /dev/null
+++ b/tests/game-boy-test.gb
Binary files differ
diff --git a/tests/list b/tests/list
index 40c215d..cdd26d3 100644
--- a/tests/list
+++ b/tests/list
@@ -434,6 +434,10 @@ adf-test.adf application/x-amiga-disk-format
# Video game ROMs
genesis1.bin application/x-genesis-rom xox
genesis2.bin application/x-genesis-rom xox
+# Kirby's Dream Land truncated to 1Ko
+game-boy-test.gb application/x-gameboy-rom
+# The Legend of Zelda: Link's Awakening truncated to 1Ko
+game-boy-color-test.gbc application/x-gameboy-rom
m64p_test_rom.n64 application/x-n64-rom
m64p_test_rom.v64 application/x-n64-rom
m64p_test_rom.z64 application/x-n64-rom