mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-31 12:05:05 +02:00
The terminal tells the two pointing devices apart from the 'T' self-test device code (0010 mouse / 0100 tablet) and switches report framing on it: 3-byte relative for the mouse, 5-byte absolute (header 110) for the tablet. Verified against the running OS: with the tablet it reads the self-test as A0 04 00 00 and then reads RHRB in groups of 5 (groups of 3 for the mouse). Refactor the VSXXX model into a shared base + mouse/tablet subclasses and select the device on DUART2-B with VT1200_TABLET=1 (default: the mouse, so the mouse stays and is selectable, not replaced). The tablet reports its documented 0..2199 active area (VCB02 D.1) and reads the host pointer through IPT_LIGHTGUN_X/Y, MAME's absolute control, so the emulated cursor follows the host pointer positionally: corner (0,0) -> (194,38), centre (1100,1100) -> (704,467), corner (2199,2199) -> (1214,898), reproducible pixel-for-pixel on a repeated coordinate. Driving it from the host mouse needs '-lightgun -lightgun_device mouse' (documented for run.sh; run.sh is not edited here). The mouse and keyboard are unchanged, and all baselines hold: no env PC=3FDCE400 samples=198 (3 PCs); VT1200_IO_PATH_STUB=1 samples=53 (75 PCs); ROM md5 unchanged. Nothing is tuned to satisfy level 0's I/O data path test.