Log In  

Hey @zep I was working on my game and found that my pokes were failing to update the .p8d.txt?
here I tried doing:

  ?"⁶!5e00²"
  ?dget(0)
  stop()

I found it replicable by doing

cartdata"test"
color(7)

local v = @0x5e00
if v<8 then
 ?@0x5e00
 ?"⁶!5e00"..chr(v+1)
 run()
end

?"done"

I understand if it's meant to take time to update the file but my game depends on this writing to memory for handling state and I wish I could rely on it.. is there some way to make sure the file has time to be written to that'd be token cheap? like giving it extra flip time or something?
I'm on v0.2.5e not sure if this exists on newer versions.

P#130443 2023-06-02 08:13 ( Edited 2023-06-02 08:13)

(seems doing

?"⁶@5e000001²⁶6"
  run()

works 100% of the time but man that waiting is a bit much.. though maybe it's fine.. please let me know if there's a better way to do this or detect the file changing somehow.. I guess I could try checking a dget but man that's a lot of tokens. breadcrum doesn't seem like it'd work cause reseting the cart maintains the crum and I don't want that...)

P#130444 2023-06-02 08:52

After a day away from it and back realized I could just go poke some uncleared memory address instead of doing cdata hoops and that works way better, . _ .
Still unclear on if this is proper cdata behavior to have this unclear wait... but uhhhh ok I'll just go do that I feel dumb; overthinking it agh

P#130477 2023-06-03 07:52

[Please log in to post a comment]