English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 01 January 2013, 19:08   #1
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
Possible FPU emulation bug in 2.5.1?

Greetings to you all. This is my first post on here after lurking for a wee while.

I was trying out some benchmarking using Real3D 1.4.2 in WinUAE and noticed some errors in the final image when rendering using the TurboReal executable.

Interestingly, it only seems to affect, in this scene at least, the bump-mapped texture on the teapot. I'll try some older versions of WinUAE and get back with some more results.

In the meantime, Happy New Year!



SJ
Attached Thumbnails
Click image for larger version

Name:	teapot_cpu.png
Views:	382
Size:	268.7 KB
ID:	33689   Click image for larger version

Name:	teapot_fpu.png
Views:	374
Size:	283.9 KB
ID:	33690  
Zoltar is offline  
Old 01 January 2013, 20:28   #2
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
After working through the previous WinUAE versions i've found that 2.0.1 is the last one that produces the correct image.

2.1.0 thru 2.3.0 all produce the same garbled image as above. In 2.3.1 thru 2.3.3 both the Real and TurboReal versions of the program crash the emulated Amiga. 2.4.0 thru to the current version all have the same problem.

I've been testing using JIT 68030 CPU + 68882 on the 'Fastest possible' setting.

Hope that helps you out a wee bit.



SJ
Attached Thumbnails
Click image for larger version

Name:	teapot_fpu_201.png
Views:	288
Size:	268.4 KB
ID:	33692  
Zoltar is offline  
Old 01 January 2013, 20:40   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Important question that needs answer: does it happen without JIT?
Toni Wilen is offline  
Old 01 January 2013, 20:53   #4
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
Quote:
Originally Posted by Toni Wilen View Post
Important question that needs answer: does it happen without JIT?
In 2.5.1, yes it does. Would it be worth going through all the older versions testing that?

SJ
Zoltar is offline  
Old 02 January 2013, 10:05   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Unfortunately there is no FPU emulation differences between 2.0.1 and 2.1.0. Could you test which beta introduced the problem?

All 2.1.0 betas are still available http://www.winuae.net/files/b/winuae_2100bx.zip (where x = 13 to 25, earlier 2.1 betas are named winuae_2020bx.zip, 1 to 12)

It looks like accuracy difference, perhaps FPU is in different mode in later versions.
Toni Wilen is offline  
Old 02 January 2013, 15:28   #6
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
Quote:
Originally Posted by Toni Wilen View Post
Unfortunately there is no FPU emulation differences between 2.0.1 and 2.1.0. Could you test which beta introduced the problem?

All 2.1.0 betas are still available http://www.winuae.net/files/b/winuae_2100bx.zip (where x = 13 to 25, earlier 2.1 betas are named winuae_2020bx.zip, 1 to 12)

It looks like accuracy difference, perhaps FPU is in different mode in later versions.
Ok dude, i'll have a crack at it later today. Could you check out the download link? It's giving me a 404 error here.

SJ
Zoltar is offline  
Old 02 January 2013, 15:31   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
You missed "x = <some number>". Read above post again
Toni Wilen is offline  
Old 02 January 2013, 16:38   #8
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
Quote:
Originally Posted by Toni Wilen View Post
You missed "x = <some number>". Read above post again
Ha! Now that i'm fully awake that makes perfect sense.



SJ
Zoltar is offline  
Old 02 January 2013, 20:35   #9
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
OK dude, here goes...

I tried out 2.1.0 first, before I tried any of the betas, making a new test configuration file with it first just so I could save a few seconds fiddling about in between each test and, interestingly, it rendered the image correctly. Indeed, all the 2.1.0 betas worked fine when using that .uae file.

I then tried the .uae I used yesterday, which is my main A1200HD config that I use 90% of the time and the issue first appears in b14, continuing on through all the remaining betas.

I wondered if it was just as simple as needing a new configuration file so I tried making a new .uae with 2.5.1 to see if it made any difference but it still produces the same messed up results. Using the config that worked with the betas above also made no difference.

Hopefully that sheds some light on things for you.



SJ
Zoltar is offline  
Old 02 January 2013, 20:43   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Thanks.

Could you find the difference in config file? CPU panel looks same? What about Direct3D vs DirectDraw or filter settings? At least D3D may change FPU mode but it should have been fixed long time ago.

Or just attach both working and non-working config file.
Toni Wilen is offline  
Old 02 January 2013, 22:31   #11
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
Quote:
Originally Posted by Toni Wilen View Post
Thanks.

Could you find the difference in config file? CPU panel looks same? What about Direct3D vs DirectDraw or filter settings? At least D3D may change FPU mode but it should have been fixed long time ago.

Or just attach both working and non-working config file.
I think that's it dude. Using the working 2.1.0 config file in 2.5.1 with DirectDraw selected produces the correct result. Changing to Direct3D mode reproduces the error.

If I save the working 2.1.0 config back out of 2.5.1, then restart the emulator, changing between DirectDraw or Direct3D now makes no difference and it generates the same scrambled up texture on the teapot.

Is anything else you can think of that you'd like me to try?

SJ
Attached Files
File Type: zip Test_configs.zip (6.4 KB, 173 views)
Zoltar is offline  
Old 04 January 2013, 17:50   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Does http://www.winuae.net/files/b/winuae.zip fix it?
Toni Wilen is offline  
Old 04 January 2013, 23:07   #13
Zoltar
Registered User
 
Zoltar's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 34
Quote:
Originally Posted by Toni Wilen View Post
Yes, that works fine now dude. In Direct3D or DirectDraw, with any of my configs, it now renders correctly. Excellent!



SJ
Zoltar is offline  
Old 05 January 2013, 14:52   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Great.

It was stupid bug, routine that gets and sets host FPU precision/rounding modes, I assumed it returns old mode value but it returns value you just set.

Usually functions that do both get and set returns old state, not new state.
Toni Wilen 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
FPU emulation elowan support.FS-UAE 8 31 January 2013 06:53
TotalCalc and EC020 FPU bug? Leandro Jardim support.WinUAE 5 25 February 2012 20:25
FPU bug found WinUAE 2.3.1 beta 7 Cosmos support.WinUAE 5 18 December 2010 00:57
Fpu emulation bug cefa68000 support.WinUAE 2 09 February 2007 19:14
Is a faster WinUAE FPU emulation possible? PeterK support.WinUAE 19 12 May 2005 13:55

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

Top

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