code wiki / _hdl_build / nx_gamehud_gate.nx

nx_gamehud_gate.nx

buildroot/runtime/_hdl_build/nx_gamehud_gate.nx

12020 B268 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_gamehud_gate.nx -- certification gate for nx_gamehud (gamebench capability 18 ui-menus-hud). The bug classes each tooth exists to kill (every one shipped in a real engine somewhere): T1 stale HUD -- HUD renders CACHED text instead of the live bound value T2 impure render -- same state renders different pixels (kills replay/lockstep evidence) T3 cursor clamp -- menu cursor clamps at the ends instead of wrapping (MUTATION TARGET) T4 modal residue -- closing a menu does not restore the exact pre-menu frame T5 out-of-bounds -- off-screen text/panel writes past the framebuffer (canary proves it can't) T6 save amnesia -- HUD/menu state does not survive nx_gamesave round-trip (parts-compose tooth) T7 nondeterminism -- the same nav script produces different selections/frames on a second run T8 anti-vacuity -- guards that the equality teeth compared REAL ink and REAL distinct choices (GX-9 law: a green gate that cannot fail is not evidence; T8 must stay GREEN under mutations) license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gamehud.nx nx_gamesave.nx nx_gamehud_gate.nx

imports: nx_syscalls.nxnx_gamehud.nxnx_gamesave.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main font8x8_table sys_mmap fg sys_mmap ↻ ww sys_write gh_init gh_slot_set fbnew sys_mmap ↻ gh_render gh_text gh_glyph gh_px font8x8_adv font8x8_ink_w gh_numdraw gh_glyph ↻ font8x8_adv ↻ sys_mmap ↻ gh_hline gh_px ↻ gh_vline gh_px ↻ gh_ink gh_frame_ck wn sys_write ↻ sys_mmap ↻ fbdiff gh_menu_open gh_menu_item gh_menu_move gh_menu_sel gh_menu_close gh_text ↻ gh_numdraw ↻ canck sys_unlinkat

structs

none

consts

17const W: i64 = 200
18const H: i64 = 120
19const FBN: i64 = 72000 // W*H*3
20const CAN: i64 = 64 // canary bytes past the fb
21const SCHEMA: i64 = 7411
22const INKMIN: i64 = 50

functions

24func ww(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
25func wn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
34func fbnew() -> *u8
called by 2: navrunmain calls 1: sys_mmap
42func fbclear(fb: *u8) -> i64
47func fbdiff(a: *u8, b: *u8) -> i64
called by 1: main
53func canck(fb: *u8) -> i64
called by 1: main
61func navrun(font: *u8, labels: *i64, mlabels: *i64, out: *i64) -> i64
92func main() -> i64