View Single Post
Old 18 August 2018, 21:54   #175
Registered User

Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,814
I mentioned on the discussion thread earlier that someone contacted me on Youtube to say that it was possible to get away with one foreground blit instead of the three background blits I have been doing with the scrolling.

Well it looks like they were right, but by God it is not without it's pain.

So the original scrolling routine used the first 5 bitplanes making up 32 colours for the foreground and used the 3 remaining bitplanes for the background, to update the background I simply shift blit the blocks from the source scene into the destination planes.

When I did this I could achieve about 10 animated bobs meaning I could realistically get around 14 or less 32x32 sprites on screen. If you play the arcade of Rygar and use the cheat you'll see there is just over 15 to 16 sprites on screen at any one time so the more I can get on screen the better. Some of the hardware sprites I can multiplex such as the flying dragons to the rhino to the lava.

However, there's a more efficient way to do the scrolling getting me more sprites. If I interleave the bitplanes like this...

BP1 Foreground, BP2 Foreground, BP3 Foreground, BP4 Background, BP5 Foreground, BP6 Background, BP7 Foreground, BPP8 Background

So my background is pointed to by bitplanes 4, 6 and 8.

Now if I move the scroll registers independently without dual playfield mode I can get move planes the foreground in planes 1,3,5 & 7 independently to 2,4,6 & 8 which make up the background.

However, this poses a problem because bitplane 2 is a foreground plane but it is moving at the background speed, so all that is required is that I blit bitplane 2 from my pristine buffer over the background buffer to compensate.

All pretty simple stuff? Wrong.

Working out the colour palette alone to interleave the bitplanes has blown my mind... and to give you an example of my efforts, a picture speaks a thousand words.

Now my calculations for working out the palettes were sound, implementing though took a whole lot longer. The lesson to be learned for me here is 'Always use the copper to do your palettes'. For some reason the AGA does not set let you poke registers 8-15... even after disabling the copper.

Absolutely blew my mind, I can now get on with doing the background scrolling. It still won't be easy but will be worth it if I can pull it off.

Wish me luck.

Last edited by DamienD; 18 August 2018 at 22:02. Reason: Reduced size / rotated images ;-)
mcgeezer is offline  
Page generated in 0.04164 seconds with 10 queries