* feat(artifacts): inspect Game Boy and GBA ROM headers
Game Boy and Game Boy Color images (game-boy-rom) are claimed when at
least the first 24 bytes of the boot logo at 0x104 match, the half every
boot ROM compares. Root metadata reports the entry code and its JP
target, full or top-half logo match, title and manufacturer code, CGB
and SGB flags, mapper and features, declared ROM and RAM sizes,
destination, licensee codes, version, and declared and computed header
and global checksums. The global checksum is summed over the file in
bounded reads.
Game Boy Advance images (gba-rom) are claimed from an ARM branch at 0,
the fixed 0x96 at 0xB2, and the boot logo or a matching complement
check. Root metadata reports the entry branch target, logo match, title,
game and maker codes, fixed value, unit and device type, version, the
complement check, and the multiboot fields when that layout could apply.
Both serve header.bin and program.bin as stored ranges. Logos are
compared by SHA-256 digest, so no logo bytes are carried. Checksum,
logo and size disagreements leave coverage unknown; a header cut short
is refused as truncated with the offset where the file ends.
* fix(artifacts): keep missing GBA multiboot fields unknown and pin checksum vectors
A GBA file that ends inside the multiboot fields reported boot_mode and
slave_id as zero. They are now null, with a limitation naming where the
file ends. The Game Boy reader charges artifact_limits.expanded_bytes
from the file size before it sums the file for the global checksum.
Checksum tests now use hand-derived vectors instead of copying the
parser's own result.
* refactor(artifacts): read Game Boy and GBA header fields through BinaryReader
The GBA parser decoded words with a local reader that read missing bytes
as zero. Both parsers now read header fields through BinaryReader, as the
tool-design guide requires, after their length checks. The fixtures write
literal offsets instead of the parsers' field constants, and the guides
say inventory reads the stored members to hash them.
* fix(artifacts): read documented GB size codes and MBC4, refuse truncated GBA headers
* style(artifacts): format the handheld ROM test
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>