code wiki / _hdl_build / nx_gx9_saveload_gate.nx
nx_gx9_saveload_gate.nx
buildroot/runtime/_hdl_build/nx_gx9_saveload_gate.nx
about
nx_gx9_saveload_gate.nx -- Gx-9: SAVE / LOAD, the capability the gamebench ruler ranks #1 across the
ingested corpus (it blocks 11 of 12 real titles). Demand-ranked by measurement, not chosen by taste.
★THE TEST THAT ONLY WE CAN RUN. Most engines can only check that a save round-trips its fields. Because
our pipeline is bit-deterministic, we can assert the far stronger property: SAVING AND RELOADING MUST BE
INDISTINGUISHABLE FROM NEVER HAVING SAVED. Play 14 ticks straight and keep the final frame. Then play 7,
save, load into a FRESH state, play the remaining 7 -- and require the final frame to be BYTE-IDENTICAL
and the final state to match field for field. That catches the entire class of "the save forgot something"
bugs, which field round-trip tests structurally cannot see.
The other half is refusal: a damaged save must FAIL WITH A REASON, never half-load. A corrupted save that
partially applies strands the player in an impossible world and reads as a game bug forever.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_game_world.nxnx_game_save.nxnx_png_write.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 18 | const SL_STEP: i64 = 8192 |
| 19 | const SL_TURN: i64 = 3217 |
| 20 | const SL_TICKS: i64 = 14 |
| 21 | const SL_N: i64 = 5 |
| 22 | const SL_PICKR: i64 = 4915 |
| 23 | const SL_EYE: i64 = 6600 |
| 24 | const SL_WORDS: i64 = 6 + SL_N // ppx ppz yaw tick collected won + alive[SL_N] |
functions
| 26 | func sl_puts(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 |
| 27 | func sl_pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 } called by 1: main |
| 29 | func sl_script(t: i64) -> i64 called by 1: sl_sim |
| 37 | func sl_init(st: *i64) -> i64 called by 1: main |
| 50 | func sl_sim(base: i64, st: *i64, from: i64, to: i64, cap: i64, dst: *u8) -> i64 |
| 82 | func sl_render(base: i64, st: *i64, ex: *i64, ez: *i64, dst: *u8) -> i64 called by 1: sl_sim calls 11: gw_hit_sin4096it_cos4096gw_groundgw_build_terrainsg_project_clip_pitch+5 |
| 115 | func main() -> i64 |