bochs-emu / Bochs

Bochs - Cross Platform x86 Emulator Project
https://bochs.sourceforge.io/
GNU Lesser General Public License v2.1
843 stars 98 forks source link

Crash in Diablo with Voodoo 3 #200

Closed Vort closed 8 months ago

Vort commented 8 months ago

When Diablo game is started in Windows 95 with Voodoo 3 card (drivers) and enabled hardware acceleration, it crashes. Game works fine with Cirrus card or with Voodoo 3 and disabled acceleration. Also similar problem happens with StarCraft game (but it works ok in Windows XP).

image

Game can be downloaded here. Version: 63ab5ea24ae0f65bed95d1dca3153cb6e0cbac74

Vort commented 8 months ago

In both cases (Diablo and StarCraft) crash happens inside of DdSetExclusiveMode function: bochs_diablo_crash

Vort commented 8 months ago

I have found article which explains how to make DirectDraw programs: https://www.mycplus.com/tutorials/microsoft-direct-x-programming/directdraw-sample/

When I built and tried to execute example from this article - it showed the same behaviour as Diablo and StarCraft. Crash probably happens in different function this time (upd: in DdCanCreateSurface), but it have the same dependency on hardware acceleration settings.

Here is binary and source code: ddsamp.zip.

@vruppert can you confirm that ddsamp.exe crashes with Windows 95, Voodoo 3 and full hardware acceleration? I suspect that I may damaged my Windows 95 installation, that's why confirmation is important.

Vort commented 8 months ago

+430h is offset of dwReserved3 from the start of DDRAWI_DIRECTDRAW_GBL. When crash happens, dwReserved3 is 0, but 3dfx32v3.dll driver expects it to be not zero.

Vort commented 8 months ago

Most likely, this driver is just not compatible with DirectX 3. When I installed DirectX 8.0a, Diablo, StarCraft and ddsamp started to work properly.