English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 11 November 2022, 14:23   #1
CFou!
Moderator
 
CFou!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
WinUAE 68010 issue or not with NoDivByZero exception????

Hi Tony,

What do you think is the normal behavior of the 68010 when a divide by zero exception is encountered?

you have a problem on WHDLoad to ignore vector $14 exception.
which causes WHDLoad exits instead of ignoring the interrupt.

see following mantis reports:
Hyperion report
Twylyte report
Wanderer3D report

Below is the comparison between 68030 & 68010 of the behavior of WHDLoad when a Division by zero is encountered.

normal behavior on 68030:


behavior on 68010 on WInuae:


WHDload expects a flag value of $2014 but it is at $0014.

I don't have real 68010 to compare

Do you think it's WinUAE returning a bad value? or is it rather the code of WHDload that needs to be modified?
CFou! is offline  
Old 11 November 2022, 15:52   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
Assuming $2014 is format/vector offset field: 68010 uses same basic frame format as 68020 but it isn't same as 68020, 68010 can only generate exception frame types 0 and 8 (address/bus errors).

Last edited by Toni Wilen; 12 November 2022 at 14:41.
Toni Wilen is offline  
Old 12 November 2022, 16:34   #3
CFou!
Moderator
 
CFou!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
Quote:
Originally Posted by Toni Wilen View Post
Assuming $2014 is format/vector offset field: 68010 uses same basic frame format as 68020 but it isn't same as 68020, 68010 can only generate exception frame types 0 and 8 (address/bus errors).
So if I understand correctly for DivByZero, the frame format should be the same on 60010 as 68020 and above.
But it looks like Winuae returns a different value when this type of exception is thrown on 68010
CFou! is offline  
Old 12 November 2022, 16:49   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
No. It is not same. 68010 does not have frame format 2!

Check the manual: http://www.bitsavers.org/components/...heet_May85.pdf
Toni Wilen is offline  
Old 12 November 2022, 17:35   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
then it's a whdload issue
jotd is offline  
Old 12 November 2022, 17:42   #6
CFou!
Moderator
 
CFou!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
Quote:
Originally Posted by Toni Wilen View Post
No. It is not same. 68010 does not have frame format 2!

Check the manual: http://www.bitsavers.org/components/...heet_May85.pdf
thanks for information
CFou! is offline  
Old 12 November 2022, 18:49   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
I think it was common misunderstanding because 68010 has same stack frame structure as 68020.

UAE also had this wrong: 68010 mode generated (and RTE accepted) frame type 2. I noticed it when doing 68010 cputester tests. Was fixed in 4.3.0.
Toni Wilen is offline  
Old 13 November 2022, 22:20   #8
Wepl
Moderator
 
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 876
EmulDivZero will be fixed for the 68010 in the next WHDLoad beta. I didn't notice that the frame looks different on the 68010.
Besides that I would recommend to use NoDivZero if there is no need for a special handler in the game. This uses only a rte in WHDLoad and is therefore not affected by this problem and would be faster too.
Wepl is offline  
Old 14 November 2022, 23:00   #9
Wepl
Moderator
 
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 876
the latest beta http://whdload.de/whdload/whd189.lha should fix the problem (build 6507)
Wepl 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
Possible exception debugging nandius_c Coders. Asm / Hardware 12 29 May 2020 20:28
Winuae Amiga OS 3.9 PPC - WarpOS - PowerPC Exception Amcio support.WinUAE 22 08 October 2019 14:33
Issue with 68010 processor on A500 Finntuitive support.Hardware 10 21 December 2018 11:06
WinUAE how to break on an exception? deimos support.WinUAE 4 29 September 2018 10:23
Exception 0 vriviere support.WinUAE 9 25 June 2012 14:36

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 06:30.

Top

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