code wiki / _hdl_build / nx_gamesave_core.nx
nx_gamesave_core.nx
buildroot/runtime/_hdl_build/nx_gamesave_core.nx
about
nx_gamesave_core.nx -- the PURE serialize/validate core of the save law (seq1151 design-flaw fix).
nx_gamesave.nx (file surface, native) and nx_wasm_craft.nx (save-image surface, wasm) each carried
their OWN copy of the same mechanism -- little-endian i64<->bytes and the rolling xor-multiply-mask
checksum fold -- because gs_save is file-syscall-coupled and wasm code cannot call it. That parallel
re-derivation was the bug. This core is the ONE definition; each format's constants (seed, multiplier,
mask, granularity) are PARAMETERS, so both existing on-disk formats stay byte-identical while the
mechanism has a single home.
PURE BY CONSTRUCTION: imports NOTHING, allocates NOTHING, touches no syscall -> wasm-dialect-clean.
license_tier: ORIGINAL expect_exit: 0
dependencies 0 imports · 2 importers
imports: none
imported by: nx_gamesave.nxnx_wasm_craft.nx
structs
| none |
consts
| none |
functions
| 12 | func gsc_put64(b: *u8, off: i64, v: i64) -> i64 called by 1: put64 |
| 18 | func gsc_get64(b: *u8, off: i64) -> i64 called by 1: get64 |
| 25 | func gsc_fold(h: i64, v: i64, mult: i64, mask: i64) -> i64 |
| 29 | func gsc_fold_bytes(h0: i64, b: *u8, n: i64, mult: i64, mask: i64) -> i64 |
| 36 | func gsc_fold_words(h0: i64, w: *i64, from: i64, to: i64, mult: i64, mask: i64) -> i64 |