English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 06 January 2024, 04:03   #1
xaind
Registered User
 
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
Weird problem with Another World WHDLoad in WinUAE 5.1.0 (but not 5.0.0)

Apologies if this has already been reported somewhere and I missed it.

When I try to run Another World from a WHDLoad install in WinUAE 5.1.0 I just get a black screen. The emulator hasn't hung though as I can still press the WHDLoad quit key to exit the game.

If I use WinUAE 5.0.0 though the game works fine.

I'm using WHDLoad version 18.9.6601.

The problem occurs with Another World slave versions 2.7 and 2.8, but it works fine if I use slave version 2.4.

My config is set up to mimic an A1200, so 68020 with 24-bit addressing, Kickstart 3.1, AGA, Cycle-exact, 2MB Chip RAM, 4MB Z2 Fast RAM.

This isn't really that big of a problem I guess, since there's nothing in the later slave versions that I really need, so I can just stick with slave 2.4.. still I thought it might be worthwhile to report it.

(Note: A full install of the game with slave version 2.4 is on whdownload.com. Version 2.8 of the slave can be downloaded from whdload.de)
xaind is offline  
Old 06 January 2024, 14:21   #2
Velociraptor5
Registered User
 
Join Date: Sep 2016
Location: Antarctica
Posts: 164
Quote:
Originally Posted by xaind View Post
Apologies if this has already been reported somewhere and I missed it.

When I try to run Another World from a WHDLoad install in WinUAE 5.1.0 I just get a black screen. The emulator hasn't hung though as I can still press the WHDLoad quit key to exit the game.

If I use WinUAE 5.0.0 though the game works fine.

I'm using WHDLoad version 18.9.6601.

The problem occurs with Another World slave versions 2.7 and 2.8, but it works fine if I use slave version 2.4.

My config is set up to mimic an A1200, so 68020 with 24-bit addressing, Kickstart 3.1, AGA, Cycle-exact, 2MB Chip RAM, 4MB Z2 Fast RAM.

This isn't really that big of a problem I guess, since there's nothing in the later slave versions that I really need, so I can just stick with slave 2.4.. still I thought it might be worthwhile to report it.

(Note: A full install of the game with slave version 2.4 is on whdownload.com. Version 2.8 of the slave can be downloaded from whdload.de)


You are right, the same here. Try your "Cycle exact" but with "fastest possible" or untick only "Cycle exact (full)" and the game should work. Unfortunately, It's normal, sometime CE configuration works in older version of WinUAE and in latest version doesn't work (and viceversa). You'll find much more such examples like your Another World. But absolute majority of games work correctly under Cycle exact-full.
P.S. Don't use games from "whdownload.com", it's obsolete. The original source is Retroplay. Look here in EAB:
https://eab.abime.net/showthread.php?t=61028
Velociraptor5 is offline  
Old 07 January 2024, 09:05   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
Does 5.2 beta (see above in this forum) fix this? It has a fix that might help.
Toni Wilen is offline  
Old 07 January 2024, 11:53   #4
xaind
Registered User
 
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
Quote:
Originally Posted by Toni Wilen View Post
Does 5.2 beta (see above in this forum) fix this? It has a fix that might help.

No, unfortunately, it doesn't work with 5.2b1 either - but note that Velociraptor5's suggestion of unticking "Cycle-exact (Full)" fixes the problem in both 5.1.0 and 5.2b1.
xaind is offline  
Old 07 January 2024, 12:03   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
This is probably the most common hang reason (at least 3 different cases seen so far), program being doing bad things and poll vblank bit in INTREQR while vblank interrupt is active. Even on real HW this can introduce "unspecified" delay until polling detects the interrupt. (Especially if 68000 where it is emulated 100% accurately)

This probably needs some hack to work around...
Toni Wilen is offline  
Old 07 January 2024, 12:10   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
Quote:
Originally Posted by Toni Wilen View Post
This probably needs some hack to work around...
imo, much better would be a patch in the slave than a hack in WinUAE..
ross is offline  
Old 07 January 2024, 13:46   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
Quote:
Originally Posted by ross View Post
imo, much better would be a patch in the slave than a hack in WinUAE..
Yes but I am quite sure this is not whdload specific bug.
Toni Wilen is offline  
Old 07 January 2024, 14:23   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
Quote:
Originally Posted by Toni Wilen View Post
Yes but I am quite sure this is not whdload specific bug.
Yep, that's the reason I referred to the slave, not to whdload itself

Problem is in slave/"ReadJoyPad.s" (and that's probably why it only appeared from a certain version onwards, it wasn't supported before).
Code:
.wvbl:
	; wait for VBL
	lea	$DFF000,a0
	move.w	#$7FFF,intreq(a0)
.wait
	move.w	intreqr(a0),d0
	btst	#5,d0
	beq.b	.wait
	rts
This piece of code of course cannot work well if INTENA/VERTB is active (as you rightly said in your message).

Jotd can definitely fix it in a short time by updating the slave
ross is offline  
Old 08 January 2024, 04:07   #9
xaind
Registered User
 
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
Quote:
Originally Posted by ross View Post
Problem is in slave/"ReadJoyPad.s" (and that's probably why it only appeared from a certain version onwards, it wasn't supported before).
Code:
.wvbl:
    ; wait for VBL
    lea    $DFF000,a0
    move.w    #$7FFF,intreq(a0)
.wait
    move.w    intreqr(a0),d0
    btst    #5,d0
    beq.b    .wait
    rts
This piece of code of course cannot work well if INTENA/VERTB is active (as you rightly said in your message).

Jotd can definitely fix it in a short time by updating the slave
Confirmed. I replaced the code above with the following (shamelessly stolen from Stingray's mini startup code):

Code:
.wvbl:
    ; wait for VBL
    move.l    d0,-(a7)
.loop
    move.l    $dff004,d0
    and.l     #$1ff00,d0
    cmp.l     #303<<8,d0
    bne.b     .loop
    move.l    (a7)+,d0
    rts
and after that the game works fine in WinUAE 5.0.0, 5.1.0, and 5.2b1 with "Cycle-exact (full)" still ticked.

Note: I haven't checked if this change breaks the controller detection code that calls this routine, since I don't have a controller. If anyone else would like to give it a try I'll attach the modified .slave file.
Attached Files
File Type: slave AnotherWorld.Slave (6.2 KB, 13 views)

Last edited by xaind; 08 January 2024 at 04:22. Reason: Typo
xaind is offline  
Old 08 January 2024, 08:36   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
Above hangs if screenmode is NTSC. This is nasty situation because active interrupt can also "steal scanlines" (and amount of lines can be "random") which makes single line comparison also bad/unstable choice. Only guaranteed working method is to set some flag in vblank interrupt or to disable interrupt during the wait. Or maybe STOP instruction
Toni Wilen is offline  
Old 08 January 2024, 08:47   #11
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,201
the real fix is to disable interrupts then enable them. I have done that in more recent slaves where the problem occurred. But at the time it worked with Another World.

Will fix.
jotd 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
CD32 games with "weird startup procedure" - It's WinUAE problem mainly Velociraptor5 support.WinUAE 1 16 June 2022 17:53
WinUAE weird problem. jdog320 support.WinUAE 47 24 May 2016 17:31
WinUAE 2.3.3 Weird problem with a real hard drive logs attached ancalimon support.WinUAE 15 12 December 2011 10:03
WinUAE WHDLoad Install Problem Kitty project.WHDLoad 97 29 September 2009 04:16
Another World WHDload & Sprite problem! immodium support.Games 6 03 November 2005 21:04

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:09.

Top

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