26 February 2021, 22:06 | #21 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
careful about
Code:
.\@ btst #6,DMACONR bne.b .\@ (winuae doesn't have this problem) BTW if you enable "blitter nasty", the "no loop" code probably only works from chipmem. From fastmem it just doesn't wait. So use a loop or a blitter interrupt chain. |
26 February 2021, 22:07 | #22 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Exactly, WinUAE doesn't have this problem.
|
26 February 2021, 22:09 | #23 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
one thing I have noted, though, is that "immediate blitter" allows to get rid of blitter issues (on broken programs) whereas "wait for blitter" doesn't seem to work properly.
I got blitter artifacts with "wait for blitter" which were fixed by "immediate blitter". Personally I don't care, I only use "immediate blitter" to check that the artifacts are caused by the blitter (so I can fix them...) and not self-modifying code. |
26 February 2021, 22:20 | #24 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
The problem with the original question is that it doesn't post the code run when emulation error is experienced. OP must provide code that fails and environment and error message or screenshot of error to have any chance of proceeding. A decade of blits, and post #22 has found a bug? I'd bet $1000000 against that.
Every word of the article quoted is correct and not only works on all Amigas but also works in WinUAE with default options, cycle exact on, and blitter wait on. (I actually didn't notice he linked to Coppershade before I wrote my previous replies, since that is 'just' an online source.) |
26 February 2021, 23:27 | #25 |
Registered User
Join Date: Sep 2019
Location: Sydney
Posts: 357
|
Photon, you seem to have misunderstood the question.
It was about trying to find a bug in my code, not in WinUAE. And thanks to a few helpful posts I did find it. Posting source code of 70 C files and 30 ASM files would not have been helpful, hence the cut down pseudo-code version that I posted instead. |
26 February 2021, 23:33 | #26 | |||
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
Quote:
Yes. Question answered. You're welcome. Quote:
So this wouldn't have helped the simple question posed, you're correct. As I wrote, we need one piece of code that fails and some kind of description of how it's not functioning as you wish. Last edited by Photon; 26 February 2021 at 23:40. |
|||
27 February 2021, 00:32 | #27 |
Registered User
Join Date: Sep 2019
Location: Sydney
Posts: 357
|
Thanks Photon, I'll be sure to be more experienced before asking beginner questions in future.
For anyone else, the hardware manual appears to say that you must set BLTCON0 before BLTxDAT. But does not clearly say that BLTCON0 must be set before BLTxPTH that I have found. I am setting BLTCON0 after BLTAPTH/BLTBPTH without problem on real and emulated Amigas, but of course if someone has a definitive answer on this, it would be useful to know. |
27 February 2021, 02:05 | #28 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Well, it was a dumb reply from a not so detailed question. We really need code and expected result and actual result. Even then we might not call into question the docs available and code that works.
Coding is a lesson in humility. You really question your own code first - even when you're experienced. And then when you're really experienced and there can be no error anywhere, you really question your own code before anything. And then when you've found the problem and reduced it to a single instruction that can't possibly fail, you still question your own code before anything. This is the lesson. Here's the answer I should have written, perhaps. Blitter corruption (whatever that is, we don't know cos you don't show), is caused by your code because WinUAE can't cause it. But here's the thing: this might be a false statement, and I don't write those. Because it IS possible that if you took a correct Blitter init and completely jumbled the order of statements, you could (maybe) provoke WinUAE into failing. It's extremely unlikely, but possible. Coppershade has only 100% accurate descriptions and only 100% working code, or it's not on Coppershade. This is how tough it is to get published there, and I'm my own author! So if you accept that WinUAE didn't corrupt your blits, and my blitwait didn't, and you show some code, and wrong result, and expected result, you will get excellent help in this, the best Amiga forum. Last edited by Photon; 27 February 2021 at 02:10. |
27 February 2021, 02:31 | #29 | ||
Registered User
Join Date: Sep 2019
Location: Sydney
Posts: 357
|
Quote:
Quote:
You have imagined that I posted something completely different, where I 'blamed' WinUAE and then asked people to find the cause of blitter corruption. I did neither of these things. |
||
27 February 2021, 02:57 | #30 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Well, even shorter then:
The order of operation of the Blitter is provided in the HRM and on Coppershade. Correct code to initialize the Blitter is provided on Coppershade. If you ask again here, please provide helpful information. |
27 February 2021, 03:17 | #31 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
I did some unusual (incorrect?) blitter setup write ordering in a game I was working on in maybe 2017. It would work under WinUAE but would glitch on real hardware. I sent Toni the code and he changed WinUAE to “correctly” implement the blitter glitch.
|
27 February 2021, 19:12 | #32 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
But there is another possibility, pre-AGA blitter busy bit goes low even when possible still pipelined D write (if D is enabled and not linedraw) is still pending. AGA fixes this. So bad things can happen if program immediately after wait loop does something that requires last D write being already written to chip RAM. Anyway, as usual: test case needed that is tested using some basic unexpanded real hardware config. Expanded/fast CPU configurations can have weird hardware issues too... Usually "blitter problem" isn't really blitter problem but some other bad assumption. Quote:
|
||
03 March 2021, 23:07 | #33 | |||||
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
Quote:
Quote:
Quote:
Which doesn't mean bugged code won't cause error messages in emu (debugger? not seen it) Quote:
No, your bug is not due to setting BLTxPTH before or after BLTCON0 and 1 if data not used. But we haven't even seen a single blit yet, or even a screenshot of the corruption. There are many knowledgeable coders here, so that we might spot the bug from blit code or screenshot. Last edited by Photon; 03 March 2021 at 23:12. |
|||||
04 March 2021, 00:22 | #34 |
Registered User
Join Date: Sep 2019
Location: Sydney
Posts: 357
|
Photon, you are talking as though this is an open issue. If you read the thread you will see it was all resolved three weeks ago, within two hours of my asking the original questions.
Others were able to help me enough so that I found the problem in my code. This thread worked out great for me. And then you reopened it three weeks later seemingly just to make a few unpleasant digs. I tried to put you on ignore after it became obvious you had constructed a strawman to argue with, but you're a moderator so I can't. Perhaps instead, you can put me on ignore? That way we don't have to waste any more time on this. This is a hobby project for me and I'd rather keep it as a positive experience - thanks. |
04 March 2021, 01:42 | #35 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
That's when you stopped responding, yes...
So you made a sketchy question putting WinUAE/Coppershade/HRM into question, now you come back and got all these responses. I can understand your confusion how we would get all involved. It's about a full understanding, nothing to do with an individual question. Every possible thing - even bugs in hardware, documentation, and emulation - we want to know. And so thread title even got Toni involved. He can answer for himself. Now, I am Photon and I am a person. I take special pride in answering questions as asked, and writing only what can be supported by objective testing. So for me personally, your strawman accusation is false - I've tried my very best, it's your post lacking information. Avoid having to play at argumentation by simply providing code and expected result. Quote:
Again Coppershade tries to provide only correct information. You didn't get that code from me. If you want a correct blitwait, it's right there on the page you linked in the OP. From your quote, if you had put that in your macro your code would have worked, removing the need for posting the question. Last edited by Photon; 04 March 2021 at 01:50. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Winuae monitor 1920x1080 with immediate blitter | White | support.WinUAE | 4 | 22 January 2020 13:06 |
demo bug with Winuae 4.2.1 - scroller corruption | SaphirJD | support.WinUAE | 13 | 02 July 2019 18:00 |
TVPaint corruption under WinUAE | ral-clan | support.WinUAE | 25 | 07 August 2017 17:16 |
Jaguar XJ220 GFX Corruption in winuae | SexyWayne | support.Games | 5 | 02 January 2005 12:43 |
WinUAE graphic corruption? | Critter | support.WinUAE | 13 | 08 February 2004 14:13 |
|
|