code wiki / (root) / nx_kkfacts.nx

nx_kkfacts.nx

buildroot/runtime/nx_kkfacts.nx

4314 B95 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_kkfacts.nx -- CLI: Koikatsu card structural facts. nx_kkfacts probe <card.png> Reads up to 64MB (cards are full files, payload census needs the whole artifact). Facts only: structure + sizes + block census; slider values / names / creative content stay unread. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_kkfacts_lib.nx nx_kkfacts.nx

imports: nx_syscalls.nxnx_kkfacts_lib.nx

imported by: nobody (leaf or entry point)

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

main kc_e sys_write kc_slen sys_exit sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_openat_rd sys_lseek sys_read sys_close kk_probe kk_probe_marker kk_b kk_find sys_mmap ↻ nx_img_dims _be32 _le16 _le24 _le32b _be16 kk_count kk_probe_aishoujo kk_probe_marker ↻ kc_w sys_write ↻

structs

none

consts

8const KKC_CAP: i64 = 67108864
9const KKD_MAX_VALS: i64 = 256 // slider arrays measure ~52 (face) / ~44 (body); 256 is the refuse-beyond bound, overflow visible via parsed vs declared

functions

11func kc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: kc_wkc_e
12func kc_w(s: *u8) -> i64 { sys_write(1, s, kc_slen(s)); return 0 }
called by 1: main calls 2: sys_writekc_slen
13func kc_e(s: *u8) -> i64 { sys_write(2, s, kc_slen(s)); return 0 }
called by 1: main calls 2: sys_writekc_slen
14func kc_num(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
28func kc_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
30func main(argc: i64, argv: *i64) -> i64