MAX DUO Pokémon Toolkit GitHub

Home / Library

Gen 3 connectivity – the scoreboard

Rendered from docs/COMPATIBILITY.md in the repository.

The goal (Fred, 25 November): full connectivity compatibility across the Gen 3 GBA games, and the GameCube's side recreated too. The feature-by-feature detail is in ROADMAP.md. This page is the short scoreboard, with a log of each working evening.

Status words:

  • hardware: done on a real GBA.
  • simulator: ported from the source and tested in hwsim or the emulator, not yet on hardware.
  • started: under way.
  • open: nothing done yet.
Route Feature Status
Cable Trade Center trades (all five games) hardware
Cable Colosseum single/double battles hardware
Cable Record Mixing (bases, TV, the whole record; Emerald layout) hardware (Ruby); Emerald layout simulator
Cable Battle Tower link multi (Emerald) hardware
Cable Berry Blender, 2 players simulator (second blend stuck on Japanese Emerald; fix in simulator)
Cable Link Contests (Emerald E mode) simulator
Cable 3-4 player features (multi battle, Blender/Mixing/Contests with more players) parked (the cable's physics)
e-Reader Mystery Event, Enigma Berry, Battle e-Card trainers (R/S) hardware
e-Reader Trainer Hill/Tower cards (Japanese E, FR/LG) simulator
Wireless (the DUO plays the adapter over a cable) Mystery Gift Wonder Card hardware (Japanese Emerald, English LeafGreen)
Wireless (the DUO plays the adapter over a cable) Wonder News simulator
Wireless (the DUO plays the adapter over a cable) Union Room: greetings, card, chat, trading-board trade simulator; the hardware froze on A over the cable
Wireless (the DUO plays the adapter over a cable) Mystery Gift with a friend (Send), the game as host simulator
Wireless (the DUO plays the adapter over a cable) Direct Corner, step 1 simulator
Wireless (the DUO plays the adapter over a cable) Union Room battles, wireless minigames (Berry Crush, Pokémon Jump, Dodrio Berry Picking) open
Wireless (real adapters, from 25 Nov) adapter-check: the DUO as the game, asking a real adapter simulator; hardware test 21
Wireless (real adapters, from 25 Nov) over-the-air distributor (the DUO hosts through a real adapter) started: adapter-check --host broadcasts the distributor and accepts a game, including a game on the simulator's air model (simulator; hardware test 22). simulator: done - gift --air sends a Wonder Card through a real adapter (end to end in the simulator); hardware tests 22 and 23
Multiboot Berry Fix (to a GBA with no cartridge, or with a game) hardware
Multiboot Bonus Disc Jirachi, Channel Jirachi hardware
Multiboot Save explorer and clock setter (in the Berry Fix carrier) simulator, with real ROMs and saves
GameCube's side XD's trade program (maxcng): the GameCube's half emulator: tools/gcdisc/virtual_gamecube.py reads the party and trades a Pokémon in, saved by the game's own code (25 Nov)
GameCube's side XD's battle program (maxbtl) emulator: 0x99 reads the trainer and party. Read from its code and driven (26 Nov): 0x77 the rules (single/double, how many to choose), 0x88 1920 bytes that open the party selection, 0x66 a three-part message (36-byte header, 340- and 24-byte records); the chosen order sits at 0x0202BB80; their meaning is open
GameCube's side Colosseum's battle program (colbtl) started: command map (the trainer read; 1920-byte and 36-byte buffers in, 50-byte answers out); the battle exchange itself is open
GameCube's side Pokémon Box R&S working in the emulator: tools/gcdisc/virtual_box.py reads all 14 boxes through Box's own GBA program and deposits a Pokémon, saved and committed by that program (tests/test_virtual_box.py)
GameCube's side coupon.bin (Colosseum) command map started (23 Nov)

Evening of 25 November (hourly, until 22:00)

The plan, in order:

  1. The virtual GameCube. Find the command sets of Colosseum/XD's GBA programs by driving them in the emulator, using tools/gcdisc/joy_master.py, your real ROMs and a copy of a save. Then make a virtual GameCube read a GBA game's Pokémon through the program the real GameCube would send.
  2. Over the air. Grow rfu_check into a host (a distributor) through a real adapter, in the simulator first.
  3. Whatever the goal check says next.

Log:

  • 17:45: adapter-check committed (6fc1b83); the save explorer installed (5cbac98). Scoreboard written.
  • 18:25: the virtual GameCube works. XD's own GBA trade program, driven in the emulator by virtual_gamecube.py, reads the champion save's party and trades Channel's Jirachi into slot 4. The game's own save code writes it (counter 2610 to 2611, 14/14 sections valid). Arthur's save is refused, probably because XD trades need the National Pokédex. Protocol in GAMECUBE_MULTIBOOT.md.
  • 18:35: maxbtl (XD's battle program) answers the same sessions, and its 0x99 gives the same trainer and party snapshot. Its 0x88 stream didn't start from a fresh session; to look at next.
  • 18:55: colbtl mapped by driving it. It reads the trainer and party the same way, and has buffers for a move-by-move link battle (GAMECUBE_MULTIBOOT.md). adapter-check no longer writes logs during the tests: the 17:12-17:29 logs were from my test runs, not hardware, and are moved to logs/_from_tests. Next: an over-the-air host through a real adapter.
  • 19:20: over the air, stage 1. adapter-check --host makes the DUO a distributor through a real adapter: it broadcasts, a game joins, and its first frames are kept. Simulator tests pass. This is hardware test 22.
  • 20:20: tests/test_virtual_gamecube.py: a regression test that XD reads the party and a trade is saved (skipped without the owner's files). Pokémon Box's program looked at: it resets within about 13 frames unless the GameCube talks from boot; to finish later.
  • 20:25: Box with interrupts enabled from the start: its JOY handler answers (S+1 counts the GameCube's resets), but a second plain reset sends it back to the cartridge at frame 6. Its reset reply and key exchange must come first; for the next session.
  • 21:05: Pokémon Box's opening found and working in the emulator (tools/gcdisc/box_probe.py). maxbtl's other commands read from its code (0x88 the GameCube writes 240 bytes; 0x77 three settings bytes; 0x66 36 bytes).

Overnight, 25-26 November (plan: OVERNIGHT_PLAN.md)

  • 21:55: Box's ready flag traced. A mode dispatcher picks mode 1, which loads the save including the Hall of Fame and sets the flag, but the main loop stops reaching the dispatcher once the GameCube is talking. The 21:52 check-in had been booked as the evening wrap-up; I followed Fred's extension instead (no wrap-up, no notification).
  • 23:35: the virtual Pokémon Box works. With idle frames between exchanges the save loads. Box's program streams the whole save (it matches the file byte for byte) and writes a deposit with 0xCC. It saves with 0xEE, and 0x99 commits the last signature byte. Without that byte the first deposit looked damaged. A copy of save #2610 went from 43 to 44 Pokémon, with valid checksums and counter 2611. New: tools/gcdisc/virtual_box.py, tests/test_virtual_box.py.
  • 00:00: over the air, stage 2. The simulator now has an air model (tests/rfu_air.py, with a pure-Python link cable in tests/rfu_wire.py): each game talks to its own adapter model, and the adapters relay broadcasts, joins and data. In pure Python, one game hosts and another finds it, joins and swaps three packets each way. A Python game also joins the DUO's adapter-check --host over the air, and its frame reaches the DUO. All adapter-check tests still pass.
  • 01:00: air_host: the distributor drives a real adapter as the host. It is adapter.c with -DAIR_HOST, using rfu_check's master command code, with 0x26 then 0x24 once a frame. It is 10,316 bytes and fits; the other adapter builds are unchanged byte for byte. In the simulator, a game over the air finds it, joins, sends its name and is told it may join. Next: the Wonder Card end to end.
  • 02:00: the Wonder Card over the air, end to end in the simulator. The game's Mystery Gift (search, connect, name, link players, receive_gift) runs against air_host on the DUO through two adapter models, and the game saves the card and its script byte for byte. The air model's swap timeout now follows the game's 0x17 config (32 frames for Emerald); two frames was too short. One 4-frame pause in the DUO's loop is noted to check on hardware.
  • 03:00: over the air, stage 2 finished in the simulator. gift --air --card FILE.wc3 is the command: it loads the card, picks the serial from its language (selector 39, new in air_host), and stops once the game has the card. There are new tests (the command with an English card, no card, nobody joining) and five planted bugs, all caught. Hardware test 23 is in HARDWARE_QUEUE.md.
  • 04:00: XD's battle program, read and driven. 0x77 is the rules word (single or double battle, how many to choose). With the rules set, 0x88 (1920 bytes, not 240) opens the GBA's "Please select a POKéMON" screen with the cartridge's party. Choosing three leaves the order at 0x0202BB80 as six nibbles, the same form as 0x66's first word. 0x66 is a three-part message: a 36-byte header, then 340-byte and 24-byte records. New: tools/gcdisc/maxbtl_probe.py. Still open: how the GameCube collects the order.
  • 05:00: Colosseum's battle program, driven. 0x77's rules (single or double battle, how many to choose), then 0x88, open "Please select 3 POKéMON" with the cartridge's party. Choosing three leaves the order at 0x02025080, and the GBA fills in its battle structures. 0x55 is the opponent's team in 100-byte party-Pokémon parts (XD uses 340-byte records instead), and 0x44 is continue. New: tools/gcdisc/colbtl_probe.py. Next: a real team through 0x55.
  • 06:40: air_join: the DUO joins a game as a child through a real adapter (adapter.c with GAME_HOSTS and UNION_ROOM, librfu's child commands). In the simulator it finds the game, connects, sends its name and is told it may join. The friend Mystery Gift over the air gets the card to the DUO but doesn't close yet; that test is kept and skipped. The air model now carries one packet each way per frame, as real adapters do.
  • 07:20: the friend gift over the air, narrowed down. The game sends READY_CLOSE and waits; the DUO never answers it, and its join_linked reads 0 at the end. Still open (skipped test); Berry Crush planning moves to a later slot.