ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.47k stars 1.07k forks source link

Bad Mojo Redux (255960) #3968

Open lavadrop opened 4 years ago

lavadrop commented 4 years ago

Compatibility Report

System Information

I confirm:

Symptoms

Game just crashes after displaying a black screen that says: Troubles? Look at comments in launcher.bat I've tried installing QuickTime 7.6 using winetricks and changing the resolution to a 640x480 virtual desktop; it makes no difference. I also created the BADMOJO.INI file by following the instructions in the launcher2.bat file and the comments on www.protondb.com

Apparently the GOG version just runs after installing QuickTime 7.6

steam-255960.log

Reproduction

Just install and run.

whizse commented 1 year ago

With Proton 7.0-5 the game, including videos, work fine and can be completed.

One lingering problem is that game is stuck in a tiny 640x480 window in the top left of the screen. But gamescope can be used as a workaround for a normal fullscreen view:

Something like: gamescope -w 640 -h 480 -W 3440 -H 1440 -f -- %command%

The launcher.bat script in the game files mentions some issues with the fullscreen mode which I guess trips up the full screen scaling in Proton:

REM launcher.exe Is a small C program that uses system() to REM execute this file. Before doing so, it sets the resolution REM to 640x480 with ChangeDisplaySettingsExW. This is needed REM because we had to deactivate Windows' 640x480 compat tool REM due to the above problem. Windows restores the previous REM screen setup on process exit. Unfortunately, tabbing out REM of the game does not restore the display mode, sorry :-(.

michaelneverwins commented 1 year ago

With Proton 7.0-5 the game, including videos, work fine and can be completed.

Is that with a fresh install or did you do some manual set-up? The game still just crashes for me, with Proton 7.0-6, on Linux Mint 20.3.

whizse commented 1 year ago

Is that with a fresh install or did you do some manual set-up? The game still just crashes for me, with Proton 7.0-6, on Linux Mint 20.3.

Fresh install, no changes. I re-tried the game and it still works here with 7.0-6.

The log you posted shows a lot of errors for Pulseaudio and ALSA. Do you have an unusual audio configuration?


20491.894:00e4:00e8:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\winepulse.drv" at 0x7ce30000: builtin
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 4016321423
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 3619066774
Ignoring received block reference with non-registered memfd ID = 3619066774
20491.898:00e4:00e8:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\winepulse.drv" : builtin
20491.900:00e4:00e8:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\winealsa.drv" at 0x7ce20000: builtin
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 4016321423
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 419411532
Ignoring received block reference with non-registered memfd ID = 419411532
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Protocol error

mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 4016321423
mmap() failed: Cannot allocate memory
Failed to create permanent mapping for memfd region with ID = 2857772511
Ignoring received block reference with non-registered memfd ID = 2857772511
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Protocol error
michaelneverwins commented 1 year ago

It wasn't my log, but no, my audio set-up is/was not unusual; I just use Linux Mint and I don't do any tinkering with audio. I'm on Linux Mint 21.1 now, and getting the same result with Proton 8.0-1; the screen goes black for a second as if the game is about to start, but then it closes. I'm not seeing the Protocol error found in @lavadrop's log. I am getting those Cannot allocate memory errors, which seem significant but I'm not an expert.

I suppose I might as well upload my own log here: steam-255960.log

Vulkan-related warnings in that file are probably due to the fact that my GPU is a Radeon HD 7950, which is rather old now. The only graphics-related tinkering I've done to my system is using kernel parameters to use the amdgpu driver instead of radeon as described here. Generally I don't have an issue running games with DXVK, and I don't even know if that would come into play here, but for what it's worth, PROTON_USE_WINED3D=1 doesn't seem to make any difference. For the attempt which generated the log attached to this comment, I just had PROTON_LOG=1 %command% in the launch options, and it was a fresh install.

michaelneverwins commented 5 months ago

I had hoped that a Proton update would eventually fix this, but my out-of-the-box experience with Proton 9.0-1 is the same as with Proton 8.0-1. Fortunately, I found a solution.

Upon running the game for the first time after a fresh install — now with Proton 9.0-1 on Linux Mint 21.3 (although I don't think it makes any difference) — the game creates BADMOJO.INI in the same folder as BADMOJO.EXE before crashing. I had looked in this BADMOJO.INI file in previous attempts to get the game working, but didn't know what to make of it. Most lines just reference the locations of various folders in the game's install directory, and the remaining lines are rather cryptic:

[booger]
BACKGROUND=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\BACKGND
TOPO=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\TOPO
BTC=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\BTC
PALETTE=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\PALETTE
SCRIBBLE=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\SCRIBBLE
CEL=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\CEL
SCRIPT=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\SCRIPT
ROACH=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\ROACHD
MOVIE=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\MOVIE
MASH=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\MASH
SOUND=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\SOUND
SAVE=Z:\home\michael\_STE~3II\DEBI~SJU\STEA~P3I\common\BadMojo\SAVE
USER=Badmojo Fan
[SoundMix]
SoundOn=1
BetweenScreens=1
SmallChunkSize=3
BigChunkSize=26
BigChunkMethod=0
DumbSound=0
[badmojo]
Preferences=1111110

Note that the folder locations are just sub-folders of the install directory, as accessed via the prefix's z: link to /. I assume the weird parts (_STE~3II\DEBI~SJU\STEA~P3I) are 8.3 filenames or similar. The actual location of the game's install directory, on my machine, is /home/michael/.steam/debian-installation/steamapps/common/BadMojo. I don't actually know how the name shortening works, but I figured I might as well try playing around with this file.

I tried a few things, and what ultimately worked was just replacing all _STE~3II\DEBI~SJU\STEA~P3I with .steam\root\steamapps. (While the actual location is under ~/.steam/debian-installation/steamapps, there is a link to ~/.steam/debian-installation at ~/.steam/root. I generally use that link just because it's shorter and thus typing it is easier, but in this case it seems to be required. Replacing all _STE~3II\DEBI~SJU\STEA~P3I with .steam\debian-installation\steamapps resulted in a "Bad Mojo CD not present in drive Z" error; this is probably because the folder name debian-installation is too long, considering that simply using root instead allows the game to run.) This search-and-replace was done using sed:

sed s/'_STE~3II\\DEBI~SJU\\STEA~P3I'/'.steam\\root\\steamapps'/g -i ~/.steam/root/steamapps/common/BadMojo/BADMOJO.INI

My BADMOJO.INI file now looks like this:

[booger]
BACKGROUND=Z:\home\michael\.steam\root\steamapps\common\BadMojo\OVER;Z:\home\michael\.steam\root\steamapps\common\BadMojo\BACKGND
TOPO=Z:\home\michael\.steam\root\steamapps\common\BadMojo\TOPO
BTC=Z:\home\michael\.steam\root\steamapps\common\BadMojo\BTC
PALETTE=Z:\home\michael\.steam\root\steamapps\common\BadMojo\PALETTE
SCRIBBLE=Z:\home\michael\.steam\root\steamapps\common\BadMojo\OVER;Z:\home\michael\.steam\root\steamapps\common\BadMojo\SCRIBBLE
CEL=Z:\home\michael\.steam\root\steamapps\common\BadMojo\OVER;Z:\home\michael\.steam\root\steamapps\common\BadMojo\CEL
SCRIPT=Z:\home\michael\.steam\root\steamapps\common\BadMojo\SCRIPT
ROACH=Z:\home\michael\.steam\root\steamapps\common\BadMojo\ROACHD
MOVIE=Z:\home\michael\.steam\root\steamapps\common\BadMojo\OVER;Z:\home\michael\.steam\root\steamapps\common\BadMojo\MOVIE
MASH=Z:\home\michael\.steam\root\steamapps\common\BadMojo\OVER;Z:\home\michael\.steam\root\steamapps\common\BadMojo\MASH
SOUND=Z:\home\michael\.steam\root\steamapps\common\BadMojo\SOUND
SAVE=Z:\home\michael\.steam\root\steamapps\common\BadMojo\SAVE
USER=Badmojo Fan
[SoundMix]
SoundOn=1
BetweenScreens=1
SmallChunkSize=3
BigChunkSize=26
BigChunkMethod=0
DumbSound=0
[badmojo]
Preferences=1111110

With that, the game runs successfully, but in one corner of the screen. This failure to fill the screen properly can then be addressed using gamescope in the launch options (e.g. gamescope -w 640 -h 480 -f -- %command%).

michaelneverwins commented 5 months ago

After restoring BADMOJO.INI back to its default state, I've found that I can also get the game working just by replacing the shortened form of debian-installation with root using

sed s/'DEBI~SJU'/'root'/g -i ~/.steam/root/steamapps/common/BadMojo/BADMOJO.INI

so that the file contains the following:

[booger]
BACKGROUND=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\BACKGND
TOPO=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\TOPO
BTC=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\BTC
PALETTE=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\PALETTE
SCRIBBLE=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\SCRIBBLE
CEL=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\CEL
SCRIPT=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\SCRIPT
ROACH=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\ROACHD
MOVIE=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\MOVIE
MASH=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\OVER;Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\MASH
SOUND=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\SOUND
SAVE=Z:\home\michael\_STE~3II\root\STEA~P3I\common\BadMojo\SAVE
USER=Badmojo Fan
[SoundMix]
SoundOn=1
BetweenScreens=1
SmallChunkSize=3
BigChunkSize=26
BigChunkMethod=0
DumbSound=0
[badmojo]
Preferences=1111110

I don't know why only debian-installation shortened to DEBI~SJU is a problem, while the other shortened names are fine, but the root link allows me to avoid the need for debian-installation in any form. If that link didn't exist by default, then I suppose I could have created my own link to avoid any long/problematic folder names.