# Protection ## Correction to the commission: there is no PIC on the Y-unit or the T-unit The commission expected a PIC16C57 protection microcontroller on the Y-unit. The evidence says otherwise: - **MAME 0.285** lists a PIC16C57 in no Y-unit or T-unit set: no `pic` ROM region, no `pic16c57` device. It appears on the **Wolf unit** (region `serial_security:pic`, device `midway_serial_pic_emu`, with dumps for `umk3` and `rmpgwt` only; the other 20 Wolf sets use `midway_serial_pic_sim`) and on the **X-unit** (census.md). OBSERVED. - **The manuals' parts lists** (Smash T.V. Y-unit 1990, Mortal Kombat Y-unit, NBA Jam and MK II T-unit) name no microcontroller. The part that looks like one on the T-unit, UF5 "1020A-1" (A-17480), is an Actel 1020 whose schematic sheet shows the board's address decoding and bus arbitration (`DMA_HRQ`, `HLDA`, `GSP_HAK`, `DMA_CS`, `CRAMSEL`, `IROMSEL`, the CMOS and watchdog selects), not a protection device. DOC, read by eye. ## What the Y- and T-unit games check instead (OBSERVED) - **Y-unit:** MAME maps a read-only "protection" port at `01C00060-01C0007F` (the same address takes the CMOS-enable write). In 2,000 frames of `term2` the game wrote it 34 times (CMOS enable) and never read it; the games that read it, and when, were not found tonight (U7). Which part answers is not known: the Y-unit's PLDs (`a_5346_3044_*` in `smashtv`'s set, PLS153s in `narc`'s) are candidates (HYPOTHESIS). - **T-unit:** NBA Jam reads and writes a device MAME installs outside its static map, at `01B14000` and upwards in strides of `0x400` bits, six times each in the first 2,000 frames (`tests/mame_traces/io-nbajam.txt`). `mk` touched nothing outside the static map in 2,000 frames (U7). The board models these as a socketed **protection device** with a small interface (a read and a write at bit addresses), filled per game from captures of what the game reads and expects. Until a hardware capture or the part's equations exist, each game's responses are OBSERVED (MAME's) and say so. ## The PIC16C57 (Wolf, later row) Facts from Microchip's PIC16C5X data sheet (1992, bitsavers; DOC): the PIC16C57 has **2K x 12** program EPROM, **80 x 8** RAM including the special function registers, **21** I/O pins (ports A, B, C), a two-level stack, the "page preselect" bits in the status register (f3, bits 5-6) for its four 512-word pages, and one instruction cycle per four oscillator clocks (two for instructions that change the PC). MAME clocks it at 4 MHz on the Wolf unit (1 M instructions a second at most) and 625 kHz on the X-unit (OBSERVED, listxml). **Reuse:** `../famicom-python` already holds a **PIC16C54** core inside its cartridge package (`src/famicom_python/cartridge/pic16c54.py`, 271 lines, MIT, from a later edition of the same data sheet, DS30453E), for mapper 355. The PIC16C57 is the same instruction set with 2K words, the page bits, banked RAM (FSR bits 5-6) and port C. By the chip rule a CPU gets its own core, and this is now a second user: the recommendation is a new **`pic16c5x-python`** core, extracted from famicom-python's module with its history and grown to the 16C55/56/57 rows, pinned by both boards (open decision 4). It is needed only for the Wolf row. On the Wolf unit the PIC answers a serial protocol at `01600000-0160001F` (OBSERVED, `umk3`'s map); the protocol is to be read from the PIC program's own code once the core runs it, not from MAME.