06 December 2013, 15:27 | #1 |
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 744
|
interleaved bitmaps and blitting
Quick question.. I'm thinking of using an interleaved bitmap instead of the usual bitmap method of each bitmap one after the other.
The idea is that I should be able to blit all 5 planes in one blit rather than having to add plane size to the pointer on each blit. Anyone had any experience with this? Also is there an iff converter which will output the raw image this way? By my calculations the plane pointers in this case would be.. (for a 320 pixel width screen) plane 1 = source plane 2 = source+40 plane 3 = source+80 plane 4 = source+120 plane 5 = source+160 and the modulo would be 120. |
06 December 2013, 18:00 | #2 |
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 744
|
Seems to be the day for it today!! I found that PicCon can save interleaved raw bitmaps, chucked in the new values above and all went it perfick
|
06 December 2013, 21:10 | #3 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
Blitting to multiple planes in with one blit is wonderful, especially if the dimensions of the pixel block are small. A case where blitting is only slightly faster than the CPU becomes a huge win with interleaved bitplanes.
|
07 December 2013, 12:22 | #4 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
|
If you can spare the extra chip memory to store the mask once for each plane - yes!
|
07 December 2013, 15:02 | #5 |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
I'm using interleaved bitplanes for my game. I create the interlaved data with IFFConverter which is very easy to use and can also generate palette and sprite data. As Codetapper said, I'm storing the mask once for every bitplane.
|
07 December 2013, 18:16 | #6 | |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
Quote:
I've been wondering, though: is there any extra use that can be gotten out of what is normally the mask in this case? Some special effect, possibly using some unusual LF? That way the extra copies of the mask aren't wasted. I'm thinking something like semi-transparency. If the palette is setup correctly, then semi-transparency can be done with something like LF=$B2. With that LF, whenever the bob is written on top of pixels not masked out, the underlying pixel is inverted. With the right palette, some colors can become the shaded versions of the others when the background images has its bits flipped when merged with the bob. |
|
07 December 2013, 20:58 | #7 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
even with only one mask and separate blits for each bitplane to draw a bob, a single blit could still be used for restoring background graphics.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Raw Interleaved Graphics | Hungry Horace | Coders. General | 12 | 28 January 2023 23:30 |
BPLxMOD for interleaved bitmaps | phx | Coders. Asm / Hardware | 12 | 02 June 2012 22:47 |
Bitmaps in FASTRAM and blitting - C++ | NovaCoder | Coders. General | 22 | 01 December 2010 23:40 |
Bitmaps Brothers | Djay | request.Old Rare Games | 22 | 23 November 2003 21:18 |
|
|