kjliew / qemu-3dfx

MESA GL/3Dfx Glide pass-through for QEMU
GNU General Public License v2.0
391 stars 51 forks source link

Visual Glitches with Streets of Sim City under 3dfx #130

Closed rmervine closed 3 months ago

rmervine commented 3 months ago

Hi KJ, I'm a longtime donator back in 2022. I encountered visual glitches when trying to play Qemu-3dfx on a Mac M1 Pro.

My applicable version:

QEMU emulator version 7.1.0 Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers featuring qemu-3dfx@dae79bb-17:18:21 Sep 3 2022 build

When playing the game, I get blue boxes showing up on the game

Screenshot 2024-05-26 at 10 54 43 PM

Since the game can also play DirectX, I tried WineD3D. If I tried any version newer than 4, I would get a crash on the game. Anything lower than that, the game would play, but it would have a weird tiled effect to where the intro would play on the top pane and the bottom had the actual game, but unplayable as it didn't show the whole game.

I have tried this game in 86Box as I always like to do comparisons against Qemu-3DFX (which is almost always way faster for QEMU-3DFX :) 86BOX displays it properly. Could this be something with me having an old package?

kjliew commented 3 months ago

Hi Ron, Glad to hear back from you. It's been quite a while and I am glad to hear that QEMU binary package remains functional till this day despite several major MacOS upgrades.

While your package is indeed quite old, I reproduced every issues you just described on my MacBook Air M1 with my latest. Streets of SimCity (1997) is not a game that can be supported by OpenGlide bundled with the package. Here are several options to play the game:

  1. Play the game in DirectX software renderer *WITHOUT* any WineD3D libraries simply by changing the shortcut to STREETS.EXE -o0.
  2. Use dgVoodoo1.50Beta2 Glide wrapper over WineD3D d3d9.dll within the Guest. Use dgVoodooSetup.exe to configure dgVoodoo1.50Beta2 wrapper as shown. The settings are saved directly into its DLL instance. Once you're done with it, you can remove dgVoodooSetup.exe. You're free to play around other wrapper settings. The highlighted are the critical ones from its defaults.

Dgv150

Here's the simple instructions to follow: dgVoodoo 1.50Beta2.zip

Game presumed to install at D:\Maxis\Streets
DgVoodoo1.50Beta2.zip unpacked at D:\Maxis\_dgv_
$ cd /d/Maxis/Streets
$ cp -vf ../_dgv_/glide2x.dll ../_dgv_/dgVoodooSetup.exe ./
$ wine-get install 4.12.1 d3d9
$ ./dgvoodoosetup

Regardless of which options you choose, there is still one major issue with the game that is the games physics seemed broken on fast CPU emulation. Don't be surprised that even QEMU TCG on Apple Silicon is too much for the game to handle. Having said that, this game may be more appropriate for other emulators such as DOSBox or PCem/86Box for their controlled CPU cycles manipulation.

I would like to take this opportunity to THANK YOU for your generous support at the early stage of the project. A *FREE upgrade* is honored to *ALL* who donated & supported the project with Apple Silicon macOS as Platform of Choice. The upgrade compensates for the issues of QEMU TCG regression in v7.2.0 and has now been resolved upstream since v8.2.2. There are always risks at upgrades, including the worst case of restarting everything from scratch. So the choice is left to the individuals. All ones need is to write in for the request with the same email associated with PayPal donations.

rmervine commented 3 months ago

Hi KJ,

Thank you for following up.I'm glad to know it's something I didn't screw up on my end. I try to keep all my retro gaming in QEMU. However, this one may be better suited for 86Box. And yes I encountered the issue of games playing too fast under my GOG in a Windows 11 Parallels environment. I ended up using a utility that I actually paid for as it was really good at slowing things down to make it playable. I forget what it is from the top of my head, but it helped with a lot of Star Wars older games.

I'll reach out when I have a chance to consider that upgrade.It is amazing that this survived upgrades while VMs like Parallels always seem to break with updates.

kjliew commented 3 months ago

It is amazing that this survived upgrades while VMs like Parallels always seem to break with updates.

THANK YOU so much for such a wonderful testimony. There is nothing wrong about Parallels, it's understood. They have a business to run.

I hope for one day that I would have learned enough to be able to offer OpenGlide for this game. Should OpenGlide have worked, there wouldn't be any needs to slow the CPU for the game physics. 3Dfx Glide API offers great & effective interjection to regulate frame rate.

kjliew commented 3 months ago

@rmervine Thanks GOD with His Mercy & Blessings, I am now pleased to offer OpenGlide for Streets of SimCity (1997). The problem was understood and fixed in https://github.com/kjliew/qemu-xtra/commit/9dffb19b310186518f57ca4f6be2f211b349de18. This makes the game a perfect preservation for Windows, Linux and macOS.

That also makes PCem/86Box *USELESS* for one more 3Dfx games. Ouch😜!

When the MacBook Pro M1 is too powerful, it is as simple as having a glide.cfg to limit the frame rate.

$ cd /d/Maxis/Streets
$ echo ScaleWidth,1152 >glide.cfg
$ echo FpsLimit,30 >>glide.cfg

OpenGlide scaling also consumes CPU cycles for LFB operation. On my MacBook Air M1, it played slightly over 30 FPS without enemy AI in sight and lower than 30 FPS with enemy AI in sight as 1024x768 scaled. So FpsLimit isn't required.

Thank YOU for supporting qemu-3dfx and Games Preservation. You've earned yourself the Honorable Sponsor for Streets of SimCity (1997). 2 out of 3 Game Elections accounted.😇

kjliew commented 3 months ago

The same fix brings 2 more games into OpenGlide support territory. OpenGlide support matters a lot for Linux/macOS as it is the only open-source Glide wrapper for 1st-party Host-side Glide APIs wrapping. For macOS in particular, 1st-party Host-side Glide wrapping delivers twice the performance compared to WineD3D for games such as Sub Culture.

Scorched Planet 3Dfx demo (with API 2.11 emulation) ScorchedPlanet

Sub Culture 3Dfx SubCulture

Streets of SimCity image