forked from arti/vt1200
test(termtris): assert the play acceptance results; drop the dead drain hook
This commit is contained in:
1 parent
64bd781aa6
commit
eb896f7b8c
6 files changed
+47
-38
No files matched your search
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
*****************************************************
|
||||
TMS340 COFF Linker Version 5.01
|
||||
*****************************************************
|
||||
Tue Nov 03 20:07:31 2026
|
||||
Tue Nov 03 20:09:24 2026
|
||||
|
||||
OUTPUT FILE NAME: <MAIN.out>
|
||||
ENTRY POINT SYMBOL: "_start" address: 018a0000
|
||||
@@ -43,15 +43,15 @@ section page origin length input sections
|
||||
018b5b70 00000050 X11.obj (.cinit)
|
||||
018b5bc0 00000050 rts.lib (.cinit)
|
||||
|
||||
.bss 0 01a00000 0001ec20 UNINITIALIZED
|
||||
.bss 0 01a00000 0001ec00 UNINITIALIZED
|
||||
01a00000 00008000 ENTRY.obj (.bss)
|
||||
01a08000 00000400 MAIN.obj (.bss)
|
||||
01a08400 00004a40 GAME.obj (.bss)
|
||||
01a0ce40 00000b80 SCOREDB.obj (.bss)
|
||||
01a0d9c0 0000f220 X11.obj (.bss)
|
||||
01a1cbe0 00000020 COMPAT.obj (.bss)
|
||||
01a1cc00 00002000 XGFIX.obj (.bss)
|
||||
01a1ec00 00000020 rts.lib (.bss)
|
||||
01a0d9c0 0000f200 X11.obj (.bss)
|
||||
01a1cbc0 00000020 COMPAT.obj (.bss)
|
||||
01a1cbe0 00002000 XGFIX.obj (.bss)
|
||||
01a1ebe0 00000020 rts.lib (.bss)
|
||||
|
||||
.data 0 018a0000 00000000 UNINITIALIZED
|
||||
|
||||
@@ -92,23 +92,23 @@ address name address name
|
||||
018b2c10 _sprintf 018b2390 _fflush
|
||||
018b4330 _srand 018b2400 _putchar
|
||||
018a0000 _start 018b2c10 _sprintf
|
||||
01a1cbe0 _stdout 018b39d0 _vt_install_xg
|
||||
01a1cbc0 _stdout 018b39d0 _vt_install_xg
|
||||
018b4400 _strcmp 018b3be0 _memcpy
|
||||
018b4550 _strcpy 018b3d80 _memmove
|
||||
018b4670 _strlen 018b4030 _memset
|
||||
018b4780 _strncpy 018b41d0 _rand
|
||||
01a1cb00 _term_clearscr 018b4330 _srand
|
||||
01a1cb40 _term_cursor 018b4400 _strcmp
|
||||
01a1cae0 _term_clearscr 018b4330 _srand
|
||||
01a1cb20 _term_cursor 018b4400 _strcmp
|
||||
01a08a60 _term_height 018b4550 _strcpy
|
||||
01a1cb80 _term_ibmchar 018b4670 _strlen
|
||||
01a1cb60 _term_ibmchar 018b4670 _strlen
|
||||
018b2320 _term_init 018b4780 _strncpy
|
||||
018b0c30 _term_putstr 018b4940 cinit
|
||||
01a1cae0 _term_reset 018b4940 etext
|
||||
01a1cb60 _term_setcolor 01a00000 .bss
|
||||
01a1cb20 _term_setcursor 01a08360 _dbg_loops
|
||||
01a1cbc0 _term_type 01a08380 _dbg_events
|
||||
01a1cac0 _term_reset 018b4940 etext
|
||||
01a1cb40 _term_setcolor 01a00000 .bss
|
||||
01a1cb00 _term_setcursor 01a08360 _dbg_loops
|
||||
01a1cba0 _term_type 01a08380 _dbg_events
|
||||
01a08a40 _term_width 01a083a0 _dbg_last
|
||||
01a1cba0 _termenv 01a083c0 _dbg_focus
|
||||
01a1cb80 _termenv 01a083c0 _dbg_focus
|
||||
01a08960 _tick_interval 01a083e0 _dbg_rev
|
||||
018a3130 _update 01a08940 _quit
|
||||
01a08980 _use_bell 01a08960 _tick_interval
|
||||
@@ -121,21 +121,20 @@ address name address name
|
||||
018a0530 _vt_poll_event 01a08a40 _term_width
|
||||
018af950 _vt_root_window 01a08a60 _term_height
|
||||
01a1ca60 _vt_win 01a08a80 _scr
|
||||
01a1cac0 _vt_x11_drain_events 01a0ce40 _username
|
||||
018b0dd0 _vt_x11_flush 01a1ca40 _vt_dpy
|
||||
018afa30 _vt_x11_init 01a1ca60 _vt_win
|
||||
01a1caa0 _vt_x11_progress 01a1ca80 _vt_gc
|
||||
018b2000 _vt_x11_term_init 01a1caa0 _vt_x11_progress
|
||||
018a1700 _wait_display 01a1cac0 _vt_x11_drain_events
|
||||
018b01e0 _x11_clearscr 01a1cae0 _term_reset
|
||||
018b03e0 _x11_cursor 01a1cb00 _term_clearscr
|
||||
018b07b0 _x11_ibmchar 01a1cb20 _term_setcursor
|
||||
018b03a0 _x11_reset 01a1cb40 _term_cursor
|
||||
018b0440 _x11_setcolor 01a1cb60 _term_setcolor
|
||||
018b0560 _x11_setcursor 01a1cb80 _term_ibmchar
|
||||
018b4940 cinit 01a1cba0 _termenv
|
||||
018a0000 edata 01a1cbc0 _term_type
|
||||
01a1ec20 end 01a1cbe0 _stdout
|
||||
018b4940 etext 01a1ec20 end
|
||||
018b0dd0 _vt_x11_flush 01a0ce40 _username
|
||||
018afa30 _vt_x11_init 01a1ca40 _vt_dpy
|
||||
01a1caa0 _vt_x11_progress 01a1ca60 _vt_win
|
||||
018b2000 _vt_x11_term_init 01a1ca80 _vt_gc
|
||||
018a1700 _wait_display 01a1caa0 _vt_x11_progress
|
||||
018b01e0 _x11_clearscr 01a1cac0 _term_reset
|
||||
018b03e0 _x11_cursor 01a1cae0 _term_clearscr
|
||||
018b07b0 _x11_ibmchar 01a1cb00 _term_setcursor
|
||||
018b03a0 _x11_reset 01a1cb20 _term_cursor
|
||||
018b0440 _x11_setcolor 01a1cb40 _term_setcolor
|
||||
018b0560 _x11_setcursor 01a1cb60 _term_ibmchar
|
||||
018b4940 cinit 01a1cb80 _termenv
|
||||
018a0000 edata 01a1cba0 _term_type
|
||||
01a1ec00 end 01a1cbc0 _stdout
|
||||
018b4940 etext 01a1ec00 end
|
||||
|
||||
[77 symbols]
|
||||
[76 symbols]
|
||||
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* x11.c -- a small character-cell terminal that draws through the VT1200 ROM
|
||||
* Xlib. The game's term_* callbacks feed an 80x24 grid; vt_x11_flush() paints
|
||||
* only the dirty cells with XFillRectangle (background) + XDrawString (glyph).
|
||||
* Xlib. The game's term_* callbacks feed an 80x24 grid; vt_x11_flush() repaints
|
||||
* each dirty row with one XFillRectangle (background) and one XDrawString (the
|
||||
* row's 80 characters), which keeps the request stream small enough for the
|
||||
* in-machine X server to drain.
|
||||
*
|
||||
* Geometry is the default GC's font, measured on the real server: 6x13 cells,
|
||||
* baseline +10. Do not change the cell metrics without re-measuring.
|
||||
@@ -29,8 +31,7 @@ static int cur_fg, cur_bg;
|
||||
void *vt_dpy;
|
||||
vt_u32 vt_win;
|
||||
vt_u32 vt_gc;
|
||||
volatile vt_u32 vt_x11_progress;
|
||||
int vt_x11_drain_events;
|
||||
volatile vt_u32 vt_x11_progress; /* debug: 0xFFFFFF when a flush finished */
|
||||
|
||||
/* term.h's callback objects (term.c is not compiled for the VT1200). */
|
||||
void (*term_reset)(void);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
extern void *vt_dpy;
|
||||
extern vt_u32 vt_win;
|
||||
extern vt_u32 vt_gc;
|
||||
extern int vt_x11_drain_events;
|
||||
|
||||
int vt_x11_init(void);
|
||||
void vt_x11_flush(void);
|
||||
|
||||
@@ -29,6 +29,17 @@ for mode in ${MODES:-move panels quit}; do
|
||||
-autoboot_script "$DIR/play_keys.lua" -autoboot_delay 0 \
|
||||
>"$LOG" 2>&1 || true
|
||||
grep -E 'PLAYKEYS:|LOADER: result|LOADER: snapshot' "$LOG" | tail -5
|
||||
DIAG=$(grep -a 'DIAG: loops' "$LOG" | sed -n 's/.*loops=\([0-9]*\) events=\([0-9]*\).*quit=\([0-9]*\)/\1 \2 \3/p' | head -1)
|
||||
[ -n "$DIAG" ] || { echo "play_keys.sh: no DIAG line for $mode (see $LOG)" >&2; exit 1; }
|
||||
set -- $DIAG
|
||||
LOOPS=$1; EVENTS=$2; QUIT=$3
|
||||
echo "play_keys: $mode loops=$LOOPS events=$EVENTS quit=$QUIT"
|
||||
[ "$LOOPS" -ge 100 ] || { echo "play_keys.sh: $mode main loop barely ran ($LOOPS)" >&2; exit 1; }
|
||||
[ "$EVENTS" -ge 6 ] || { echo "play_keys.sh: $mode got $EVENTS events, expected the click and keys" >&2; exit 1; }
|
||||
case $mode in
|
||||
move|panels) [ "$QUIT" = 0 ] || { echo "play_keys.sh: $mode quit unexpectedly" >&2; exit 1; } ;;
|
||||
quit) [ "$QUIT" = 1 ] || { echo "play_keys.sh: q did not reach the game (quit=$QUIT)" >&2; exit 1; } ;;
|
||||
esac
|
||||
[ -s "$EV/loader_frame3200.png" ] || { echo "play_keys.sh: no $mode snapshot" >&2; exit 1; }
|
||||
cp "$EV/loader_frame3200.png" "$EV/termtris_${mode}_3200.png"
|
||||
done
|
||||
|
||||
@@ -48,7 +48,6 @@ int main(void)
|
||||
put(1, 20, word, 0x70);
|
||||
put(21, 20, "0123456789", 0x70);
|
||||
put(22, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0x70);
|
||||
vt_x11_drain_events = 1;
|
||||
vt_x11_flush();
|
||||
mark[4] = 0x464C5553UL; /* FLUS */
|
||||
|
||||
|
||||
Reference in new issue
Block a user