# The polygon pipeline: 68000 display lists, DSPs, the 3D renderer **No Namco document, schematic or hardware measurement of System 21's 3D side is in hand.** Everything below is OBSERVED in MAME 0.285 (device names, ROM regions, address maps, traces, pictures) or HYPOTHESIS built on those, and MAME is a tier-5 detector here ([validation.md](validation.md)). MAME's own status line for these sets is "imperfect" (Winning Run, Starblade) or "preliminary" (the rest). ## The flow, as far as it can be seen 1. **The 68000 side writes a display list.** On Winning Run the main 68000 writes a RAM it shares with the DSP (`winrun_polydata`, $250000-$25FFFF) and pokes DSP control registers at $280000-$440000 (OBSERVED: map). On the C67 boards the 68000s reach the DSPs through a communication RAM at $200000 and registers at $400000-$4807FF (OBSERVED: map). 2. **The DSPs transform.** The DSPs read object geometry from a **vertex ROM** wired into their data space (`point16` on Winning Run and Driver's Eyes, 2-6 ROMs of 128 KiB; `point24` on the C67 boards, 3-6 ROMs of 512 KiB) (OBSERVED: `-listxml` regions, the DSP data map at $8000-$FFFF). The region names suggest 16-bit and 24-bit vertex words (HYPOTHESIS). The DSP program is uploaded to RAM on Winning Run (`winrun_dspbios`), and is Namco's mask ROM plus uploaded code on the C67s (`master_dsp_ram`). 3. **The master hands work to the slaves** (C67 boards): five DSPs, one master and four slaves; the slaves see only registers and I/O ports (OBSERVED: map). MAME runs one slave at four times the clock instead of four ([cpu-cores.md](cpu-cores.md)). 4. **A renderer draws the polygons.** MAME names a device `namcos21_3d` on every System 21 kind (OBSERVED: `-listxml` device list): flat-shaded polygons with a depth term into a frame buffer (OBSERVED: pictures, e.g. Starblade at 50 s and Winning Run at 20 s, both showing flat, depth-shaded faces with no texture). Whether the renderer is fixed-function hardware fed by the DSPs, and how its depth test, shading and frame buffers work, is U1-U3. 5. **The picture is mixed.** The polygon frame buffer is mixed with the C355 sprite layer (C67 boards) or with the third 68000's palette and frame-buffer side (Winning Run). ## What this means for the specification - The **DSPs are CPUs** and are modelled as such: the TMS320C25 has tier-2 documents complete enough for an instruction-level model with cycle timing ([cpu-cores.md](cpu-cores.md)). Their programs are not microcode to be summarised: they are the game's code and Namco's mask ROM, run as they are. This is the charter's "game owns the machine" case. - The **renderer** has no document. Its first specification is functional: it takes the primitives the DSPs emit (whatever a trace of their output ports and RAM writes shows) and draws them, judged only against MAME's pictures (tier 5). Its timing (does the DSP wait on it? how long does a polygon take?) is unknown and matters for when the DSPs see "done" (U2). - **The cost.** At 496 x 480 and 60.6 Hz a full-screen layer is 14.4 M pixels a second; flat shading with a depth term is a few operations per pixel. The DSPs, not the pixels, are the load ([domains-and-speed.md](domains-and-speed.md)). ## Unknowns specific to the pipeline (also in the handoff brief) - U1 the renderer's primitive format, depth test, shading and fill rules; - U2 the renderer's timing and the DSP-side handshake that waits on it; - U3 the frame buffers (count, size, swap) and how they mix with sprites; - U4 how the master shares work among four slaves, and their real clock; - U5 which TMS320C25 multiprocessing features (global memory, HOLD, BIO/XF) the board wires.