English Amiga Board


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

 
 
Thread Tools
Old 02 November 2018, 00:59   #1
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
What is this AGA effect?

I was futzing around with display stuff and I got this odd result (see binary).
What is going on here? It kinda looks like an effect from differing number of slots per line? But it doesn't snowball so I can't see the logic of it.
Fixing the modulo to what it really should be brings it back to sanity.


Also doesn't match in WinUAE 3.6.1 to my 4000 (sorry, 4.x goes in a boot loop for me - I should make a support thread for that.)
Attached Files
File Type: lha WhatIsThisEffect.lha (21.9 KB, 95 views)

Last edited by lilalurl; 02 November 2018 at 09:48.
NorthWay is offline  
Old 02 November 2018, 09:00   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Actually even fixing the modulo (that cannot be -2, must be a multiple of 4 to not misalign everything when you have a 32bit fetch),
i've a properly display only when single 32bit CAS in enabled (FMODE=1, ignoring sprite's bits)!

With FMODE=2 i've the attached display. Why?
How do you see it in the real A4000? [DDFSTRT=30, DDFSTOP=C0, BPLxMOD=0, FMODE=2; all ok with FMODE=1].
Attached Thumbnails
Click image for larger version

Name:	gaunt.jpg
Views:	415
Size:	81.3 KB
ID:	60558  
ross is offline  
Old 02 November 2018, 20:23   #3
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
This is what the exe looks like on my A4000 (see attachment)
Attached Thumbnails
Click image for larger version

Name:	WhatEffect-4000.jpg
Views:	432
Size:	294.8 KB
ID:	60565  
NorthWay is offline  
Old 02 November 2018, 21:08   #4
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by NorthWay View Post
This is what the exe looks like on my A4000 (see attachment)
wow, this is a work for Toni
ross is offline  
Old 03 November 2018, 09:24   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Something strange is going on with modulo handling. I get similar (but not 100% same, I think bitplane fetching when FMODE=2 isn't exactly right after all) if modulo calculation adds extra 4 to modulo when bitplane pointer is not long aligned. This creates very similar looking "scanline" effect.

So bitplane pointer adder does incorrect calculation if input value(s?) are not integer divisible by fetch size? Modulo and bitplane fetch size are added at the same time so there probably is some FMODE related trick that causes conflicts in this situation.

EDIT: it would be interesting to see how image changes if bitplane FMODE=1 (not 2)

Last edited by Toni Wilen; 03 November 2018 at 11:19.
Toni Wilen is online now  
Old 03 November 2018, 12:34   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Could you do following tests:

- FMODE=1. How does the image change? (photo)
- DDFSTRT=0x30 (set also DDFSTOP=0xC2). This should make any difference except move the display horizontally but better confirm it too.
- Photos of following cases: Modulo=-4,0,2 and 4. (Yes, it will be total mess but there should be enough details to match it with emulator screens)

EDIT: I did some quick tests. "Unaligned" modulo and bitplane pointer does seem to work unexpectedly.

Last edited by Toni Wilen; 03 November 2018 at 17:23.
Toni Wilen is online now  
Old 03 November 2018, 18:04   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
FMODE=1/2 module weirdness is now supported. (Note that test program does not set all palette entries so colors may be different depending on how you booted the program)

Logic seems to be: when bitplane pointer and modulo is added, bit 1 carry is ignored, for example 0x102 + 2 = 0x100. 0x102 + 0x12 = 0x110

FMODE=3 case is not yet updated.
Toni Wilen is online now  
Old 03 November 2018, 18:17   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Thanks Toni, these improvements in the emulation of 'strange cases' are very useful.
Even though they actually use illegal or wrong modes, they make life simple for those who develop only on emulators but could find unexpected weirdness on real machines.
WinUAE is more and more accurate.
ross is offline  
Old 03 November 2018, 20:00   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Exactly, bad/invalid/stupid/illegal/whatever situations must also work accurately.

FMODE=3 case is now correct. Similar weirdness, only difference is that bit 2 carry is ignored. Something like "if ((bplpt & (2 | 4)) + (modulo & (2 | 4)) >= 8) modulo-=8"

Only difference was modulo addition, BPL DMA fetch handling was already 100% correct.
Toni Wilen is online now  
Old 03 November 2018, 22:11   #10
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
Here are snaps from my A4000D. I think they should cover the questions:
Attached Thumbnails
Click image for larger version

Name:	20181103_213011_fmode0.jpg
Views:	165
Size:	347.7 KB
ID:	60593   Click image for larger version

Name:	20181103_213115_fmode1.jpg
Views:	166
Size:	362.9 KB
ID:	60594   Click image for larger version

Name:	20181103_213151_fmode2.jpg
Views:	160
Size:	334.4 KB
ID:	60595   Click image for larger version

Name:	20181103_213228_fmode3.jpg
Views:	142
Size:	353.4 KB
ID:	60596   Click image for larger version

Name:	20181103_213754_fmode1_30_c2.jpg
Views:	154
Size:	352.6 KB
ID:	60597  

Click image for larger version

Name:	20181103_214741_fmode1_30_c2_-4.jpg
Views:	134
Size:	318.3 KB
ID:	60598   Click image for larger version

Name:	20181103_214836_fmode1_30_c2_0.jpg
Views:	137
Size:	402.1 KB
ID:	60599   Click image for larger version

Name:	20181103_214941_fmode1_30_c2_2.jpg
Views:	140
Size:	423.6 KB
ID:	60600  
NorthWay is offline  
Old 03 November 2018, 22:11   #11
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
Mods do whatever you need, this is the 9th attachment.
Attached Thumbnails
Click image for larger version

Name:	20181103_215019_fmode1_30_c2_4.jpg
Views:	150
Size:	426.6 KB
ID:	60601  
NorthWay is offline  
Old 04 November 2018, 12:49   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Thanks but I think I already solved it 100%. See previous posts.
Toni Wilen is online now  
Old 02 December 2018, 06:15   #13
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
I'll follow up here since my 4000 is in parts (again); if Toni or someone else has time to confirm what I was trying to test:

1. fmode 0/1/2/3 gives overscan in minimum 16/32/32/64 pixel steps and ddfstrt changes in minimum 8/16/16/32 value steps
2. Using copper to dynamically change fmode down from 3/2/1 to 2/1/0 happens when? Does it leave any artifacts?
3. Using copper to dynamically change fmode up from 0/1/2 to 1/2/3 happens when? Does it leave any artifacts? Can you break(confuse) the ddfstrt requirements?

Basically, I was trying to break how fmode 3 eats 7(?) sprites by starting each line with fmode 1/2 and changing to fmode 3 after the first fetch.
Can you confuse it to work, will it ignore the address bits to fetch something aligned with the fmode, will it change fetch aligned with the old or new fetchmode, will it sit waiting until the number of pixels put out matches its old or new fetch mode?
What happens when the address is 64-bit aligned but the ddfstrt isn't? (I.e. fmode 2; you do 1 32-bit fetch at a ddfstrt that is fmode 3 aligned or you do 2 32-bit fetches at a ddfstrt that is fmode 2 aligned and end up with an address that is good for fmode 3 but not a ddfstrt value. And then you change fmode to 3.)
NorthWay is offline  
Old 02 December 2018, 12:10   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
1) DDFSTRT does not have any restrictions. Note that that BPLCON1 gets hidden offset added if DDFSTRT is "unaligned" (which is equal to size between DDFSTRT and previous "aligned" position) that can make it look like display start changed.

2-3) I haven't tested enough to be sure. Also most likely this isn't fully emulated (separation of Lisa and Alice FMODEs).
Toni Wilen is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
twister effect Coagulus Coders. General 91 14 March 2017 20:45
Help with a sine effect bobster Coders. Tutorials 16 17 October 2012 12:11
Overlay effect MrX_Cuci request.UAE Wishlist 15 30 June 2010 17:35
Global Effect mai support.Games 3 04 February 2010 12:58
Cracktro effect absence Coders. General 13 02 April 2009 16:41

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 08:34.

Top

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