Bug 106055 - Improve Neo-Geo Pocket (Color) detection
Summary: Improve Neo-Geo Pocket (Color) detection
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:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-15 13:18 UTC by Alexander Mikhaylenko
Modified: 2018-04-24 13:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/2] Fix application/x-neo-geo-pocket-rom header and test (3.66 KB, patch)
2018-04-15 13:25 UTC, Alexander Mikhaylenko
Details | Splinter Review
[PATCH 2/2] Add Neo Geo Pocket Color file type (3.29 KB, patch)
2018-04-15 13:25 UTC, Alexander Mikhaylenko
Details | Splinter Review
[PATCH] Differentiate Neo Geo Pocket Color ROMs from non-Color ones (6.02 KB, patch)
2018-04-17 12:08 UTC, Alexander Mikhaylenko
Details | Splinter Review

Description Alexander Mikhaylenko 2018-04-15 13:18:49 UTC
Currently there are a number of problems:

1. NGP and NGPC games have the same mime type;
2. NGPC *.ngc glob isn't specified;
3. The files can have " LICENSED BY SNK CORPORATION" header (with a space at the beginning) instead of "COPYRIGHT BY SNK CORPORATION";
4. NGP test game is actually an NGPC one, and different from the one specified in comment.

2 and 3 mean that non-SNK NGPC games wouldn't be recognized at all.
Comment 1 Alexander Mikhaylenko 2018-04-15 13:25:23 UTC
Created attachment 138847 [details] [review]
[PATCH 1/2] Fix application/x-neo-geo-pocket-rom header and test
Comment 2 Alexander Mikhaylenko 2018-04-15 13:25:50 UTC
Created attachment 138848 [details] [review]
[PATCH 2/2] Add Neo Geo Pocket Color file type
Comment 3 Bastien Nocera 2018-04-17 08:57:18 UTC
Comment on attachment 138847 [details] [review]
[PATCH 1/2] Fix application/x-neo-geo-pocket-rom header and test

Review of attachment 138847 [details] [review]:
-----------------------------------------------------------------

> The first 9 characters in the header can either be "COPYRIGHT" or
> " LICENSED" with a space.

In which case, declaring both cases would be easier than shortening the magic string.
Comment 4 Bastien Nocera 2018-04-17 08:59:11 UTC
Comment on attachment 138848 [details] [review]
[PATCH 2/2] Add Neo Geo Pocket Color file type

Review of attachment 138848 [details] [review]:
-----------------------------------------------------------------

I think it might make sense to merge both patches, with a "Differentiate Neo Geo Pocket Color ROMs from non-Color ones" subject
Comment 5 Alexander Mikhaylenko 2018-04-17 12:08:54 UTC
Created attachment 138881 [details] [review]
[PATCH] 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
Comment 6 Bastien Nocera 2018-04-24 13:11:15 UTC
commit fbc73fb12e8c22d7718351f7e4ef6cd9603da34a
Author: Exalm <exalm7659@gmail.com>
Date:   Sun Apr 15 13:07:16 2018 +0000

    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


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.