From 942a45800bca906e5bb7e4ea65ef0f34b23295fc Mon Sep 17 00:00:00 2001 From: SDD Date: Fri, 16 Oct 2026 16:09:51 +0300 Subject: [PATCH] run.sh: tablet mode (skip + VSXXX-AB absolute pointing); lightgun options in COMMON, verified inert by frame-md5 A/B --- harness/mame/run.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/harness/mame/run.sh b/harness/mame/run.sh index 4da59fc..a4510cf 100755 --- a/harness/mame/run.sh +++ b/harness/mame/run.sh @@ -8,6 +8,8 @@ # ./run.sh headless [N] no window; dump frame N (default 600) into this directory # ./run.sh stub faithful, plus an opt-in stand-in for the level-0 # keyboard-port test fixture -> reaches level 1 +# ./run.sh tablet skip + VSXXX-AB tablet: interactive GUI with ABSOLUTE +# pointing (the cursor follows the host pointer) # ./run.sh -- # # Reboot the running machine with Shift+F3 (MAME's UI_RESET_MACHINE; plain F3 is a @@ -28,6 +30,11 @@ # It is NOT a keyboard model: that test checks only the byte *count* and never # compares the content, so the bytes are arbitrary. It stands in for an # unknown test fixture, and it is opt-in so the default stays honest. +# tablet selects the VSXXX-AB tablet instead of the mouse (VT1200_TABLET=1). It is +# ABSOLUTE: the host pointer position maps directly to where the cursor is, +# rather than being integrated from deltas, and it does not grab the pointer. +# The mouse stays the default device. Compose it with any mode by setting the +# variable yourself, e.g. VT1200_TABLET=1 ./run.sh skip # # Modes other than 'headless' open a window at real speed, so you can watch. @@ -53,8 +60,11 @@ if [ $# -gt 0 ]; then shift; fi usage() { awk 'NR>1 && /^set -euo pipefail/{exit} NR>1{print}' "$0"; } -# common: correct rompath, no sound (the driver has no audio), no licence screen -COMMON=(-rompath "$ROMPATH" -sound none -skip_gameinfo) +# common: correct rompath, no sound (the driver has no audio), no licence screen. +# The lightgun options give MAME an absolute host pointer for the VSXXX-AB tablet +# (VT1200_TABLET=1); they are harmless when the tablet is not selected, and they do +# NOT grab the pointer. +COMMON=(-rompath "$ROMPATH" -sound none -skip_gameinfo -lightgun -lightgun_device mouse) case "$MODE" in faithful|"") @@ -75,6 +85,16 @@ case "$MODE" in "$MAME" vt1200 "${COMMON[@]}" -window "$@" ;; + tablet) + # the useful combination: the OS is only reachable through the skip gate, and + # the tablet gives absolute pointing, so the cursor follows the host pointer + # positionally instead of through relative deltas. The OS distinguishes tablet + # from mouse by the device-code nibble in its "T" self-test reply, and then + # frames 5-byte absolute reports (3-byte relative for the mouse). + exec env VT1200_SKIP_LEVEL1=1 VT1200_TABLET=1 \ + "$MAME" vt1200 "${COMMON[@]}" -window "$@" + ;; + pie) # `-debug -debugger none` is required: l1patch.lua needs the debugger API. exec env VT1200_L1PATCH=1 \