code wiki / _hdl_build / nx_roku_emit.nx
nx_roku_emit.nx
buildroot/runtime/_hdl_build/nx_roku_emit.nx
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
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
structs
| none |
consts
| 17 | const K_MAGIC_65521: i64 = 65521 |
| 18 | const K_MAGIC_262144: i64 = 262144 |
| 19 | const K_MAGIC_65535: i64 = 65535 |
| 20 | const K_MAGIC_4096: i64 = 4096 |
functions
| 22 | func 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 |
| 23 | func 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 |
| 24 | func rk_puts(s: *u8) -> i64 { sys_write(1, s, rk_strlen(s)); return 0 } |
| 25 | func rk_num(v: i64) -> i64 |
| 35 | func rk_u32be(buf: *u8, off: i64, v: i64) -> i64 |
| 40 | func 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 |
| 43 | func rk_adler32(data: *u8, n: i64) -> i64 called by 1: rk_png_solid |
| 50 | func rk_png_chunk(out: *u8, off: i64, typ: *u8, data: *u8, dlen: i64) -> i64 |
| 62 | func rk_png_solid(out: *u8, w: i64, h: i64, r: i64, g: i64, bl: i64) -> i64 |
| 96 | func main(argc: i64, argv: *i64) -> i64 |