English Amiga Board


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

 
 
Thread Tools
Old 01 November 2021, 14:51   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
Sprites Multiplexing problem

I'm trying a classic Multiplexing sprites, by changing pointers into copperlist, but I'm getting some dirty pixel when sprites are displayed. My copperlist:

dc.w $3c01,$fffe ; copper wait
dc.w $0128,$0000 ; sprites pointers
dc.w $012a,$0000
dc.w $012c,$0000
dc.w $012e,$0000
dc.w $0150,$0000 ; sprxpos - sprxctlr
dc.w $0152,$0000
dc.w $0158,$0000
dc.w $015a,$0000

dc.w $4c01,$fffe ; copper wait
dc.w $0128,$0000 ; sprites pointers
dc.w $012a,$0000
dc.w $012c,$0000
dc.w $012e,$0000
dc.w $0150,$0000 ; sprxpos - sprxctlr
dc.w $0152,$0000
dc.w $0158,$0000
dc.w $015a,$0000

Do you have ever seen this problem?

sandruzzo is offline  
Old 01 November 2021, 15:53   #2
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
My first guess is that it looks like the Sprites are either also displaying the Sprite control words (meaning, the Sprite control words are not just set by you in the Copperlist, they're also part of the Sprite data you're pointing too) or the Sprite pointers are off by one line each. If this either turns out to be the problem, both should be fixable. The first by removing the control words from the Sprite data, the second by increasing the pointer values by 4.
roondar is offline  
Old 01 November 2021, 15:55   #3
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
@roondar

If I get rid of the first wait, all will be fine. Strange... I'll try to get rid of control word from sprites' pointers
sandruzzo is offline  
Old 01 November 2021, 15:58   #4
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
By getting rid of controls' words it works. Strange, since without coppers' waits all its ok. Learning never end!
sandruzzo is offline  
Old 01 November 2021, 16:06   #5
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Quote:
Originally Posted by sandruzzo View Post
By getting rid of controls' words it works. Strange, since without coppers' waits all its ok. Learning never end!
If you get rid of the Copper waits, the Sprite DMA will read the Sprite Control words itself. Basically, when multiplexing, you either need to set the Sprite Control words manually (usually using the Copper) and not have them in the Sprite data or have them in the Sprite data and not set them manually.

Combining both will lead to problems, as setting the control words manually using the Copper means the Sprite hardware will interpret the data it reads from memory as image data instead of control words.

Last edited by roondar; 01 November 2021 at 16:16.
roondar is offline  
Old 13 December 2021, 22:56   #6
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Amiga sprite behavior is special. I wrote an article to detail exactly how to treat them. It's the results of many hours of testing and should explain completely how to program sprites in both modes and what to expect.
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
Sprite multiplexing on Amiga majikeyric Coders. General 51 27 April 2023 11:06
Sprite multiplexing question mcgeezer Coders. Asm / Hardware 1 28 September 2021 14:01
Multiplexing sprites By changing pointers sandruzzo Coders. Asm / Hardware 17 26 August 2021 18:51
Multiplexing Using Vsprites Code Havie Coders. Blitz Basic 23 08 September 2019 21:37
AmiDevCpp - sprites problem milikabdp Coders. C/C++ 24 28 September 2017 14: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 21:52.

Top

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