27 August 2021, 17:17 | #41 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
I've a solution, using only sprites and no copper tricks or dual playfields or more colors:
Blinky (red) Pinky (pink) Inky (cyan) Clyde (orange) eyes: blu, white COLOR registers: 16 null 17 red 18 blue (normal +ATT) 19 white (normal +ATT) 20 cyan (null for Pinky) (+ATT) 21 pink 22 blue 23 white 24 black (+ATT) 25 black (+ATT) 26 black (+ATT) 27 black (+ATT) 28 orange (+ATT) 29 null 30 null 31 null sprite 0 Blinky sprite 1 black tunnel at right (ATT bit) sprite 2 Pinky sprite 3 null sprite 4/5 Inky (ATT bit) sprite 6/7 Clyde (ATT bit) So main idea: - use sprite 1, ATT=1, DATA=0, DATB=$FFFF, position right of screen (tunnel) - use sprite 4/5 and 6/7 as 16 colors sprites - COLOR24,25,26,27=0 to make Blinky disappears when 'overlaid'/'mixed' by the tunnel (other ghosts disappear in tunnel by sprites auto-priority) EDIT: but i guess this has nothing to do with sprite multiplexing, this question and answer should be moved to your Pacman thread Last edited by ross; 27 August 2021 at 17:46. |
27 August 2021, 19:05 | #42 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
|
I'm not too familiar with attached sprites but I get it now. It looks a lot like my original idea, only better
It's however complicated and non-symmetric. I'd have to redo everything sprite from the start, where it works perfectly now, except for that clipping part. I have enough CPU power to shift sprite images. Thanks anyway. Last edited by jotd; 27 August 2021 at 19:11. |
27 August 2021, 22:18 | #43 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Another way to do it would be to use one of your in game colours for the clipping, but horizontally change the colour to Black at the borders.
Geezer |
27 August 2021, 23:01 | #44 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
|
I was planning to do that, but problem is: the color I'm changing to black and which must be restored is variable too (depending on the enemy state). So I'm going to have to write to 16 words each time the enemy changes state (only the enemy using the other sprite though)
In the end, shifting the data is simple & generic. I'll go for that. |
12 April 2023, 11:44 | #45 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Due to a recent discussion I need confirmation for this statement again:
Quote:
How can such an unused DMA slot, which is on an even cycle, ever be used by the 68000? I don't get it... |
|
12 April 2023, 12:06 | #46 | ||
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
|
Quote:
Quote:
This is usually not permanent, as DMA sources tend to push the CPU back onto the 'odd' cycles shortly afterwards, but it's still possible. |
||
12 April 2023, 17:38 | #47 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
Quote:
|
||
12 April 2023, 18:01 | #48 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
The CPU cycle is 'delayed' only if Agnus requires it for its purposes. Odd cycles are usually the most used by DMA channels because they have priority in the fixed allocations (refresh, audio, disk, sprites, bitplanes..), but, for example, copper (or blitter or >4bpls) use possibly even cycles. So in the 'grand scheme' of bus usage, it doesn't really matter if the CPU requests a 'misaligned' cycle. EDIT: If I'm not mistaken this is one of the big differences between Amiga and AtariST (but I ask the ST experts for confirmation!) where what you said always happens. For instance, an instruction like lsl.w #4,d0is often two cycles faster on the Amiga . Last edited by ross; 12 April 2023 at 18:27. |
|
12 April 2023, 21:20 | #49 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
Thanks for the explanation. |
|
27 April 2023, 02:08 | #50 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Personally I've never used sprites, I usually have everything in memory and just use the blitter (I have a kind of multitasking interface for the blitter that I've developed).
|
27 April 2023, 10:25 | #51 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
This example only uses the bus for fetching the instruction, so how would it take longer on an ST? Is it because the following instruction is delayed to 2 cycles (for alignment), so it isn't actually this instruction that takes longer?
|
27 April 2023, 11:06 | #52 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Settlers sprite | zdechlak | project.Sprites | 1 | 02 March 2019 10:55 |
Best sprite scaling/Doom style engines on Amiga? | ImmortalA1000 | Amiga scene | 95 | 23 July 2018 00:17 |
Amiga Sprite/Tile Cross-Platform Software? | diablothe2nd | Amiga scene | 16 | 12 July 2013 17:29 |
sprite overscan | jamiejamie | Coders. General | 11 | 02 February 2011 16:59 |
DIWSTART and sprite | Camionsauro | Coders. Tutorials | 3 | 22 April 2009 13:24 |
|
|