joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.57k stars 374 forks source link

Half-life doesn't run #2455

Open Diatonator opened 3 years ago

Diatonator commented 3 years ago

Describe the bug Yeah I know. Not really the game to run on P1 MMX win 64 MB RAM, but I do remember running it myself on such a setup back in the day. I unfortunately don't remember which video card that setup had and did it had any 3D acceleration - I believe it didn't. It was kinda a slideshow on the worst settings possible, but I even had beaten a few episodes!

In software fullscreen mode the game crashes and exits right on the desktop. I seen some info on the internet on this issue, so this could be not Dosbox-X related. In software windowed mode the game page faults - see screenshot below. The windowed mode is listed in many places as a workaround for the fullscreen software mode crash. I coudn't find any info on this on Google, thus it could be some emulation specific stuff. In OpenGL mode, regardless if I choose 3dfx Mini or Default, it says that it's "not supported by the videocard" Voodoo is enabled and seems to be working with other games, so I'm not sure what's the deal here. In DirectX mode the game freezes after showing a few frames.

To Reproduce

Screenshots Software mode - windowed image MiniGL OpenGL - fullscreen image image

Environment (please complete the following information):

Diatonator commented 3 years ago

Hmm, the software windowed mode gave me a different page fault when I patched the game to 1.1.1.0 (KERNEL32.DLL instead of SW.DLL) image

henk717 commented 3 years ago

I have run Half-Life just fine on Dosbox before (Although admittedly not at super high framerates), try installing the Voodoo driver so you get better official directx support. You can grab it from here : http://falconfly.3dfx.pl/voodoo1.htm . I forgot which one i have in my dosbox drivers folder, but its either the latest reference driver or the iceman driver with it most likely being the latest reference driver.

Other than it being fun to emulate though you might get further running the game natively, the steam version is well supported on modern windows and with a bit of tinkering you should be able to get the retail copy working to.

Diatonator commented 3 years ago

Wow installing the last official drivers for Voodoo actually helped to run the game in MiniGL mode! Half-life started recognizing MiniGL modes as legitimate for running!

320x240 HalfLifeMiniGL_320_240.zip On 320x240 there is the annoying thing of a "screen inside the screen", as currently in Dosbox-X on 3dfx modes the screen is locked at 640x480 and apparently it had to fill the remainder with black. 640x480 HalfLifeMiniGL_640_480.zip

I made those captures using the external software because for some reason Dosbox-X didn't record any HalfLife gameplay! Only the main menu! Some problems recording 3dfx modes?

On both captures you could see a slightly annoying spikes (random "extensions" of the models) flashing all over the place and doors/walls flashing and/or getting invisible for a split second. Not sure if those problems were presented on the real hardware/drivers. HalfLifeSpikeScreenshot

Sometimes in this mode I randomly got this error on startup: image Not sure if it may impact the playing, I'll try beating some levels, as I see FPS as pretty acceptable for such an older machine. Got some freezes though, will see if they are that common.

Software mode is still unplayable due to all the reasons in the post above, but I believe it doesn't use Voodoo. I now really suspect that this was the mode I was playing on back in the day, because the gameplay was no near as smooth as I got with Voodoo! So I guess it worth investigating if the software mode problem is the emulator problem or some other kind of problem.

And also apparently the game didn't like me when I tried to release the mouse from the Dosbox-x and I got this sort of soft-lock: HalfLifeWtf

I tried 1.0.0.5 version, will try patching and see what comes of it. And of course I could pretty much play this on a modern system, but that's the thing with all those emulators - it's interesting what could be done on them.

Diatonator commented 3 years ago

A guard just randomly died near the train door! image Is this any kind of a known bug? Also various people, mostly scientists, consistently just screamed and dropped dead during the train sequence. It's funny, but I needed that guard! By searching this It seems like kind of a known bug: https://steamcommunity.com/app/70/discussions/0/627456355988110589/ Will see if I can do something about it.

Diatonator commented 3 years ago

I reinstalled the game, installed the patch 1.1.1.0 and now I constantly get freeze at the start of the train ride around here: image I didn't hear dying scientists this time, so that could be fixed I dunno, but I don't seem to get out of that train yet.

henk717 commented 3 years ago

Did a test of my own, and had even better results than when i tried this with a much older version years ago. The FPS of the game was no longer around 15fps but i got really smooth gameplay! I also did not notice any bugs with the game. So i think it is safe to say this is not a DOSBox-X issue but an issue with your Half-Life setup.

To make this as reproducable as possible i will walk you exactly trough what i did in my instance.

Here is a copy of my exact config :

#Windows 98 compatible VirtualPC config by Henk717
#No drivers or partitoning required, just install and go! :D
#This is the DOSBox-X version of this config and may not work properly with other versions of DOSBox.

# A: mounts to A.IMG
# C: mounts to C.IMG (Created if not supplied)
# D: mounts to D.IMG (Created if not supplied)
# E: mounts to E.ISO (You can use other formats like BIN/CUE, simply rename them and it will work)
# F: mounts to F.ISO (You can use other formats like BIN/CUE, simply rename them and it will work)

[sdl]
aspect=false
fullscreen=false
fulldouble=true
fullresolution=desktop
output=opengl
autolock=true
autolock_feedback=beep
priority=higher,higher

[render]
aspect=false
scaler=none

[dosbox]
title=VirtualPC Mode
memsize=128

[video]
vmemsize=8
vesa modelist width limit=0
vesa modelist height limit=0

[dos]
ver=7.1
hard drive data rate limit=0

[cpu]
cputype=pentium_mmx
core=auto

[pci]
voodoomem=max

[ide, primary]
enable=true

[ide, secondary]
enable=true

[ne2000]
ne2000=true
realnic=1

[gus]
gus=true
gusrate=44100
gusbase=240
gusirq=5
gusdma=3

[autoexec]
imgmake c.img -t hd -size 2048
imgmake d.img -t hd -size 2048
imgmount a a.img
imgmount c c.img
imgmount d d.img
imgmount e e.iso -t iso -ide 2m
imgmount f f.iso -t iso -ide 2s

boot -l a
boot -l c

I then installed a Windows 98 Second Edition OEM English (Not sure if Russian could have broken anything) copy from disk with all the default options, and changed my monitor resolution to 32-bit and 800x600 on the S3 adapter. Then i proceeded with the installation of DirectX 9, and followed it up by installing the Voodoo driver. After installing the Voodoo driver i ran Optimized.reg and OpenGL.reg that you can find in that drivers directory if you downloaded the correct one i linked before.

I then installed a copy of Half-Life 1.0 (Build 742) and changed the display to OpenGL -> MiniGL Driver -> 640x480 resolution. After starting the game the FPS was high and i had no issues with freezes or any of the NPC's dying.

This was tested on DOSBox-X MinGW Lowend 0.83.12 SDL1 Windows version.

skipcress commented 2 years ago

I’ve tried to get “Half-Life” running to no avail. I started off by updating DirectX to the latest version of DirectX 9 supported on Windows 98, then installed the latest iceman driver (because only the iceman driver had “Optimize.reg” and “OpenGL.reg”, as mentioned in the previous post by @henk717). I also went to the display settings of Windows and configured the display for 32 bit color, and a resolution of 800x600.

Then I installed “Half-Life” and set the video mode to “OpenGL,” selected the “MiniGL Driver,” and set the resolution to “640x480.” To be honest, I’m not sure which version of “Half-Life” I’ve got installed, I got it from here: https://archive.org/details/HalfLifeUSA

When I attempt to play the game, audio is routinely dropped, and it invariably hangs before the end of the opening tram ride. Also, I’m getting those same “spikes” and invisible walls described by @Diatonator. I have tried a number of different settings for the cpu cycles, but leaving it at the default seems to be the most reliable, which isn’t saying much. As for differences in my config file as compared with the example:

…and that’s pretty much it.

I’m using the latest version of DOSBox-X at the time of this writing (0.84.0), my host machine is running Ubuntu 20.04.4 LTS, I’ve got an AMD FX-8320 processor, an NVIDIA GeForce GTX 970 graphics card, and 32GB of ram. The guest operating system is Windows 98 SE.

Anybody have any ideas as to how I can get this game running?

Thanks! Kirk

skipcress commented 2 years ago

In case it's helpful for anyone else, I finally got it to work by changing the "cputype" to "ppro," which I initially did to circumvent a known audio issue with MMX simulation. After making that change, the game works nicely, just a minor hiccup here and there.