ROM import tables
One file per ROM revision. Addresses are bit addresses and are not assumed stable across firmware revisions; v2.2 is the first target.
vt1200-v22.syms contains only the entries already proven by the hand-written
payloads in vendor/vt1200/dwt/gui/xhello.asm and the README. M2 consumes
only strlen: scripts/m2/gen-rom-imports.sh emits an ABI-preserving
jauc stub for every entry, and the M2 harness calls _strlen at
0x3FB458D0. M3 consumes exactly the four Xlib entries below through the
same stub generator; the compiled scripts/m3/xhello.c is the end-to-end proof.
The table has not been widened beyond those five validated entries (the four
Xlib entries below plus strlen). M4 extends it for the
real client (XImage/XEvent and the rest of the X11R4 calls) from the Ghidra
project / ptr_constants.py, and validates each new entry on MAME, then on the
real unit. Do not assume an address here is validated just because it is
listed.
v2.2 Xlib entries validated
The four Xlib entries used by the compiled client are validated by
vendor/vt1200/dwt/gui/xhello.asm (the hand-written payload that already runs
against the live DWT X server):
| entry | bit address | evidence |
|---|---|---|
XOpenDisplay |
0x3F9C2570 |
xhello.asm calls it; CALLA _XOpenDisplay reaches the stub in MAME |
XCreateSimpleWindow |
0x3FD41B90 |
nine-argument window create; window id marker is nonzero |
XMapWindow |
0x3FD645B0 |
mapped window produces the white VRAM pixel |
XSync |
0x3FD9F6B0 |
called after mapping; return value is diagnostic only |
scripts/m3/validate-syms.sh is the regression check: each entry must be in
the ROM bit range 3F200000h..3FFFFFFFh, 16-bit aligned, and disassemble to a
plausible function prologue (MOVE/MMTM/SETF/CMP/ADDI).
scripts/tests/m3/run.sh runs it before every MAME run, so the compiled client
cannot pass with a stale stub. It is not a re-extraction; M4 extends the table
for XImage/XEvent and the rest of the real client.
The build resolves these as absolute symbols (or ABI-preserving stubs). Do not bake them into the compiler: keep them in a per-ROM linker script.