English Amiga Board


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

 
 
Thread Tools
Old 29 March 2018, 10:42   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Sprites Issue

Hi All,

I'm trying to change sprites pointer during the screen via copper:

dc.w $0120,0000
dc.w $0122,0000
....
dc.w $af01,$fffe <- copper wait

dc.w $0120,0000
dc.w $0122,0000
....


Nothing seems to happens. Is that possible? Do I have to take care of somenthing in particular? I'm using Aga with burst at 64 bits

Thanks
sandruzzo is offline  
Old 29 March 2018, 12:15   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
If nothing happens your code to set the sprite pointer either isn't called at all or it is wrong or sprite DMA is not enabled! Make sure the code is called and check that the copperlist writes to the sprite pointers are done correctly.
StingRay is offline  
Old 29 March 2018, 12:21   #3
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Quote:
Originally Posted by StingRay View Post
If nothing happens your code to set the sprite pointer either isn't called at all or it is wrong or sprite DMA is not enabled! Make sure the code is called and check that the copperlist writes to the sprite pointers are done correctly.
All is fine!
sandruzzo is offline  
Old 29 March 2018, 12:27   #4
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
If I double spritex Y size, seems to work. I'm doing some more checks
sandruzzo is offline  
Old 29 March 2018, 20:58   #5
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
I don't know about AGA, but I did the same in an OCS project a few days ago. Did you forget to rearm the sprite 0 channel? Otherwise make sure the new pointer is loaded before the 0,0 control words are read, i.e. during the last line with sprite data, after the sprite's DMA slot (for example, hpos>=$38).
phx is offline  
Old 30 March 2018, 18:44   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
Well, many time a proper pre-made sprite list in memory suffice.
But in fact a 'gapless' multiplexed sprites engine or something really dynamic could require copper list tampering
ross is offline  
Old 31 March 2018, 17:47   #7
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
What the other guys said. Having a second sprite below another using the same channel(s) is called multiplexing, and the hardware can automatically chain sprites like you want to do without have to reinitialize. If it fits your purpose, you can replace the dc.w 0,0 after the sprite data with the next sprite's control words, sprite data and dc.w 0,0.
Photon is offline  
Old 01 April 2018, 08:14   #8
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Quote:
Originally Posted by Photon View Post
What the other guys said. Having a second sprite below another using the same channel(s) is called multiplexing, and the hardware can automatically chain sprites like you want to do without have to reinitialize. If it fits your purpose, you can replace the dc.w 0,0 after the sprite data with the next sprite's control words, sprite data and dc.w 0,0.
Thnaks. I know how they works, but i needed to change sprites pointers
sandruzzo is offline  
Old 01 April 2018, 17:43   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
Yep, there are many reasons why the built-in chaining is not optimal, the biggest one is that you sometimes have to copy spritedata to chain them, which sort of defeats its purpose

I think Phx answered your question. Likely sprite DMA has been turned off before you load the pointers, so you must set the sprite DMA bit in DMACON.

If it hasn't turned off, you must turn it off, wait a scanline, and then set the bit.
Photon 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
Some sprites Frog project.Sprites 6 22 August 2022 20:01
Aga Sprites Attached issue sandruzzo Coders. Asm / Hardware 11 28 April 2016 14:17
amiga computing vol 2 issue 1 (issue 13 anyone) Mort request.Other 0 30 November 2010 11:27
Pang sprites qtelSparrow project.Sprites 3 12 March 2010 22:10
Where are all the sprites? Gambit37 project.Sprites 8 14 October 2005 14:49

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 01:33.

Top

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