Package: shared-mime-info
Version: 1.3-1
Severity: normal
Tags: patch
It seems that Nintendo64 roms are nearly never detected. Only extension for one
subformat is part of the mime info database and no magic info is stored at all.
The attached patch fixes it by adding the missing two extensions for the two
missing subformats and adding the magic for each subformat.
The information is taken from
http://sources.debian.net/src/mupen64plus-core/2.0-7/src/main/rom.c/?hl=69#L69
--- System information. ---
Architecture: amd64
Kernel: Linux 3.14-2-amd64
Debian Release: jessie/sid
500 unstable http.debian.net
--- Package information. ---
Depends (Version) | Installed
============================-+-============
libc6 (>= 2.14) |
libglib2.0-0 (>= 2.35.9) |
libxml2 (>= 2.7.4) |
Package's Recommends field is empty.
Package's Suggests field is empty.
Description: Increase detection rate for application/x-n64-rom
---
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index d1c422cd46d5f242a3738e98fe0d5a83a677a9ad..ee927be0808c29b8ecf9e0a4dc17b0056221567c 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -2658,6 +2658,16 @@ command to generate the output files.
<_comment>Nintendo64 ROM</_comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.n64"/>
+ <glob pattern="*.z64"/>
+ <glob pattern="*.v64"/>
+ <magic>
+ <!-- native *.z64 -->
+ <match type="big32" offset="0" value="0x80371240"/>
+ <!-- byteswapped [BADC] *.v64 -->
+ <match type="big32" offset="0" value="0x37804012"/>
+ <!-- wordswapped [DCBA] *.n64 -->
+ <match type="big32" offset="0" value="0x40123780"/>
+ </magic>
</mime-type>
<mime-type type="application/x-nautilus-link">
<_comment>Nautilus link</_comment>