nx_kinetics.nx
buildroot/runtime/nx_kinetics.nx
dependencies 0 imports · 1 importers
imports: none
imported by: nx_kinetics_gate.nx
structs
| none |
consts
| 1 | const O_MAGIC_4096: i64 = 4096 |
| 8 | const W: i64 = 256 |
| 9 | const H: i64 = 256 |
| 10 | const O_FB: i64 = 0 |
| 11 | const O_A: i64 = 524288 // [A] concentration (scaled, A0=1e6) |
| 12 | const O_B: i64 = 524296 // [B] |
| 13 | const O_MODE: i64 = 524304 // 0=first-order decay, 1=reversible, 2=zero-order (control) |
| 14 | const O_KNUM: i64 = 524312 // forward rate numerator |
| 15 | const O_KDEN: i64 = 524320 // rate denominator |
| 16 | const O_KRNUM: i64 = 524328 // reverse rate numerator (reversible) |
| 17 | const O_STEP: i64 = 524336 |
| 18 | const O_HIST: i64 = 524344 // [A] history (one sample per tick) |
| 19 | const HISTN: i64 = 236 |
| 20 | const A0: i64 = 1000000 |
| 21 | const ZCONST: i64 = 700 // zero-order constant decrement |
| 22 | const STEPS_PER_TICK: i64 = 20 |
functions
| 24 | func rgb(r: i64, g: i64, b: i64) -> i64 { return (r & 255) | ((g & 255) << 8) | ((b & 255) << 16) } called by 1: render_impl |
| 25 | func putpx(base: i64, px: i64, py: i64, c: i64) -> i64 |
| 29 | func clear_fb(base: i64, c: i64) -> i64 { let fb: *i64=(base+O_FB) as *i64; var i: i64=0; while i<W*H { fb[i]=c; i=i+1 } return 0 } called by 1: render_impl |
| 30 | func vbar(base: i64, x0: i64, x1: i64, h: i64, c: i64) -> i64 |
| 34 | func init_impl(base: i64) -> i64 |
| 42 | func step_one_impl(base: i64) -> i64 |
| 50 | func tick_impl(base: i64, cmd: i64) -> i64 |
| 59 | func render_impl(base: i64) -> i64 |
| 73 | func ww() -> i64 { return W } called by 1: main |
| 74 | func hh() -> i64 { return H } called by 1: main |
| 75 | func fb_off() -> i64 { return O_FB } called by 1: main |
| 76 | func init() -> i64 { return init_impl(0) } calls 1: init_impl |
| 77 | func tick(cmd: i64) -> i64 { return tick_impl(0, cmd) } calls 1: tick_impl |
| 78 | func render() -> i64 { return render_impl(0) } calls 1: render_impl |
| 79 | func mem_bytes() -> i64 { return O_HIST + HISTN*8 + O_MAGIC_4096 } |