nx_chaos.nx
buildroot/runtime/nx_chaos.nx
dependencies 0 imports · 1 importers
imports: none
imported by: nx_chaos_gate.nx
structs
| none |
consts
| 1 | const O_MAGIC_500000: i64 = 500000 |
| 2 | const O_MAGIC_500001: i64 = 500001 |
| 3 | const O_MAGIC_3900: i64 = 3900 |
| 4 | const O_MAGIC_4096: i64 = 4096 |
| 13 | const W: i64 = 256 |
| 14 | const H: i64 = 256 |
| 15 | const O_FB: i64 = 0 |
| 16 | const O_XA: i64 = 524288 |
| 17 | const O_XB: i64 = 524296 |
| 18 | const O_R: i64 = 524304 // r * 1000 |
| 19 | const O_STEP: i64 = 524312 |
| 20 | const O_HA: i64 = 524320 // trajectory A history |
| 21 | const O_HB: i64 = 524320 + 240*8 // trajectory B history |
| 22 | const HISTN: i64 = 240 |
| 23 | const SC: i64 = 1000000 // x in [0, SC] == [0,1] |
| 24 | const STEPS_PER_TICK: i64 = 1 |
functions
| 26 | func rgb(r: i64, g: i64, b: i64) -> i64 { return (r & 255) | ((g & 255) << 8) | ((b & 255) << 16) } called by 1: render_impl |
| 28 | func logistic(x: i64, R: i64) -> i64 { let tmp: i64 = x*(SC-x)/SC; return tmp*R/1000 } |
| 30 | func putpx(base: i64, px: i64, py: i64, c: i64) -> i64 called by 1: disc |
| 34 | func disc(base: i64, px: i64, py: i64, r: i64, c: i64) -> i64 |
| 41 | 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 |
| 43 | func init_impl(base: i64) -> i64 |
| 51 | func step_one_impl(base: i64) -> i64 |
| 56 | func tick_impl(base: i64, cmd: i64) -> i64 |
| 66 | func render_impl(base: i64) -> i64 |
| 80 | func ww() -> i64 { return W } called by 1: main |
| 81 | func hh() -> i64 { return H } called by 1: main |
| 82 | func fb_off() -> i64 { return O_FB } called by 1: main |
| 83 | func init() -> i64 { return init_impl(0) } calls 1: init_impl |
| 84 | func tick(cmd: i64) -> i64 { return tick_impl(0, cmd) } calls 1: tick_impl |
| 85 | func render() -> i64 { return render_impl(0) } calls 1: render_impl |
| 86 | func mem_bytes() -> i64 { return O_HB + HISTN*8 + O_MAGIC_4096 } |