Blitter emulation bug?

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

XiA
Atarian
Atarian
Posts: 5
Joined: Wed Apr 18, 2012 11:09 am

Blitter emulation bug?

Postby XiA » Wed Oct 31, 2018 11:22 am

Hi!

I think I've discovered a bug in the blitter emulation, see attached file.

source at http://beyondbrown.mooo.com/post/blaster-sprites/
You do not have the required permissions to view the files attached to this post.

User avatar
npomarede
Atari God
Atari God
Posts: 1260
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Blitter emulation bug?

Postby npomarede » Wed Oct 31, 2018 5:24 pm

Hi
I think that's a known bug that was already reported in hatari where emutos had some issues too when drawing some icons.
If you check hatari-devel mailing list archive for the the thread "Blitter emulation corner case" from 2018/05/09, I think it describes the same issue with some details / test programs.

The problem arises when xcount=1 and FXSR and NFSR bits are both set, which is more or less contradictory, because fxsr asks to fetch one extra word at start, but nfsr asks to not fetch the last word. But here the last word is also the first/single word .

In that case, the real blitter will sometimes read 2 words and ignore one of these word, but not always, it seems to depend on a "complex" combination of src/dest addresses, whether addresses are incrementing or decremeting and so on.
For now, the logic behind this was not determined. Hatari will always do the same logic, which might break some programs.

Nicolas

XiA
Atarian
Atarian
Posts: 5
Joined: Wed Apr 18, 2012 11:09 am

Re: Blitter emulation bug?

Postby XiA » Wed Oct 31, 2018 7:18 pm

You're right, I really shouldn't be setting both bits at the same time - it was just the only way I could make the clipping work in STEem. My bad for trusting an emulator :-)

Thanks for your reply!

User avatar
npomarede
Atari God
Atari God
Posts: 1260
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Blitter emulation bug?

Postby npomarede » Wed Oct 31, 2018 7:29 pm

Well, you can of course :) But as the results are "undefined" (at least not easily predictable for an emulator), you might find cases where settings both bits gives the correct result in Steem and not in Hatari, and other cases where it's the opposite.
Hopefully someone will have time to dig into the blitter schematic to describe all the combinations


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 2 guests