Rendered from docs/REGISTERS.md in the repository.
What the MAX DUO's control area holds, worked out offline from the way Datel's own firmware 1.06
uses it, and where things live inside that firmware. It complements HARDWARE.md
(the chips) and FINDINGS.md (what was measured). The method is
tools/probes/fw_regscan.py, run on your own copy of Datel's update: it finds every literal pointing
into the control area or the header overlay, every instruction that loads one, and what is read or
written through it. Only addresses and the shape of each access are recorded here; no Datel code is
reproduced.
Each line says how sure we are. Measured means a lab session read it on the real DUO.
From the code means Datel's firmware plainly does it. Interpretation is our reading of why,
to be confirmed by the session 32 probes (tools/probes/duo_probes.py, below).
The control area, 0x09FE0000-0x09FFFFFF
Measured on the real DUO (sessions 32-35, 28 November 2026):
- Only 0x09FE0000-0x09FE01FF is decoded for reads. At rest everything there reads 0, except 0x09FE0080 (0x0FF0), LINK_IN at 0x09FE01C0 (0xF5xx with the switch ON; it also reads at 0x09FE01C2) and LINK_OUT at 0x09FE01E0 (0x0002, not the GBA's last write). Nothing moved over ~2 s.
- From 0x09FE0200 upwards every read is open bus (the address bits): the four slot registers below can be written but not read back, and nothing is mirrored at higher address bits.
- 0x09FFE140 is not a readable register. Its "0xF0A0" (October) is simply open bus; Datel's write of 0x0FF0 there may be what 0x09FE0080 shows, but that needs a write to test.
- With the game mapped (0x0101, 0x0007 or 0x0001) the whole control area and 0x09FE0400 read as open bus: the game cannot see the Action Replay's registers. The header overlay and mapping register remain.
| Register | Datel's access | What it is | Confidence |
|---|---|---|---|
| 0x09FE0000 / 0x09FE0020 | write | A 32-bit value split into halves (written as an address in halfwords) | from the code |
| 0x09FE0040 | write | A 16-bit value written with it | from the code |
| 0x09FE0080 / 0x09FE00A0 / 0x09FE00C0 | write | A second address and value, the same pattern | from the code |
| 0x09FE0100 / 0x09FE0120 + 0x09FE0060 | write | Slot A: 32-bit address (low, high) and 16-bit value | from the code; slots are an interpretation |
| 0x09FE0200 / 0x09FE0220 + 0x09FE00E0 | write | Slot B | as above |
| 0x09FE0280 / 0x09FE02A0 + 0x09FE0240 | write | Slot C | as above |
| 0x09FE02C0 / 0x09FE02E0 + 0x09FE0260 | write | Slot D | as above |
| 0x09FE0160 | read | Board variant. 0 on this DUO (lab, 22 October). Chooses how the AR switch is read | measured + from the code |
| 0x09FE0180, 0x09FE01A0 | read, write | Read, and written (0x0180 cleared to 0), by the same routines as the slots | from the code |
| 0x09FE01C0 | read | LINK_IN (bits below) | measured + from the code |
| 0x09FE01E0 | write | LINK_OUT (bits below) | measured + from the code |
| 0x09FFE140 | write | Written 0x0FF0 every time Datel maps its own program back (routine 0x0800BA80, with mapping 0x0120). Reads are open bus | measured + from the code |
The four slots. One routine (0x0802E700) takes a slot number 0-3, a 32-bit value and a 16-bit value, and writes them to the three registers of that slot. Datel's Action Replay code formats include ROM patch codes, up to four per game, which replace one 16-bit word of the game's ROM. Four address-and-value slots in the switch chip are the natural way to do that, so our interpretation is that the Actel compares every cartridge read against four addresses and substitutes the value. Unconfirmed, and deliberately not tested by writing (the lab allows no writes here).
LINK_IN (0x09FE01C0)
| Bits | Meaning | Confidence |
|---|---|---|
| 0-7 | A byte from the USB chip | measured (every transfer) |
| 8 | The USB chip's strobe; differs from LINK_OUT bit 8 when a byte waits | measured |
| 9 | AR switch on variant-1 boards (ON when clear) | from the code |
| 10 | AR Button: System Test shows "AR Button : DOWN" when this bit is clear, otherwise UP | from the code (routine 0x0800BB2C) |
| 12 | Serial data in (see LINK_OUT) | from the code (0x0800BBFC) |
| 13, 14 | AR switch on variant-0 boards like this one: ON when both are set | from the code; switch behaviour seen on hardware |
| 15 | Reads 1 at rest | measured (sessions 32-35) |
| 12-15 | Datel's game-start routine waits while all four read 1 before handing over to the game | from the code |
LINK_OUT (0x09FE01E0)
| Bits | Meaning | Confidence |
|---|---|---|
| 0-7 | A byte to the USB chip | measured |
| 8 | The GBA's strobe | measured |
| 10 | Serial select, set and cleared around each exchange (0x0800BB54) | from the code |
| 11 | Serial clock (0x0800BB8C) | from the code |
| 12 | Serial data out (0x0800BBC4) | from the code |
Datel keeps a copy of LINK_OUT in IWRAM at 0x0300212C and changes one bit at a time. Its byte-out routine (0x0800BC0C) sends eight bits, most significant first: clock low, data, clock high. Its byte-in routine (0x0800BC3C) reads bit 12 after each clock. That is SPI, bit-banged. Nintendo DS game cards keep their saves on an SPI chip, and the DUO's DS commands (0x27, "send commands to a DS card's save chip"; 0x1A, the save size) and System Test's DS Capacity line use it, so these are almost certainly the DS card slot's save-chip lines. Interpretation, high confidence.
The mapping register (0x0800009C) in Datel's code
| Value | Where Datel writes it | Meaning |
|---|---|---|
| 0x0120 | everywhere it returns to its own program (0x0800BA80) | the DUO's program (measured) |
| 0x0101 | its "read the game" helper (0x0800D10C): map the game, one read of 0x08000000 (a wake read), copy, map 0x0120 again | the game (measured) |
| 0x0007, 0x0067 | a family of small routines (0x0800D168, 0x0800D194, 0x0800D1CC): write 0x0067, jump to Thumb code at 0x09FE0400 with a return address inside the header overlay (0x08000031, 0x08000033, 0x08000040, 0x08000044), then write 0x0007 | the game running with the Action Replay attached: 0x0067 seems to open a code window at 0x09FE0400 for the cheat engine. Interpretation |
The lab only lets scripts write 0x0120, 0x0101, 0x0007 and 0x0001, so 0x0067 stays untested. Datel's game-start routine (ARM code at 0x0800CFA4) reads the variant register, waits on LINK_IN as above, pauses, writes the mapping value it was given, clears the GBA's I/O registers and stacks, and jumps to the game at 0x08000000.
Datel's USB command table
tools/probes/fw_map.py reads the table at 0x080074A8 (one entry per command, 0x02-0x27). Datel's
1.06 answers only 14 of the 38 numbers at the top level: 0x02 (hello), 0x0A, 0x0B, 0x0C, 0x11,
0x12, 0x13, 0x1A, 0x1C, 0x22, 0x24, 0x25, 0x26 and 0x27. The other 24 go to "unknown command"
(0x08007572), including 0x16, 0x18, 0x19, 0x1F, 0x0F and 0x20: those are answers inside a transfer
or an update, read by the running command's own loop, never dispatched by the table. Reckless v4.2
fills ten free slots (0x03-0x07, 0x09, 0x1E, 0x21, 0x23, and 0x02 is redirected to its own hello) and
changes nothing else outside the padding except the start-up shortcut (8 bytes at 0x080073A0) and
System Test's version pointer: fw_map.py --compare lists every changed word.
The screen table at 0x0802AD80 has 19 entries (screen 7 is USB SERVER MODE). The hardware routines' callers: the SPI routines are used by eight routines clustered at 0x0800BC78-0x0800BF9C (the DS card code); the packet routines by the USB server (0x080073F4, 0x08007444) and its handlers; the AR switch by start-up (0x08003FD0, 0x08003FE4) and System Test (0x0800B2A0), which alone reads the button.
Datel's firmware 1.06: a map
The image is 191,172 bytes (0x08000000-0x0802EAC3).
| Address | What | Source |
|---|---|---|
| 0x080006A8 | idle wait | build scripts |
| 0x08000E30 | go to screen N | firmware reading |
| 0x080065D0 | CRC-32 | build scripts |
| 0x080066E0, 0x08006714 | log a message (several, one) | build scripts |
| 0x080068E4 | HELLO handler | build scripts |
| 0x080073F4 | boot | firmware reading |
| 0x08007454 | USB server main loop | build scripts |
| 0x08007540 | command-table entry for HELLO | build scripts |
| 0x08007572 | command-table entry for "unknown command" (the free slots this project uses) | build scripts |
| 0x08007648 | USB server entry | firmware reading |
| 0x0800B238 | System Test's pointer to "V 1.06" | build scripts |
| 0x0800BA80 | map the DUO back (0x0120, and 0x0FF0 to 0x09FFE140) | fw_regscan |
| 0x0800BAF0 | read the AR switch | fw_regscan |
| 0x0800BB2C | read the AR button | fw_regscan |
| 0x0800BC0C, 0x0800BC3C | SPI byte out, byte in | fw_regscan |
| 0x0800C1DC | "is a packet waiting?" (LINK_IN bit 8) | build scripts |
| 0x0800C1FC, 0x0800C29C | receive, send an 8-byte packet | build scripts |
| 0x0800CFA4 | start the game (ARM) | fw_regscan |
| 0x0800D10C | read from the game (with the wake read) | fw_regscan |
| 0x0800EADC | colour schemes | build scripts |
| 0x0802AD80 | screen table (12-byte entries: enter, update, leave) | firmware reading |
| 0x0802BB70, 0x0802BE94, 0x0802C0B8, 0x0802C2DC | text tables: English, French, German, Italian | build scripts |
| 0x0802E700 | write patch slot A-D | fw_regscan |
| 0x0801E7C2-0x0801FD8F | empty padding (5,582 bytes of 0xFF): all of Reckless lives here | build scripts |
Where Reckless puts things. In the padding: cosmetic strings at 0x0801EC00; the v3/v4 routines
from 0x0801F000 (send_sbw, wait_pkt, rle, send_block, stream, log_msgs, then the command handlers
s_hello, s_exec, s_info, s_upload, s_restart up to 0x0801F5FF); v4.2's run-from-RAM at 0x0801F640;
strings at 0x0801F800 and 0x0801FB00; the API table handed to programs at 0x0801FC00. In RAM: Datel's
transfer buffer at 0x02010030, the lab's staging area at 0x02038000, a 4 KB compression buffer at
0x02039000, the PC's log messages at 0x0203AE00 and the stream state at 0x0203AF00. What Datel itself
writes in RAM, measured in the simulator, is in extracted/duo_memory_map.txt (made by
tools/duo_memory_map.py): 134 KB of EWRAM and 3 KB of IWRAM over boot, a save backup and a
multiboot send.
The probe and analysis toolkit
All in tools/probes/ (README): fw_regscan.py and fw_map.py (offline,
on your own image), usb_trace.py (decodes a Wireshark/USBPcap capture of Datel's PC program or this
toolkit: packets named and timed, turn-taking checked) and duo_probes.py (session 32's lab scripts,
the USB check and the report). tests/test_probes.py covers them all.
Session 32: the probes that test this
All read-only, all ordinary lab scripts, written by python tools/probes/duo_probes.py write
(the plan: ... plan; the analysis: ... report). Run only with Fred's go-ahead.
| Probe | Question |
|---|---|
| p_regs | Do the write-only registers read back? What do all 24 hold at rest? |
| p_decode | Which address bits does the Actel decode in the control area? Anything Datel never uses? |
| p_window | What reads at 0x09FE0400 (the code window) with the DUO's own mapping? |
| p_flash | Are 0x0802EAC4-0x0802FFFF and 0x0803C000-0x0803FFFF blank? |
| p_busmap | Is anything else mapped anywhere in the 32 MB cartridge space? |
| p_waitcnt | Which of 16 ROM wait-state settings can the DUO's flash and the game keep up with? |
| p_mirror | Where do the flash and the game mirror? Does the header overlay repeat in the flash's mirror? |
| p_garble | Straight after a restart, are the first bytes ever garbled? |
| speed_* | Five timed reads to refit the speed model (fixed cost + per-packet cost) |
| p_switch | Which LINK_IN bits follow the AR switch, the AR button and a DS card? (needs you at the console) |
| usb | The USB descriptors (bInterval settles the "~9 ms: chip or Windows?" question) and 200 timed HELLOs |
The worst a read can do is upset the link, and a power cycle cures that: none of these can write the flash (that needs command writes on the flash's own bus) or the cartridge.