sarah-walker-pcem / pcem

PCem
http://pcem-emulator.co.uk
GNU General Public License v2.0
1.53k stars 217 forks source link

Blood crashes on Windows 98 #211

Open eddmanx opened 1 year ago

eddmanx commented 1 year ago

The game works in DOS mode, however under windows, it crashes shortly after launch. At first glance it might be perceived as a game bug, however apparently it doesn't occur on real hardware.

It happens with both v1.0 and v1.11 of the game.

It also used to happen on 86box, which interestingly was introduced by the code ported from PCem. https://github.com/86Box/86Box/issues/2700

EDIT: The game works fine with PCem v16.

To Reproduce Play the game on Windows 98.

Emulator configuration It doesn't really matter but I used these:

Host machine

unreal9010 commented 1 year ago

You need to set the sound card IRQ to 5 in order to be able to run this game.

eddmanx commented 1 year ago

That doesn't matter. It crashes in the windows environment regardless. It works with IQR 7 under DOS.

unreal9010 commented 1 year ago

It matters if you run it under Windows. It used to crash for me too when I had the IRQ set to 7. Once I set it to 5 the game started working normally under Windows 95 and I was able to finish it so it's definitely not a PCem bug.

unreal9010 commented 1 year ago

I remember I had to do this back in the day if I wanted to run the game from Windows.

eddmanx commented 1 year ago

I stated that it crashes "regardless", meaning I've tested it with 5 and it still happens. I also linked to the issue page on 86box, which was fixed. Apparently it doesn't happen on real hardware. Had you read that link, you'd see IRQ 5 is mentioned there too.

Maybe windows 95 behaves differently, or the bug manifests on certain emulated hardware setups.

unreal9010 commented 1 year ago

I doubt it. I upgraded to Win 98 SE when I switched the mainboard and never had any problems with the game on my real machine. I also tried the game under 98SE in PCem and it worked. I ripped my copy (the original 1997 big boxed European release by Eidos) to MDS/MDF since it's a mixed mode CD.

eddmanx commented 1 year ago

Again, maybe it's setup dependent. Test with the settings I posted in the OP.

Besides, the 86box devs mention it's a CPU code issue in v17 and they fixed it on their side.

Maybe the type of the host CPU matters too.

EDIT: You probably ran the game on v16 or older. If it was with v17, then your host CPU doesn't trigger the bug.

leilei- commented 1 year ago

It's related to the smacker movie playback. If you move the SMK's out, it'll work

eddmanx commented 1 year ago

Yes, it's related to the videos.

I loaded the HDD image with the exact same setup on v16 and the game works fine with videos.

Load the HDD on v17 and the game crashes.

unreal9010 commented 1 year ago

Try one of the more recent development builds too to see if there's any difference.

eddmanx commented 1 year ago

Do you remember if you used v17 to play blood? If you can, test it again to see if the host CPU makes a difference. Ryzen 2000 surely is affected.

I tested the latest vNext and it crashes too. I don't know if Michael has even done any actual changes to the CPU code. The low performance of vNext might simply be compiler related. (I don't mean the dynarec, but the compiler that is used to generate the binaries.)

unreal9010 commented 1 year ago

The first time I ran Blood under PCem was when v16 came out (I remember I used the FIC board). The game kept crashing. At first I thought it might have something to do with AudioPCI being a PCI-based card so I switched it with SB16. There was no difference as the game continued to crash but then I remembered the old tip from back in the day and changed the sound card IRQ. Then the game started to work. I ran the game under v17 too (Gigabyte board) and it worked fine. However, I must admit I never ran the game with any of the 430VX-based boards.

unreal9010 commented 1 year ago

And yes, there are many compiler and dynarec-related bugs that are currently plaguing PCem. I'd be happy to fix these but I lack necessary skills.

Tasosgemah commented 1 year ago

I haven't managed to make Blood work in PCem either.