# The slave and servo processors, pointing devices, front panel, NVRAM Sources: cdichips `mc6805slave.md`, `mc6805servo.md`, `mc6805ikat.md` (CD-i Fan; facts only); Motorola MC68HC05C8 programming reference guide and MC68HC05i8 advance information (ICDIA; facts only); Philips "Technical Info Pointing Devices" and the keyboard specifications (ICDIA; facts only); ST M48T08 data sheet (facts only); CDi_MiSTer `doc/slave.md`, `doc/servo.md` (logic-analyser captures on a 210/05 and a 210/20, GPL-3.0 repository, prose read for facts); MAME's lists and access census (closed box). ## The slave (MC68HC05C8, Maxi-/Mini-MMC, Mono-I, Mono-II) - A Motorola MC68HC05C8 (MAME: `mc68hc705c8a`, the OTP part, 8 KB images "with test ROM"): high-level CD drive control, pointing devices, front display and system control (cdichips). MAME clocks it at 4,000,000 Hz (OBSERVED); the internal bus clock is fOSC/2 (2 MHz) per the 6805 family's convention and CDi_MiSTer's notes. - The main CPU sees it at `310000` (Mono-I, Mono-II) or `200000` (MMC boards): four byte-wide **channels A-D** at odd addresses `+1/+3/+5/+7`. Commands and responses are channel-specific messages whose length follows from the first byte; the slave raises a level interrupt (IN2 on Mono-I: scc68070.md) while response bytes are waiting, and may delay DTACK. Commands documented in cdichips include channel A `83`/`84` enable/disable pointer input; cdinotes adds channel 2 (C) `82` mute / `83` unmute. - MAME's boot census shows the CPU writing `310000` (`86`, `89`), a burst to `310006` and `310002`, then polling (OBSERVED, mame-oracle.md): the boot handshake. - Timing measured on hardware (CDi_MiSTer `doc/slave.md`, a real slave 3.2 in a 210/05): an I2C transaction to the front display every 8.1 ms (the slave's timer output compare, its time base); a region query answered after 152 polls at a 1.3 ms period, 196 ms in total. OBSERVED on real units through a GPL-3.0 document: usable as facts, tier 3 (U14 for everything not captured there). - The slave talks to the **servo** MCU over SPI at 500 kHz (CDi_MiSTer `doc/servo.md`: the full byte exchanges after power-on, with and without a disc, on eject and load, captured on a 210/05 and a 210/20). ## The servo (MC68HC05C8, MMC boards and Mono-I/II) Low-level drive control (focus, tracking, sled, spindle, tray). Not on the main CPU's bus. Its 8 KB firmware is dumped (bios-and-models.md). In a board that models the drive functionally, the servo is only needed if the slave runs as low-level code. ## IKAT (MC68HC05i8, Mono-III/IV) A 68HC05 variant with a 68000 bus interface (ICDIA: "the 68000-interface microcontroller used as the IKAT chip"; 7,936 bytes ROM, 224 bytes RAM per cdichips). Not dumped in MAME's sets (no IKAT ROM in any listed machine): Mono-III/IV need a functional model or a dump (U15). ## The 68HC05 core: a second user (the chip rule) The PlayStation Phase 0 (`../psx-python/docs/cdrom.md`) proposed **`mc68hc05-python`** for the PS1's CD controller sub-CPU (an MC68HC05-family part; MAME runs an HD63705 for the US model). The CD-i is the second family board that needs a 68HC05: the slave and servo (MC68HC05C8) and the IKAT (MC68HC05i8). CPUs get their own core anyway; two users settle that one core serves both, with the C8, i8 and the PS1's part as variants (port and timer blocks differ, the instruction set is shared). No 6805 core exists in the family (`m6800-python` is a different instruction set). Open decision 3. Evidence for that core: the MC68HC05C8 reference guide and MC68HC05i8 data (ICDIA), the MC68HC05L16 data sheet in psxdev (CC0 repository, Motorola's document), opencores' 68hc05 (licence to check before use), MAME's `m6805`/`m68hc05` (BSD-3-Clause by their `license:` lines; closed in practice, decision 6). ## The two ways to run the slave | | A. Functional slave | B. The slave's firmware on mc68hc05-python | | --- | --- | --- | | Evidence | cdichips' channel/command tables (reverse engineered from the drivers, tested in CD-i Emulator), CDi_MiSTer's captures, MAME's `cdislavehle` behaviour as a detector | the dumped firmware (slave 2.0 for Mono-I, 4.1 for Mono-II: by SHA-1) | | Gets right for free | nothing; every response and delay is fitted | the message formats, responses, polling periods, pointer packet handling, front panel, IR remote | | Needs | fitting | the 6805 core, the SPI link to a servo model or the servo firmware too, the I2C front display, the IR receiver | | Speed | negligible | a 2 MHz 8-bit CPU: cheap in Rust, a few percent in Python | **Recommendation: B for the reference (Mono-I's slave 2.0 runs as itself), with A built first only as a stepping stone if mc68hc05-python is late.** Unlike the PS1's sub-CPU, the CD-i slave owns the user's input path and the boot handshake, both visible to every title; its dump is in hand and its interface is small (four byte channels and an interrupt). MAME's Mono-I uses a functional model, so MAME cannot judge B; the MiSTer core runs the real slave (its README), a GPL-3.0 closed box that could (decision 7). ## Pointing devices (DOC: Philips pointing-device specification) - Classes: **maneuvering** (joysticks, joypads, the RV 8701 paddle), **relative coordinate** (mice, trackballs), **absolute coordinate** (tablets, absolute mice), **absolute screen** (light pens, touch screens). Two buttons (button 1, button 2) as a rule. - Serial: 1200 or 9600 baud, 7 data bits LSB first, 2 stop bits; three-byte packets on every movement or button change (the mouse: byte 0 = `bt1 bt2 Y7 Y6 X7 X6` in d5-d0, bytes 1 and 2 = `0` and the low six bits of X and of Y; 8-bit movement, $00 = none; the d6 marker of byte 0 is not legible in the scan, U18); RTS identifies the device: it sends a one-byte device ID at power-up (ID timing: the device answers within 10-500 ms). - On Mono-I the pointer port is read by the slave, which forwards pointer state on its channel A. Keyboards ('K', 'X', 'T' modes) have their own specification. ## Front panel and remote The slave drives the front display over I2C (the SCC68070's I2C bus on boards where the CPU owns it) and decodes the RC5 infrared remote (CDi_MiSTer: a 210/05 needs the slave 3.2 dump for the front-panel play button and the remote's media keys; that dump does not exist in MAME's sets: U16). ## NVRAM and real-time clock (DOC: M48T08; OBSERVED: MAME census) - An **M48T08 TIMEKEEPER** SRAM (8 KB x 8 with a real-time clock in its top eight bytes, `1FF8-1FFF`; control register at `1FF8`) on Mono-I; MAME lists `mk48t08`. Philips players also use a DS1216 SmartWatch socket for 32 KB on some models (ICDIA's document list). - On Mono-I it is wired to one byte lane: MAME's accesses span `320000-323FFF` with byte mask `FF00`, i.e. NVRAM byte n at `320000 + 2n` (OBSERVED); the boot writes `323FF0` (= 2 x `1FF8`), the clock's control register, `40` then `00` (the read latch). - CD-RTOS keeps the player settings and each title's save data in it; the MiSTer core's NVRAM files are "compatible with the CD-i emulation of MAME" (its README). The board keeps NVRAM as a host-provided 8 KB image and the clock from a host-provided epoch so that runs are deterministic (decision 9).