21 January 2022, 23:24 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,200
|
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) |
21 January 2022, 23:53 | #2 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
|
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. |
22 January 2022, 00:34 | #3 |
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... |
22 January 2022, 12:01 | #4 | |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,200
|
Quote:
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. |
|
22 January 2022, 12:17 | #5 |
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.
|
22 January 2022, 12:20 | #6 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
|
Problem here is that SPR7CTL disarm the sprite.
Reverse the write and make SPR7DATA as the last in line. (plus what a/b said) |
22 January 2022, 12:46 | #7 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,200
|
yeah, getting better now I have colored bars because sprite data should be zeroed the line after probably. thanks a lot!
|
22 January 2022, 12:54 | #8 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
|
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) |
22 January 2022, 13:07 | #9 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,200
|
by trial and error I will reach the required effect now. got a nive colored ladder already
|
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 |
|
|