[File] [Patch] Game Boy additions to Magdir/console
Eldred HABERT
me at eldred.fr
Tue Jun 30 11:35:42 UTC 2020
Hello, I am a fairly involved member of the modern Game Boy development
community. I would like to submit two patches related to that.
The first one is simply adding some recently-found values in the header,
as well as updating the reference to the new community-maintained docs.
--- a/magic/Magdir/console
+++ b/magic/Magdir/console
@@ -113,7 +113,7 @@
#------------------------------------------------------------------------------
# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format
-# Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header
+# Reference: https://gbdev.io/pandocs/#the-cartridge-header
#
0x104 bequad 0xCEED6666CC0D000B Game Boy ROM image
# TODO: application/x-gameboy-color-rom for GBC.
@@ -157,6 +157,8 @@
>0x147 byte 0x1C [MBC5+RUMBLE]
>0x147 byte 0x1D [MBC5+RUMBLE+SRAM]
>0x147 byte 0x1E [MBC5+RUMBLE+SRAM+BATT]
+>0x147 byte 0x20 [MBC6]
+>0x147 byte 0x22 [MBC7+SENSOR+RUMBLE+SRAM+BATT]
>0x147 byte 0xFC [Pocket Camera]
>0x147 byte 0xFD [Bandai TAMA5]
>0x147 byte 0xFE [Hudson HuC-3]
@@ -171,6 +173,7 @@
>0x148 byte 5 \b, ROM: 8Mbit
>0x148 byte 6 \b, ROM: 16Mbit
>0x148 byte 7 \b, ROM: 32Mbit
+>0x148 byte 8 \b, ROM: 64Mbit
>0x148 byte 0x52 \b, ROM: 9Mbit
>0x148 byte 0x53 \b, ROM: 10Mbit
>0x148 byte 0x54 \b, ROM: 12Mbit
Additionally, I have a few questions:
* Should the MIME TODO be handled as well while we're at this?
* Do we want to print additional info from the header?
I also know that some ROM dumps (from MMM01) have the header near the
very end of the ROM, do we want to attempt supporting that as well? I
don't know any references for that though, I'd have to ask around.
The second patch is recognizing RGBDS object files. RGBDS is the most
popular GB assembly development system.
I'm not sure what would be the most relevant place to add it, so I went
with right below the GBS format magic.
--- a/magic/Magdir/console
+++ b/magic/Magdir/console
@@ -666,6 +669,16 @@
>3 byte x version %u,
>4 byte x %u tracks
+# Rednex Game Boy Development System object files
+# See rgbds(5), online at https://rednex.github.io/rgbds/rgbds.5.html
+0 string RGB
+>3 byte >0x30
+>>3 byte <0x39 RGBDS object file, version %c
+!:mime application/x-object
+>>3 byte =0x39 RGBDS object file, version 9
+!:mime application/x-object
+>>>4 lelong x \b, revision %u
+
# IPS Patch Files from: From: Thomas Klausner <tk at giga.or.at>
# see https://zerosoft.zophar.net/ips.php
0 string PATCH IPS patch file
Regards,
~ EldredHABERT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20200630/46dc4d02/attachment.htm>
More information about the File
mailing list