English Amiga Board


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

 
 
Thread Tools
Old 15 January 2014, 13:35   #161
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 52
Posts: 244
Quote:
Originally Posted by Toni Wilen View Post
Exactly. Seems only Cardamon/Cardamom's coder found and took advantage of this weird feature.



BLTDPT == BLTCPT after blit ends. (Demo Deformations won't work properly without this)
Heck.. never really understood how this worked back in day but I found it (or something similar) by accident and used it in this demo at least http://janeway.exotica.org.uk/release.php?id=4171
I never drew shorter lines or xorred any pixels
mr.spiv is offline  
Old 15 January 2014, 22:39   #162
Lekman
Registered User
 
Join Date: Dec 2013
Location: Fredrikstad/Norway
Age: 46
Posts: 17
Quote:
Originally Posted by Toni Wilen View Post
Sorry but there is not enough information. Obviously it is some corner case where nearly every DMA slot is in use but it is impossible to find the exact condition (which is the point of this thread, to document these features/bugs) without full code. You also mention sprites in comment but there is nothing in the code, also FMODE and BLTCON0 contents are missing.

I don't assume anything, full "buggy" code (binary is best, source isn't that good because different assembler may optimize it differently..) or nothing
Ok, here is the binary. No bug in winAUE, but on my original a1200.

(The two first downloads was with blitter nasty enabled (no bug) i upploaded new version 16.01.13. I now use 5 sprites and 3 dummy attacked sprites (so i can use the same colour as mask). The buggi version use 8 fullsize sprites, 3 attacked).
Attached Files
File Type: zip BlitterBugs.zip (85.3 KB, 160 views)

Last edited by Lekman; 17 January 2014 at 23:57.
Lekman is offline  
Old 25 January 2014, 21:07   #163
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by Lekman View Post
Ok, here is the binary. No bug in winAUE, but on my original a1200.
Thanks, I'll test it someday.

Quote:
Originally Posted by mr.spiv View Post
Heck.. never really understood how this worked back in day but I found it (or something similar) by accident and used it in this demo at least http://janeway.exotica.org.uk/release.php?id=4171
I never drew shorter lines or xorred any pixels
Nice. This really should have been documented because it made line drawing for filled vector objects so much simpler..
Toni Wilen is online now  
Old 25 January 2014, 21:11   #164
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Not sure why I have missed this.. (Perhaps I am the the only one..) Probably because my usual test Amiga 500 has ECS Agnus.

DDFSTRT = 0x18 and OCS Agnus: All sprites are disabled. (ECS = sprite 0 is works normally, other sprites are disabled)

I checked this condition with logic analyzer and only first sprite word is fetched in this situation, second word fetch slot is not used.

It seems OCS Agnus expects idle cycle after both sprite fetches, when DDFSTRT = 0x18, second word is 1 cycle before first bitplane DMA slot.
Toni Wilen is online now  
Old 26 January 2014, 17:41   #165
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
Quote:
Originally Posted by Toni Wilen View Post
Nice. This really should have been documented because it made line drawing for filled vector objects so much simpler..
Still won't match up the slopes for you though, so it didn't solve the convex object shared edge glitch. (As demonstrated in Cardamon.)

Quote:
Originally Posted by Toni Wilen View Post
Not sure why I have missed this.. (Perhaps I am the the only one..) Probably because my usual test Amiga 500 has ECS Agnus.

DDFSTRT = 0x18 and OCS Agnus: All sprites are disabled. (ECS = sprite 0 is works normally, other sprites are disabled)

I checked this condition with logic analyzer and only first sprite word is fetched in this situation, second word fetch slot is not used.

It seems OCS Agnus expects idle cycle after both sprite fetches, when DDFSTRT = 0x18, second word is 1 cycle before first bitplane DMA slot.
I think I mentioned this is in my max overscan test? There should be a link somewhere in this thread. I think I didn't test if the scroll register affected it, and it shouldn't, but it's worth a test I guess.
Photon is offline  
Old 28 January 2014, 20:35   #166
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Yes, BPLCON1 won't have any effect on DMA usage, it is Denise register.

I finally compared "blue" HRM and "black" HRM DMA time slot allocation page, differences are interesting:

Earlier revision says: "cycle $18 or earlier will wipe out all sprites" ... "if SPRITE0 is desired to function then the data fetches cannot begin any earlier than cycle $1c"

Later revision says: ..."This allows the user to wipe out most of the sprites if desired (by defining an extra-wide display)"..

ECS improvements have separate chapter but it does not mention fixed sprite 0 in max overscan (which is obviously a bug or some chip restriction because there is no DMA cycle conflict even if DDFSTRT=$18. It should have worked in OCS already.)

It looks like they didn't really want anyone to notice it

EDIT: I tested all DDFSTRT positions from $18 to $38 with OCS and ECS Agnus. OCS Agnus is always "off by one", DMA slot at DDFSTRT-1 is never used for sprite DMA if OCS (it is available for any other DMA channel or CPU).

Last edited by Toni Wilen; 29 January 2014 at 19:04.
Toni Wilen is online now  
Old 29 January 2014, 19:08   #167
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
So a Superfat Agnus should be enough to fix it? From memory it doesn't on a Rev 6A Superfat A500. Which should mean it was in two 1MB Agnus chip revisions at least? See Wikipedia. Would be cool to pin the change down to chip revision, that's the revision that's a true ECS Agnus to me anyway
Photon is offline  
Old 29 January 2014, 19:25   #168
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by Photon View Post
So a Superfat Agnus should be enough to fix it? From memory it doesn't on a Rev 6A Superfat A500. Which should mean it was in two 1MB Agnus chip revisions at least? See Wikipedia. Would be cool to pin the change down to chip revision, that's the revision that's a true ECS Agnus to me anyway
AFAIK all 1M (or 2M) chips are "fixed". 8372A and later ones. At least my A500 rev6 8372A works "correctly" and A1000 8367 and A500 8371 does not.
Toni Wilen is online now  
Old 29 January 2014, 20:08   #169
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
Confirmed. I think it was the 2nd bitplane of unattached 8th sprite missing or not at $30 I was thinking of.
Photon is offline  
Old 31 January 2014, 18:17   #170
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
Hi Photon, I didn't know that bug you are mentioning. so when DDFSTRT = $30 the 2nd plane of the 8th sprite "flickers"? (only if sprite is not attached?)
I think I had seen this happening, but I thought it was a bug in my code
Only on certain Agnuses, I guess

Last edited by TheDarkCoder; 31 January 2014 at 18:18. Reason: typo
TheDarkCoder is offline  
Old 31 January 2014, 20:12   #171
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by TheDarkCoder View Post
Hi Photon, I didn't know that bug you are mentioning. so when DDFSTRT = $30 the 2nd plane of the 8th sprite "flickers"? (only if sprite is not attached?)
I think I had seen this happening, but I thought it was a bug in my code
Only on certain Agnuses, I guess
It is caused by same OCS Agnus "bug".

If DDFSTRT is large enough when sprite position information is fetched (POS&CTRL) but DDFSTRT becomes smaller when sprite is displayed, second "plane" of sprite stops getting updated (no DMA fetches) and last fetched data is reused in all following lines.
Toni Wilen is online now  
Old 02 February 2014, 04:16   #172
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
Yes, I don't remember it flickering.
Photon is offline  
Old 02 February 2014, 11:10   #173
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
@Photon: so what do you mean, in your previous post with "8th sprite missing or not". I don't understand :-)
TheDarkCoder is offline  
Old 02 February 2014, 16:27   #174
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
I only got the one bitplane showing, but that could be due to the first word in the second bitplane read being zero, and then repeated as Toni says. This raises the question how it has time to even read the first word, since it doesn't even get a DMA slot at any of the following lines. One guess is that it gets latched long beforehand, when the first bitplane DMA word is read at the top of the screen.

In other words, when DDFSTRT is $30, a slot is stolen from a sprite channel by the bitplane DMA starting ealier (more to the left), even though it shouldn't according to (some) documentation.

Quote:
Originally Posted by Toni
EDIT: I tested all DDFSTRT positions from $18 to $38 with OCS and ECS Agnus. OCS Agnus is always "off by one", DMA slot at DDFSTRT-1 is never used for sprite DMA if OCS (it is available for any other DMA channel or CPU).
I think it could be the same bug causing both, but this doesn't explain why sprite 0 disappears completely at $18 but sprite 7 has 1 correct bitplane showing at $30. (Or maybe it does, I haven't drawn the positions on paper and compared to the cycle diagram in HRM. If it doesn't, it could be one more curious behavioral difference to investigate.)

Last edited by Photon; 02 February 2014 at 16:45.
Photon is offline  
Old 02 February 2014, 16:52   #175
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by Photon View Post
I think it could be the same bug causing both, but this doesn't explain why sprite 0 disappears completely at $18 but sprite 7 has 1 correct bitplane showing at $30. (Or maybe it does, I haven't drawn the positions on paper and compared to the cycle diagram in HRM. If it doesn't, it could be one more curious behavioral difference to investigate.)
I think it only depends what has happened previously. If both control words are fetched normally (bitplane disabled or ddfstrt large enough), sprite will be shown in correct position but second plane will contain whatever was last fetched to that register (SPRxDATB). It could be something from many, many frames ago, last line of sprite that was last correctly fetched.

I think it may even be possible to change the second plane pattern by manually writing to SPRxDATB using CPU.
Toni Wilen is online now  
Old 02 February 2014, 17:03   #176
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
Yes, of course that should work.

From a quick look in HRM you could hope that the bitplane DDFSTRT would steal less sprites in hires or if you're using less than 4 bitplanes in lores. Fetch order is _462_351, so you might even hope less than 2 bitplanes on will fix it. But when I got this I had 1 bitplane on, so that should crush the hope in both cases.
Photon is offline  
Old 02 February 2014, 17:13   #177
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
Quote:
Originally Posted by Photon View Post
From a quick look in HRM you could hope that the bitplane DDFSTRT would steal less sprites in hires or if you're using less than 4 bitplanes in lores. Fetch order is _462_351, so you might even hope less than 2 bitplanes on will fix it. But when I got this I had 1 bitplane on, so that should crush the hope in both cases.
Unfortunately "empty" bitplane slots still count, I tested it, number of planes makes no difference.
Toni Wilen is online now  
Old 02 February 2014, 21:10   #178
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 52
Posts: 244
Quote:
Originally Posted by Photon View Post
Still won't match up the slopes for you though, so it didn't solve the convex object shared edge glitch. (As demonstrated in Cardamon.)
I did not have edge glitch issue.. Must be then some other thing on my side
mr.spiv is offline  
Old 22 February 2014, 17:08   #179
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
BPLCON1 scaling/zooming

(Partially copied from http://eab.abime.net/showthread.php?t=71437)

How BPLCON1 really works:

When Agnus writes to Denise's BPL1DAT, all BPLxDAT registers are copied to internal Denise temp registers and flag is set. (separate flag for both odd and even planes)

When bitplane delay value (odd and even are separate) matches Denise's internal hpos counter ((hpos & mask) == delay value) and flag is set, internal temp register is copied to 16-bit output shift register and flag is reset.

Hpos comparison checks are continuous, internal copy happens immediately when comparison matches and if flag is set.

This explains all weird flickering/blanking side-effects if BPLCON1 values are modified "incorrectly" (comparison does not match before shift register empties too much) mid-scanline.
Toni Wilen is online now  
Old 14 March 2014, 14:54   #180
JPQ
Registered User
 
Join Date: Mar 2014
Location: Akaa
Posts: 57
In earlier this thread someone mentioned 7bit ocs mode how colours are defined in this mode? what i know there is only 32 colour registers.
JPQ 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
who can provide hardware to create ADFs of some old rare stuff like Nautilus...? Bernd support.Other 3 19 August 2011 23:41
Stuff for sale amiga a1200 plus more retro stuff blast MarketPlace 23 22 June 2010 19:05
Action Replay Undocumented Features deicidal support.Hardware 0 01 March 2010 17:15
I've got some Amiga stuff...I want your SNES stuff! Fingerlickin_B MarketPlace 14 20 February 2009 01:33
Amiga stuff for trade for Atari Stuff 8bitguy1 MarketPlace 0 12 February 2009 05:36

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

Top

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