code wiki / _hdl_build / nx_sovereign_surface_gate.nx

nx_sovereign_surface_gate.nx

buildroot/runtime/_hdl_build/nx_sovereign_surface_gate.nx

15755 B284 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic sovereign
docsdependenciesstructsconstsfunctions

about

nx_sovereign_surface_gate.nx -- PROVES, mechanically, that the Breeders stack is emitted from NishiLang FROM THE FIRST BYTE UP and that ONE frame is interoperable across the sovereign surfaces. (operator 2026-07-27: "make sure we are emitting from nishi lang from the first byte up not building into 3rd parties but we do want it to be interoperable aka nishi os and browser first then making it work on android or windows etc") ★WHY A GATE AND NOT A PROMISE: rule 26's discipline -- a sovereignty claim must be proven mechanically, never asserted. So this gate READS ITS OWN DEPENDENCIES' SOURCE OFF DISK and fails if any of them reaches outside the nx_* namespace. A future session cannot quietly `import` a third-party shim and keep the green, because the check is structural rather than documentary. THE INTEROP CONTRACT UNDER TEST -- ONE framebuffer, many sinks, no conversion library: packed i64 per pixel, R | G<<8 | B<<16 (nx_game_raster's format) -> NishiOS : the same word order the sovereign display controller + UEFI GOP sink consume -> Nishi Browser: byte 0=R,1=G,2=B of each i64 read straight out of linear memory by the canvas blit (the loader contract the emitted pages already use) -> PNG : nx_png_write_rgb, our own encoder (STORED zlib, no third-party deflate) -> Android/Windows: reachable BECAUSE the core is integer-only -- no float, no FPU rounding mode, no endian-dependent struct punning -- so a byte-identical result on a different ISA is a property of the code, not a hope. T5 proves determinism; the aarch64/x86 backends are the graphics lane's Gx-2 rung, NOT claimed here. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_char_identity.nx nx_game_raster.nx nx_png_write.nx nx_sovereign_surface_gate.nx

imports: nx_syscalls.nxnx_char_identity.nxnx_game_raster.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

main p sys_write sys_mmap slurp sys_openat_rd sys_read sys_close foreign_imports at pn sys_mmap ↻ sys_write ↻ nl p ↻ count_of at ↻ gr_pack gr_r gr_g gr_b idv_from_seed sys_mmap ↻ idv_rng gr_clear gr_rect gr_disc gr_px nx_png_write_rgb sys_openat_wr sys_mmap ↻ sys_write ↻ pw_chunk pw_u32be sys_mmap ↻ sys_write ↻ sys_write ↻ pw_crc_block pw_adler32 sys_close ↻

structs

none

consts

45const TW: i64 = 96
46const TH: i64 = 64

functions

28func p(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 2: nlmain calls 1: sys_write
29func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
43func nl() -> i64 { p("\n" as *u8); return 0 }
called by 1: main calls 1: p
49func slurp(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
64func at(buf: *u8, len: i64, i: i64, needle: *u8) -> i64
74func count_of(buf: *u8, len: i64, needle: *u8) -> i64
called by 1: main calls 1: at
81func foreign_imports(buf: *u8, len: i64) -> i64
called by 1: main calls 1: at
96func main() -> i64