English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 27 October 2019, 17:16   #1
Jack Burton
It's all in the reflexes!
 
Jack Burton's Avatar
 
Join Date: Nov 2009
Location: Wingkong warehouses
Posts: 206
OCS/ECS 16 colors sprites

Hi,

I've a question about (OCS/ECS) sprites.

OCS/ECS allows to link 2 4-colors sprites to form 1 16-colors sprite.
If we join all these 16-colors sprites together we can create a "large" 64 pixel wide sprite.

But, can we freely use all the 15 colors (from 16-31) for this 64 pixels sprite or are there some constraints (like some colors only available to some sprites) ?
Jack Burton is offline  
Old 27 October 2019, 17:39   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
There are only constraints for 4-colour sprites. All attached 15-colour sprites use the same COLOR17-31 registers.
phx is offline  
Old 28 October 2019, 10:39   #3
Jack Burton
It's all in the reflexes!
 
Jack Burton's Avatar
 
Join Date: Nov 2009
Location: Wingkong warehouses
Posts: 206
Quote:
Originally Posted by phx View Post
There are only constraints for 4-colour sprites. All attached 15-colour sprites use the same COLOR17-31 registers.

Thanks for your answer. I thought that even in 16 colors mode some restrictions remained. And BTW 16 colors sprites should be perfectly useable with a 16 colors sliced screen I guess.
Jack Burton is offline  
Old 28 October 2019, 11:24   #4
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Yup, they are. It's (IMHO) one of the many ways in which you can see that the Amiga OCS chipset was clearly optimised for using 16 colour/4 bitplane screen modes.

16 colour sprites are also a good match for Dual Playfield modes (for both OCS/ECS and AGA). They can help add a splash of extra colour in those modes.
roondar is offline  
Old 28 October 2019, 14:15   #5
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
If you want to see just what can be done with sprites, then Codetapper's website has some good examples of practical usage:

https://codetapper.com/amiga/sprite-tricks/
DanScott is offline  
Old 30 October 2019, 19:42   #6
Jack Burton
It's all in the reflexes!
 
Jack Burton's Avatar
 
Join Date: Nov 2009
Location: Wingkong warehouses
Posts: 206
Quote:
Originally Posted by roondar View Post
Yup, they are. It's (IMHO) one of the many ways in which you can see that the Amiga OCS chipset was clearly optimised for using 16 colour/4 bitplane screen modes.

16 colour sprites are also a good match for Dual Playfield modes (for both OCS/ECS and AGA). They can help add a splash of extra colour in those modes.
Yes, in fact the Amiga architecture has some interesting features, on a 16 colors screen it's possible to add 15 more colors with sprites and add even more colors with the copper ending with a quite colorful screen if done carefuly, and all of this still being in a 16 colors screen mode !

Regrettably there isn't any OCS/ECS paint program supporting a sliced mode (like Photochrome on the Atari ST), which is strange since the copper should do this pretty easily...

A personal solution consists in using the 256 colors mode (out of a 4096 palette) with Brilliance and then counting the number of colors per lines (blocks of 8 lines in fact) which can be somewhat laborious.

BTW a CLI program which can count colors per line would be an interesting option to check if the number of colors used do not exceed the limit.
Jack Burton is offline  
Old 30 October 2019, 19:42   #7
Jack Burton
It's all in the reflexes!
 
Jack Burton's Avatar
 
Join Date: Nov 2009
Location: Wingkong warehouses
Posts: 206
Quote:
Originally Posted by DanScott View Post
If you want to see just what can be done with sprites, then Codetapper's website has some good examples of practical usage:

https://codetapper.com/amiga/sprite-tricks/

Thanks for the link !
Jack Burton is offline  
Old 31 October 2019, 00:55   #8
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Quote:
Originally Posted by DanScott View Post
If you want to see just what can be done with sprites, then Codetapper's website has some good examples of practical usage:

https://codetapper.com/amiga/sprite-tricks/
I read through a lot of that recently. And I was like "omg I've never even turned on sprite dma, I need to learn!!!"
Antiriad_UK is offline  
Old 31 October 2019, 02:15   #9
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
Probably best usage of hardware sprites ever on an OCS/ECS game:

[ Show youtube player ]
Shatterhand is offline  
Old 31 October 2019, 08:48   #10
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
Yeah, first off Amiga sprites seem to be shitty, but when you research a bit about them it's nice with the all kinds of stuff you can do with them...

You need to think of them as little helpers instead of being the main actors, like they are on the C64.
Tigerskunk is offline  
Old 31 October 2019, 08:53   #11
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
Quote:
Originally Posted by Jack Burton View Post
Yes, in fact the Amiga architecture has some interesting features, on a 16 colors screen it's possible to add 15 more colors with sprites and add even more colors with the copper ending with a quite colorful screen if done carefuly, and all of this still being in a 16 colors screen mode !

Regrettably there isn't any OCS/ECS paint program supporting a sliced mode (like Photochrome on the Atari ST), which is strange since the copper should do this pretty easily...

A personal solution consists in using the 256 colors mode (out of a 4096 palette) with Brilliance and then counting the number of colors per lines (blocks of 8 lines in fact) which can be somewhat laborious.

BTW a CLI program which can count colors per line would be an interesting option to check if the number of colors used do not exceed the limit.
This so much...
I was thinking lately about how to create a proper Amiga painting program that incorporates Copper color switches.

Not an easy task, though..
Tigerskunk is offline  
Old 01 November 2019, 08:45   #12
EmilAmiga90
Registered User
 
Join Date: Sep 2018
Location: Rome / Italy
Posts: 22
Quote:
Originally Posted by Steril707 View Post
Yeah, first off Amiga sprites seem to be shitty, but when you research a bit about them it's nice with the all kinds of stuff you can do with them...

You need to think of them as little helpers instead of being the main actors, like they are on the C64.
Impressive (and really noisy)

Probably a little off topic but I am thinking: since games like this one use vertical scrolling and HAM is compatible with both vertical scrolling an sprites, perhaps it could be interesting to try programming something like that with HAM. Obvious drawback is that blitter will have a lot less cycles, that would proably mean less BOBs, smaller and less colorful... But sprites could still be used as if it were a regular 16 colours mode screen

Anyway, I wonder if the result is worth the effort. Gameplay will not be ennanced, I suppose.
EmilAmiga90 is offline  
Old 01 November 2019, 09:48   #13
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Gameplay can be brilliant even for 160x100 monochrome graphics

Anyway, what you're describing is essentially a kind of 'Hyper Hybris' (which is a game that uses only sprites for all the enemies on screen). The only trouble would be the player ship/bullets. Might get tricky to do well.
roondar is offline  
Old 01 November 2019, 15:11   #14
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
Quote:
Originally Posted by Steril707 View Post
Yeah, first off Amiga sprites seem to be shitty, but when you research a bit about them it's nice with the all kinds of stuff you can do with them...

You need to think of them as little helpers instead of being the main actors, like they are on the C64.
Can I say I still think the are kinda shitty?

I know the Amiga was built to use the Blitter as its main source of graphics, but if we had 16 sprites with 16 colors "free" for using per scanline (Or maybe even just 8) it would make such a HUGE difference for gaming development.... even if they were just 16 pixels wide.

Even if you want to use the 8 sprites with 4 colors, their color distribution is kinda silly.
Shatterhand is offline  
Old 01 November 2019, 19:19   #15
EmilAmiga90
Registered User
 
Join Date: Sep 2018
Location: Rome / Italy
Posts: 22
Quote:
Originally Posted by roondar View Post
Gameplay can be brilliant even for 160x100 monochrome graphics
I recall a Speedy Gonzales game on Game Boy and is perhaps the most enjoyable gameplay to me

Quote:
Originally Posted by roondar View Post
Anyway, what you're describing is essentially a kind of 'Hyper Hybris' (which is a game that uses only sprites for all the enemies on screen). The only trouble would be the player ship/bullets. Might get tricky to do well.
Thank you. I completely forgot that BOBs are almost unusable with HAM. An interesting chore would be to code a routine capable of displaying BOBs on HAM screen (with fringes, of course)

Quote:
Originally Posted by Shatterhand View Post
Can I say I still think the are kinda shitty?

I know the Amiga was built to use the Blitter as its main source of graphics, but if we had 16 sprites with 16 colors "free" for using per scanline (Or maybe even just 8) it would make such a HUGE difference for gaming development.... even if they were just 16 pixels wide.

Even if you want to use the 8 sprites with 4 colors, their color distribution is kinda silly.
Indeed is quite a big limit. Anyway, I wonder how the DMA could have been arranged to allocate more sprites. Perhaps the logic could be sorta the bitplane DMA: the extra 8 sprites could steal some cycles from the CPU.
EmilAmiga90 is offline  
Old 01 November 2019, 19:25   #16
EmilAmiga90
Registered User
 
Join Date: Sep 2018
Location: Rome / Italy
Posts: 22
Speaking of DMA. Sprites use the odd cycles. Blitter usually steals even cycles to the 68000.

Does anyone know if Blitter can get odd cycles that are not being used by other devices?

For example, a 320 x 200 lowres 8 colours screen would cause 20 display DMA slots to be unused (odd slots). Could the blitter use those free odd slots?
EmilAmiga90 is offline  
Old 02 November 2019, 01:21   #17
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
It will ask for every single cycle, odd and even. DMA manager will then decide who gets it based on priority level (and CPU exception rule in regard to blitter).
a/b is offline  
Old 02 November 2019, 08:15   #18
EmilAmiga90
Registered User
 
Join Date: Sep 2018
Location: Rome / Italy
Posts: 22
Quote:
Originally Posted by a/b View Post
It will ask for every single cycle, odd and even. DMA manager will then decide who gets it based on priority level (and CPU exception rule in regard to blitter).
Good to know. I supposed it but I was not sure. Thank you.
If I recall well, CPU gets one cycle every four if blitter_nasty if not set?
EmilAmiga90 is offline  
Old 02 November 2019, 15:08   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by EmilAmiga90 View Post
If I recall well, CPU gets one cycle every four if blitter_nasty if not set?
Sort of.

If blitter is active and CPU has waited at least 4 cycles (All cycles count, it does not need to be blitter cycle), CPU is guaranteed to get next blitter cycle.
Toni Wilen is offline  
Old 04 November 2019, 12:08   #20
Jack Burton
It's all in the reflexes!
 
Jack Burton's Avatar
 
Join Date: Nov 2009
Location: Wingkong warehouses
Posts: 206
Quote:
Originally Posted by Steril707 View Post
Yeah, first off Amiga sprites seem to be shitty, but when you research a bit about them it's nice with the all kinds of stuff you can do with them...

You need to think of them as little helpers instead of being the main actors, like they are on the C64.


Yes, it's something that seems often misunderstood particularly when you see comments comparing the Amiga with consoles likes Megadrive, PCE, etc. and complaining about the so-called Amiga's weaknesses in term of sprites and gaming capabilities. IMHO the Amiga has a so unusual architecture philosophy that it can't really be compared with other gaming machines.

I understand one can find Amiga's sprites shitty, but as far as I'm concerned, it's a secondary problem. You can have zillions of objects moving on screen, that won't necessarily make a good game if the gameplay is neglected. Better focus on gameplay. My main gaming machine is my MSX2+ and frankly despite having a lower resolution, less colors on screen and sometimes not even scrolling, MSX2 games are far more enjoyable, deeper and have better gameplay than many Amiga games which display a lot more : sprites/BOBs, colors, resolution, parallax, etc. etc.

(I wish I could play Amiga versions of games like Penguin Adventure, Maze of Galious, F1 Spirit, Aleste 2, Vampire Killer, (SD) Snatcher, Undead Line, Ys 1/2/3, etc. which should be technically doable on an OCS Amiga.)

So a good use of hardware sprites on the Amiga, although being rather limited, can add a lot if used properly, like you said they are valuable little helpers.


Well, it was just my 2 cents of course.
Jack Burton is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ECS and OCS antonvaltaz Amiga scene 41 12 December 2023 19:44
To AGA or to OCS/ECS... bitter Coders. Asm / Hardware 6 02 December 2018 07:06
How to know if A500 is OCS or ECS? Sim085 support.Hardware 17 19 August 2018 05:25
SetCol/DoColl-How to test collisions with different sprites against different colors? Shatterhand Coders. Blitz Basic 1 12 January 2017 18:51
Need some help about specs of OCS Sprites please ImmortalA1000 Amiga scene 15 01 November 2013 13:02

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 15:46.

Top

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