# Start here Sega's System 1 (1983-86) and System 2 (1985-88) are Z80 boards: a 4 MHz main Z80, a 4 MHz sound Z80 with two SN76489A PSGs, and Sega's own tile and sprite hardware. Most sets protect the main Z80 with Sega's opcode decryption (a 315-xxxx or 317-xxxx part in place of the Z80) or an NEC MC-8123; three System 2 sets add an Intel 8751. ## The five things to know first 1. **The board has no tier 1-3 source in hand.** MacDonald's notes are set aside (their host's robots.txt), system16.com too; MAME is a closed box. Every board fact here is MAME's (OBSERVED, tier 5) or arithmetic on it, marked as such. Decisions 1 and 2 are how to do better. 2. **Protection is the rule, not the exception.** 59 of 92 machines are protected, and 12 of 28 titles have no plain set ([census.md](census.md)). Two classes of Sega part are visible from outside MAME: 17 parts whose opcode and data views differ only in bits 7, 5, 3, and 7 parts that differ everywhere ([protection.md](protection.md)). 3. **z80-python's `read_m1` is needed early**, and it is not on `main` yet. 4. **The CPUs are small**: 0.77 M instructions a second for both Z80s; real time is easy in Rust everywhere ([domains-and-speed.md](domains-and-speed.md)). 5. **sms-python's SG-1000 is a cousin, not a parent**: same CPU and PSG family, different video ([boards.md](boards.md)). ## Reading order [boards.md](boards.md) (groups, clocks, maps) -> [protection.md](protection.md) -> [sound.md](sound.md) -> [video.md](video.md) -> [cpu-cores.md](cpu-cores.md) -> [domains-and-speed.md](domains-and-speed.md) -> [validation.md](validation.md) -> [sources.md](sources.md) -> [mame-oracle.md](mame-oracle.md) -> [census.md](census.md) -> [handoff-brief.md](handoff-brief.md). ## Setting up ```sh . # MAME_ROMPATH must hold the non-merged MAME sets python -I scripts/fetch_references.py --verify python -I scripts/census.py python -I scripts/mame_trace.py wboyu --frames 3 --ports ``` Evidence tags in these docs follow the family's: MEASURED, DIE, TEST ROM, DOC, OBSERVED (in MAME, here), FITTED, HYPOTHESIS. "Matches MAME" is not "matches the hardware".