FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows ME, 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.23k stars 143 forks source link

Balls of Steel #299

Closed quakeguy44 closed 4 months ago

quakeguy44 commented 6 months ago

Sadly this great pinball game runs slowly on linux with Wine. When try using cnc-ddraw the tables won't load. Just showing a black screen. Here is the log file: cnc-ddraw-1.log

FunkyFr3sh commented 6 months ago

The game is working fine on windows. Note that the menu is not using DirectDraw (AKA cnc-ddraw), only the tables do. I tried to get it working on linux but it's crashing right away on startup (before I even get to the tables). My version got a bunch of weird additional exe files in the folder that seem to "reset your display profile". Maybe running on of them can fix the black screen?

FunkyFr3sh commented 6 months ago

Nevermind, it does work fine if you wait on the splash screen. Do not press ESC, do not click!

Game is working fine here. No issues. I'm using the RIP version from myabandonware. I did run all these other .exe files though, maybe one of them fixed the game?

wine-8.0.2 Linux Mint 21.2

quakeguy44 commented 6 months ago

Yes the RIP version is v1.0 and for Windows95 only. The patches basically patch to v1.3 and then to 1.3c. I use the GOG version, which have the patches already included. But still no luck. Starting bos.exe to run the game. Bosloader.exe won't run on WINE.

The patch says:

Changes:

The game runs but slow. When i then use cnc-ddraw directdraw crashes if i load a table (black screen), What you mean by "wait on splash screen"? I wait there to load the menu, but when i start a table the described problem.

FunkyFr3sh commented 6 months ago

Yes the RIP version is v1.0 and for Windows95 only. The patches basically patch to v1.3 and then to 1.3c. I use the GOG version, which have the patches already included. But still no luck. Starting bos.exe to run the game. Bosloader.exe won't run on WINE.

Yes the RIP version needs you to create a 32bit wine prefix, this will allow you to set the windows version to windows 95 in winecfg and will get rid of the error message (the game will now start without complaining)

The patch says:

Changes:

  • fixes for keyboard speed, gfx profiler, directdraw crashes

The game runs but slow. When i then use cnc-ddraw directdraw crashes if i load a table (black screen), What you mean by "wait on splash screen"? I wait there to load the menu, but when i start a table the described problem.

Maybe they've done some changes in the GOG version which break cnc-ddraw? Not sure, I don't have the GOG version so I can't test it.

The RIP version will crash on startup if you click or press ESC, maybe they've fixed that in the GOG version.

I'll try the 1.3 patch on the RIP version. Maybe I can reproduce the issue with it.

FunkyFr3sh commented 6 months ago

Here are my test results:

v1.0 CD version - Doesn't work at all

v1.2 RIP version - Shows Windows95 required error, but can be workarounded (see previous post) and then works fine

v1.2 CD version - Works fine - no issues

v1.3 CD version - Doesn't load table - failed to determine refresh rate error - Can be fixed by setting "Limit game speed" to "Sync with monitor refresh rate" in "Compatibility settings" with cnc-ddraw config.exe

Patches used for testing:

Name: bos12reg.exe Size: 4702880 Bytes (4592 KiB) SHA1: 1948e1e56e8d8ced819c7fffc443813dd86a27af

Name: bos13rp.exe Size: 3932976 Bytes (3840 KiB) SHA1: 558508caaaa218cdb58646ab09ff327088f36058

quakeguy44 commented 6 months ago

Thanks for investigating my problem. I still have no luck.

Patching to v1.2 with the mentioned bos12reg.exe fails to start the game with my Wine version. Either with cnc-draw or without. Even starting on Windows 10 brings the same error.

Using the mentioned bos13rp.exe (v1.3) won't start the tables. Also when i change ddraw.ini to maxgameticks=-2.

I believe the GOG version is just v1.3c with the bos loader exe.

I use Batocera v39, which uses a recent version of Wine Glorious Eggroll. Older Batocera versions had Wine Lutris or Proton, but still the same results in BOS.

FunkyFr3sh commented 6 months ago

About v1.2: What error do you get? Did you try to downgrade v1.3 to v1.2? Maybe you can't downgrade and that's why it fails? I upgraded from v.1.0 (CD version) to v1.2 on my tests.

About v1.3: Did you try to start the game in a window? I also didn't notice the error message before (it was hidden behind the window). Maybe If you run the game in a window it may be possible to get some additional info. In my case, the first start of the game had a white message in the top left saying something about profiling my display hardware and then I got the failed to determine refresh rate error. The profiling message didn't go away until i fixed it with the cnc-ddraw config.exe settings change. Do you you also see the profiling message showing up?

About v1.3c: I've seen the files (4 different numbered patches in a zip) but those didn't work for me. It didn't recognize my game executable so I can't say anything about it.

quakeguy44 commented 6 months ago

About v1.2: I upgraded from v1.0 (CD) to v1.2 like you did. I get the following error when i start a table (even on native Windows 10):

Application Error: C:\Temp\bos\barbarin.DDP

An privileged instruction was executed at address 00431c7c
Click on OK to terminate the application

About v1.3: I started the game full screen. I saw no profiling message. I will try v1.3 this week on a regular linux distro and post my results.

FunkyFr3sh commented 4 months ago

Just been toying around with this again and noticed it never actualyl worked properly. The game runs too fast I think, it feels really weird.

I got the 1.3 version slightly better working now so I'm leaving a test build here: cnc-ddraw-BOS.zip

TBH, I think I'll never be able to get this working properly - It's just pure luck and it will behave differently on each system so I'm closing this here now, sorry

quakeguy44 commented 3 months ago

Hi FunkyFr3sh,

i just had time to test your test build. And its working with this version! I even use 1.3c (GOG version).

And yes the game runs too fast. But after investigating with the native version on Windows, its excactly twice the time it should be. Maybe a refresh rate problem, like 30 instead of 60.

Anyway good work and big thanks.

quakeguy44 commented 3 months ago

Addition: Parameter maxgameticks only works for the loading screen (with the bar). All values beside -1 will be ignored showing the pinball, but work at loading screen.

FunkyFr3sh commented 3 months ago

Maybe a refresh rate problem, like 30 instead of 60.

Yeah, it's something like that. The game got some very weird method to determine the refresh rate, it's difficult to replicate that behavior.

This might be a lot easier to fix with a game patch

quakeguy44 commented 3 months ago

Is it possible the parameter maxgameticks working on the pinball screen too? So a value of 30 will do the trick.

FunkyFr3sh commented 3 months ago

Is it possible the parameter maxgameticks working on the pinball screen too? So a value of 30 will do the trick.

I don't think so - The game runs a test upfront to determine the refresh rate and then keeps using that value

FunkyFr3sh commented 1 week ago

@quakeguy44 Not sure if you still need it, but I recently fixed some issues in another game that fix also made BOS working properly now as well.

  1. Install Balls of Steel and make sure you patch it to 1.2 (I used the myabandonware RIP for testing)
  2. Add a dll override for "ddraw" and "winmm"
  3. Extract cnc-ddraw_Balls_of_Steel_1.2.zip into your game folder

When the game starts, make sure you don't click and don't press any keys, let the splash screen disappear on its own or else it will crash (some weird bug in the game, not cnc-ddraw related)

quakeguy44 commented 5 days ago

Today i tested your fix. At first i tried version 1.3 (1.3c GOG). I couldn't start the game. So i installed version 1.2 again. This time the game works like a charm. Big thanks ;)

I changed a few ddraw.ini settings to properly run the game: fullscreen=true maintas=true vsync=true

And don't set the table view to auto (either scrolling or single screen). Then the game will crash when it switches the mode. I just recognized this behaviour. Thats of course no cnc-ddraw issue. Must be a wine thing...