Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Implement a workaround/compatibility solution for Motor City Online #121

Closed
SimplyTadpole opened this issue Mar 15, 2023 · 15 comments · Fixed by #125
Closed

Request: Implement a workaround/compatibility solution for Motor City Online #121

SimplyTadpole opened this issue Mar 15, 2023 · 15 comments · Fixed by #125

Comments

@SimplyTadpole
Copy link

SimplyTadpole commented Mar 15, 2023

Hello! I wanted to apologize in advance if this isn't a proper usage of this project's issue reports - this technically isn't an issue with D8VK itself as it also occurs with vanilla Wine, and I couldn't find anything on this page related to requesting support for a specific game, but Motor City Online is a game that's mostly too obscure for upstream Wine developers to consider it a high-priority to fix at the moment (and understandably so; they have to focus on games and programs that are more popular rather than a dead game less than a dozen of people still play nowadays, lol), and since D8VK is a project actively focusing on older games, I hoped it would at least be okay to make a page here.

Motor City Online (I will refer to it as "MCO" from this point onwards) was an MMO from 2001 that was later shut down in 2003, and people made an unofficial launcher based on a leaked debug tool that allowed people to play it in a limited offline mode against AI opponents... unfortunately, for some reason, even this tool doesn't seem to let people play the game on Wine, as although the game will install successfully and the debug launcher will open, atttempting to actually launch the game will always cause the game to crash immediately, usually with the following error message:

image

This appears to happen regardless of the graphics card the host is actually using (I use a Radeon RX 570, which obviously has hardware acceleration, plus also discards the possibility of it being buggy Nvidia drivers). It's possible to bypass this error message through the Wine registry error by going to "HKLM\Software\Wow6432node\Electronic Arts\Motor City" and setting the value "D3D Device" to 0, but this merely leads to another issue - the game will launch and show the loading screen for a split-second, only to immediately crash anyway, with a different error message:

image

The errors, as well as the log files Wine accrued, seem to imply this issue may be related specifically to graphics rather than Wine itself, which hopefully means this could be fixed on D8VK's end without having to rely on upstream. On the other hand, a developer working on a rewrite of MCO's engine said that apparently the game utilizes "direct video card access", which "makes things like wine, virtualbox, [...] etc really unhappy". I don't exactly know what that entails, or if it can even be resolved on D8VK's end, but it sounds bad from my layperson perspective, and since said developer has been dealing with this program for 7 years, I'm inclined to believe they are speaking the truth on this.

I'm dearly hoping it's possible to add a workaround to this, though; I had a lot of fun playing this game when I was on Windows, and I'd be sad to lose the ability to play this game on Linux.

Software information

Name of the game: Motor City Online
Settings used: I attempted everything - a 32-bit prefix; Windows version to XP, 98, 10; dgVoodoo; disabling DXVK; nGlide; regular Wine; Wine-GE; Wine-TKG; no matter what I tried, nothing would work. Not even D8VK seemed to do the trick - though it's worth noting that D8VK seems to only be available for 64-bit prefixes, and MCO will crash if it's not running on a 32-bit prefix apparently. (Well, at least crash harder than it does on a 32-bit prefix.)

System information

  • GPU: Radeon RX 570
  • Driver: amdgpu
  • Wine version: 8.3; 7.0; Wine-GE-Proton-7.35
  • D8VK version: 0.10 - New Croak

Apitrace file(s)

I couldn't really figure out how to get the Apitrace thingy to work as MCO uses an unique d3d8 file...

Log files

  • d3d8.log: None were generated as the game crashes immediately before a log could be generated
  • Wine log: I uploaded two.
    mco log 1.txt
    mco log 2.txt

Again, terribly sorry if this isn't the proper place for this, or if I wrote this request wrong. If the latter, please let me know what I need to add.

@WinterSnowfall
Copy link

The good news is that the game is reportedly already working in Windows with d8vk. There's already some fixes for it in main, 8ddf18f IIRC, which should address problems with d3d rendering (it's actually mostly the game taking a very weird approach...).

See here

image

The only thing remaining is to get it working in Wine, and see why it crashes.

@SimplyTadpole
Copy link
Author

Is there anything I can do to help sort out the crash issue? But I'm guessing that means this is probably out of scope for D8VK? :c

@SimplyTadpole
Copy link
Author

SimplyTadpole commented Mar 17, 2023

Whoa whoa whoa, tell me more: is there a way to get the d3d8 wrapper from Better Rayman 3 without having to install Rayman 3 solely to run their setup installer? And how can I run DgVoodoo in DX9 mode? When I tried it, it seemed to only let me use it on DX11 mode :/

Also, since apparently Better Rayman 3's custom DX8 wrapper makes MCO run successfully if paired with dgVoodoo, maybe that's a good enough base for the D8VK team to figure out a fix?

EDIT: I attempted to follow your instructions, but no dice - MCO still crashes:

image
image
image

This is the log file: mco log 6.txt

@SimplyTadpole
Copy link
Author

SimplyTadpole commented Mar 17, 2023

I did the exact same steps, and it still crashes, with the exact same error messages I posted above.

Where did you get d3dx9_43.dll and d3dcompiler_43.dll, anyway? From winetricks? I don't have either of those in my installation folder :/

@SimplyTadpole
Copy link
Author

...Okay, I managed to get it to work!! And the issue was incredibly stupid, too 😓

image

Following your instructions did the trick quite well (and installing Better Rayman 3 for the d3d8 wrapper didn't need Rayman 3 to be installed at all, thank goodness!), the issue was actually due to something completely unrelated - specifically, the Motor City update files have to replace a file called "text.eng", except the replacement file is called "text.ENG", and due to Linux's case-sensivity, the old file wasn't actually replaced, so the game kept trying to call the old one, which naturally made it crash. Deleting the old file and renaming the new one fixed it... I really should've considered doing this sooner 😅

Just for the sake of preservation, I'm uploading the necessary d3d8 files here in case someone wishes to play MCO on Linux and Better Rayman 3 ever gets taken down for whatever reason, right here.

Now, since it seems we've proven that it is possible to get Motor City Online to run on Linux with those bizarre nonsensical hacks, I think it's fair to ask that compatibility for it in D8VK itself be implemented, right? At least I'd like for others to be able to get this game running without having to resort to bizarre hacks involving another game entirely. 😅

@WinterSnowfall
Copy link

WinterSnowfall commented Mar 26, 2023

I've got the game working with d8vk (in Wine), with just these steps:
a) "HKLM\Software\Wow6432node\Electronic Arts\Motor City" and setting the value "D3D Device" to 0
b) text.ENG -> text.eng when you apply the offline patch
c) Setting the resolution to 800x600
d) make absolutely sure "D3D Device" is set to 0 again
e) Use the MCity_Launcher.exe to launch the game

ApiTraceMode

PR #125 improves the abysmal performance and brings it to levels I think are on par with native. I doubt much more can be optimized for this game in particular, but things may get better once d8vk performance in general is further tweaked in the future.

@WinterSnowfall
Copy link

WinterSnowfall commented Mar 28, 2023

Just FYI, it's perfectly fine to try whatever combination gets the game launched for you, but simply by following the steps I have shared above, I can confirm it also just works with d8vk on Intel:

MCOnline

Performance seems even better than it was on my RTX 3060, ironically. There's no artifacting or other problems of any nature really. The performance you're seeing is with PR #125 applied.

@WinterSnowfall
Copy link

I did indeed take the screenshot on default settings, but then maxed them out and played the game for about an hour on Intel to compare performance.

I believe you are correct in your assumption that the CPU is the bottleneck at this point, since I do have somewhat faster single-core performance on my laptop. Perhaps this situation was not clear when the game was designed (and GPUs were still insufficiently fast to expose this bottleneck), or they simply didn't know how to address it.

In any case, although your fps counter will not launch into space with v-sync force disabled, the game does usually hold a very steady 60 fps even on my iGPU, so I believe we can consider this issue closed once my PR is merged. There's nothing we can magically do in d8vk if a game's engine is doing things suboptimally.

@Blisto91
Copy link

Newer WINE (since 8.1) also defaults to Windows 10. So in future one can expect vsync to be broken on d3d8 apps, just like on Windows 10... so get ready for that, and dont be surprised :D

What do you mean? The Windows version in Wine is just some strings changed to spoof which Windows is installed afaik.

@Blisto91
Copy link

Probably not. And if there is a issue relating to that it should be reported so it can be fixed or any specific games can have a workaround.
d8vk itself and drivers and etc etc also have a lot to say here.

@Blisto91
Copy link

Blisto91 commented Mar 30, 2023

image

Yay. Seems to work.
Gonna poke at it a bit.

@WinterSnowfall
Copy link

Right... so now that we have confirmation it works on all relevant GPU vendors, all is well in the world. Waiting on the PR merge to close the issue and thanks to @SimplyTadpole for bringing up this cool game many of us weren't even aware existed.

@drazisil
Copy link

It would be a lot cooler if you happen to know any C++ programmers who would be interested in pairing with me to get it back online. Which is it's normal state.

@drazisil
Copy link

I can get it online. I just need help. It's no longer a fun solo project after several years.

@Blisto91
Copy link

@drazisil sounds like a cool project. I don't personally know anyone like that but have linked your comment in a discord server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants