code wiki / _hdl_build / nx_frame_score.nx
nx_frame_score.nx
buildroot/runtime/_hdl_build/nx_frame_score.nx
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
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
structs
| none |
consts
| 18 | const FS_MAGIC_65536: i64 = 65536 |
| 19 | const FS_MAGIC_3600: i64 = 3600 |
| 21 | const FS_MAXW: i64 = 1024 |
| 22 | const FS_MAXH: i64 = 1024 |
| 23 | const FS_SELF_W: i64 = 400 // the canonical comparison scale (the Veloren-cell methodology) |
| 24 | const FS_SELF_H: i64 = 240 |
functions
| 26 | func 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 } |
| 27 | func onum(o: *u8, at: i64, v: i64) -> i64 |
| 37 | func emit(o: *u8, n: i64) -> i64 { sys_write(1, o, n); return 0 } |
| 40 | func fs_nib(c: i64) -> i64 called by 1: fs_load |
| 46 | func 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 |
| 49 | func fs_int(b: *u8, p: i64, n: i64, pp: *i64) -> i64 called by 1: fs_load |
| 66 | func fs_load(path: *u8, whp: *i64) -> *i64 |
| 127 | func fs_report(fb: *i64, w: i64, h: i64, label: *u8) -> i64 |
| 152 | func fs_mk_toy(fb: *i64, w: i64, h: i64) -> i64 called by 1: main |
| 175 | func fs_mk_rich(fb: *i64, w: i64, h: i64) -> i64 called by 1: main |
| 202 | func main(argc: i64, argv: *i64) -> i64 |