Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interleaving options for Amiga binary 'Planes' save #28

Open
neildavis opened this issue Jul 15, 2024 · 1 comment
Open

Interleaving options for Amiga binary 'Planes' save #28

neildavis opened this issue Jul 15, 2024 · 1 comment
Labels
enhancement New feature or request Planned

Comments

@neildavis
Copy link

Thanks for this awesome app! I have one small feature request for Amiga ASM development:

When using the Amiga 'Planes' save option, the bitplanes are saved contiguously back-to-back. It would be nice to have an option to interleave them.

An example:

  1. Create a 32x8 pixel image using a palette of 4 colors, so 2 bitplanes will be used.
  2. Place four 8x8 filled rectangles next to each other left-to-right using color0, color1, color2, color3 in that order.
  3. Save using Amiga 'Planes' option.

The saved data looks like this when examined in hex editor (lines of 4 bytes):

00 FF 00 FF  <- Line 1 of bitplane 1
00 FF 00 FF  <- Line 2 of bitplane 1
00 FF 00 FF  ...
00 FF 00 FF  ...
00 FF 00 FF  ...
00 FF 00 FF  ...
00 FF 00 FF  ...
00 FF 00 FF  <- Line 8 of bitplane 1
00 00 FF FF  <- Line 1 of bitplane 2
00 00 FF FF  <- Line 2 of bitplane 2
00 00 FF FF  ...
00 00 FF FF  ...
00 00 FF FF  ...
00 00 FF FF  ...
00 00 FF FF  ...
00 00 FF FF  <- Line 8 of bitplane 2

When writing games/demos on the Amiga it's often useful to interleave the bitplane data, particularly when using the Blitter to mask smaller sprites (Blitter Objects or 'BOBs') over a larger playfield. With interleaved bitplane data this can be done in a single contiguous Blit across all bitplanes instead of having to Blit each individual bitplane in turn. To support this we'd need an option to interleave the bitplane data (like in IFF/ILBM,) when saving the planes so that in the above example the output would look like this in a hex editor:

00 FF 00 FF  <- Line 1 of bitplane 1
00 00 FF FF  <- Line 1 of bitplane 2
00 FF 00 FF  <- Line 2 of bitplane 1
00 00 FF FF  <- Line 2 of bitplane 2
00 FF 00 FF  ...
00 00 FF FF  ...
00 FF 00 FF  ...
00 00 FF FF  ...
00 FF 00 FF  ...
00 00 FF FF  ...
00 FF 00 FF  ...
00 00 FF FF  ...
00 FF 00 FF  ...
00 00 FF FF  ...
00 FF 00 FF  <- Line 8 of bitplane 1
00 00 FF FF  <- Line 8 of bitplane 2

Whilst it's possible to save in IFF/ILBM and extract the BODY chunk it would be great to have this option on Planes with the convenience of the palette output.

@steffest
Copy link
Owner

Good point!
I'll add it to the TODO list.

@steffest steffest added the enhancement New feature or request label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Planned
Projects
None yet
Development

No branches or pull requests

2 participants