# VRAM, palette and the picture ## VRAM | | Y-unit | T-unit, Wolf | | --- | --- | --- | | Parts | TMS4461 (64K x 4) VRAMs (Smash T.V. parts list, "IC, 4461 VRAM", DOC) | eight "48121" 80 ns parts at UA11-14, UB11-14 (MK II and NBA Jam parts lists, DOC); the MK II schematic labels a sheet "VIDEO RAM BANK 0/BANK 2" | | Size in the CPU's map | `00000000-001FFFFF` bits = 256 KB (OBSERVED) | `00000000-003FFFFF` bits = 512 KB (OBSERVED) | | As a bitmap | 512 x 512 at 8 bits (HYPOTHESIS: 256 KB / 512 / 512) | 512 x 512 at 16 bits (HYPOTHESIS: the same arithmetic) | | Pages | the DMA's destination Y reaches `0180`+ (dma-blitter.md); two 256-line pages | two 256-line pages, alternated by the clip registers once a frame (OBSERVED, `mk`, `umk3`) | The 48121's identity (most likely TI's TMS48C121, a 128K x 8 multiport video RAM) is not confirmed from a document (U5). The pixel format (how many bits index the palette, whether the Y-unit's 8-bit pixels take a palette page from the DMA's colour register) is HYPOTHESIS until read from the schematics' colour-RAM sheets (M3 in the brief). The VRAMs' serial ports feed the display: at the start of each line the TMS34010's screen refresh (DPYCTL SRE) loads a row into the serial register and the board shifts it out at the dot clock. The games also use explicit shift-register transfers (SRT, cpu-needs.md item 4); the Y-unit has an "Autoerase Controller" PLD (Smash T.V. parts list, DOC). A reading that fits both (HYPOTHESIS, to check against the schematic and MAME's pictures): the game loads a blank row into the serial registers with an SRT read, and the autoerase logic writes it back into each line of the page being drawn, clearing the next frame's buffer without CPU time. ## Palette | | Y-unit | T-unit, Wolf | | --- | --- | --- | | In the CPU's map | `01800000-0181FFFF` bits = 16 KB = 8,192 entries of 16 bits | T: `01800000-0187FFFF`, Wolf: `01880000-018FFFFF`: 64 KB = 32,768 entries | | Written through | a handler (`paletteram_w`) | MAME's generic `palette_device::write16` | | Parts | "PLD Color RAM Control"; 8K x 8 static RAMs | `5565`, `5C2568` RAMs (MK II parts list; roles not traced) | | Entry format | 16 bits; 5:5:5 RGB is the usual reading (HYPOTHESIS: check the DAC resistor ladders on the colour sheet) | same | ## The picture 8 MHz dot clock; 506 x 289 total; Y-unit 410 x 256 visible, T and Wolf 400 x 254 (start-here.md). One frame is 146,234 periods of the dot clock; the visible area is 104,960 (Y) or 101,600 (T, Wolf) pixels. Recommended modelling level (provisional): **dot level for timing** (HCOUNT, VCOUNT, the display interrupt, blanking, the line-start serial transfer, DPYADR), and **line level for pixels** (each visible line is the serial register's 400-410 pixels through the palette as it stands when the line is shifted out). A palette write in the middle of a line would then land at the next line: whether any game does that is unknown, and MAME's own behaviour is the detector for it (U6).