Add Nintendo 3DS related files mime types
I have made a project called bign-handheld-thumbnailer which makes thumbnails for Nintendo DS and Nintendo 3DS related files. However due to how it works I would need proper mime type info for the files I will handle, whether I ship those mime types definitions or it's already present on the system.
xdg mime types currently only has the rom file defined for Nintendo DS (which is fine):
<mime-type type="application/x-nintendo-ds-rom">
<comment>Nintendo DS ROM</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.nds"/>
</mime-type>
But for Nintendo 3DS only the rom file and homebrew file are defined:
<mime-type type="application/x-nintendo-3ds-rom">
<comment>Nintendo 3DS ROM</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.3ds"/>
<glob pattern="*.cci"/>
<magic>
<match offset="256" type="string" value="NCSD"/>
</magic>
</mime-type>
<mime-type type="application/x-nintendo-3ds-executable">
<comment>Nintendo 3DS Executable</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.3dsx"/>
<magic priority="40">
<match offset="0" type="string" value="3DSX"/>
</magic>
</mime-type>
For reference, going to the files Lime (Citra fork, both 3DS emulators) those are the definitions (Source):
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-ctr-3dsx">
<comment>Nintendo 3DS homebrew executable</comment>
<comment xml:lang="fr">Exécutable non-officiel pour Nintendo 3DS </comment>
<acronym>3DSX</acronym>
<icon name="lime"/>
<glob pattern="*.3dsx"/>
<magic><match value="3DSX" type="string" offset="0"/></magic>
</mime-type>
<mime-type type="application/x-ctr-cci">
<comment>Nintendo 3DS cartridge image</comment>
<comment xml:lang="fr">Image de cartouche Nintendo 3DS</comment>
<acronym>CCI</acronym>
<expanded-acronym>CTR Cart Image</expanded-acronym>
<icon name="lime"/>
<glob pattern="*.cci"/>
<glob pattern="*.3ds"/>
<magic><match value="NCSD" type="string" offset="256"/></magic>
</mime-type>
<mime-type type="application/x-ctr-cxi">
<comment>Nintendo 3DS executable</comment>
<comment xml:lang="fr">Exécutable Nintendo 3DS</comment>
<acronym>CXI</acronym>
<expanded-acronym>CTR eXecutable Image</expanded-acronym>
<icon name="lime"/>
<glob pattern="*.cxi"/>
<magic><match value="NCCH" type="string" offset="256"/></magic>
</mime-type>
<mime-type type="application/x-ctr-cia">
<comment>Nintendo 3DS importable archive</comment>
<comment xml:lang="fr">Archive installable Nintendo 3DS</comment>
<acronym>CIA</acronym>
<expanded-acronym>CTR Importable Archive</expanded-acronym>
<icon name="lime"/>
<glob pattern="*.cia"/>
</mime-type>
<mime-type type="application/x-ctr-smdh">
<comment>Nintendo 3DS icon and metadata</comment>
<comment xml:lang="fr">Icône et métadonnées Nintendo 3DS</comment>
<acronym>SMDH</acronym>
<expanded-acronym>System Menu Data Header</expanded-acronym>
<glob pattern="*.smdh"/>
<magic><match value="SMDH" type="string" offset="0"/></magic>
</mime-type>
<mime-type type="application/x-ctr-cbmd">
<comment>Nintendo 3DS banner</comment>
<comment xml:lang="fr">Bannière Nintendo 3DS</comment>
<acronym>CBMD</acronym>
<expanded-acronym>CTR Banner Model Data</expanded-acronym>
<glob pattern="*.cbmd"/>
<magic><match value="CBMD" type="string" offset="0"/></magic>
</mime-type>
</mime-info>
The ones with x-nintendo-3ds
prefix come from this repo and the ones with x-ctr
prefix come from Citra/Lime.
It was suggested to me, when I asked, that the ideal would be to take the x-ctr
that already had a x-nintendo-3ds
equivalent and make them alias, and then copy over the other x-ctr
that don't have a x-nintendo-3ds
equivalent as-is.
However, IMHO, it might make some sense to have x-nintendo-3ds
equivalents to all x-ctr
(therefore, creating new mime types that are completely new) and then making all x-ctr
variants into aliases.