# VDP1: sprites, polygons, the frame buffers Primary source: the VDP1 User's Manual (ST-013-R3, cited VDP1) and its supplement (ST-013-SP1, VDP1S). No community hardware document on VDP1 timing was found in this phase; MacDonald's notes cover VDP2, not VDP1 (CMH). ## What it is (DOC: VDP1 ch. 1-2, OVW 3.3) - A command processor: it reads a linked list of 32-byte command tables from its own 512 KB VRAM and draws into the **draw** frame buffer; VDP2 scans the **display** frame buffer out as its sprite layer. Two 2-Mbit DRAMs make the two 256 KB buffers; after reset buffer 0 draws and buffer 1 displays (DOC: VDP1 p. 21). - Commands (DOC: VDP1 ch. 7): system clipping, user clipping, local coordinates, normal sprite, scaled sprite, distorted sprite, polygon, polyline, line, draw end. The list links by jump modes (next, assign, call, return, skip variants; VDP1 "Jump Mode"). - Pixel paths: colour bank and lookup-table modes, RGB, Gouraud shading through a table, half-luminance, half-transparency, shadow, mesh, the MSB-on bit, end codes, pre-clipping (and its disable, VDP1S), high-speed shrink (VDP1S), double-interlace drawing. - Frame-buffer change modes (FBCR/TVMR): automatic one-cycle change with erase at each frame, or manual erase and manual change (DOC: VDP1 ch. 4). The erase/write unit fills a rectangle with EWDR during the display period, and the manual says how many pixels fit in V-blank erase (DOC: VDP1 table 4.5). - Status: EDSR (transfer end, current end), LOPR and COPR (last and current command addresses, read-only), MODR (DOC: VDP1 4.x). The sprite-draw-end interrupt goes to the SCU (vector 4D, level 2; DOC: SCU table 2.1). ## Timing: the hard part What the manual gives (DOC: VDP1 p. 20-21): - Drawing runs "in sync with the CPU operating clock" (28 MHz in the manual's words), one pixel per clock as the ceiling. - The CPU side (the SCU) has priority over drawing for VRAM and frame-buffer access; a CPU access may wait "more than 10" cycles, and CPU access during drawing interrupts drawing. Access uses burst transfers. What it does not give: the cost of fetching a command, of each texel read, of a half-transparent read-modify-write, of Gouraud, of clipped pixels that are still walked, of the frame-buffer DRAM page changes, and when the erase runs relative to the drawing. Games that poll EDSR/COPR or race the frame change see these costs. No hardware-captured VDP1 timing table is public (U5 in the brief). Celeriyacon's tests, which the Saturn MiSTer and Ymir developers cite, are not published (sources.md). Proposal: a per-command cost model kept in one table with every constant tagged FITTED or HYPOTHESIS, judged at first only by detectors (MAME, Mednafen, Ymir as closed boxes), and replaced by measured numbers when a source appears. ## Distorted sprites and polygons The manual describes the result (any four vertices; textures mapped along the edges), not the rasteriser's exact walk: which pixels a distorted quad touches, overdraw along the long edges, how anti-aliasing fills holes. Picture-exact output needs that walk. It is known publicly only from emulators (GPL, closed box) and from the MiSTer core (no licence, closed box). U6: the board starts with the manual's description, compares pixels against detectors, and records each difference. ## What the board owns All of it: VDP1 is used only by the Saturn and ST-V (chip rule; MAME's `stvbios` has the same device set). It stays in `saturn-python`.