The Virtual DUO is the toolkit's dress rehearsal. Two GBAs run in one process (mGBA 0.10.5 with a 63-line cartridge-bus hook), joined by a link cable. One has the real game; the other has the DUO in its cartridge slot – a behavioural model of the board's three chips (SST flash, Actel switch, Cypress USB controller) in shared C, running the same Reckless firmware image that goes on the real device. The DUO's USB end is a TCP port, so the unchanged duo_events.py talks to it exactly as it talks to the hardware.
Nothing here replaces a hardware test, but it catches most mistakes before they cost an evening at the console: every feature on this page was rehearsed here first, and the ones marked Proven on hardware elsewhere then worked on a real DUO. The design is written up in full in the library: Virtual DUO (design), and the save generator that makes the test saves from a ROM alone in Save generator.
The recordings
Each video is cut straight from a rehearsal run: the left half is the game, the right half the emulated DUO's own screen and log. Saves are synthetic (made by the save generator; the trainer is TESTER). Game audio has been removed.
Trading
Record Mixing and Secret Bases
Mystery Event
Link battles
Battle Tower
Contests and the Berry Blender
The cross-language matrix
The rehearsals were then run against every cartridge language the save generator knows (English Ruby's seven; Emerald's ten; LeafGreen's three). Result of the last full run (toolkit at 86260ce):
| Game | Passed | Failed | Notes |
|---|---|---|---|
| Ruby (English) | 7 | 0 | |
| Emerald (Japanese) | 10 | 0 | |
| Emerald (Spanish) | 9 | 1 | Battle Tower, DUO as player 0 |
| Emerald (English, USA/Europe) | 8 | 2 | Battle Tower, both seats |
| Emerald (German) | 9 | 1 | Battle Tower, DUO as player 1 |
| Emerald (French) | 9 | 1 | Battle Tower, DUO as player 1 |
| Emerald (Italian) | 8 | 2 | Battle Tower, both seats |
| LeafGreen (Japanese, German, Spanish, European English, French, Italian) | 3 each | 0 |
Everything except the Battle Tower passes in every language. The Tower's failures are why it is marked simulator on the features matrix: the Japanese build passes both seats, the other languages fail one or both, and the cause is still being worked on (see Battle Tower).
How a rehearsal works
- A save from nothing.
virtual/savegenboots the ROM in the emulator and lets the game's own code write a new save, then walks it to the Cable Club (no copyrighted save is used or published). - The DUO boots for real. The emulated DUO starts Datel's firmware with the Reckless patches, exactly as the hardware does – including the borrowed Nintendo logo and the USB SERVER MODE start.
- The toolkit drives it. The rehearsal script runs the same
duo_events.pycommand a user would run, over the TCP stand-in for USB, with the same strict one-packet-each-way turn-taking. - The game is checked, not just watched. Each rehearsal checks the outcome in the game itself (for example, that the traded Pokémon or the ticket really arrived) and fails if it didn't.
One correction to mGBA came out of this work: a master's START while the others aren't ready still transfers on real hardware, and the emulator now does the same. See the design notes.