Skip to content

Instantly share code, notes, and snippets.

View loveemu's full-sized avatar

loveemu loveemu

View GitHub Profile
@eddieburke
eddieburke / gist:de8c70bb25e5b5d27fb4f67ffd54cfe4
Created October 8, 2026 22:54
Monsters INC GBA (Hachiemon) sound and music engine analysis
# Hachiemon music format and sound-driver reference
This reference describes Natsume's Hachiemon sound driver in **Monsters, Inc. for Game Boy Advance**: sequence commands, channel state, instruments, envelopes, modulation, percussion and hardware playback.
Addresses and inventories refer to the examined 4 MiB image, whose header identifies `MONSTERS,INC` / `AMXE78` and whose MD5 is **`2bfd80868014971192e161837efee88f`**. The checksum identifies the examined image; the header alone does not establish that another image has identical contents. Other builds require separate verification.
Sequence state, hardware registers and final audio are separate layers. A stored pitch can change without a register write; a rest can leave echo audible; PCM can continue after its sequence enters a rest. Reproduction requires the state transitions and write conditions below, in addition to notes and sample bytes.
Stored multi-byte values are little-endian unless a note explicitly assembles its bytes in the opposite order.