# Registers: the Mega Duck's I/O page against the DMG's Sources: MDI "Graphics Register Address Changes", "Graphics Register Bit Flag Changes", "Sound Register Changes Table", "Sound Register Value/Data Changes"; HWINC (every `TARGET_MEGADUCK` block). The two agree on every address below (checked line by line 2026-11-26). Tier 3 (DOC); OBSERVED in MAME where the trace touched them (mame-oracle.md). ## Unchanged (HWINC; MDI for serial) `$FF00` P1, `$FF01` SB, `$FF02` SC ("same address, control flags and behavior", MDI), `$FF04-$FF07` DIV/TIMA/TMA/TAC, `$FF0F` IF, `$FF30-$FF3F` wave RAM, `$FF80-$FFFE` HRAM, `$FFFF` IE. VRAM `$8000-$9FFF`, OAM `$FE00-$FE9F`, WRAM `$C000-$DFFF` (HWINC's area constants are not conditional). No CGB registers; no `$FF50` (there is no boot ROM). ## Picture (MDI; HWINC) | Register | DMG | Mega Duck | | --- | --- | --- | | LCDC | `$FF40` | `$FF10` | | STAT | `$FF41` | `$FF11` | | SCY | `$FF42` | `$FF12` | | SCX | `$FF43` | `$FF13` | | OBP0 | `$FF48` | `$FF14` | | OBP1 | `$FF49` | `$FF15` | | WY | `$FF4A` | `$FF16` | | WX | `$FF4B` | `$FF17` | | LY | `$FF44` | `$FF18` | | LYC | `$FF45` | `$FF19` | | DMA | `$FF46` | `$FF1A` | | BGP | `$FF47` | `$FF1B` | **LCDC bits** (Duck bit -> DMG meaning): 7 LCD on (7), 6 BG/window enable (0), 5 window on (5), 4 tile data `$8000` (4), 3 window map `$9C00` (6), 2 BG map `$9C00` (3), 1 OBJ 8x16 (2), 0 OBJ on (1). Bits 7, 5 and 4 stay; bit 6 moves to 0; bits 3, 2, 1, 0 move to 6, 3, 2, 1. The build writes this as a table of eight bit moves (Duck bit -> DMG bit), tests every bit alone, and applies the inverse on reads. STAT's bits are not listed as changed by either source (U4). ## Sound (MDI; HWINC) | Register | DMG | Mega Duck | Data change (MDI) | | --- | --- | --- | --- | | NR10 | `$FF10` | `$FF20` | | | NR11 | `$FF11` | `$FF22` | | | NR12 | `$FF12` | `$FF21` | nybbles swapped | | NR13 | `$FF13` | `$FF23` | | | NR14 | `$FF14` | `$FF24` | | | NR21 | `$FF16` | `$FF25` | | | NR22 | `$FF17` | `$FF27` | nybbles swapped | | NR23 | `$FF18` | `$FF28` | | | NR24 | `$FF19` | `$FF29` | | | NR30 | `$FF1A` | `$FF2A` | | | NR31 | `$FF1B` | `$FF2B` | | | NR32 | `$FF1C` | `$FF2C` | volume code: Duck 01 = 25%, 11 = 100% (DMG 01 = 100%, 11 = 25%) | | NR33 | `$FF1D` | `$FF2E` | | | NR34 | `$FF1E` | `$FF2D` | | | NR41 | `$FF20` | `$FF40` | | | NR42 | `$FF21` | `$FF42` | nybbles swapped | | NR43 | `$FF22` | `$FF41` | nybbles swapped | | NR44 | `$FF23` | `$FF43` | | | NR50 | `$FF24` | `$FF44` | | | NR51 | `$FF25` | `$FF46` | | | NR52 | `$FF26` | `$FF45` | | MDI's conversions: a nybble swap `(v << 4 | v >> 4) & 0xFF`, and for NR32 `(~v + 0x20) & 0x60`, "the value to write (or the value read)". That reads and writes both convert is MDI's statement, not a measurement of reads (U5). Holes in the Duck's map (`$FF1C-$FF1F`, `$FF26`, `$FF2F`, `$FF47-$FF4F`, `$FF03`, `$FF08-$FF0E`) are not described by any source (U6). ## What this means for the specification Every difference is an **address decode and data-line wiring** difference: no source names a register that behaves differently once its bits are put back in DMG order. So the board is the DMG's behaviour behind a permutation of addresses (picture, sound) and of data bits (LCDC, NR12, NR22, NR42, NR43, NR32). That is a HYPOTHESIS backed by (a) MDI's porting notes, which treat it so and run real homebrew, and (b) MAME, which drives its unchanged DMG PPU and APU devices behind such a map (OBSERVED: its device list, not its source).