English Amiga Board


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

 
 
Thread Tools
Old 21 January 2022, 23:24   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,168
displaying multiplexed sprites using the copper

I'm trying to do a dynamic star field using copper and 1 multiplexed sprite (with WAIT statements)

ATM I'm not even able to display ONE sprite

Part of copperlist:

Code:
 0000048c: 01ba 0f00            ;  COLOR29 := 0x0f00
 00000490: 01bc 00f0            ;  COLOR30 := 0x00f0
 00000494: 01be 0f00            ;  COLOR31 := 0x0f00
 00000498: 0178 9072            ;  SPR7POS := 0x9072
 0000049c: 017a a000            ;  SPR7CTL := 0xa000
 000004a0: 017c f0f0            ;  SPR7DATA := 0xf0f0
 000004a4: 017e 0ff0            ;  SPR7DATB := 0x0ff0

setting bright colors for last color registers, using sprite 7, setting at X=100, Y=100 (computer pos/ctl set in registers) then random pattern (dots in line) in data/datb.

And nothing is displayed except sprite artefacts after a while.

Can someone help? (sprite dma is on, and I'm familiar with the SPRPT way of displaying a sprite in the copperlist, but that doesn't multiplex)
jotd is offline  
Old 21 January 2022, 23:53   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Hi jotd, you mean that on the same line you also have a sprite where the data for DATA and B are fetched by the DMA and displayed in a x-position early than 100?

Then you have to make sure that the wait with the copper is in a later position in order to re-fill the sprite registers in an appropriate time.

Otherwise you risk not displaying anything or wrong parts.
ross is offline  
Old 22 January 2022, 00:34   #3
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
If this is like an old skool effect where you have stars moving horizontally, then you only set the sprite pointer and colors, and the rest is done by sprite dma while you manually (cpu) adjust sprite positions in multiplexed sprite data (each part is 1 line tall): pos/ctrl, 1 line data, pos/ctrl, 1 line data, ... pos/ctrl, 1 line data, 0, 0.
Or if you go manual mode, you only load data once (each star is the same?) and then multiplex pos/ctrl with copper while sprite dma is *off* (you mentioned you have it on).
If I correctly understand what you are trying to achieve...
a/b is offline  
Old 22 January 2022, 12:01   #4
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,168
Quote:
while sprite dma is *off*
that's the important part that I was doing wrong Yes, I want to do a stars effect. Not moving, just blinking. ATM I'm just trying to do a static stars effect. One dot, varying color, varying x and y

Now sprite dma is off (DMACON 03C0) but still nothing displayed

Code:
 00000490: 017c f0f0            ;  SPR7DATA := 0xf0f0
 00000494: 017e 0ff0            ;  SPR7DATB := 0x0ff0
 00000498: 01ba 0f00            ;  COLOR29 := 0x0f00
 0000049c: 01bc 00f0            ;  COLOR30 := 0x00f0

 000004a0: 01be 0f00            ;  COLOR31 := 0x0f00
 000004a4: 0178 9072            ;  SPR7POS := 0x9072
 000004a8: 017a a000            ;  SPR7CTL := 0xa000

Last edited by jotd; 22 January 2022 at 12:10.
jotd is offline  
Old 22 January 2022, 12:17   #5
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Do you have any bitplanes enabled? Sprites won't show unless you have at least one, or write to bplXdat in each rasterline to enable them.
a/b is offline  
Old 22 January 2022, 12:20   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Problem here is that SPR7CTL disarm the sprite.
Reverse the write and make SPR7DATA as the last in line.
(plus what a/b said)
ross is offline  
Old 22 January 2022, 12:46   #7
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,168
yeah, getting better now I have colored bars because sprite data should be zeroed the line after probably. thanks a lot!
jotd is offline  
Old 22 January 2022, 12:54   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by jotd View Post
..I have colored bars because sprite data should be zeroed..
Yep, zero it, disarm it or ..multiplex it as you like
(if you don't do it, every time the x position is reached on each line the sprite is re-displayed, hence the bar; Denise know nothing about the y position and so repeats the DATA/B over and over)
ross is offline  
Old 22 January 2022, 13:07   #9
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,168
by trial and error I will reach the required effect now. got a nive colored ladder already
jotd 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
Copper changing sprite pointers Muzza Coders. General 7 30 July 2021 13:58
Copper WAIT, copper SKIP and $80/$100 vpos problem defor Coders. Asm / Hardware 2 23 July 2021 08:32
Combining copper scrolling with copper background phx Coders. Asm / Hardware 16 13 February 2021 12:41
Sprite multiplexing & copper bars? E-Penguin Coders. Blitz Basic 6 22 December 2018 17:07
Best way to mix blitting with copper and copper effects roondar Coders. Asm / Hardware 3 12 September 2016 13:12

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 03:44.

Top

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