code wiki / _hdl_build / nx_roku_emit.nx

nx_roku_emit.nx

buildroot/runtime/_hdl_build/nx_roku_emit.nx

8674 B155 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind tooltopic roku
docsdependenciesstructsconstsfunctions

about

nx_roku_emit.nx -- SOVEREIGN Roku channel-package emitter (R0 "hardware rung" of the Roku media-app arc). Emits a sideload-ready Roku channel as a STORED ZIP via the shared nx_opc framer -- NO new ZIP code: manifest (key=value text, named exactly `manifest`, NO extension, at zip root) source/main.brs (SceneGraph entry point -- the BrightScript platform shim, EMITTED not hand-written) components/MainScene.xml (a Scene with a background Rectangle + a centered "Nishi" Label) images/icon.png (a fully sovereign solid-colour PNG: signature + IHDR + IDAT[zlib stored-DEFLATE] + IEND; chunk CRCs via nx_crc32, IDAT zlib trailer via inline Adler-32) Doctrine: BrightScript/SceneGraph can't run Nishi bytecode (no WASM on Roku) so it's a platform shim, the same way HTML is in the browser -- we keep it sovereign by EMITTING it from an organ (cf. nx_wiki_shell emits HTML). Sovereignty = our own packager + our own PNG; rigor (ZIP + PNG are standard formats) is proven in the harness by a 3rd-party oracle (python zipfile.testzip + PNG IHDR unpack) per the non-novel-format doctrine. nx_roku_emit [out.zip] (default: /mnt/c/Users/elder/nishi_roku.zip) license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_crc32.nx nx_opc.nx nx_roku_emit.nx

imports: nx_syscalls.nxnx_crc32.nxnx_opc.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap rk_cat rk_png_solid sys_mmap ↻ rk_u32be rk_png_chunk rk_u32be ↻ nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at rk_u16le rk_adler32 opc_write sys_mmap ↻ nx_crc32 ↻ opc_strlen opc_put_u32 opc_put_u16 opc_copy sys_openat_wr sys_write sys_close rk_puts sys_write ↻ rk_strlen rk_num sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

17const K_MAGIC_65521: i64 = 65521
18const K_MAGIC_262144: i64 = 262144
19const K_MAGIC_65535: i64 = 65535
20const K_MAGIC_4096: i64 = 4096

functions

22func rk_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: rk_puts
23func rk_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i }
called by 1: main
24func rk_puts(s: *u8) -> i64 { sys_write(1, s, rk_strlen(s)); return 0 }
called by 1: main calls 2: sys_writerk_strlen
25func rk_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
35func rk_u32be(buf: *u8, off: i64, v: i64) -> i64
40func rk_u16le(buf: *u8, off: i64, v: i64) -> i64 { buf[off]=(v&0xff) as u8; buf[off+1]=((v>>8)&0xff) as u8; return off+2 }
called by 1: rk_png_solid
43func rk_adler32(data: *u8, n: i64) -> i64
called by 1: rk_png_solid
50func rk_png_chunk(out: *u8, off: i64, typ: *u8, data: *u8, dlen: i64) -> i64
called by 1: rk_png_solid calls 2: rk_u32benx_crc32
62func rk_png_solid(out: *u8, w: i64, h: i64, r: i64, g: i64, bl: i64) -> i64
96func main(argc: i64, argv: *i64) -> i64