16 March 2013, 04:29 | #1 |
Registered User
Join Date: Mar 2012
Location: Australia
Age: 44
Posts: 1,126
|
Odyssey whdload (demo) freeze under winuae
So early in the demo during the part where a ship flies across a planets surface, the ship freezes and landscape continues forever..
I've tried (seemingly) everything but not matter what the demo always bugs at this point. I know there's a few other threads addressing the issue but the OP's have just given up and gone onto floppy versions. Apparently works ok on real amiga but not winuae. Last edited by vagrant; 26 August 2013 at 10:19. |
16 March 2013, 07:23 | #2 |
Pastafarian
Join Date: Sep 2010
Location: Uppsala/Sweden
Posts: 290
|
File a bugreport at http://www.whdload.de/demos/Alcatraz_Odyssey.html so that the authors may notice it.
Last edited by ascp; 16 March 2013 at 07:24. Reason: wrong url |
16 March 2013, 08:24 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
With and/or without JIT? (2.6 betas have some JIT specific exception tweaks and I think this demo used division by zero exceptions during that part)
|
16 March 2013, 11:58 | #4 |
Registered User
Join Date: Mar 2012
Location: Australia
Age: 44
Posts: 1,126
|
Yep it happens with JIT enabled or disabled, cycle exact enable/disable also tried blitter options, 'more compatible' etc. (I even tried all 3 versions of the demo)
|
16 March 2013, 12:56 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
I checked it, I remembered correctly, it assumes undocumented DIVS behavior when dividing by zero (V flag getting cleared).
68020 sets V and UAE uses 68020 behavior if CPU is 68020+. 68060 (perhaps 68040 too) seems to again clear V. So this demo won't work on 68020 (real or emulated) but it may work on real 68030+ (or maybe only 68040+). |
16 March 2013, 16:48 | #6 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 866
|
This could probably fixed in the whdload slave.
Can you show me a code snippet and address where the bad code is located? |
16 March 2013, 17:21 | #7 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Quote:
Code:
00082F9C 0c86 0000 7fff CMP.L #$00007fff,D6 00082FA2 6f06 BLE.B #$00000006 == $00082faa 00082FA4 5245 ADD.W #$00000001,D5 00082FA6 e286 ASR.L #$00000001,D6 00082FA8 60f2 BT .B #$fffffff2 == $00082f9c 00082FAA 8fc6 DIVS.W D6,D7 00082FAC 6806 BVC.B #$00000006 == $00082fb4 00082FAE e287 ASR.L #$00000001,D7 00082FB0 5345 SUB.W #$00000001,D5 00082FB2 60f6 BT .B #$fffffff6 == $00082faa (and if someone is bored enough, 68030 and 68040 needs divs/divu divide by zero flag test) |
|
17 March 2013, 11:23 | #8 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 866
|
so clearing the V flag in the exception handler should sufficient I think
I will check behavior on 30/40... |
17 March 2013, 14:43 | #9 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
I just noticed 68020 DIVS and DIVU has very different flag bebavior when dividing by zero, DIVU is correct but DIVS isn't correct in UAE.
I think it is better to not "fix" this until all CPU models are tested. There may not be anything to fix.. (I don't want fixes for bad emulation, they only hide possible future problems) 68020 and 68030: Signed divide: Z=1, NVC=0. Unsigned: V=1, N=dst<0, Z=!N. (Weird, isn't it?) 68060: Clear C. All other flags are preserved. EDIT: I was wrong, demo works if CPU clears V or does not modify it. It only gets stuck if V is set by the CPU. EDIT2: A1200 + 68020 and 68060 tested and space ship part confirmed working. EDIT3: 68030 tested. Exact same as 68020 (was not surprising). I'd assume 68040 does same as 68060. -> No need for slave fixes. Last edited by Toni Wilen; 17 March 2013 at 17:20. |
17 March 2013, 23:47 | #10 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 866
|
wrote a test slave:
MC68060 UAE=N divu X=X N=X Z=X V=X C=0 divs X=X N=X Z=X V=X C=0 MC68040 UAE=N divu X=X N=X Z=X V=X C=0 divs X=X N=X Z=X V=X C=0 MC68030 UAE=N divu X=X N=1 Z=0 V=1 C=0 divs X=X N=0 Z=1 V=0 C=0 MC68020 UAE=N divu X=X N=1 Z=0 V=1 C=0 divs X=X N=0 Z=1 V=0 C=0 question remains if results on 20/30 depends on the value of the dividend |
18 March 2013, 08:21 | #11 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Thanks. 68040 = 68060, everything is fine
Quote:
Documentation also says overflow makes N and Z undefined. More testing to do, later.. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odyssey WHDLOAD | Rochabian | support.Games | 34 | 28 September 2018 20:32 |
Odyssey Reborn - Odyssey demo remake | viddi | Amiga scene | 4 | 11 October 2013 23:41 |
whdload freeze my 530. | Tiki | support.Games | 3 | 08 July 2011 22:26 |
Odyssey whd demo | Mad-Matt | support.Demos | 14 | 01 January 2008 23:58 |
WHDLoad version of Odyssey | oldpx | request.Old Rare Games | 2 | 18 December 2002 01:03 |
|
|