29 July 2015, 18:13 | #1 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Reuse sprite, attached and unattached
Is it possible to create an unattached sprite with the copper at the beginning of a line, followed by the same sprite (and its companion sprite) at the end of a line, but this time attached?
Example (single line): Sprite 6 (4col) at xpos=16. Sprite 6 and 7 (16col) at xpos=248. In my game the DMA for sprite 6 and 7 is not available anyway, so I always write their SPRxPOS and SPRxDAT with the copper. For the example line I hope to use the following sequence: SPR6POS,SPR6DATA,SPR6DATB,WAIT(after Spr6 is displayed),SPR6CTL,SPR7CTL,SPR6POS,SPR6DATA,SPR6DATB,SPR7POS,SPR7DATA,SPR7DATB Sprite 6 and 7 don't have an attached bit set before this line. Now I set it with SPR7CTL in the middle of the line. I know that an access to the control register disables the sprite. But writing to SPRxPOS and SPRxDAT arms it again, right? Could that ever work? |
29 July 2015, 20:46 | #2 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Don't know the answer off the top of my head - sorry - but... this would seem like a good candidate for just trying it and seeing what happens. Nothing worse than "nope, that didn't work" could possibly await
|
29 July 2015, 20:54 | #3 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
PMC, are you back or am I imagining this?
phx, I agree with PMC. I think it will probably work |
29 July 2015, 21:01 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Not answering the question, not sure but it probably works but what about simply keeping attach bit always enabled and adjust palette to match changed "not actually attached" sprites' palette selection? (If possible, it reduces number of unique sprite colors)
|
29 July 2015, 23:14 | #5 | |
Registered User
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
|
I bet it works, but you have to try! ;-)
Quote:
|
|
30 July 2015, 11:57 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Ok, so I have to try that. Just wanted to know about my chances before doing so, because it needs some work to prepare all the code and graphics.
I already had the same idea, but as far as I understand sprite 7 will no longer use the same colours as sprite 6 in such a case. And I need these two sprites in other locations on the screen with their common colours. |
02 August 2015, 20:29 | #7 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
FYI, it works!
|
02 August 2015, 23:42 | #8 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Yes!
|
03 August 2015, 12:58 | #9 |
Registered User
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
|
very good!
I win my bet! :-) Which is my reward? An A3000T ? :-) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga Coverdisks - How were they attached? | bill-rhit | Nostalgia & memories | 23 | 13 February 2013 17:08 |
Minimising attached picture size | mark_k | project.EAB | 1 | 03 February 2013 21:12 |
Identify attached module | absence | request.Modules | 7 | 12 August 2012 23:45 |
WinUAE 2.4.1 does not boot with attached HD anymore | Jasmin68k | support.WinUAE | 9 | 18 June 2012 09:31 |
Attached sprite coming out 8 pixels wide (UAE) | korruptor | Coders. General | 8 | 17 January 2008 09:04 |
|
|