code wiki / _hdl_build / nx_frame_score.nx

nx_frame_score.nx

buildroot/runtime/_hdl_build/nx_frame_score.nx

10633 B246 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic frame
docsdependenciesstructsconstsfunctions

about

nx_frame_score.nx -- score ANY captured frame with the hardened nx_game_critic, ONE ruler ONE scale. WHY (seq890/seq1004): the head-to-head vsbench contract says a Tier-3 EXT cell must be measured off a captured artifact by OUR instrument -- but the organ that minted the first EXT cell existed in NO source tree and was never registered, so the evidence path was not reproducible by any agent. This is that organ rebuilt from the first byte as a REGISTERED MCP tool: OUR render and a REFERENCE render are graded by the SAME deployed binary on the SAME scale, on the NAS, with the artifact on disk. INPUT FORMAT NXFH1 (text-hex framebuffer -- deliberately TEXT so it travels the fs-write lane safely; raw binary through JSON-string tooling is the proven corruption path): line 1: "NXFH1 <w> <h>\n" then w*h pixels as 6 lowercase hex chars each (rrggbb), any whitespace between pixels ignored. Encoder: scratchpad/png2hex.js (same code path for BOTH sides). USAGE: nx_frame_score <path.nxfh> | nx_frame_score selftest Composes nx_game_critic (gc_score/gc_quality/gc_verdict) -- nothing re-implemented. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_game_critic.nx nx_frame_score.nx

imports: nx_syscalls.nxnx_game_critic.nx

imported by: nobody (leaf or entry point)

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

main emit sys_write sys_mmap fs_mk_toy fs_mk_rich fs_report sys_mmap ↻ gc_score sys_mmap ↻ gc_lum gc_quality gc_capw ocat onum sys_mmap ↻ gc_verdict emit ↻ ocat ↻ onum ↻ fs_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close fs_isws fs_int fs_nib

structs

none

consts

18const FS_MAGIC_65536: i64 = 65536
19const FS_MAGIC_3600: i64 = 3600
21const FS_MAXW: i64 = 1024
22const FS_MAXH: i64 = 1024
23const FS_SELF_W: i64 = 400 // the canonical comparison scale (the Veloren-cell methodology)
24const FS_SELF_H: i64 = 240

functions

26func ocat(o: *u8, at: i64, s: *u8) -> i64 { var i: i64=0; var a: i64=at; while s[i]!=(0 as u8){o[a]=s[i]; a=a+1; i=i+1} return a }
called by 2: fs_reportmain
27func onum(o: *u8, at: i64, v: i64) -> i64
called by 2: fs_reportmain calls 1: sys_mmap
37func emit(o: *u8, n: i64) -> i64 { sys_write(1, o, n); return 0 }
called by 2: fs_reportmain calls 1: sys_write
40func fs_nib(c: i64) -> i64
called by 1: fs_load
46func fs_isws(c: i64) -> i64 { if c==32 { return 1 } if c==10 { return 1 } if c==13 { return 1 } if c==9 { return 1 } return 0 }
called by 1: fs_load
49func fs_int(b: *u8, p: i64, n: i64, pp: *i64) -> i64
called by 1: fs_load
66func fs_load(path: *u8, whp: *i64) -> *i64
127func fs_report(fb: *i64, w: i64, h: i64, label: *u8) -> i64
152func fs_mk_toy(fb: *i64, w: i64, h: i64) -> i64
called by 1: main
175func fs_mk_rich(fb: *i64, w: i64, h: i64) -> i64
called by 1: main
202func main(argc: i64, argv: *i64) -> i64