English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 08 August 2022, 20:08   #1
Crank
Registered User

 
Join Date: Mar 2018
Location: Prague
Posts: 35
Sprite behavior when they are in the same location (memory bandwidth vs. limitations)

What happens if all the Amiga's spites are in the same location?

As sprites are drawn while the scanline is drawn across the monitor, there's only a limited amount of memory bandwidth per pixel to fetch all the pixel data for all the sprites over that pixel. Surely there isn't enough memory bandwidth to draw all the sprites into same location at the same time?

You can't even optimize it so that non-visible pixels are left out, because you first need to fetch the pixels to see if there is transparent color or not. So worst case you need to fetch all the sprite's pixels for a pixel on screen.

So what does Amiga do in that situation?
Crank is offline  
Old 08 August 2022, 20:38   #2
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 675
Sprite data is fetched before visible screen area (in each rasterline) in a predetermined order, there's no conflict between sprites no matter how many are active.
http://amigadev.elowar.com/read/ADCD.../node02D4.html
a/b is online now  
Old 08 August 2022, 20:39   #3
paraj
Registered User

 
Join Date: Feb 2017
Location: Denmark
Posts: 374
Sprite data is read if it it's needed (and there's enough DMA bandwidth) outside the display area (usually) and stored in the relevant custom chip for super fast access - not on demand. After that it's available "immediately" to the display hardware when the screen is being displayed, and the stuff you can read about in the HRM applies (e.g. priority with regards to bitplanes/to each other).

Last edited by paraj; 08 August 2022 at 20:49. Reason: simultaneous post with a/b, nothing new
paraj is offline  
Old 08 August 2022, 21:02   #4
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 52
Posts: 3,824
Quote:
Originally Posted by Crank View Post
.., there's only a limited amount of memory bandwidth per pixel to fetch all the pixel data for all the sprites over that pixel.
Actually the hw in the Amiga (Denise) that displays the sprites doesn't even have access to the memory

It simply checks if the (horizontal) position of the electron beam corresponds to that present in its registers.
If yes, then it proceeds to pass the data (of its internal sprite data registers) to the shifter that takes care of the visualization (together with the bitplanes, and with the relative priority) of the single pixels on the screen.

Denise does not care who and when the sprite data registers are 'filled', it simply passes the data to the shifter for each beam match and can do it multiple times per line for the same sprite.

Normally and for speed of execution the filling data task is left to the DMA controller in Agnus, which can do it at most once per sprite per line, if there are no other higher priority channels that require its use (for example bitplanes DMA).
But, always normally, in the case of screens without overscan, it does so in video positions with no visible data.

However, nothing prevents the CPU or Copper from filling (at least in OCS and ECS) the sprite data registers at any time (or that the position registers being modified).
This allows horizontal multiplexing of sprites. All of these operations are obviously time-sensitive.

That's all
ross is offline  
Old 08 August 2022, 21:12   #5
Crank
Registered User

 
Join Date: Mar 2018
Location: Prague
Posts: 35
Thanks! Makes sense!
Crank is offline  
Old 10 August 2022, 19:07   #6
Crank
Registered User

 
Join Date: Mar 2018
Location: Prague
Posts: 35
Is there a way to make the sprites pixels double sized? I.e each sprite pixels would be 2x2 on screen, giving 32x32 pixel size on screen for the 16x16 sprite.
Crank is offline  
Old 10 August 2022, 19:13   #7
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 675
Nope, there is no hardware feature equivalent to the C64 double size sprites.
a/b is online now  
Old 13 August 2022, 10:03   #8
Crank
Registered User

 
Join Date: Mar 2018
Location: Prague
Posts: 35
Damn.
Crank is offline  
Old 14 August 2022, 03:29   #9
AmigaHope
Registered User
 
Join Date: Sep 2006
Location: New Sandusky
Posts: 907
Quote:
Originally Posted by a/b View Post
Nope, there is no hardware feature equivalent to the C64 double size sprites.
I mean, that's essentially what you're doing with 35ns/70ns/140ns sprites in AGA. There's just no options for 280ns sprites.
AmigaHope 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
Sprite priority limitations Muzza Coders. Asm / Hardware 19 30 August 2021 18:27
PPC PCI memory limitations matt3k support.Hardware 1 08 November 2020 17:09
Search and change memory location using action replay perky416 New to Emulation or Amiga scene 3 19 August 2015 11:43
2 questions: Not used DFFxxx location Copper behavior and Indivision ECS registers pandy71 Coders. Asm / Hardware 2 13 January 2015 14:13
Chipmem bandwidth question. Thorham Coders. General 8 16 December 2009 00:31

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 17:19.


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