Hardware-Sprites on OCS/AGA

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
fingus
Posts: 206
Joined: Fri Sep 16, 2011 9:53 am

Hardware-Sprites on OCS/AGA

Post by fingus »

Maybe add real Hardware Sprites to the Plananarama-Plugin with all known limitations (colors, max width/heigt)?

User avatar
airsoftsoftwair
Posts: 4984
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Hardware-Sprites on OCS/AGA

Post by airsoftsoftwair »

Yes, that could be possible now that Hollywood has palette support and it certainly would be a nice feature.

User avatar
airsoftsoftwair
Posts: 4984
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Hardware-Sprites on OCS/AGA

Post by airsoftsoftwair »

Code: Select all

- New: Added support for real hardware sprites; unfortunately, sprites were never the Amiga's
  strong point so they won't give you too much power; the Amiga hardware can only handle eight
  hardware sprites; if you want them to use 16 colors instead of 4 colors, then this goes down
  even further to just 4 hardware sprites; on ECS the width is limited to 16 pixels, on AGA it
  is limited to 64 pixels; there's no restriction on the height, though; you can create hardware
  sprites from palette brushes with the following new Plananarama functions: planar.CreateSprite(),
  planar.FreeSprite(), planar.MapSprite(), planar.UnmapSprite(), planar.MoveSprite(); sprites
  can be dynamically mapped and unmapped to/from the DMA sprite channels on the hardware
  to give you some flexibility when it comes to animations

SamuraiCrow
Posts: 432
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: Hardware-Sprites on OCS/AGA

Post by SamuraiCrow »

There's one sprite hack for OS3 that I've done in E that seems quite handy. Transplant the pointers from a simple-sprite structure to an interleaved 2 bitplane bitmap structure. Then you can pass the bitmap structure to CreateRastPort() with a flag to keep it from generating the copper instructions. Then the OS functions will draw directly to a 64-pixel wide AGA sprite with the blitter, treating it just like a screen of that width. You can even draw bobs on it like any other screen. By doing the same thing to the corresponding odd sprite it can even be boosted to 16 colors. The only real catch is that it won't use 4 bitplane interleave.

If it wouldn't be too much messing, adding that would make sprites quite useful to applications that need a sidebar or a slider that is independent of screen-scrolling.
I'm on registered MorphOS using FlowStudio.

Post Reply