11 April 2017, 21:31 | #21 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
19 April 2017, 18:17 | #22 |
Registered User
Join Date: Oct 2013
Location: Hamburg
Posts: 69
|
Same on ECS Agnus here with ross' versions.
I have started to build a minimal example to reproduce this and tried to rule out other factors one-by-one: the copperlist was unbuffered, waiting until mid-screen before the blit queue, double-checking interrupt handler, check if I introduced a bug into the framework etc. -- so far with no success. Since I have brought back some other fails-on-hardware bugs to fix from Revision (probably unrelated, though), it might take some time until I can get back to this. Thanks for all your efforts on pinning this down so far! |
20 April 2017, 08:47 | #23 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
|
|
20 April 2017, 09:31 | #24 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
20 April 2017, 10:09 | #25 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Only if test program exists that confirms it. It must not be some boring theory without proof (seen those too many times..) or "just to be safe, do this"
|
20 April 2017, 11:19 | #26 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
For example I was poking the bitplane pointers in a copper list in a non synchronised way which I'm guessing meant that every now and then on real hardware left them in an invalid state when they were latched? Timing on real hardware was everything, an unrelated change would change the timing and mask the bug. In the end I disabled th copper DMA before patching and that seemed to fix it. |
|
20 April 2017, 11:28 | #27 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
You probably hit the chipset feature where write to DMA pointer register does nothing if next cycle is same DMA channel's data read/write cycle. (Most emulation modes do not emulate this because wrong CPU timing, especially if not 68000, can break situations which work in real hardware)
This is why real world test case is needed. To find and confirm the exact root cause and to test if it is hardware revision specific. |
20 April 2017, 11:33 | #28 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
I had a blitter issue that was 100% reproducible on real hardware and perfect under emulation so I can try and resurrect that if you're interested. |
|
20 April 2017, 13:40 | #29 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Quote:
Quote:
|
||
21 April 2017, 09:25 | #30 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
|
|
23 April 2017, 15:00 | #31 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Quote:
Blitter ADAT and BDAT (BDAT in this program) writes in non-DMA mode didn't shift in old value (if shift was non-zero). Old data from last blit corrupted the font writer's mask data. No corruption if old data was zero. Previous blit used B-channel, next blit had B-channel disabled but it was part of used minterm, BLTBDAT was properly set by CPU write but if shift was non-zero, old data was shifted in to final "B hold" value. It seems "old" data ("A old" and "B old" in HRM) is automatically cleared only if channel is enabled when writing to BLTSIZE. EDIT: Only B channel "remembers" old value. "A old" is always cleared. Last edited by Toni Wilen; 24 April 2017 at 17:52. |
|
27 January 2018, 17:41 | #32 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
There are multiple separate issues here. But I could address some questions about loading the Blitter registers correctly.
1. Blitwait must be before every blit. Only if you need to rely on the result of the blit for the CPU, or if you plan to disable Blitter DMA, should you wait after the blit. Examples: bob collision detection (BZERO) or joint rendering into the same buffer (BLTDPTx) by the blitter and the CPU. 2. To support early A1000 Blitter chips, the documentation says to read twice before the CPU can rely on the value. Copper blits need only to perform one blit wait and nothing else. Blitter interrupts are triggered by BBUSY and so need no wait. 3. Register load order: There are only 4 important registers: BLTCONx, BLTxDAT, BLTAxWM, and BLTSIZE. This is the normal load order, all other registers can be set in any order after this. BLTSIZE starts the blit and obviously should be last. BLTxDAT will be shifted immediately upon the write to the corresponding BLTCONx, do this instead if that's what you desire. BLTADAT must be set before BLTAxWM for BLTADAT to be masked. |
27 January 2018, 17:53 | #33 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Quote:
BLTADAT does not shift immediately or mask immediately. Only BDAT does immediate shifting. It most likely does not work like BDAT because mask is dynamic, first and last word mask is different than middle words and shifting is done after masking. |
|
27 January 2018, 20:22 | #34 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Hm, sorry for muddling matters by replying in the Undocumented Hardware Features thread at about the same time.
I just took the general meaning of the problems and replies in this thread and wanted to minimize confusion. These are just the simplest rules I've found that lets a coder write or debug a blit routine and be sure that it's correct. (There's a short article on Coppershade, but it's not as simplified.) |
27 January 2018, 20:32 | #35 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Yeah but this thread is not beginner stuff so everything should be 100% accurate
|
27 January 2018, 22:39 | #36 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
I have to disagree. I'm addressing intent, and you're addressing hardware implementation/emulation accuracy. Two sides of the same coin, yet worlds apart. Ends of a spectrum.
The chips stay the same and do what you tell them, so it's about 100000 times more likely (rough estimate) that the coders are writing code that doesn't express their intent. HRM is certainly accurate and complete enough to allow a relatively experienced hardware programmer (whether new to Amiga or not) to code a Copper list that blits, and a font writer is beginner stuff and the code worked and you fixed the emulation. I have to wag my finger and say "tsk, tsk!" at that you say you don't like "better do this just to be safe", but then suggest changing the order of register writes for no good reason and haven't protested against "try this" things such as waiting an extra line, double blit waits in Copper lists, etc. (Which I'm quick to do now! ) I normally refuse to help if no code is posted, but I still wanted to help. Now I used my rules and they ruled out the blits, and on the HRM page I linked it says that the blitter WAIT is a normal WAIT with an AND condition provided by bit 15. HPOS below $07 as you know is on the previous line and will fail >= comparisons on the raster. $0001,$0000 is not a correct WAIT instruction, and $0007,$7ffe is a correct Copper Blit WAIT. |
28 January 2018, 01:36 | #37 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
Actually $0001,$8000 can be used to make delay of exactly 6CCK in copper list (like $01fe,$0000 for 4CCK). Call them if you want CNOP6 and CNOP4. Last edited by ross; 28 January 2018 at 09:39. Reason: clarifications |
|
28 January 2018, 09:26 | #38 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Quote:
I always want everyone (not just me) to also know exactly WHY something happens when I do this and that instead of blindly following some guides or HRM and possibly even refusing to attempt something crazy which hopefully does something unexpected, then it is time to try to find out why. Demo coders are supposed to make crazy things |
|
28 January 2018, 15:14 | #39 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
So now they can do crazy things with a correct blit wait that doesn't waste a scanline per blit.
|
02 February 2018, 08:24 | #40 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
Quote:
@Toni: Could you confirm this behaviour for these cases on the A1000? Last edited by dissident; 04 February 2018 at 04:57. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2 questions: Not used DFFxxx location Copper behavior and Indivision ECS registers | pandy71 | Coders. Asm / Hardware | 2 | 13 January 2015 14:13 |
Strange bitmap behavior | losso | support.WinUAE | 2 | 31 December 2013 12:42 |
Very strange SFS behavior. | Thorham | support.Apps | 26 | 17 October 2009 15:04 |
discovered strange behavior | NfernalNfluence | support.WinUAE | 7 | 26 May 2009 08:10 |
Strange behavior in A4000 | Computolio | support.Hardware | 8 | 22 September 2007 12:39 |
|
|