# The display path: video timing, the VDL, CLUTs, interpolation Sources: '641; '462 = US5502462A and '876 = WO1995012876A1 (the VDL; '876 also carries Portfolio's `hardware.h`, `graphics.h`, `BuildSystemVDLs()` and `ProofVDLEntry()`); '389 = US5838389A (CLUT update in horizontal blank; the per-line timeline); '679 = WO1994010679A1 (interpolation; CV25M; the interpolator truth tables); SDK gpg `1gpga`, `2gpga`-`2gpgg`, `4gpgd`; wiki opera_vdlp, opera_ntsc_vs_pal, opera_240p_mode. WO1996036037A1 describes the **M2**, not this machine. All DOC unless marked. ## Who owns the timing The video encoder (Philips 7199 in '462; VP536A per the wiki) generates sync; CLIO accepts a horizontal sync only in a window and passes a serial code to MADAM, whose own horizontal counter starts with CLIO's ('389, '641 III.A). The display path runs on CV25M (24.5454 MHz NTSC) from its own crystal (or the genlocked input), apart from the ~25 MHz system clock. ## Lines and fields NTSC: 525 lines, 262.5 per field, 59.94 fields/s; 240 displayed lines per field, 320 pixels (640 high-resolution through interpolation). The OS's VBL period is 16,684 us ('876). PAL: 50 Hz; display types "narrow" 320x288 and "wide" 384x288 (SDK); PAL timing and line numbers are undocumented (U33). 240p: the encoder can run progressive (~60.05 Hz), which doubles the OS's VBL count; some games then run fast (wiki opera_240p_mode, measured by its author; MAME's software list notes the same). Per line, ticks of CV25M ('389): active pixels tick 11 to ~1290 (640 x 2 ticks); copy the current CLUT to the previous-line CLUT at ticks 1293-1326 (one entry a tick); download VDL colour words from tick 1340, done by 1400; horizontal sync accepted only in ticks 1400-1800. Line length ~1560 ticks (HYPOTHESIS: 63.556 us x 24.5454 MHz). ## The VDL ('462 tables 1-6, '876 `hardware.h`, SDK `4gpgd`) A chain of entries, each 4 header words (CLUT-DMA control, current frame buffer address, previous frame buffer address, next entry address) and command words; an entry lasts LINE lines. Control word: 26 640SC, 25:23 DISPMOD (320, 384, 512, 640, 1024), 22 SLIPEN, 21 ENVIDDMA, 20 SLIPCOMMSEL, 19 480RES, 18 RELSEL (polarity C14), 17 PREVSEL, 16 LDCUR, 15 LDPREV, 14:9 LEN, 8:0 LINE. Command words: colour (bit 31 = 0: RGB enables, pen 0-31, 8-bit R, G, B), encoder control (10x, forwarded to the encoder), display control (110: PAL select, CLUT bypass, transparency, window and line interpolation controls, H/V subposition sources, blue LSB source, random LSBs, one-line interpolation off), background colour (0xE0), NOP (0xE1). The SDK limits an entry to 34 command words; the patents say ~50 (C15). The top-of-field entry is fetched near the end of line 5 (or 4, by field) ('641 VI.C). Portfolio's system chain: blank to line 18, a VIRS test line at 19, pre-display at 20, the 240-line display VDL, post-display at 262 ('876 `BuildSystemVDLs`). ## The pixel pipeline (SDK 2gpga-2gpgg; '389; '679) S-bus halfwords alternate previous line / current line -> pixel decode by mode (1555, 15541, P555, P5541: bit 15 and bit 0 are subposition or palette-select bits) -> background detector (RGB 000) -> CLUTs (custom: 3 x 32 x 8-bit + background, current and previous line; fixed "bypass" CLUT: 5 bits plus 3 LSBs from zero, MSB copy or random) -> the interpolator (a 2x2 window of low-resolution pixels to four high-resolution pixels, each the average of four choices selected by the subposition bits through code tables ITPCON, HVON, HV0ON-HV3ON) -> 24-to-12 multiplex -> the encoder at 24.5454 MHz. **The interpolator tables are printed in '679 with 3DO's copyright reserved on the listings.** The function is a fact; transcribing the tables as data is a licence question for Aubrey (open decision 6). ## Unknowns and contradictions (this page) U33 PAL clock, lines, VDL line numbers; U34 hardware line numbering (top of field 4/5); U35 D-bus cycle cost of read transfers, mid-line transfers and VDL fetches. C14 RELSEL: patent and the OS's own code say 1 = relative, the SDK says 1 = absolute (take the code). C15 command words per entry.