English Amiga Board


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

 
 
Thread Tools
Old 21 June 2022, 18:31   #1
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 456
changing FMODE AGA sprites on the fly

Hi,

config : Amiga 1200

I'd like to use at the same time some sprites using the FMODE ($dff1fc) to 64 pix and others FMODE to 32 pix wide.
Sprites are not at the same vertical position, so I use copper to change FMODE.
But for some reason I can't manage to display 32pix sprites, and the 64 pix ones are displayed just fine.

So my question : Is FMODE locked at each frame at the same value ?
LeCaravage is offline  
Old 21 June 2022, 19:38   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by LeCaravage View Post
Hi,

config : Amiga 1200

I'd like to use at the same time some sprites using the FMODE ($dff1fc) to 64 pix and others FMODE to 32 pix wide.
Sprites are not at the same vertical position, so I use copper to change FMODE.
But for some reason I can't manage to display 32pix sprites, and the 64 pix ones are displayed just fine.

So my question : Is FMODE locked at each frame at the same value ?
Hi.
Changing FMODE during display (for sprites) as no effect becase all the data are fetched in fixed DMA slots at the left of the video line (where usually there is no visible display).
When you change FMODE the fetch was already done..
ross is offline  
Old 21 June 2022, 19:47   #3
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 456
So everything is setting-up during vertical blank.
Thanks dear sir Ross
LeCaravage is offline  
Old 21 June 2022, 20:22   #4
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by LeCaravage View Post
So everything is setting-up during vertical blank.
Thanks dear sir Ross
Horizontal blank (at least you can change FMODE per line).

Perhaps I didn't quite understand what you wanted to do
If the different sprites never have vertical overlaps then this might work.

EDIT.
Just to give an example, this can work:
Code:
********
********    ********
********    ********
********
           ****
           ****  ****
           ****  ****
           ****
  **
  **
  **  **
  **  **
      **
      **
This cannot:
Code:
********
********
********   ****
********   ****
           ****
  **       ****
  **

Last edited by ross; 21 June 2022 at 20:34.
ross is offline  
Old 21 June 2022, 20:51   #5
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 456
Cristal-clear.
Thanks.

PS : I'm doing something wrong in my copperlist then.
LeCaravage is offline  
Old 21 June 2022, 23:32   #6
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 456
Still not working. I wonder if the pb is not coming from the linking multiplexed sprites.
I mean, I make a list of sprite mixing 64 and 32 bits. The first sprite (64 bits wide) after been displayed is expecting a 64 bits control header for the next sprite. So may be it's impossible if you use automatic sprite control reload.
LeCaravage is offline  
Old 22 June 2022, 00:00   #7
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by LeCaravage View Post
Still not working. I wonder if the pb is not coming from the linking multiplexed sprites.
I mean, I make a list of sprite mixing 64 and 32 bits. The first sprite (64 bits wide) after been displayed is expecting a 64 bits control header for the next sprite. So may be it's impossible if you use automatic sprite control reload.
Nah, it is possible
Change FMODE at start of the same line where the 32bit control words should be fetched.
Beware: not where the new 32bit sprite should appears, but after last line for 64bit sprite!

If you still have problems post the code, complete with copper list.
ross is offline  
Old 22 June 2022, 18:35   #8
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 456
Tried several combinaisons, several sprite high (-1,+1)....

Code:
	; ******************************************
	; *               COPPERLIST               *
	; ******************************************

	.
	.
	.

	; a0 = copperlist

	move.l #$41dffffe,(a0)+								; wait

	move.w     #$01fc,(a0)+								;
	move.w     #%0000000000000100,(a0)+					; lutin en 32 bits
;	move.w     #%0000000000001000,(a0)+					; lutin en 32 bits


	move.l #$64dffffe,(a0)+								; wait

	move.w     #$01fc,(a0)+								;
	move.w     #%0000000000001100,(a0)+					; lutin en 64 bits

	.
	.
	.

	; etc...


	; ******************************************
	; *               LUTINS                   *
	; ******************************************

	; lutins 64 pixels de large

lut64:
	dc.l $30640000,$00000000		        ; contrôle
        dc.l $41000000,$00000000		        ;

	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		; données lutins
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;



	; lutin 32 pixels de large


lut32:

	dc.w $50a0,$0000,$0000,$0000					; contrôle
	dc.w $5e00,$0000,$0000,$0000					;

	dc.w $ffff,$ffff,$ffff,$ffff						; données lutins
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
	dc.w $ffff,$ffff,$ffff,$ffff						;
;	dc.w $ffff,$ffff,$ffff,$ffff						;

	.
	.
	.


	; etc...

Last edited by LeCaravage; 22 June 2022 at 18:53.
LeCaravage is offline  
Old 22 June 2022, 22:07   #9
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Code:
	; a0 = copperlist

	move.l #$17dffffe,(a0)+				; wait (first cw frame fetch)

	move.w     #$01fc,(a0)+				;
	move.w     #%0000000000001100,(a0)+	; lutin en 64 bits


	move.l #$40dffffe,(a0)+				; wait (32bit cw fetch)

	move.w     #$01fc,(a0)+				;
	move.w     #%0000000000000100,(a0)+	; lutin en 32 bits

	.

	; etc...


	; ******************************************
	; *               LUTINS                   *
	; ******************************************

	; lutins 64 pixels de large

lut64:
	dc.l $30640000,$00000000		        ; contrôle (64 bit)
        dc.l $41000000,$00000000		        ;

	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		; données lutins
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;
	dc.l $ffffffff,$ffffffff,$ffffffff,$ffffffff		;



	; lutin 32 pixels de large


lut32:

	dc.l $50a00000			; contrôle (32 bit)
	dc.l $5e000000			;

	dc.w $ffff,$ffff,$ffff,$ffff				; données lutins
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;
	dc.w $ffff,$ffff,$ffff,$ffff				;

	dc.l $0,$0					        ;
	; etc...
Not checked.
But if I'm not wrong for some values and it does not conflict with your copperlist should work.
ross is offline  
Old 22 June 2022, 23:03   #10
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 456
You are fast. It works.
If I understand well, my copperwaits were bad.
Thanks for your time.
LeCaravage 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
AGA FMODE & BPLCON1 Scrolling DanielAllsopp Coders. Asm / Hardware 13 17 May 2022 13:51
Multiplexing sprites By changing pointers sandruzzo Coders. Asm / Hardware 17 26 August 2021 18:51
OS Friendly AGA FMODE Issues bork Coders. General 14 01 March 2021 14:24
Re-using AGA sprites on the same scanline? mcgeezer Coders. Asm / Hardware 20 27 March 2020 02:04
Sprites mutliplexing AGA mcgeezer Coders. General 24 29 August 2018 19:20

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 14:58.

Top

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