Page 1 of 1

Hardware-Sprites on OCS/AGA

Posted: Wed Nov 17, 2021 9:17 am
by fingus
Maybe add real Hardware Sprites to the Plananarama-Plugin with all known limitations (colors, max width/heigt)?

Re: Hardware-Sprites on OCS/AGA

Posted: Sat Nov 20, 2021 2:51 pm
by airsoftsoftwair
Yes, that could be possible now that Hollywood has palette support and it certainly would be a nice feature.

Re: Hardware-Sprites on OCS/AGA

Posted: Sat Dec 04, 2021 10:08 pm
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

Re: Hardware-Sprites on OCS/AGA

Posted: Thu Dec 09, 2021 4:55 am
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.