It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
After several unsuccessful attempts to start Bad Mojo Redux in Linux, I turn to community for possible help.

I have tried running current GOG version labeled 2.0.0.3 using different Wine builds, either directly or from PlayOnLinux, but the error message is always the same:

Troubles? Look at comments in launcher.bat.
Can't recognize 'gencfg.bat C:\GOG Games\Bad Mojo' as an internal or external command, or batch script.
Search for said gencfg.bat confirmed the validity of error notification as it doesn't exist.

Following advice given in the error message I looked for launcher.bat and found one named launcher2.bat in the game dir with the following contents:

@echo off

echo Troubles? Look at comments in launcher.bat.

REM Unsets all compatibility layer options. Without doing so,
REM BADMOJO.EXE crashes during ole32.dll initialization,
REM presumably due to a bad call in WAVEOUT.DLL's DllMain
REM routine.

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

REM quicktime.qts is a small dll that loads qthook.dll and
REM returns FALSE from DllMain's PROCESS_ATTACH. This causes
REM BADMOJO.EXE to proceed with the next entry in it's QT
REM search logic, which happens to be the path the QuickTime
REM registry entries point to. Refusing the library load
REM causes our quicktime.qts to unload, which is why a second
REM stage library is needed.

REM Finally, qthook.dll hooks kernel32.GetVersionExA on load.
REM The injected GetVersionExA returns Windows XP SP 2. This
REM is needed to activate QuickTime's DirectDraw backend to
REM play the movies at decent speed. QuickTime's d3d9 backend
REM is not used for some reason (though d3d9.dll is loaded),
REM and the GDI backend plays the movies at about 1 fps.

cmd.exe /C gencfg.bat %CD%

set __COMPAT_LAYER=
BADMOJO.EXE
Since it calls for non-existent gencfg.bat before the game executable, origin of the error becomes clear. Somehow I doubt this is Wine-related as I don't see why it wouldn't install all the files (if presumably gencfg.bat existed) when installation process went smoothly on every occasion.

Omitting the launcher and running BADMOJO.EXE manually doesn't yield any error message, but it doesn't start either.

The Wine AppDB entry lists the game with Platinum rating, but there's no mention of using GOG version of the installer.

Any ideas highly appreciated!
This question / problem has been solved by vv221image
Can you post the full console return of the following command?
innoextract -l setupXXX.exe
"setupXXX.exe" being the GOG installer, and the 'innoextract' command being provided by a package of the same name in most distributions, or downloadable from GitHub:
https://github.com/dscharrer/InnoExtract
Post edited October 26, 2015 by vv221
Nice one! Here's the output.
It appears launcher2.bat is the only batch there too, so now it's confirmed that it calls missing gencfg.bat which it shouldn't, but that doesn't explain why BADMOJO.EXE doesn't start when invoked on its own.
You don’t get any console feedback when trying to run directly badmojo.exe?
Have you tried installing the latest version of QuickTime, then running the game from badmojo.exe?
I have just installed QuickTime 7.7.8, currently the only one in the prefix, but it still won't start. Also had to change Windows version from XP to 7 in Wine cfg in order to install QT.

After that I tried running BADMOJO.EXE from the console again and 2 messages appeared:

fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}

err:ntdll:RtlpWaitForCriticalSection section 0x7bcdc300 "loader.c: loader_section" wait timed out in thread 0026, blocked by 0009, retrying (60 sec)
Thank you for helping me troubleshoot this!
Here is how I got Bad Mojo Redux to work near perfectly on my Debian Sid amd64.
I’m using WINE 1.6.2-22 and winetricks 0.0+20141009+svn1208-2

1. I create a clean WINE prefix:
export WINEPREFIX=~/badmojo-wine
wineboot -i
2. In this prefix I install QuickTime:
winetricks quicktime76
When a configuration window opens, go to "Advanced" and chose to play the movies in "safe mode" (not DirectX).

3. I then install the game, under a non-tricky directory (C:\badmojo):
cd $WINEPREFIX/drive_c/
wine setup_badmojo_2.0.0.3.exe /nogui
4. Then I can finally run the game:
cd badmojo
wine BADMOJO.EXE
Movies play fine, the only bug I get so far is bad rendering of the shadows (white instead of black).
The game does not take the full screen, but I guess it would if I set my desktop resolution to 640×480 prior to running the game.

Once I’m sure that I got a reproducible, non-failish method to install the game I’ll write a ./play.it script to automate the process ;)

-----

/!\ launcher.exe & launcher2.bat are *not* needed on Linux.
Post edited October 28, 2015 by vv221
I've tried numerous times with varying parameters and the result is that it managed to run, kind of, only on one occasion while all the other attempts yielded the same effect as before.

Using either 32 or 64-bit wineprefix under 32 or 64-bit distros (Ubuntu and derivatives) and different Wine versions (1.6.2, 1.7.50+) I couldn't get the game to start directly from it (as before with clean prefix), end result always being the same as previously described.

Strangely, the only way I could get it to run is by installing in POL while following your advice. So, the game started, but before menu showed up, error notification window popped up saying:

BadMojo hacks

Cannot hook: Unexpected byte sequence
After I close it, it appears 5 more times before I'm presented with the main screen. Yet, sound (I've also tried setting it to Safe mode) and what should be animations are so glitchy that I didn't get past the intro.

Something's still missing for it to work properly in different environments, but we're much closer than before. Thanks for sharing your finds!
Post edited October 29, 2015 by v3
To get rid of these problems, try two things:
_installing QuickTime via the winetricks command I posted earlier (don’t forget the setting in the "advanced" tab, it’s what avoids very slow framerate for movies)
_removing the qthook.dll file from your game directory
avatar
vv221: _installing QuickTime via the winetricks command I posted earlier (don’t forget the setting in the "advanced" tab, it’s what avoids very slow framerate for movies)
Yes, it's been set like you said all along. With vanilla Wine I installed it using winetricks, which I couldn't (or didn't know how) to do in the case of PlayOnLinux so I installed it manually in the same virtual drive as the game (the only occasion when it ran).
avatar
vv221: _removing the qthook.dll file from your game directory
Now I can't even reproduce the one "successful" start using POL, so I can't say if removing it would help with choppy A/V.

But it doesn't make a difference in the case of installations that wouldn't start anyway.

I guess I could always boot Debian and give it a go, but at this point I'm more interested in getting it to run under Ubuntu-ish distros which shouldn't matter that much being first relatives. The second option is to file a Wine bug report, but I'm curious how would they troubleshoot it if they don't have the same GOG version of the game?
avatar
v3: The second option is to file a Wine bug report, but I'm curious how would they troubleshoot it if they don't have the same GOG version of the game?
It’s a good idea, they will guide you to produce the logs that could help them spot the bug.

By the way, there’s not a "WINE team" with a collection of games: troubleshooting is mostly done by users like you and me, only some of them are WINE developpers. With thousands of games supported it couldn’t work otherwise ;)
avatar
vv221: By the way, there’s not a "WINE team" with a collection of games: troubleshooting is mostly done by users like you and me, only some of them are WINE developpers. With thousands of games supported it couldn’t work otherwise ;)
Thanks for that info. But whoever assigns themself to troubleshooting would have to own the correct copy of the game, right? I saw that demos were uploaded as attachments with some bug reports, but here it is not possible afaik.

I will mark your solution in a few days, just to leave enough time for possible further developmen, since you did solve it with current options in place. It would probably need more internal tweaking to make it work under all environments (that recent succesful test in WineDB lists Fedora for example).

I would also like to point out and thank you again for the selfless help you provided with this issue and to inform everyone reading this that they can find more goodies from vv221 by visiting:
<span class="bold">./play.it</span> project wiki
<span class="bold">./play.it</span> GOGmix
<span class="bold">./play.it</span> GOG forum announcement thread

Keep an eye on this one!
avatar
v3: I would also like to point out and thank you again for the selfless help you provided with this issue and to inform everyone reading this that they can find more goodies from vv221 by visiting:
<span class="bold">./play.it</span> project wiki
<span class="bold">./play.it</span> GOGmix
<span class="bold">./play.it</span> GOG forum announcement thread

Keep an eye on this one!
Thanks for that!

If everything go as planned, I should go back to the publication of a new supported game every day in the coming months ;)
Ok, I finally managed to run the game as it should, though still not using Wine directly, but it works.

Here's how I started it in Ubuntu and friends following vv221's previous advice:
1. Install PlayOnLinux
2. Download latest QuickTime for Windows (7.7.8 at the moment) from the official page
3. Open POL and in Tools > Manage Wine versions install 32-bit (x86) Wine 1.7.54
4. Open "Configure" from POL toolbar and create new virtual drive named "mojo" for example. In its General tab set Wine version to 1.7.54 (not System), then go to Wine tab, open Configure Wine and set Windows Version to Windows 7. Exit configuration window.
5. Run Install a program > Install a non-listed program > Edit or update existing application > check Show virtual drives and select mojo (if that's how you named it) > browse for downloaded QuickTime installation.
6. After QT is installed, start it and go to Edit > Preferences > QuickTime Preferences. Set both audio and video playback to SafeMode under Audio and Advanced tabs.
7. In the same manner install Bad Mojo Redux, just make sure to enter C:\badmojo as install location and when process is finished don't opt to launch the game but exit the installer. When POL asks you to make a shortcut, locate BADMOJO.EXE and select it, because you will use this executable to start the game directly.

Btw, this time there were no hook-related errors so no need to remove qthook.dll.

Sincere thanks to vv221 for helpful guidance and solution!

Glad to see your project is alive and kickin' :)
Post edited October 31, 2015 by v3
Thanks for reporting your method, I’ll see if from your experience and mine I manage to build a script taking care of all of this, working for everyone.
avatar
v3: Ok, I finally managed to run the game as it should, though still not using Wine directly, but it works.

Here's how I started it in Ubuntu and friends following vv221's previous advice:
1. Install PlayOnLinux
2. Download latest QuickTime for Windows (7.7.8 at the moment) from the official page
3. Open POL and in Tools > Manage Wine versions install 32-bit (x86) Wine 1.7.54
4. Open "Configure" from POL toolbar and create new virtual drive named "mojo" for example. In its General tab set Wine version to 1.7.54 (not System), then go to Wine tab, open Configure Wine and set Windows Version to Windows 7. Exit configuration window.
5. Run Install a program > Install a non-listed program > Edit or update existing application > check Show virtual drives and select mojo (if that's how you named it) > browse for downloaded QuickTime installation.
6. After QT is installed, start it and go to Edit > Preferences > QuickTime Preferences. Set both audio and video playback to SafeMode under Audio and Advanced tabs.
7. In the same manner install Bad Mojo Redux, just make sure to enter C:\badmojo as install location and when process is finished don't opt to launch the game but exit the installer. When POL asks you to make a shortcut, locate BADMOJO.EXE and select it, because you will use this executable to start the game directly.

Btw, this time there were no hook-related errors so no need to remove qthook.dll.

Sincere thanks to vv221 for helpful guidance and solution!

Glad to see your project is alive and kickin' :)
So does it work on WINE 1.8 and up?