English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 09 March 2016, 20:23   #1
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 47
Posts: 1,967
How did Amiga sprites work?

I'm going by the supposition that Jay Miner based his Amiga sprite hardware on the Atari 8-Bit series of computers, but more advanced, of course. So these sprites would've been the full height of the screen, were 16 colours and 16 pixels wide for OCS/ECS.

However, I don't know if sprites could be combined or not or how they were manipulated vertically (was a nightmare for players and missiles on A8, that's for sure!)

Other things are: what palette did the sprites use? From my own experience it seems to be the main colour palette for the bitplane graphics. And what about AGA sprites? I heard they were 64 pixels wide, but that sounds nuts! And how many colours?

This is the thing that I'm lacking info on about Amiga hardware, but then it's hard to tell which are the sprites and which are bobs or blitter objects.

Are there any demos that specifically show off sprites on Amiga, in both OCS/ECS and AGA?
Foebane is offline  
Old 09 March 2016, 20:29   #2
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Sunny Bournemouth, UK
Posts: 626
There are 8 hardware sprites

Each is 16 pixels wide, by unlimited height, in 4 colours (3+transparent)

Sprites 1&2 take their palette from Colours 16,17,18,19 (16 is ignored.. transparent)
Sprites 3&4 take their palette from Colours 20,21,22,23 (20 is ignored.. transparent)
Sprites 5&6 take their palette from Colours 24,25,26,27 (24 is ignored.. transparent)
Sprites 7&8 take their palette from Colours 28,29,30,31 (16 is ignored.. transparent)

2 sprites can be combined, by setting their positions to the same place, and setting the "attach" bit in the control word. This gives you a 16 colour sprite that uses from colours 16 to 31 (although again, 16 is treated as transparent)

If you search on google for "Amiga Hardware Sprites", you will easily find the Hardware Reference Manual official information on how they all work
DanScott is offline  
Old 09 March 2016, 20:30   #3
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Sunny Bournemouth, UK
Posts: 626
Here you go

http://amigadev.elowar.com/read/ADCD.../node00AE.html


There are of course some tricks you can do, using the copper (for example) to write new X positions, and data for a sprite, thereby reusing it across the screen.

Codetappers webpage explains how this was done in a selection of games:

http://www.codetapper.com/amiga/sprite-tricks/
DanScott is offline  
Old 09 March 2016, 20:58   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 23,888
Most AGA only sprite features:

- AGA sprites can be 32 pixel or 64 pixel wide (all sprites share same size).
- AGA sprites also support hires and superhires resolutions (all sprites share same resolution).
- Sprites can be visible in borders (=no bitplanes active). Also possible in OCS/ECS with BPL1DAT copper hack, with some restrictions.
- Sprite palette start offset can be moved (from OCS/ECS only offset=16) in 16 color steps. (0, 16, 32, 48, .. , 240). Separate setting for odd and even sprites.
- Sprite can be vertically doubled (Sprite scan doubling)
- Sprite can appear twice in same horizontal scanline without using copper tricks. (Side-effect of a bit hacky scan doubling implementation, very limited but can be used for some background sprite effects)

All AGA sprite features are 100% independent from bitplane resolution.
Toni Wilen is online now  
Old 12 March 2016, 20:27   #5
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 47
Posts: 1,967
Quote:
Originally Posted by Toni Wilen View Post
- Sprite can be vertically doubled (Sprite scan doubling)
As in interlace graphics modes? I always wondered about that.

Quote:
All AGA sprite features are 100% independent from bitplane resolution.
I figured that already, noticing a big lo-res mouse pointer in hi-res graphics modes in WB back in the day on my A1200. But I didn't know both sprites and regular graphics could achieve the same resolutions.

If Amiga sprites have vertical positions as well as horizontal positions, then how is that possible when the sprites are capable of being as much as 256 pixels vertical (the height of the screen) and just 16 bits wide?

And if they're NOT capable of that height, then what's the deal with those glitchy graphical corruptions that sometimes span the top and bottom of the screen, usually loading demos?
Foebane is offline  
Old 12 March 2016, 21:18   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 23,888
Quote:
Originally Posted by Foebane View Post
As in interlace graphics modes? I always wondered about that.
It was meant for doublescanned modes where each bitplane line was doubled for VGA monitor compatibility. (WB monitor drivers like "Multiscan", "DBLPAL", "DBLNTSC")

Quote:
If Amiga sprites have vertical positions as well as horizontal positions, then how is that possible when the sprites are capable of being as much as 256 pixels vertical (the height of the screen) and just 16 bits wide?
Height is "unlimited".

Each sprite has only 2 available DMA slots/scanline. Single slot can transfer 16 bits from chip RAM (OCS/ECS). AGA has 32-bit data bus and can do 2 data transfers/DMA cycle which enables 32 pixel/64 pixel wide sprites. (EDIT: 2 slots because single sprite is made from 2 planes = 4 colors)

Quote:
And if they're NOT capable of that height, then what's the deal with those glitchy graphical corruptions that sometimes span the top and bottom of the screen, usually loading demos?
You mean random, corrupted 16-pixel wide sprites with random height appearing and disappearing? Usual cause is enabled sprite DMA (or more like someone forgot to disable sprite DMA..) without setting valid sprite pointers.

Last edited by Toni Wilen; 13 March 2016 at 10:54.
Toni Wilen is online now  
Old 22 April 2016, 13:59   #7
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,813
Quote:
Originally Posted by Toni Wilen View Post
Most AGA only sprite features:

- AGA sprites can be 32 pixel or 64 pixel wide (all sprites share same size).
- AGA sprites also support hires and superhires resolutions (all sprites share same resolution).
- Sprites can be visible in borders (=no bitplanes active). Also possible in OCS/ECS with BPL1DAT copper hack, with some restrictions.
- Sprite palette start offset can be moved (from OCS/ECS only offset=16) in 16 color steps. (0, 16, 32, 48, .. , 240). Separate setting for odd and even sprites.
- Sprite can be vertically doubled (Sprite scan doubling)
- Sprite can appear twice in same horizontal scanline without using copper tricks. (Side-effect of a bit hacky scan doubling implementation, very limited but can be used for some background sprite effects)

All AGA sprite features are 100% independent from bitplane resolution.
I've heard many time about scan doubling, ho it can be used to boost if it's possible aga capability?
sandruzzo is online now  
Old 27 May 2017, 02:02   #8
Michael Parent
Registered User
 
Join Date: Oct 2009
Location: Vannes France
Posts: 43
Do you know if there's any possible copper type trick to repeat sprites across the entire screen like with ECS Amiga's (aside from the ability to clone it once at 256 pixels farther to the right)? Without that ability, in a scrolling game, creating a back layer going across the entire screen is impossible, as there would be a 64 pixel gap between each repeat of the sprite pattern.

Also, I have a vague memory about sprites being set wider at by making its pixels twice as wide. Am I confused, was that for the c64? When you set all sprites to 64 pixels wide, do you still have 8 per scan line and are their pixels not horizontally doubled?


Quote:
Originally Posted by Toni Wilen View Post
Most AGA only sprite features:

- AGA sprites can be 32 pixel or 64 pixel wide (all sprites share same size).
- AGA sprites also support hires and superhires resolutions (all sprites share same resolution).
- Sprites can be visible in borders (=no bitplanes active). Also possible in OCS/ECS with BPL1DAT copper hack, with some restrictions.
- Sprite palette start offset can be moved (from OCS/ECS only offset=16) in 16 color steps. (0, 16, 32, 48, .. , 240). Separate setting for odd and even sprites.
- Sprite can be vertically doubled (Sprite scan doubling)
- Sprite can appear twice in same horizontal scanline without using copper tricks. (Side-effect of a bit hacky scan doubling implementation, very limited but can be used for some background sprite effects)

All AGA sprite features are 100% independent from bitplane resolution.
Michael Parent is offline  
Old 27 May 2017, 05:15   #9
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,443
Send a message via Yahoo to Samurai_Crow
Quote:
Originally Posted by Michael Parent View Post
Do you know if there's any possible copper type trick to repeat sprites across the entire screen like with ECS Amiga's (aside from the ability to clone it once at 256 pixels farther to the right)? Without that ability, in a scrolling game, creating a back layer going across the entire screen is impossible, as there would be a 64 pixel gap between each repeat of the sprite pattern.

Also, I have a vague memory about sprites being set wider at by making its pixels twice as wide. Am I confused, was that for the c64? When you set all sprites to 64 pixels wide, do you still have 8 per scan line and are their pixels not horizontally doubled?
Rearming the sprites during the display portion of the screen for horizontal multiplexing takes enough time out of the Copper list that the sprites cannot be tiled side by side. Reusing the image data so it repeats every 4 sprites is cheaper and can be done.

BTW, good to hear from you again!
Samurai_Crow is offline  
Old 27 May 2017, 09:19   #10
Michael Parent
Registered User
 
Join Date: Oct 2009
Location: Vannes France
Posts: 43
Hi Samual_Crow. It's great to reconnect with you too. I'm not sure I understand your answer. Are you verifying AGA can not ever tile 64 pixel wide 16 color sprites across the screen and also have horizontal screen scrolling?

Do we lose a sprite if we want hardware scrolling, which would leave the possibility for three 16 color sprites (X64 pixels=192) and one 3 color sprite (X64 pixels) which is a total of 256 pixels (4 sprites) so theoretically, for a full screen back "playfield" created with sprites, it would have to be made entirely out of 3 color sprites or 3 16 color sprites with 1 3 color sprite for one 64 pixel column?

Another question: Do Risky Woods and Jim power run properly on AGA Amiga's? If so, how?

Thanks for your time and knowledge

Quote:
Originally Posted by Samurai_Crow View Post
Rearming the sprites during the display portion of the screen for horizontal multiplexing takes enough time out of the Copper list that the sprites cannot be tiled side by side. Reusing the image data so it repeats every 4 sprites is cheaper and can be done.

BTW, good to hear from you again!
Michael Parent is offline  
Old 27 May 2017, 16:28   #11
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,443
Send a message via Yahoo to Samurai_Crow
AGA can but ECS only reuses the sprite image data because there is not time for the Copper to reload new image data and also move the sprite in 16 pixels' time.

On AGA it is another story. The manual mode of feeding data into the sprite with the Copper can't happen but sprites can be duplicated horizontally by abusing the scan double circuit to make each sprite appear twice on the same row of pixels. As such, three page-fetched sprites can cover the screen width if they're low resolution. (Page fetch mode is the one with 64 pixel wide sprites.)

Last edited by Samurai_Crow; 27 May 2017 at 16:38.
Samurai_Crow is offline  
Old 29 May 2017, 16:24   #12
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,751
Quote:
Originally Posted by Michael Parent View Post
Also, I have a vague memory about sprites being set wider at by making its pixels twice as wide. Am I confused, was that for the c64?
I can't remember if the C64 had that as well, but there was definitely a sprite pixel width setting on the Atari 8-bits, where you defined a sprite as being x1, x2 or x4 width, doubling or quadrupling the pixels in the sprite. It was used to good? effect in Frogger and the likes.
Quote:
When you set all sprites to 64 pixels wide, do you still have 8 per scan line and are their pixels not horizontally doubled?
No, the pixels are still 1:1 at 64 pixels wide, and you still have eight sprites, but from memory I think the display width has to be reduced to be able to use them all at once.
Daedalus is online now  
Old 29 May 2017, 16:31   #13
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,443
Send a message via Yahoo to Samurai_Crow
Quote:
Originally Posted by Daedalus View Post
I can't remember if the C64 had that as well, but there was definitely a sprite pixel width setting on the Atari 8-bits, where you defined a sprite as being x1, x2 or x4 width, doubling or quadrupling the pixels in the sprite. It was used to good? effect in Frogger and the likes.

No, the pixels are still 1:1 at 64 pixels wide, and you still have eight sprites, but from memory I think the display width has to be reduced to be able to use them all at once.
C64 had 2 modes for sprites high resolution and multicolor. The multicolor mode had half the resolution. Also you could double the pixel dimensions horizontally or vertically in each mode.

The only reason you need to narrow the display on AGA page mode was for the scroll offsets of the playfields. Sprites could globally be super high resolution, high resolution or low resolution. This was a pixel doubler or quadrupler relative to the AGA 1280x200 super high resolution mode.
Samurai_Crow is offline  
Old 29 May 2017, 16:41   #14
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,751
Quote:
Originally Posted by Samurai_Crow View Post
The only reason you need to narrow the display on AGA page mode was for the scroll offsets of the playfields.
Hmmm, that must be what I'm remembering so.

Quote:
Sprites could globally be super high resolution, high resolution or low resolution. This was a pixel doubler or quadrupler relative to the AGA 1280x200 super high resolution mode.
Yes, true - that's multiplying the width, but that's independent of the width of the sprite image data, which is still 16, 32 or 64 pixels.
Daedalus is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programs to do sprites/palletes for Amiga on PC Shatterhand support.Apps 2 05 December 2015 23:42
Amiga Game Sprites? Dreedo request.Other 2 30 November 2011 19:47
Need Help with Sprites and Amiga Imaging Software XDelusion support.Apps 0 17 September 2011 00:59
Game for WM2003/2005 to come with Amiga Sprites astuermer Retrogaming General Discussion 10 07 April 2006 21:27
Amiga sprites restoration project Jim project.Sprites 385 03 April 2005 00:23

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.13303 seconds with 13 queries