![]() |
![]() |
#1 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Re-using AGA sprites on the same scanline?
Hi,
In this post here Toni references that AGA sprites can be re-used on the same scan line. "Sprite can appear twice in same horizontal scanline without using copper tricks. (Side-effect of a bit hacky scan doubling implementation, very limited but can be used for some background sprite effects)" Does anyone (including Toni) have any further info on how to exploit this as I'm keen on using some sprites for a background effect. Geezer |
![]() |
![]() |
#2 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Hi Graeme, you need to set SSCAN2 (bit 15) on FMODE.
Then when you set SH10 (bit7) in SPRxPOS, horizontal coincidence detection is for both x positions (SH10 = 0 or 1). |
![]() |
![]() |
#3 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
![]() |
![]() |
#4 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Interesting... am I reading this correctly in that SH10 would effectively be both on and off at the same time? If so I guess the sprites are always going to be a set distance apart?
|
![]() |
![]() |
#5 |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,797
|
Yeah, keep us updated...
![]() |
![]() |
![]() |
#6 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
I give an example, I probably answered hastily.
Suppose you set a sprite with SPRxPOS=$2c40 in a default DIW value low-res screen. A sprite at top/left corner appear. If you also set FMODE=$800x then sprite is doubled, on the same lines, at $40+$80 (so spaced away by 256 pixels). And if you set SPRxPOS>=$2c80? Well, test for yourself, but the effect is interesting ![]() |
![]() |
![]() |
#7 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
If it's 256 pixels apart that could work for me... going to have a play with that!
|
![]() |
![]() |
#8 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
It works!
![]() Not the most exciting example, but the white lines here are 64px wide sprites, which are then duplicated in the purple border off to the right. |
![]() |
![]() |
#9 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Same here...
Although I'm getting some strange results when I play with the upper sprites.... Sprites 1+2 are attached and repeated 64px wide sprites Sprites 3+4 are attached and repeated 64px wide sprites. Sprites above that seem to scan double... very weird. ![]() |
![]() |
![]() |
#10 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Are the lower (green masked) characters being duplicated with SSCAN2? I was thinking it had to be on the same line?
|
![]() |
![]() |
#11 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
![]() |
![]() |
#12 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Ah OK, that makes more sense!
Unless I'm missing something the downside of this is that it seems it's an all or nothing thing... I don't think you can repeat 4*64px sprites across the screen, but have other sprites not repeating within the same horizontal band of the screen. (not sure if I've explained that clearly!) |
![]() |
![]() |
#13 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
The thought occurs though that you can have a very nice full screen repeating background (256px wide). You would be limited on colours if using scrolling because in my example I'm having to lose 3 sprites due to DDFSTRT. I wonder how they did this in Flink, apparently it uses the same technique. |
|
![]() |
![]() |
#14 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,213
|
Flinks background layer appears to repeat every 128 pixels by the look of it, so they are probably just re-arming SPRxPOS with the copper to repeat the sprite data
Beautiful looking game is Flink, but don't know why they let the background parallax appear behind the status panel at the top.. it just looks very odd to me |
![]() |
![]() |
#15 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Flink does not use SSCAN2.
FMODE fetches = x4 for sprites and x2 for bpls, DDFSTRT=$30, DIW = $91 to $b1, sprites repeated with the usual copper x-multiplexing. |
![]() |
![]() |
#16 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
![]() |
![]() |
#17 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
![]() If you want a game that use SSCAN2 with a 256px sprites repeated background look for Fantastic Dizzy AGA. FMODE fetches like Flink, but DDFSTRT=$38, DIW = $a1 to $1a1, all 8 sprites used for the background (4x64x16colors). |
![]() |
![]() |
#18 | |||
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Quote:
Quote:
Quote:
Very true. Does make the play area look larger when you're outside though. |
|||
![]() |
![]() |
#19 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,797
|
Quote:
Compared to the rest that you need to take care of in x-multiplexing for a bg scroll layer this is not complicated. |
|
![]() |
![]() |
#20 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Ah, is that for a whole screen... I've been thinking of mixing layers of sprites with bitplane parallax layers and scrolling those vertically which does make the copperlist more complex.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sprites mutliplexing AGA | mcgeezer | Coders. General | 24 | 29 August 2018 19:20 |
Aga Sprites Attached issue | sandruzzo | Coders. Asm / Hardware | 11 | 28 April 2016 14:17 |
AGA: Using 32 pixel sprites twice per scanline | buzzybee | Coders. Asm / Hardware | 18 | 05 January 2016 20:26 |
AGA border sprites | mark_k | support.WinUAE | 9 | 06 January 2014 14:35 |
EHB sprites with AGA chipset ? | FrenchShark | Coders. General | 4 | 17 September 2009 06:37 |
|
|