MAX DUO Pokémon Toolkit GitHub

Home / Library

What's waiting for real hardware

Rendered from docs/HARDWARE_QUEUE.md in the repository.

Everything the simulator has passed but a real GBA hasn't seen yet, in one list (11 November 2026). There's also a page to tick them off at the console: the "DUO Hardware Checklist" artifact. It's ordered around the GBA link cable staying fitted (it's tight to remove), so the wireless tests come last. Each run writes logs\latest.log; battles also keep battles\*.txt, Record Mixing records\*.rm3. Keep the DUO's GBA switched on until the tool says it's safe to switch off.

When a test has been done, move it to "Done" with the date and what was seen (or ask Claude to).

Results of 11 November (the checklist page), and what changed for them

# Result What was seen Done about it (12 November)
1 pass A single battle at medium, two DUO Pokémon, to the end -
2 pass A single battle at impossible -
3 fail Double battle, the player on the DUO's usual spot: garbled "fainted" text with Japanese characters, then a black screen after the battle; 14 checksum mismatches Fixed: the DUO sat on the other spot but still said its usual link-player id, so both said 1 and the battle found no trainer for battler 0 (names read past gLinkPlayers). Its id is now the spot it sat on (SetLocalLinkPlayerId(VAR_0x8005)). Retest as before
3a partly Japanese Emerald fine; LeafGreen hung at the battle's start after the player blocked the DUO's way (the second try worked). Asked: show the PC's thinking Added: each PC choice is printed ("PC (medium): FLYGON uses EARTHQUAKE on ... (about 45% of its HP, 10% to knock it out)"). The LeafGreen hang isn't explained yet: please retest, blocking the DUO once, and note whether you sat down before it did
3c, 3c+ pass The Berry Blender both ways round -
3d pass The E MODE contest with Japanese Emerald (then its battery died) -
3d+ not a fault Tried with Ruby: Ruby's link contest counter needs four players (link type 0x6601) The tool now says so. Retest 3d+ with Emerald
3e fail Japanese Emerald mixed and saved but showed an error message; 700 and 1,230 checksum mismatches (the battery was low) Diagnostics: the tool now says in which of the DUO's states the mismatches happened. Likely explained, 18 November: both runs had the DUO as player 0 (the master). The mismatches were the game's closed link read as 0xFFFF between links, and as master the DUO could go more than 10 frames without a transfer while planning its walk back to the door - a slave game's link error (link.c LinkVSync). Both fixed on 17 November (adapter programs and room_walk.h). Retest with fresh batteries, ideally once each way round
12a, 12b fail The handshake never finished; the figures mixed in the half-minute before the game's GBA was on Changed: the DUO answers as master after about 20 of the game's handshakes, not 20 in a row; the figures are given again from the game's first real word, with its first 32 words in the record and the line's idle level. Retest 12a first
12a (15 Nov) fail, explained --players 1 and --players 3 both finished the handshake, but only after 1020 and 1980 tries, then stayed on "Please wait". The record shows the DUO going back and forth: it took the game's handshake word in the transfer just after the link for "the game missed our 0x8FFF" Fixed (simulator, 15 November): link.c's DoHandshake loads the game's next word with 0xB9A0 before it decides, so the transfer after the game says yes always carries the handshake once more. The DUO now waits one more transfer before deciding. The line-level model does the same now, and showed the old firmware's back-and-forth. Retest 12a, then 12b; the record should no longer fill with handshakes, so it shows what the game asks for after "link players asked for"
12a (15 Nov, evening) fail, narrowed With the confirm fix, the record shows the truth: the game never took the DUO's 0x8FFF (374 tries with --players 1). The earlier "took on try 1020" and --players 3's "try 494" were the DUO misreading the game's handshake. The "isn't the master" warning was false: the handshake count ran into the flag's bit after 128 Fixed (simulator): the not-master flag; "taken" decided over three transfers, allowing two bits misread; the DUO now steps through 13 sending timings (the lead from SC to its start bit, its bit time), three tries each, and reports the one the game took. Retest 12a: the report names the timing that worked, or says none did
12a (15 Nov, late) fail, narrowed further The sweep's first settings missed (leads 64 and 16); with the third (a lead of 146 cycles) the game stopped answering altogether, and the DUO waited on it for good. Twice the same So the game times its slot from SC going low. Changed (simulator): short leads only, the first with SC and the start bit in one write (as a GBA master sends); a setting the game goes quiet with is left after 150 transfers. Retest 12a
12a (16 Nov) fail: every setting missed All twelve of the DUO's sending timings missed (32 tries and on), the game answering throughout New (simulator): lab4p --scope. The DUO's own link hardware is the master (as in a trade, which works on hardware) and the DUO watches SD as it runs: the real master's start bit, the game's answer after it, the end of the transfer, and whether the game took the hardware's 0x8FFF. Run it at the Trade Center; the timings it shows are what the hand-made transfers should copy
12s (16 Nov) pass: the control lab4p --scope: the game took the DUO's own link hardware's 0x8FFF on transfer 5 (the Cable Club then says there was a transmission error, as the scope sends nothing more: expected). RCNT shows the pins in the serial mode too. The hardware's slot 0 looks like lab4p's on the wire (start bit at once, 145 cycles a bit, SO low at its end, the game's start bit about 200 cycles after, SO high when the game's word ends, SC high some 500 cycles later) - yet the game takes one and not the other New (simulator): lab4p --hybrid. The hardware sends slot 0; the DUO reads the game's word off RCNT, then takes the pins (SC still low) for slots 2 and 3. Run --hybrid --players 1 (the control: should reach the trade screen), then --hybrid --players 3
12h (16 Nov) big step: the game counted four players --hybrid: the handshake on the first try both times. --players 3: the game counted four players and asked for link players, then its checksums parted from the DUO's (by xor 0x0002, 0x22e9) and it stopped answering: transmission error. --players 1: the game's link player arrived, then transmission error too Two suspects: the DUO's own reading of the game's word (its stop bits went missing a third of the time before), which goes into the checksum the DUO sends; and the hand-sent bits' timing. Changed (simulator): the control takes the game's word from the link hardware (exact); with --players 3 the hardware's reading is used whenever it's there by then; the DUO's bits are worked out ahead and sent from a tight loop, and their lateness is measured and reported
12h (16 Nov, evening) fail, both causes found --hybrid --players 1: a clean link (1916 checksums of 1916, the game's word from the link hardware every time), the game's link player came, then a link error; no room key ever. --players 3: four players counted, then one checksum off by a bit; the DUO's edges up to 226 cycles late Two causes, each reproduced in the simulator once it ran the DUO's code at the GBA's real speed (its samples came 62 cycles late on hardware, 39 in the simulator). Control: after the link players the Trade Center's leader asks for the trainer cards (0xCCCC 2) and everyone answers, then both send room keys every frame; lab4p never asked, so the game gave up. Now it does, as the trade program. Four players: slots 2 and 3 went over 500 cycles after the game's word (the DUO read the whole word first), past what a GBA's link hardware waits; slot 3's start was worked out late and its bits squeezed. Now the link hardware reads the game's word and the DUO times slots 2 and 3 from its start bit, as one schedule made ahead. Retest 12h
12h (16 Nov, night) control: pass. Four players: fail, cause found --hybrid --players 1: into the Trade Center room, keys sent - the link carried on as with a real partner. --players 3: "Please wait"; the DUO flapped between linked and handshake. Its reading of the game's word was the handshake 3476 times in a row, long after the game had linked Read from the link hardware after the DUO takes the pins, SIOMULTI1 is stale (the previous build read it before, just after the game's stop bit: right every time). So the DUO always thought the game never took its 0x8FFF and went back. Fixed (simulator, which now models the stale register): read just after the game's stop bit, before the pins. Retest --players 3
12h (16 Nov, late night) fail - and an honest correction --hybrid --players 3: the game sent its handshake after every 0x8FFF (read fresh, before the pins: reliable). In DoHandshake a slot that is neither a handshake nor 0xFFFF counts no players at all; a missing one stops the count at the slots before. So: the game read the DUO's hand-sent slots as garbage. And the earlier "four players" (0daeb10) was the DUO's own count - its slots 2 and 3 came late, past the game's wait, so the game took them for empty and linked as two (hence the checksums one bit off). The game has never read a word the DUO sent by hand; the link hardware's it reads every time New (simulator, which now counts as DoHandshake does): the hybrid steps through 12 ways of sending slots 2 and 3 - the gap after the game's word (1/4 to 3 bits), the bit time, and slot 2 alone - and reports for each what the game did: garbage, missed (linked as two), or read (linked as three or four). Longest gaps last (past the game's wait it links as two and stays). Retest --hybrid --players 3, about a minute
12h (17 Nov) fail on every setting: four players parked --hybrid --players 3, the sweep: 2353 tries over all 12 ways of sending slots 2 and 3 (the gap 1/4 to 3 bits after the game's word, the bit time -256 to +256/256 cycle, slot 2 alone or both). The game read the DUO's hand-sent words as garbage every time - not once as empty (linked as two), not once read (three or four). The game's own word from the link hardware: 14139 of 14139. The DUO's edges mostly on time (255 a third of a bit late or more, the latest 118 cycles) Not timing, then, or not timing we can reach: the game's link chip doesn't take a word the DUO drives by hand on SD, at any gap or speed tried, while it takes the DUO's link hardware every time. Parked (17 November): no more four-player runs unless a new idea changes how slots 2 and 3 go out (for example a second GBA's link hardware sending them)
Trade (15 Nov) noted, not yet looked at A PKHeX-exported Tangela traded into English Ruby fine (695 mismatches, 666 of them before sitting down). Blocking the DUO on the way out after the trade: the DUO reached the door and asked to leave, the game faded to black and stayed there, the link still busy Explained from the source, 17 November (not yet retested): that day the DUO was player 0 (the master). Once both have left, the game stops its keys, fades to black and closes (field_fadetransition.c sub_8081050), but it only sends its close (0x5FFF) when its receive queue was empty at SerialCB's sample (link.c sub_8008350, gLastRecvQueueCount). The DUO kept sending a room key every frame, so the queue could stay non-empty: a black screen with the link busy. A real partner stops its keys there too. Fixed in trade, mix, colosseum: no more room keys once both have left. The 666 mismatches "connected" were the game's closed link read as 0xFFFF, fixed the same day
12a (14 Nov) fail, explained English Ruby in the Trade Center answered every transfer, its start bit steadily 44-256 cycles after its turn, but the DUO read its handshake 0xB9A0 as 0xB8A0 every time (bit 8 wrong, its neighbours right) and missed about one stop bit in eight. Two other runs stopped at once with nothing read Fixed (simulator, 14 November): one sample taken late at the same point of every transfer: the transfers start on the same line each frame and a line is 1232 cycles (about 8.5 bits), so a stall once a line - an HBlank DMA left running on the DUO's GBA, the only thing that stops the CPU with interrupts off - lands on bit 8 and near the stop bit. The line-level model, given such a stall, reads 0xB8A1 and fails the same way. lab4p now pauses any running DMA for each transfer (about 1 ms), says which it found, and measures how late each sample came. The instant stops: the DUO wasn't seeing itself as master (its SI high: the purple plug not on its GBA, or not fully in), but the warning could never show (a flag of 4 shifted past bit 31); it shows now. It also listens for 10 minutes and prints a live line about the wire every 5 s. Retest 12a

Results of 18 November (evening), and what changed for them

Test Result What was seen Done about it (19 November, night)
Colosseum, Ruby double and LeafGreen single (the DUO as player 0) pass Both battles to the end, the DUO's choices sensible The records show the game commanding its own team and the DUO its Pikachus, as the source says (Colosseum battles have no level rules in Gen 3)
Battle Tower link multi (Japanese Emerald, the DUO as player 0) swapped, by the game's rules You commanded the DUO's Pikachu and Celebi and it yours; its sprite a girl in the corridor, a boy in battle; a level 70 and a Celebi accepted Explained from the source: as player 0 the DUO can't run the battles, so the game must, and Emerald gives the battle master's slots to player 0's Pokemon (battle_main.c 1196 and 1261, battle_controllers.c InitLinkBtlControllers). The sprite mix-up is the same swap. The tool now checks which end it's on before the game is even on and stops unless --as-player0; and it checks the DUO's team with the Battle Frontier's own rules (frontier_util.c AppendIfValid: no Mew, Mewtwo, Lugia, Ho-Oh, Celebi, Kyogre, Groudon, Rayquaza, Jirachi, Deoxys; no shared items; at most level 50 in the LEVEL 50 challenge, where it now leaves at the link-up). Retest with the game's GBA on the purple end and two eligible Pokemon
Berry Blender, the DUO leading, two blends (Japanese Emerald) fail The second blend stuck at the berries: the berries crossed, then the game waited Likely cause (simulator): a game with one more "ready" barrier round its save than English Emerald (the source we have) leaves the DUO asking for the berries before the game's blend has begun; the game then clears them and waits - the same record as yours, down to the game sending its previous berry. The DUO now asks again if no blend starts 15 s after the berries cross. Retest blender --blends 2 with the DUO leading
Record Mixing, Japanese Emerald no base Mixed and saved, no error; the base didn't appear Explained: Japanese Emerald mixes with international Emerald but not international Ruby (Bulbapedia's table); to Emerald the DUO is a Ruby player with an English-layout record. Built, 19 November: mix --base FILE.sb3 --layout emerald makes the DUO an Emerald player sending Emerald's own record (simulator: 26 rounds, the base filed, the save in step). Retest with Japanese Emerald; the workshop's whole-record tab now has a Layout choice too

New to try (19 November, night):

Test Command What to look for
Record Mixing, Japanese Emerald, in Emerald's own layout python duo_events.py mix --base FILE.sb3 --layout emerald The tool says "Emerald mixes in its own layout"; 26 rounds; the base appears in the game afterwards
Multiboot: the Berry Fix to a GBA with no cartridge (the DUO's GBA on the purple plug; with an AGB-005 hub, up to three GBAs at once: the tool says how many answered) python duo_events.py multiboot --from-rom EMERALD.gba --send The other GBA shows the Nintendo logo, then the Berry Fix program's screens; the tool says "sent". It asks you to put a Ruby or Sapphire cartridge in - only do that with a backed-up save, as the program writes it. To send without letting it write anything, simply switch the other GBA off once the tool says "sent"
Test Result What was seen Done about it
13, Mystery Gift: the Mystic Ticket in English LeafGreen pass The card came through, the game saved it, and the delivery man handed over the Mystic Ticket -
16, the Union Room: the DUO as a trainer partly Into the Union Room, and DUO was there; pressing A on DUO froze the game with a communication error On hold at the user's choice. To look at from logs\latest.log when picked up again. One suspect to keep in mind: talking to a trainer is the first step with a sustained exchange at 2 MHz over the cable, which GBATEK warns is only reliable without one (Mystery Gift worked over the same cable, so it isn't the whole story)
# Test Command What to look for
1 A single battle, medium (Ruby with 2-3 Pokemon; the DUO with 1-2) python duo_events.py colosseum --pk3 A.pk3 B.pk3 The DUO uses sensible moves; the battle reaches its end; the tool says "safe to switch off" and keeps battles\*.txt. In the record: the game's own answers (state 1 for battler 0) and a SETMONDATA after each hit
2 A single battle, impossible ... --level impossible A short pause after you choose each turn (it waits for your choice), then a strong answer; never anything the game wouldn't allow
3 A double battle (Ruby with 3-4 Pokemon; the DUO with 3-4) ... --level medium, choose DOUBLE BATTLE Both of the DUO's Pokemon act; each aims at a foe it can hurt; a fit replacement after a faint
3a A battle with Emerald, then LeafGreen as 1 The same as with Ruby. To Emerald the DUO is a Ruby player (its card and sprite); LeafGreen sees a LeafGreen player
3b Emerald's Battle Tower link multi battle (the Battle Frontier open; the game's GBA on the cable's master end) python duo_events.py tower --pk3 A.pk3 B.pk3 The link-up at the counter, the trainers, the battles with the DUO as your partner, "carry on?" between them
3b+ The Battle Tower, the DUO as player 0 (as 3b, but the DUO's GBA on the master end) python duo_events.py tower --pk3 A.pk3 B.pk3 --retire-after 2 The tool says the DUO is player 0; the trainer cards show; the DUO's Pokémon are on the left of your side; the Tower's trainers are ones your game would pick; after the second win the game says your partner has retired
3c The Berry Blender (Ruby or Emerald, Lilycove; the game's GBA on the master end; a berry and a Pokéblock Case) python duo_events.py blender --blends 2 The DUO's arrow presses as it passes the top (mostly the best spot); the blend ends; "another berry?" once more, then the link closes. The tool's Pokéblock matches the one in your case
3c+ The Berry Blender, the DUO leading (as 3c, but the DUO's GBA on the master end) python duo_events.py blender --blends 2 The tool says the DUO leads; the game shows the trainer cards and the bag; the blend, the time and RPM on the results screen match the tool's; "another berry?" is decided as both answered
3d Emerald's link Contest, E MODE (Lilycove's Contest Lobby, the link counter; the game's GBA on the master end) python duo_events.py contest --pk3 X.pk3 --category cool The DUO's Pokémon appears with its name and trainer; from round 2 the tool names each round's move as it chooses it (never "too late"), and the game shows that move; when the meter is one short at the DUO's turn, a cool move gets the crowd going; the results match what the tool says
3d+ The Contest, the DUO as player 0 (the DUO's GBA on the master end) python duo_events.py contest --pk3 X.pk3 --category cool --rivals A.pk3 B.pk3 The other two contestants are the --rivals; the contest runs to its results; nothing looks wrong on the results screen
3e Record Mixing with Emerald (the DUO a Ruby player) python duo_events.py mix --base X.sb3 The 24 rounds go across, Emerald saves; the base appears on its route (with Secret Power)
4 Record Mixing, standing in the DUO's way on purpose on its way to the table python duo_events.py mix --base X.sb3 The DUO waits a moment, then goes round the other side of the table to its seat: no pacing along a wall
5 A trade, standing in the way out python duo_events.py trade --pk3 X.pk3 The DUO goes round you to the door, and the received Pokemon is kept straight after the trade
6 Record Mixing's results in the game (after a mix with a trend and news) Ask about the trend in Dewford; the news on the TV (Slateport's sale). The TV show and the Bard's song were seen on 7 November
7 The Record Workshop's Put it in the record the workshop, then mix --record FILE.rm3 A base designed and put straight into the record arrives in the game
8 The trade's trainer card in Ruby, Emerald and LeafGreen a trade; look at the partner's card The event trainer's name, ID and gender; a realistic card
9 duo_rom.py with the Ruby cartridge, then the workshop python duo_rom.py The file loads in the workshop ("Use my ROM's graphics…") and draws the rooms and words
10 Japanese Emerald's Trainer Hill after its e-Card (session 30) — Visit the Trainer Hill: the card's trainers are there
11 Japanese FireRed/LeafGreen's Trainer Tower e-Cards (needs a Japanese cartridge) python duo_events.py event --event "...Trainer Tower....raw" The floor is there in the Trainer Tower
12 Sapphire, and other languages of Ruby/Sapphire, for the e-Reader route python duo_events.py event --event ... As English Ruby (sessions 24-30)

The four-player experiment (the DUO's GBA on the cable's master end, the purple plug)

# Test Command What to look for
12a The control: the bit-by-bit link as one player (Ruby, the Trade Center) python duo_events.py lab4p --players 1 Push the purple plug fully into the DUO's GBA. The live line should go to "the game's link is open and it answers" once you're with the attendant and saved, and its handshake read many times; then the game links and the trade screen comes as usual (cancel it). At the end: which DMA was found and paused, the latest sample (well under 48 cycles late), and no missing stop bits
12b Three players (Ruby, the Trade Center) python duo_events.py lab4p --players 3 The game says the number of participants is wrong (it counted four), and the tool says the game's checksums took in four slots. If the trade carries on as usual instead, try --gap 2, then --gap 1

With the two real Wireless Adapters (arrived 25 November)

No cable for these: the adapter plugs straight into a GBA's link port.

# Test Command What to look for
20a Baseline: the adapters work (one adapter on Emerald, FireRed or LeafGreen) none MYSTERY GIFT > WONDER CARDS > WIRELESS COMMUNICATION searches, then says nobody was found
20b Baseline: game to game (both adapters, two of your games) none Both in the Union Room see each other, and pressing A on the other trainer works. That is the step that froze when the DUO played the adapter over the cable (test 16)
21 The adapter check: one adapter in the DUO's GBA, a game with the other adapter in the Union Room nearby python duo_events.py adapter-check "ID exchange: 0x8001", then a table of the adapter's answers next to the DUO's own. Every command should have an answer (no "NO ANSWER"). Lines marked DIFFERENT are what we wanted to learn: the real values. The search should hear your game, with its trainer ID and a good checksum. The log is saved in logs\adapter_check_*.json; send it over
22 Over the air: does a real game join the DUO? One adapter in the DUO's GBA; the other in a GBA with English Emerald, FireRed or LeafGreen (Mystery Gift enabled) python duo_events.py adapter-check --host --seconds 30 then on the game: MYSTERY GIFT > WONDER CARDS > WIRELESS COMMUNICATION The game finds "DUO" and joins; the tool says "A game JOINED the DUO over the air". The game then shows a communication error: expected at this stage (the DUO doesn't send the card yet). For Japanese Emerald add --serial 7F7F --lang 1
23 A Wonder Card over the air (after 22 joins). One adapter in the DUO's GBA, the other in the game's GBA; a save backup first. Use your own .wc3 python duo_events.py gift --air --card "YOUR CARD.wc3" --seconds 120, then on the game: MYSTERY GIFT > WONDER CARDS > WIRELESS COMMUNICATION "a game has joined", then "Wonder Card sent: the game saves it now." The game says it received the card and saves; check WONDER CARDS. The last line gives frames, retries and resends: send it over. The serial follows the card's language (7F7F Japanese, 7F7D otherwise); --serial overrides it. If the game joins but the card doesn't arrive, note the Mystery Gift step the tool prints

No Wireless Adapter needed: the DUO plays it. Use the MGB-010, or any Game Boy Color cable that fits the GBA (not the GBA link cable: docs/WIRELESS.md).

# Test Command What to look for
13 Mystery Gift through the guided start-up python duo_events.py gift --card X.wc3 Received first time; the start-up's order is right
14 English and European Emerald, FireRed, LeafGreen in other languages gift --card ... (and --sweep-serial if a game never finds the distributor) The serial table gains a line per game
15 Wonder News (needs a real news file) python duo_events.py news --news X "News received"; the delivery man's berries
16 The Union Room: the DUO as a trainer (Emerald, FireRed or LeafGreen; Pokemon Center 2F, the Union Room attendant) python duo_events.py union A trainer called DUO in the room; walk up, press A, GREETINGS: its card shows ("DUO"). The trace lists each step. Never tried on hardware
17 A Union Room trade from the trading board python duo_events.py union --pk3 X.pk3 --want normal The board by the counter shows DUO's offer; pick it, choose one of yours of that type: the two cross, the game saves, the tool keeps yours in received\ (the program before 18 November would have refused every trade: a wrong activity number, now fixed)
18 Mystery Gift with a friend, Send (Emerald with a Wonder Card it may share: the card's view offers SEND) python duo_events.py friend DUO appears in the game's list of people to send to; choose YES. The game says the card was sent; the tool keeps a .wc3 in received\ (the tool can hand it out again with gift --card, to a game without that card). Never tried on hardware
19 Union Room chat python duo_events.py union Walk up to DUO, press A, CHAT: the DUO says yes; in the chat it joins and says hello; type something (START sends it) and it says it back, and the PC prints what you typed; quit the chat and it ends. Never tried on hardware

Done

  • 7 November: the first link battle (the probe, a single battle against English Ruby, to the end and out of the room); Record Mixing with a whole record (Arthur's Blue Cave); TV and the Bard's song.
  • 6 November: Record Mixing with English Ruby (both bases rounds; the DUO walked round a blocking player).
  • Sessions 16-31 (lab notes, lab/sessions/): Mystery Gift (Japanese Emerald, English LeafGreen), the e-Reader route (Eon Ticket, berries, Devin), trades into Ruby, Emerald and LeafGreen.