DEV Community

Cover image for CanopyCore – Reverse-engineering archive for Diddy Kong Pilot (GBA)
canopycore
canopycore

Posted on Edited on AI-assisted

CanopyCore – Reverse-engineering archive for Diddy Kong Pilot (GBA)

Hi,

I spent 17 days doing a reverse-engineering sprint on Diddy Kong Pilot, the unreleased 2003 GBA prototype developed by Rare. Instead of chasing a byte-matching build, I've published the work as an archived, read-only research repository containing 151 technical docs (~357k words) and a semantic C11 reference of the core engine.

Repository (archived / read-only): https://github.com/canopycore/canopycore

Scope & coverage (421-function analysis scope / 90,787 code bytes):

  • Documented: 220 / 421 functions (52.3% / 64,334 bytes)
  • Reconstructed in C: 130 / 421 functions (30.9% / 43,356 bytes)

Technical highlights in the docs:

  • Mode-7-style HBlank pipeline: 160x32-byte scanline table generator (0x0803CC64), IWRAM HBlank handler (0x030055A4), scanline-0 lag behavior, and BG2 ground map streaming.
  • OAM & 3D sprite emitter: bottom-up merge-sort (0x08039A20), attr3 1:1 VBlank transfer trick, viewpoint LUTs, LOD chains, and OBJ VRAM/palette allocator.
  • Flight physics, AI splines/gates, and 4-type narrow-phase collision (0x0803AED4) with 10-lap rewind.
  • Rareware audio sequencer (0x08850090): all 13 bytecode opcodes (75k+ opcodes parsed), 28 tunes, 103 instruments, 256 direct SFX entries, keysplit drumkits, 6-phase ADSR, and vibrato/pitch LUTs.

Verification:
Analyzed with Ghidra and Capstone, validated against mGBA's GDB stub for frame-level ground truth, and tested with a Unicorn-based differential harness comparing original ARM/Thumb machine code against the C reconstruction (including 38k+ test vectors and negative-control mutation tests).

Notes:

  • Non-matching & non-standalone: does not build a ROM or playable port.
  • BYO-ROM / Zero assets: contains no ROMs, save states, sprites, palettes, or audio samples.
  • Archived as read-only for preservation and future matching/clean-room work.

Top comments (0)