English Amiga Board


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

 
 
Thread Tools
Old 27 April 2016, 11:59   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Aga Sprites Attached issue

Hi,

I'm using 64px wide sprites on Aga machine. I'm trying to attach it, but it seems to not work. I'm using Piccon 2.50 to export sprites, and winuae to emulate amiga aga. Even though I set bit 8 on sprite, they refuse to work

Is there any thing to do in order to set thing right?


Thanks in advantage
Alessandro
sandruzzo is offline  
Old 27 April 2016, 16:26   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
You must enable 32-bit and double-page mode for sprites in FMODE, set bit 7 (not bit 8) in the second control word of the odd-numbered sprite, and position both sprites directly on top of eachother.

With 64-pixel wide sprites, all control words will also be 64 bits in size, and the relevant bits are mapped to the most significant 16 bits of each 64-bit control word.
Leffmann is offline  
Old 27 April 2016, 17:21   #3
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Quote:
Originally Posted by Leffmann View Post
You must enable 32-bit and double-page mode for sprites in FMODE, set bit 7 (not bit 8) in the second control word of the odd-numbered sprite, and position both sprites directly on top of eachother.

With 64-pixel wide sprites, all control words will also be 64 bits in size, and the relevant bits are mapped to the most significant 16 bits of each 64-bit control word.
IT'S all set. Sprites is 64px wide, both of them are directly on top of eachother. Yes bit 8 my fault.

With 64px wide bit 8 will be allways in the second control word, isn't?
sandruzzo is offline  
Old 27 April 2016, 19:47   #4
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Yes, the hardware expects data like this:
Code:
dc.w  pos, 0, 0, 0, ctrl, 0, 0, 0
dc.w  bpl1, bpl1, bpl1, bpl1, bpl2, bpl2, bpl2, bpl2
...
dc.w  0, 0, 0, 0, 0, 0, 0, 0  (or another pair of control words)
This is what you get if you check Attached and Control Words in PicCon, and it outputs both sprite 0 and 1 like this.
Leffmann is offline  
Old 27 April 2016, 19:56   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Also wide AGA sprites need higher address alignment, normal OCS/ECS sprite word alignment is not enough. 32-pixel = 4 byte divisible/long word alignment, 64-pixel = 8 byte divisible.
Toni Wilen is online now  
Old 27 April 2016, 19:59   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Yep that's most likely the problem here. AmigaDOS guarantees 8-byte alignment of hunk sections, so a simple
cnop 0,8
will do.
Leffmann is offline  
Old 27 April 2016, 20:14   #7
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Quote:
Originally Posted by Leffmann View Post
Yep that's most likely the problem here. AmigaDOS guarantees 8-byte alignment of hunk sections, so a simple
cnop 0,8
will do.
Done it! even with cnop 0,8 nothing
sandruzzo is offline  
Old 27 April 2016, 20:16   #8
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Quote:
Originally Posted by Leffmann View Post
Yes, the hardware expects data like this:
Code:
dc.w  pos, 0, 0, 0, ctrl, 0, 0, 0
dc.w  bpl1, bpl1, bpl1, bpl1, bpl2, bpl2, bpl2, bpl2
...
dc.w  0, 0, 0, 0, 0, 0, 0, 0  (or another pair of control words)
This is what you get if you check Attached and Control Words in PicCon, and it outputs both sprite 0 and 1 like this.
I set attached bit by myself knowing that piccon doesnt' set it
sandruzzo is offline  
Old 27 April 2016, 20:39   #9
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
The Attached option is required for it to convert the data correctly, 16-color graphics into 2 sprites. If you write $4040 $8000 and $4040 $8080 as control words for 64-pix wide and tall sprite 0 and 1, do you still see nothing?

The bug could be somewhere else, perhaps your sprite and bitplane priorities get messed up, the sprite pointers not set correctly, or the sprite DMA is turned off.
Leffmann is offline  
Old 28 April 2016, 09:32   #10
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Quote:
Originally Posted by Leffmann View Post
The Attached option is required for it to convert the data correctly, 16-color graphics into 2 sprites. If you write $4040 $8000 and $4040 $8080 as control words for 64-pix wide and tall sprite 0 and 1, do you still see nothing?

The bug could be somewhere else, perhaps your sprite and bitplane priorities get messed up, the sprite pointers not set correctly, or the sprite DMA is turned off.
All seems ok. I'm trying to find out why it's not working
sandruzzo is offline  
Old 28 April 2016, 13:28   #11
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
I set for both, odd and even sprites same palette index

dc.w $0102,$0022
sandruzzo is offline  
Old 28 April 2016, 14:17   #12
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,291
Issue resolved, I was setting the wrong control word! All it' ok now!
sandruzzo 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: Using 32 pixel sprites twice per scanline buzzybee Coders. Asm / Hardware 18 05 January 2016 20:26
Attached sprites nirvan75 Coders. Asm / Hardware 3 27 December 2015 11:42
AGA border sprites mark_k support.WinUAE 9 06 January 2014 14:35
Indivision AGA issue AMIGAZ support.Hardware 4 10 April 2010 12:31
EHB sprites with AGA chipset ? FrenchShark Coders. General 4 17 September 2009 06:37

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

Top

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