Bug 101135 - Add WonderSwan [Color] types
Summary: Add WonderSwan [Color] types
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: 2017-05-21 07:28 UTC by Adrien Plazas
Modified: 2017-05-24 10:46 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Add application/x-wonderswan-rom (2.65 KB, patch)
2017-05-21 07:51 UTC, Adrien Plazas
Details | Splinter Review
Add application/x-wonderswan-color-rom (2.73 KB, patch)
2017-05-21 07:52 UTC, Adrien Plazas
Details | Splinter Review
Add application/x-wonderswan-rom (2.74 KB, patch)
2017-05-24 06:44 UTC, Adrien Plazas
Details | Splinter Review
Add application/x-wonderswan-color-rom (2.80 KB, patch)
2017-05-24 06:44 UTC, Adrien Plazas
Details | Splinter Review

Description Adrien Plazas 2017-05-21 07:28:12 UTC

    
Comment 1 Adrien Plazas 2017-05-21 07:51:59 UTC
Created attachment 131424 [details] [review]
Add application/x-wonderswan-rom
Comment 2 Adrien Plazas 2017-05-21 07:52:10 UTC
Created attachment 131425 [details] [review]
Add application/x-wonderswan-color-rom
Comment 3 Bastien Nocera 2017-05-23 15:43:31 UTC
Comment on attachment 131424 [details] [review]
Add application/x-wonderswan-rom

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

::: freedesktop.org.xml.in
@@ +3858,5 @@
>    </mime-type>
> +  <mime-type type="application/x-wonderswan-rom">
> +    <_comment>WonderSwan ROM</_comment>
> +    <generic-icon name="application-x-executable"/>
> +    <glob pattern="*.ws"/>

No magic? Do we want to prefix the comment and mime-type with "Bandai"?
Comment 4 Bastien Nocera 2017-05-23 15:43:50 UTC
Comment on attachment 131425 [details] [review]
Add application/x-wonderswan-color-rom

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

::: freedesktop.org.xml.in
@@ +3863,5 @@
>    </mime-type>
> +  <mime-type type="application/x-wonderswan-color-rom">
> +    <_comment>WonderSwan Color ROM</_comment>
> +    <generic-icon name="application-x-executable"/>
> +    <glob pattern="*.wsc"/>

Ditto.
Comment 5 Adrien Plazas 2017-05-23 17:14:22 UTC
(In reply to Bastien Nocera from comment #3)
> No magic?

I didn't see any clear magic value in this document (section "6. ROM HEADER"): https://www.zophar.net/fileuploads/2/10805ixdtg/wstech23.txt

Any idea of how to use that knowledge?

> Do we want to prefix the comment and mime-type with "Bandai"?

I'm not against it.
Comment 6 Bastien Nocera 2017-05-23 17:21:11 UTC
(In reply to Adrien Plazas from comment #5)
> (In reply to Bastien Nocera from comment #3)
> > No magic?
> 
> I didn't see any clear magic value in this document (section "6. ROM
> HEADER"): https://www.zophar.net/fileuploads/2/10805ixdtg/wstech23.txt

You can use bitmasks, and "or" operations when defining the magic. For example, byte 1 is either 0 or 1, nothing else, then byte 4 is one of 6 values, then bit 2 of byte 6 is always 1.

That's 3 bytes where you can check values. When defining the magic, bump the priority and run the test suite to see if you get many false positives.
Comment 7 Adrien Plazas 2017-05-24 06:39:41 UTC
(In reply to Bastien Nocera from comment #6)
> You can use bitmasks, and "or" operations when defining the magic. For
> example, byte 1 is either 0 or 1, nothing else, then byte 4 is one of 6
> values, then bit 2 of byte 6 is always 1.
> 
> That's 3 bytes where you can check values. When defining the magic, bump the
> priority and run the test suite to see if you get many false positives.

Quoting the found documentation: "Header taking last 10 bytes of each ROM file", so we better do without magic as the interesting bits are in a footer.
Comment 8 Adrien Plazas 2017-05-24 06:44:01 UTC
Created attachment 131457 [details] [review]
Add application/x-wonderswan-rom
Comment 9 Adrien Plazas 2017-05-24 06:44:17 UTC
Created attachment 131458 [details] [review]
Add application/x-wonderswan-color-rom
Comment 10 Bastien Nocera 2017-05-24 10:46:33 UTC
Attachment 131457 [details] pushed as 2f8690d - Add application/x-wonderswan-rom
Attachment 131458 [details] pushed as 4f27262 - Add application/x-wonderswan-color-rom


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.