Log In  

@zep it looks like if you do a cstore from a cart in splore or an exported binary, what it saves to the .lexaloffle/pico-8/cstore folder is only those regions of cart ROM that were cstored, and then next time you launch it from splore (or next time you run the exported binary), only those regions of the ROM are copied to base RAM; everything else is blank

I'm guessing the cstore file is intended be overlayed on top of the original ROM contents when copying from cart ROM to cart RAM (and that's why it only saves the changed parts?), but it looks like there was a mistake in implementation and the cstore file contents actually are the only thing copied to base RAM?

I can't reproduce the behavior when using a p8 or p8.png file; this happens only with splore or from an exported binary

To reproduce:

  1. load a cart from the splore or launch a binary export of a cart that contains data and calls cstore specifying a partial section of cart memory, e.g. cstore(0, 0, 0x2000) (which is what my jigsaw puzzle cart does but I'm about to change it to write the entire ROM as a workaround ;p)
  2. exit splore or close the binary export
  3. relaunch the cart
  4. see that now all data regions of cart ROM are "permanently" empty, except for the spritesheet
P#85307 2020-12-11 21:03 ( Edited 2020-12-12 06:44)

2

Thanks for investigating this @kittenm4ster. Fixed for 0.2.2

And yes -- the overlay scheme is meant to only patch in the data that changed. The .p8 format has a data section for this called __change_mask__. This was first needed for writing to carts embedded in exported datafiles, and BBS carts are treated the same way for simplicity. I'm glad you were able to find that workaround -- 0.2.1b fails to write that mask at all in this particular context.

P#85342 2020-12-13 09:52

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 09:58:15 | 0.008s | Q:14