pico-8 cartridge // http://www.pico-8.com version 42 __lua__ -- wave catalog helper -- by smelly -- copy data from catalog -- into this string. 🐱 data = split[[ ]] function _init() -- change "0" to the sfx slot -- you want. -- use data to insert ∧ at n. --import∧(0) -- use slot n to export ∧. --export∧(0) end -->8 -- i/o function export∧(slot) address = 0x3200+slot*68 s = "" for i = 0, 63 do s = s..(i~=0 and "," or "")..(peek(address+i)+128)%256 end cls(1) printh(s,"@clip") poke(0x5f36,128) ?s ?"[saved to @clip.]",64-34,120,13 end function import∧(slot) address = 0x3200+slot*68 cls(5) assert(data and #data==64,"make sure data is valid! use '[64]'!") for i = 1, 64 do poke(address-1+i, data[i]+128) end poke(address+64, 0, 0, 128, 0) cstore(address, address, 68) -- memory display for i = 0, 15 do for j = 0, 5 do if i+j*16<68 then ?peek(address+i+j*16),j*16,i*6 end end end ?"[pasted successfully!]",0,100 end