# The Model 2 board family Sources: MAME 0.285's Model 2 driver files, BSD-3-Clause, pinned in `scripts/pinned_files.json` (`model2.cpp`, `model2.h`, `model2_m.cpp`, `model2_v.cpp`, `model2rd.ipp`; copyright holders R. Belmont, Olivier Galibert, ElSemi, Angelo Salese, Matthew Daniels), cited as **M2** with a line or function name, and `mame -listxml` (run). **Everything in this file is OBSERVED: an emulator's model of the hardware, tier 5.** The driver's own header credits "hardware and protection reverse-engineering" to ElSemi, and its video file names a Sega document, the "Model 2B-CRX Manual", that this phase did not find (U1). No manufacturer's board documentation is in hand. ## Revisions (one i960 board family, four geometry/sound pairings) | Revision | MAME config | Geometry ("copro") DSP | Sound | Sets (census) | | --- | --- | --- | --- | ---: | | Model 2 (original, "2O") | `model2o` (`daytona`, `desert`, `vcop`, ...) | Fujitsu MB86234 "TGP" @ 50 MHz | Model 1 sound board: 68000 @ 10 MHz + YM3438 + 2x MultiPCM (YMW-258-F) | 11 | | Model 2A-CRX | `model2a` | MB86234 TGP | 68000 @ 11.29 MHz + SCSP (YMF292-F) | 24 (+2 Manx TT sets with both sound boards) | | Model 2B-CRX | `model2b` | Analog Devices ADSP-21062 "SHARC" @ 32 MHz (MAME emulates one; a second, the geometrizer, is commented out) | 68000 + SCSP | 34 | | Model 2C-CRX | `model2c` | Fujitsu MB86235 "TGPx4" @ 20 MHz | 68000 + SCSP | 18 | Common to all (M2 `model2o`, `model2a`, `model2b`, `model2c`): the **i960KB at 25 MHz** (50 MHz crystal / 2), Sega's System 24 tilemap chip for the 2D layers (`S24TILE`), a palette of 8,192 entries, a 3D renderer with two CPU-visible frame buffers, four 25 MHz down-counting timers that raise interrupts, battery-backed RAM, a 93C46 EEPROM (2A-2C), and the M2 comm board link. The header's summary line: "i960KB + (5x TGP) or (2x SHARC) or (2x TGPx4)", "Custom Sega/Lockheed-Martin rasterization hardware". The screen: 496 x 384 visible in a 656 x 424 raster from a 16 MHz pixel clock (M2 `model2_screen`, which says the timing is "from System 24, might not be accurate for Model 2"). That gives about 57.5 Hz (16e6 / (656 x 424) = 57.52; arithmetic, not a measurement). ## Memory map (the i960's view; M2 `model2_base_mem`) | Range | What | | --- | --- | | 0x00000000-0x001FFFFF | program ROM | | 0x00500000-0x005FFFFF | work RAM | | 0x00800000-0x00803FFF | geometrizer port (`geo_r`/`geo_w`) | | 0x00880000-0x00883FFF | copro function port (FIFO in) | | 0x00900000-0x0091FFFF | buffer RAM (mirrored) | | 0x00980000-0x0098003F | FIFO control, video control, TGP id | | 0x00E00000-0x00E00037 | "CPU control (wait-states)": a register file MAME keeps as plain RAM (U2) | | 0x00E80000-0x00E80007 | interrupt request/acknowledge and enable | | 0x00F00000-0x00F0000F | the four timers | | 0x01000000-0x010FFFFF | System 24 tilemap RAM and character RAM, sync registers | | 0x01800000-0x0181C003 | palette, colour translation, Z-clip register | | 0x01A00000-0x01A04002 | comm board shared RAM and flags | | 0x01D00000-0x01D03FFF | backup SRAM | | 0x02000000-0x03FFFFFF, 0x06000000- | data ROMs (`main_data`) | | 0x10000000-0x10DFFFFF | renderer mode, status, polygon count, polygon RAM ping/pong, fill memory ping/pong | | 0x11600000-0x116FFFFF | frame buffers A and B (xRGB 1-5-5-5, 512 x 400) | Interrupts reach the i960 through the board's request/enable registers (M2 `irq_update`); the timers set bits 2-5 (M2 `model2_timer_cb`). The i960's own interrupt mechanism is in `../i960-python/docs/architecture.md`. ## Around the main board - **Drive (force feedback) boards.** Daytona USA and Sega Rally carry the SJ25-0207-01 board: a Z80 at 4 MHz (8 MHz / 2, "confirmed"), two Sega 315-5296 I/O chips, an Oki MSM6253 ADC, 8 KB SRAM, its own EPROM (M2 header and `sj25_0207_01`). MAME's hook to the main CPU is a TODO (M2 `driveio_port_w`). 17 sets carry a drive ROM (census). - **I/O.** Original Model 2 uses Sega's Model 1 I/O board (a Z80 with EPROM epr-14869[bc], or the "advanced" board with epr-16891/17181/18021 for Virtua Cop), joined through an MB8421 dual-port RAM; 2A-2C use a Sega 315-5649 I/O chip on the main board. Both are separate MAME devices (`model1io.cpp`, `model1io2.cpp`, `315_5649.cpp`, by Dirk Best, BSD-3-Clause). - **Billboard.** 60 sets drive a billboard board (a Z80 with epr-18022; `segabill.cpp`). - **Comm board.** `M2COMM` in every configuration (linked cabinets). - **Digital sound boards.** Sega Touring Car Championship has the Z80 + MPEG "DSB"; Top Skater the 68000 + MPEG "DSB2" (`dsbz80.cpp`, `dsb2.cpp`). - **Board ROMs.** The CPU board carries TGP table ROMs (opr-14742a/14743a, "the 'a' versions have the atan table fixed compared to model 1") and reciprocal and reciprocal-square-root tables (opr-14744-14747); the 2A video board carries three ROMs mpr-16310-16312 whose role MAME calls `video_unk` (a 1/(1+x) table). These are Sega's, identified by SHA-1 in [census.md](census.md), never shipped. ## Protection, per game (census.md has the full table) - **Sega 315-5881** (a decryption chip also used on NAOMI and Model 3 step 2): 11 Model 2 sets in 2A, 2B and 2C configurations (Dynamite Cop, Dynamite Deka 2, Pilot Kids, Zero Gunner). MAME holds a 32-bit key per game as a ROM parameter; the census counts them and never prints them (decision M9). - **Sega 315-5838 / 317-0229** (a compression/protection device): the 5 Dead or Alive sets (`model2a_0229`, `model2b_0229`). - **Daytona USA "To The MAXX" and "GTX"** (2001, 2003 upgrades): a PIC with a banked protection data ROM (M2 "Daytona To The MAXX PIC protection simulation"). - **Happy Baseball '98** (`hpyagu98`): EEPROM and backup RAM contents the game checks (M2's comment "possible that this may be a form of copy protection"; MAME ships hand-made NVRAM for it). - Two games carry MAME program patches for their own bugs (Pilot Kids and Zero Gunner "destroy the interrupt table and never fix it": M2 `init_pltkids`, `init_zerogun`). A board that runs these unpatched and fails would be right, not wrong; worth a probe (U3). ## How good the detector is MAME 0.285 marks 82 of 89 Model 2 sets `preliminary` (NOT_WORKING) and 7 `imperfect`; Model 1: 8 imperfect, 2 preliminary (census). `vf2` boots to its attract mode in MAME at 193 % speed on one core (docs/mame-oracle.md). The detector is narrow: it runs the 2O/2A geometrizer as high-level code because that DSP's program is in an undumped internal ROM ([geometry.md](geometry.md)).