MAX DUO Pokémon Toolkit GitHub

Home / How it works

How it's tested

Nothing reaches real hardware untested.

Layer What it is
The simulator (tests/hwsim.py) Datel's actual firmware in an ARM emulator, inside a model of everything measured on the real DUO: the turn-taking, the sleeping save chip, the 8-bit save bus, the header overlay, start-up and restart, USB delays
Game models (tests/*_model.py) the other GBA, ported from pret's decompilations: the trade, Record Corner, Colosseum, Tower, Blender, Contest, the e-Reader route, librfu and link_rfu_2, the Union Room, the Mystery Gift client and server
The test suite (tests/test_v4.py and others) hundreds of tests: corrupted packets at every position, the PC pulled away mid-transfer, nothing ever writing a save, every feature end to end
Planted bugs (tests/mutate4.py) each bug ever met, and each new behaviour, is planted in a copy of the firmware or tool; at least one test must fail
The Virtual DUO (virtual/) an emulated DUO in mGBA, so a tool can be rehearsed against a real game before the hardware
The emulator (tools/gcdisc/emu_client.py) the GBA programs from the GameCube discs, driven by a virtual GameCube
The air model (tests/rfu_air.py) Wireless Adapters relaying over the air, for the over-the-air features

Measure, model, test, correct the model. The simulator only knows what has been observed. When hardware disagrees, the failure is reproduced in the simulator first, then fixed - as with v3's stall and v4's 8-bit save bus. Every hardware failure so far ended in a refusal or a timeout, never a damaged save.

Running them: the README's "Building and testing".