Pico-8 API Documentation
Memory
Memory
Memory manipulation
cstore(dest_addr, src_addr, len, [filename]) -- copy bytes from ram to rom [load from filename; works with multi-cart export]memcpy(dest_addr, src_addr, len) -- copy bytesmemset(dest_addr, val, len) -- set len bytes to valpeek(addr) -- read byte in ram addresspoke(addr, val) -- write val in ram addressreload(dest_addr, src_addr, len, [filename]) -- copy bytes from rom to ram [load from filename; works with multi-cart export]
RAM Layout
0x0 - gfx0x1000 - gfx2/map2 (shared)0x2000 - map0x3000 - gfx_props0x3100 - song0x3200 - sfx0x4300 - user data0x5e00 - persistent cart data (256 bytes)0x5f00 - draw state0x5f40 - hardware state0x5f80 - gpio pins (128 bytes)0x6000 - screen (8k)