# Tilemaps: K052109 + K051962 On every set in scope (OBSERVED, `-listxml`). The pair is also on 16 other MAME Konami drivers (37 parents in all: [shared-cores.md](shared-cores.md)). ## What is known, and how well | Fact | Evidence | | --- | --- | | The K052109 holds the tile RAM and registers and is addressed by the main CPU; the K051962 turns tile codes from the K052109 into pixels from the graphics ROMs | HYPOTHESIS (common description; the schematic sheets we have do not include the video page) | | Graphics ROM size per set: tmnt 1 MB, punkshot 512 KB, ssriders 1 MB, simpsons 1 MB, xmen 2 MB, aliens 1.5 MB (`k052109` region) | OBSERVED (`-listxml`) | | Main-CPU window: 32 KB at `100000` (tmnt, punkshot), 16 KB at `600000` (ssriders), 48 KB at `18C000` (xmen), a banked window in the 8-bit sets | OBSERVED (address maps) | | Three layers (one fixed text-like layer and two scrolling layers), 8 x 8 tiles, 64 x 32 tile maps, per-row and per-column scroll | HYPOTHESIS (common description, MAME's behaviour); to be confirmed by observation (M4) | | Tile code and colour bits are extended by a board-specific callback (bank bits, colour base) that differs per game | HYPOTHESIS; it is the reason each row needs its own wiring table | | The chip raises the main CPU's vertical-blank interrupt (IRQ enable through a register) on several boards | HYPOTHESIS; to confirm in the M1 trace by watching the CPU's interrupt level | | The CPU cannot read the graphics ROMs directly; a read-back mode exists (ROM test in the self test: "MASK ROM CHECK") | DOC for the existence of the ROM check (Turtles in Time and Sunset Riders manuals, self-test pages); the mechanism is HYPOTHESIS (the LS174 bit `VROMRD` on sheet 3 of the GX063/064 schematic is the likely enable, DOC for the bit's name) | ## Oracles | Tier | Oracle | Status | | --- | --- | --- | | 1 | die traces of the K052109 and K051962 | exist (furrtek, SiliconRE/VGChips); **set aside (author's wishes)** | | 2 | Konami data sheet | none known | | 3 | community document | none found outside the furrtek lineage; vgmrips.net and system16.com set aside (sites' wishes) | | 4 | FPGA cores (jtcores `tmnt`, `aliens`, `simson`, `riders`, `xmen`) | GPL-3.0 and built on furrtek's traces (their READMEs say so): **set aside**, not even as a closed box | | 5 | MAME 0.285 `k052109.cpp` | BSD-3-Clause by its `license:` line, run as a closed box (decision 1) | So the tilemap model will be **FITTED** to MAME's pictures and to the games' own behaviour, and tagged that way, until a respect-clean hardware source appears. MAME is a detector: where our picture differs, the difference is recorded, not resolved in MAME's favour by default. ## Unknowns for M4 U10 the exact scroll-register layout and when scroll values are latched within a frame; U11 the board callbacks per row (tile bank and colour bits); U12 whether the layers are fetched per line (raster effects) and on which dot.