# The DVD interface and drive, EXI devices, SI controllers, the hi-speed port Sources: YAGCD 5.7-5.9, 9, 10, 11, 12, 13 (community, facts only, tier 3); Copetti's "I/O" and "Anti-piracy" sections (CC BY 4.0); the Redump datfile (sizes; OBSERVED). ## DI and the drive - **DI** (0x0C006000, 0x40 bytes; YAGCD 5.7): status (DISR: break, transfer-complete and device-error interrupts with masks), cover (DICVR: lid state and its interrupt), three command words (DICMDBUF0-2), DMA address and length (DIMAR, DILENGTH), control (DICR: start, DMA or immediate, direction), an immediate data word (DIIMMBUF) and a config word. - **Drive commands** in DICMDBUF0's top byte (YAGCD 5.7.1): 0x12 inquiry (drive info by DMA), 0xA8 read sectors (position >> 2, length; DMA), 0xA8 with 0x40 read the disc ID / initialise, 0xAB seek, 0xE0 request error, 0xE1 play audio stream, 0xE2 request audio status, 0xE3 stop motor, 0xE4 audio buffer configuration, and debug commands (YAGCD 5.7.2). Several entries are "?" in the table (U16). - **The drive is a computer of its own**: a Matsushita mechanism with a controller running its own firmware (YAGCD 19 cites the Panasonic MN102H60 manual for it; the census finds five 128 KB drive firmware images, ipl-firmware.md). It descrambles the disc, checks its burst-cutting-area mark and lead-in (Copetti, "Anti-piracy"; YAGCD 2.7), decodes streamed audio, and answers DI's commands with delays set by its mechanics. - **Modelling level proposed: functional drive, timed by a fitted model.** An LLE drive needs an MN10200-family core (the family has none; MAME's is GPL) and the drive firmware (player-supplied), and the disc images in the census are decoded data that carry none of the physical marks the firmware checks (HYPOTHESIS: RVZ/ISO keep user data only). So the board answers drive commands from the image, with seek and read times from a FITTED model (recorded as such), and streams audio from the image. This is a modelling choice (axis B, functional), not a concession, as long as its timing model is stated; whether the time a read takes is close to hardware is an axis-A unknown (U17). - **Disc images.** A GameCube disc image is 1,459,978,240 bytes (every full-size entry in the Redump datfile has this size; OBSERVED). Its layout (YAGCD 13): the disc header at 0 (game code, maker, disc number, version, streaming flag and buffer size, magic 0xC2339F3D, name), bi2 at 0x440, the apploader at 0x2440, then the DOL executable and the file system table the header points to. The census reads the header only. - The board reads images through a small **disc source** interface (sector reads by offset), with RVZ/NKit decoding left to a separate tool (open decision 6): the RVZ format's description is in Dolphin's GPL repository and its decoder is Dolphin's code. ## EXI (YAGCD 5.9, 10) - Three channels, each a small SPI-like serial master with chip selects, clock rates of 1-32 MHz, immediate (up to 4 bytes) and DMA transfers, and per-channel interrupts (EXI interrupt, transfer-complete, external insertion) (YAGCD 5.9). - Devices (YAGCD 10.1): | Channel | Device | What | | --- | --- | --- | | 0 | 0 | memory card slot A | | 0 | 1 | the Macronix IPL/RTC chip: mask ROM (IPL and fonts) at offset 0, RTC at 0x20000000, SRAM (64 bytes of settings, with checksums) at 0x20000100, a UART at 0x20010000 | | 0 | 2 | serial port 1 (the broadband adapter or modem) | | 1 | 0 | memory card slot B | | 2 | 0 | AD16 (a trace-step register for development) | - **Memory cards** (YAGCD 10.7, 12): flash cards whose "block" is 0x2000 bytes, the first 5 blocks holding the file system (YAGCD 12), sizes from 4 Mbit (64 blocks) to 128 Mbit (2,048 blocks; Copetti), command set (read, write, erase sector, status, ID, unlock), a file system with directory, block allocation map and checksums (YAGCD 12). Official cards answer an **unlock** sequence with a challenge computed by DSP ucode and card hardware (HYPOTHESIS from the community account; U18: the specification needs it only for LLE card emulation; a functional card can accept any unlock). - **Broadband adapter** (serial port 1): an Ethernet controller behind EXI that YAGCD thinks is "a reengineered version of the mx98726 or mx98728" (YAGCD 10; its datasheets are in YAGCD 19). Phantasy Star Online and a few LAN titles use it. Deferred past M8. - The **RTC** counts seconds; the real time is that count plus the SRAM's bias, as "seconds since January 1st, 2000" (YAGCD 10.4); the SRAM holds language, video mode, sound mode and the RTC bias (YAGCD 10.5). Both are board state that must be saved and given by the player's settings. ## SI and controllers (YAGCD 5.8, 9) - Four "joy-bus" channels with output and input buffers per channel, a poll register (how often each channel is polled per VI frame, in VI lines), a communication control register for one-shot transfers, and status (YAGCD 5.8). - Devices (YAGCD 9): the standard controller (ID, origin, status: buttons, two sticks, two analogue triggers, rumble), the WaveBird, the keyboard, the bongos (DK Bongas), the steering wheel, the RE4 chainsaw controller, and the **Game Boy Advance** over the GBA link cable (a joy-bus device: reset, status, read and write of 4 bytes). - **The family can plug its own GBA in here**: gba-python (an ARM7TDMI board) is a natural joy-bus device for the link cable, at the price of running a second machine (a socket, open decision 10). Its BIOS is the player's or Cult-of-GBA's (MIT). - Polling timing (when in a frame the controller is read) is in the observable contract for input latency; the joy-bus bit rate and the controller's response delay are timing unknowns (U19). ## The hi-speed port (YAGCD 11; Copetti) An 8-bit parallel port on ARAM's side of Flipper (Copetti: "not connected through EXI, but through Audio RAM"), used by the **Game Boy Player**, which carries a GBA's hardware and a boot disc. YAGCD 11 is nearly empty. Game Boy Player support would pair this board with gba-python as a socket device (deferred; open decision 10).