I posted a question on StackOverflow, and was told I'd better ask the question here:
According to Lexaloffles manual, the cartridge size is 32K (I assume this means 32kilo bytes). However, my cartridge is 41KB. All the demo cartridges that comes with the editor are also above 32K. Why is that?
that's because you're looking at a .p8 which is the uncompressed version of a cart that has no absolute filesize limit (it only has character-count and token-count limits)
.p8.png files are the ones that get compressed, and have a maximum 32k size limit in order to fit embedded into the PNG image.
load your .p8 and type INFO to see if it will be small enough to fit once it is compressed. if so, you can then save it with a .p8.png extension.
Note that the .p8.png file itself can also be larger than 32k -- it also includes the cart label :)
The 32k comes from lowest 2 bits of each RGBA pixel in the png image, so exactly 1 byte per pixel. This is the actual cart data that is internally extracted as a 32k block of binary data. The cart images are 160x205 or 32800 pixels, so there are 32 bytes left over.
[Please log in to post a comment]