6000 bit 11: tilemap infinite vertical stretch? 6400 bit 15: weird horizontal stretch shadow mode bit 8: sprite mosaic bit 9: NOT pivot mosaic 6600 seems to be all bg color index but not 100% sure 7000 lineram has 8 "sections" (traditionally referred to as 4000,5000,...,A000,B000 because that's where every game maps them) each section can be mapped to one of 16 possible locations within the $62.... block of graphics ram (though, the first two would interfere with other things) each section contains four "subsections" (traditionally named 000,200,400,600) each subsection can occur in one of two positions within its section: either at its base address, or that address plus $800 each subsection contains a list of 256 words, which control some parameter(s) on each scanline. (todo: what do we call these values (the raw 16-bit values, containing multiple parameters)) the mapping of sections and subsections, and latching (reusing the same parameters across multiple scanlines) is controlled by the "latches". at $620000, there is a latch per scanline per section (todo: better language to describe arrays-of-arrays) latch: address: [*010 0000 sssl llll lll-] s [0,8) section l [0,256) scanline data: [..mm mm.. aaaa llll] m [0,16) mapping address (maps this section to address 0x620000 + 0x1000*m) for each subsection (lsb to msb): a (bool) subsection alternate bank: 1 = add 0x800 to the subsection address (note: does nothing if latch is 0) l (bool) subsection latch: 1 = read parameter from lineram, 0 = reuse previous value (this persists across frames. i.e. if 0 on the first scanline, uses value from the last scanline of the previous frame) line ram subsection: address: [*010 mmmm auul llll lll-] m [0,16) section mapping (from the section's latches) a (bool) subsection bank (from the section's latches) u [0,4) subsection number l [0,256) scanline data: varies by subsection "4000" (0.0) - unused? "4200" (0.1) - unused? "4400" (0.2) [RLrl ??Ts ssss ssss] s - {playfield 2} local scroll offset ("colscroll"), in integer texture pixels T - {playfield 2}, 1 = use alternate tilemap l - {clip plane 0} left, high bit r - {clip plane 0} right, high bit L - {clip plane 1} left, high bit R - {clip plane 1} right, high bit "4600" (0.3) - same as previous, but for playfield 3 / clip planes 2 and 3 "5000" (1.0) [rrrr rrrr llll llll] l - {clip plane 0} left, lower 8 bits, in screen pixels r - {clip plane 0} right, lower 8 bits, in screen pixels "5200" (1.1) - same, for {clip plane 1} "5400" (1.2) - same, for {clip plane 2} "5600" (1.3) - same, for {clip plane 3} "6000" (2.0) [B?p? oNAm ddcc bbaa] a - {sprite group 0} blend mode. 0=neither, 1=left, 2=right, 3=both b - {sprite group 1} blend mode c - {sprite group 2} blend mode d - {sprite group 3} blend mode m - {mystery layer} blend value select A - {pivot} blend value select N - {background color} blend value select o - {playfields} {mystery layer} reset y source index p - {pivot} 1 = pixel, 0 = text B - {pivot pixel} data location: 0 = $620000 (collides with lineram), 1 = $630000 "6200" (2.1) [LLLL llll RRRR rrrr] four blend values alpha = clamp((15-value)/8, 0, 1) ($F = 0%, $B = 50%, $7+ = 100%) r - "right" pixel, bsel = 0 R - "right" pixel, bsel = 1 l - "left" pixel, bsel = 0 L - "left" pixel, bsel = 1 "6400" (2.2) [ffB? Sgps mmmm 3210] 0 - {playfield 0} enable mosaic 1 - {playfield 1} enable mosaic 2 - {playfield 2} enable mosaic 3 - {playfield 3} enable mosaic m - mosaic strength (samples every (16-m) screen pixels) s - {sprites} enable mosaic p - {mystery layer} enable mosaic g - ?? changes the behavior of shadow mode somehow S - shadow mode: if 2 layers are placed at neighboring priorities (e.g. 5 and 6), the upper one's palette has its lower bit set IF the lower layer has a nontransparent pixel there (todo: check if this bit varies depending on the bpp setting). note that the bg color layer (as well as prio conflicts), do not count as opaque pixels for the purposes of shadow B - horizontal blur (FDA): 0 = enable, 1 = disable f - FDA mode. 0 = 15bit color format mode, 1 = normal mode, 2 = double resolution mode (no blending), 3 = invalid? (repeat first pixel all the way across, no blending) note that alpha functions normally in all modes (multiplying the brightness) "6600" (2.3) [...b bbbb bbbb bbbb] b - {background color} color (palette index) "7000" (3.0) [BBEI cccc iiii pppp] - {mystery layer} see b000 - B: blend mode 0=both, 1,2,3= ??? half something.. they all seem to be the same half (right?) but with a few pixels that differ "7200" (3.1) [B?EI cccc iiii pppp] B - {pivot} blend mode: 0 = both, 1 = left rest - {pivot} see b000 "7400" (3.2) [AAAA ??EI cccc iiii] - {sprites} see b000 AAAA - {sprite group n} blend value select "7600" (3.3) [dddd cccc bbbb aaaa] a - {sprite group 0} priority b - {sprite group 1} priority c - {sprite group 2} priority d - {sprite group 3} priority "8000" (4.0) [xxxx xxxx yyyy yyyy] y - {playfield 0} y scale x - {playfield 0} x scale "8200" (4.1) [xxxx xxxx YYYY YYYY] Y - {playfield 3} y scale - BUG x - {playfield 1} x scale "8400" (4.2) [xxxx xxxx yyyy yyyy] y - {playfield 2} y scale x - {playfield 2} x scale "8600" (4.3) [xxxx xxxx YYYY YYYY] Y - {playfield 1} y scale - BUG x - {playfield 3} x scale "9000" (5.0) [.... .... ..cc cccc] c - {playfield 0} palette add (palette index) yes it's only 6 bits "9200" (5.1) - same for {playfield 1} "9400" (5.2) - same for {playfield 2} "9600" (5.3) - same for {playfield 3} "A000" (6.0) [ssss ssss ssss ssss] s - {playfield 0} rowscroll (same format as x scroll register) "A200" (6.1) - same for {playfield 1} "A400" (6.2) - same for {playfield 2} "A600" (6.3) - same for {playfield 3} "B000" (7.0) [BBEI cccc iiii pppp] p - {playfield 0} priority iiii - {playfield 0} clip modes: 0 = hide inside, 1 = hide outside cccc - {playfield 0} 1 = enable clip plane I - {playfield 0} 1 = invert clipping E - {playfield 0} 1 = enable display B - {playfield 0} blend mode. 0=both, 1=left, 2=right, 3=neither "B200" (7.1) - same for {playfield 1} "B400" (7.2) - same for {playfield 2} "B600" (7.3) - same for {playfield 3} pivot port latch: address: [*010 0001 000l llll lll-] l [0,256) scanline data: [.... .... llll ....] l (bool[4]) latch for some subsection ? not sure which subsection is controlled by which latches, because there's more than 4 subsections. pivot port subsection: address: [*010 0001 uuul llll lll-] u [1,8) subsection l [0,256) scanline data: unknown