forked from opencode.energia.arti.ee/vt1200
Board, score panel, preview and help/scores toggles draw through the ROM Xlib cell grid; keys arrive as real X KeyPress events. The backend is now monochrome (the VT1200 raster is one bit deep) and flushes whole rows so the in-machine server can drain the request stream.
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# input.sh -- Task 4 acceptance: main.c's key map against injected keys.
|
|
set -eu
|
|
DIR=$(cd "$(dirname "$0")" && pwd)
|
|
APP=$(cd "$DIR/.." && pwd)
|
|
ROOT=$(cd "$APP/../.." && pwd)
|
|
M=${MAME:-/home/arti/code/k-space/mame0289/vt1200}
|
|
LOG="$APP/build/input.log"
|
|
mkdir -p "$APP/build"
|
|
"$APP/build.sh" "$DIR/input.c" "$APP/src/vt1200/main.c" "$APP/src/vt1200/x11.c" "$APP/src/vt1200/xgfix.c" >"$APP/build/input-build.log" 2>&1
|
|
MARK=$(awk '/_mark/ {print $1; exit}' "$APP/build/input.map")
|
|
VT1200_SKIP_LEVEL1=1 INPUT_MARK="0x$MARK" \
|
|
LOADER_AT=2500 LOADER_END=3400 \
|
|
LOADER_BIN="$ROOT/dwt/loader/build/loader.bin" \
|
|
LOADER_COFF="$APP/build/input.coff" \
|
|
LOADER_OUT="$APP/build" \
|
|
"$M" vt1200 -rompath "$ROOT/harness/mame/roms" \
|
|
-video none -sound none -nothrottle -skip_gameinfo \
|
|
-debug -debugger none \
|
|
-autoboot_script "$DIR/input.lua" -autoboot_delay 0 \
|
|
>"$LOG" 2>&1 || true
|
|
grep 'INPUT:' "$LOG" | tail -3
|
|
grep -q 'INPUT: .*bytes=.*61 9B 41 9B 42 9B 44 9B 43 30 0A 7F 71' "$LOG" || {
|
|
echo "input.sh: mapped key sequence missing (see $LOG)" >&2
|
|
exit 1
|
|
}
|
|
echo "input: PASS"
|