summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExalm <exalm7659@gmail.com>2018-04-15 13:07:16 +0000
committerBastien Nocera <hadess@hadess.net>2018-04-24 15:09:43 +0200
commitfbc73fb12e8c22d7718351f7e4ef6cd9603da34a (patch)
tree0f5c3826807222a69741cc4a0ced15a6cc9f3e1a
parent8311e418a502589b22894a375b7473249b4decf3 (diff)
downloadshared-mime-info-fbc73fb12e8c22d7718351f7e4ef6cd9603da34a.tar.gz
Differentiate Neo Geo Pocket Color ROMs from non-Color ones
Add an 'application/x-neo-geo-pocket-color-rom' MIME type, as opposed to 'application-x-neo-geo-pocket-rom'. Neo Geo Pocket Color ROMs usually have '.ngc' extension instead of '.ngp', and their 0x23rd byte in the header is different from NGP ones. The first 9 characters in the header can either be "COPYRIGHT" or " LICENSED" with a leading space. Also update application/x-neo-geo-pocket-rom test to use an actual NGP game instead of a Neo-Geo Pocket Color one. http://bugzilla.freedesktop.org/show_bug.cgi?id=106055
-rw-r--r--freedesktop.org.xml.in16
-rw-r--r--tests/list4
-rw-r--r--tests/neo-geo-pocket-color-test.ngcbin0 -> 1024 bytes
-rw-r--r--tests/neo-geo-pocket-test.ngpbin1024 -> 1024 bytes
4 files changed, 18 insertions, 2 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 72c41d60..2a819f93 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -3024,7 +3024,21 @@ command to generate the output files.
<generic-icon name="application-x-executable"/>
<glob pattern="*.ngp"/>
<magic>
- <match offset="0" type="string" value="COPYRIGHT BY SNK CORPORATION"/>
+ <match offset="35" type="byte" value="0x0">
+ <match offset="0" type="string" value="COPYRIGHT BY SNK CORPORATION"/>
+ <match offset="0" type="string" value=" LICENSED BY SNK CORPORATION"/>
+ </match>
+ </magic>
+ </mime-type>
+ <mime-type type="application/x-neo-geo-pocket-color-rom">
+ <_comment>Neo-Geo Pocket Color ROM</_comment>
+ <generic-icon name="application-x-executable"/>
+ <glob pattern="*.ngc"/>
+ <magic>
+ <match offset="35" type="byte" value="0x10">
+ <match offset="0" type="string" value="COPYRIGHT BY SNK CORPORATION"/>
+ <match offset="0" type="string" value=" LICENSED BY SNK CORPORATION"/>
+ </match>
</magic>
</mime-type>
<mime-type type="application/x-nes-rom">
diff --git a/tests/list b/tests/list
index 269c50ad..ff757a7d 100644
--- a/tests/list
+++ b/tests/list
@@ -528,8 +528,10 @@ m64p_test_rom.z64 application/x-n64-rom
wii.wad application/x-wii-wad x
# Mariobros from Atari 7800 truncated to 1Ko
atari-7800-test.A78 application/x-atari-7800-rom
-# Sonic the Hedgehog - Pocket Adventure truncated to 1Ko
+# Samurai Shodown truncated to 1Ko
neo-geo-pocket-test.ngp application/x-neo-geo-pocket-rom
+# Sonic the Hedgehog - Pocket Adventure truncated to 1Ko
+neo-geo-pocket-color-test.ngc application/x-neo-geo-pocket-color-rom
# Pac-Man from Atari 2600 truncated to 1Ko
atari-2600-test.A26 application/x-atari-2600-rom ox
# Metroid truncated to 1Ko
diff --git a/tests/neo-geo-pocket-color-test.ngc b/tests/neo-geo-pocket-color-test.ngc
new file mode 100644
index 00000000..f0795631
--- /dev/null
+++ b/tests/neo-geo-pocket-color-test.ngc
Binary files differ
diff --git a/tests/neo-geo-pocket-test.ngp b/tests/neo-geo-pocket-test.ngp
index 31dad268..be111317 100644
--- a/tests/neo-geo-pocket-test.ngp
+++ b/tests/neo-geo-pocket-test.ngp
Binary files differ