Bug 83545 - [PATCH] application/x-n64-rom nearly never detected
Summary: [PATCH] application/x-n64-rom nearly never detected
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL: https://bugs.debian.org/cgi-bin/bugre...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-05 19:31 UTC by Fayvel Victor
Modified: 2014-09-08 15:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch fixing nintendo64 rom detection (946 bytes, patch)
2014-09-05 19:31 UTC, Fayvel Victor
Details | Splinter Review
Nintendo64 ROM testfiles (105.74 KB, application/x-xz)
2014-09-06 15:08 UTC, Fayvel Victor
Details

Description Fayvel Victor 2014-09-05 19:31:07 UTC
Created attachment 105820 [details] [review]
Patch fixing nintendo64 rom detection

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760566

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
Comment 1 Bastien Nocera 2014-09-06 11:37:25 UTC
Would it be possible for you to send me a test file for each one of those, through private mail?
Comment 2 Fayvel Victor 2014-09-06 15:08:51 UTC
Created attachment 105839 [details]
Nintendo64 ROM testfiles

Why private mail? I've just attached test files in a tarball of an GPL rom from https://github.com/mupen64plus/mupen64plus-rom/tree/master/mupen64plus
Comment 3 Fayvel Victor 2014-09-06 15:13:52 UTC
I can run following inside the the folder of the extracted tarball and get as output:

# for i in *; do echo $i; mupen64plus $i|grep Imagetype;done
m64p_test_rom.n64
Core: Imagetype: .n64 (wordswapped)
m64p_test_rom.v64
Core: Imagetype: .v64 (byteswapped)
m64p_test_rom.z64
Core: Imagetype: .z64 (native)

So I hope the test files are ok for you. With my patch the kde file browser dolphin shows the type 'nintendo64 rom' of the file ending and I can just click on it to start the rom in mupen64plus.
Comment 4 Fayvel Victor 2014-09-06 15:20:53 UTC
"independent of the file ending"
Comment 5 Bastien Nocera 2014-09-08 15:49:16 UTC
Pushed it all in one commit, thanks for the help.

commit ca5cc4b7c4e0af0de7024fc20c6a30a41444409e
Author: Fayvel Victor <fayvel@web.de>
Date:   Fri Sep 5 19:31:00 2014 +0000

    Add Nintendo 64 ROM magic
    
    And support more globs.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=83545


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.