Hello everyone
I'm new here and don't really have much experience with Pico-8 or Picotron, but I'm trying to learn by doing and of course I didn't start with the easiest task
[8x8] | |
I'm trying to understand how to decode copied sprites PODs or their base64 content. I'm trying to see the sprite data in e.g. bytes, or any format I could use to recreate the sprite in another programme.
I tried to decode the b64 code with the Linux command base64 --decode and I get a file starting with lz4. When I then try to decode the file with the command lz4 -t (https://github.com/lz4/lz4/) I get the error message:
Error 44 : Unrecognized header : file cannot be decoded
Could someone give me a nudge in the right direction
[8x8] | |
While Picotron uses LZ4 compression, it doesn't use the full LZ4 file format including headers etc. If you're looking for a working example of reading/writing Picotron carts, check out https://github.com/thisismypassport/shrinko8, which started as a PICO-8 project but handles Picotron too.
In my opinion, the picotron itself does the conversion.
I think it's very simple.
It was easy to exchange data via the clipboard.
The method of conversion is..
For example, this is possible like this:
-- This is the original data. -- It is copied from the GFX editor with the "--[[pod_type="gfx"]]" part -- at the beginning removed. p = unpod("b64:bHo0ACcAAAAtAAAA8QdweHUAQyAQEAQI8EAhAAEAIQAhIAEAAgAACAAUIBQAUAHgAfBe") -- In this case, p is a user data type. -- You can access each pixel as is. print(p) print(get(p,0,0)) -- Of course you can also set pixels. set(p,1,0,9) -- The contents may be much easier to understand -- if you convert it to uncompressed POD. p2 = pod(p) print(p2) -- And if you want to compress the results of various -- edits into a POD, you can turn on the option. -- Let's just talk about the amount of data. -- It depends on the case, but there are also cases -- where not compressing will result in less data. p3 = pod(p, 0x7) print(p3) |
[Please log in to post a comment]