dosbox-staging icon indicating copy to clipboard operation
dosbox-staging copied to clipboard

Support game-specific builds of DOSBox

Open kcgen opened this issue 2 years ago • 4 comments

DWD DOSBox

  • Game(s): Wizardry VI
  • What: There is an audiopop issue that this build of dosbox fixes. See file "custom-readme.txt" under heading "Extras" in the archive DWDdosbox.rar for details.
  • Sources:: https://github.com/hiddenasbestos/dosbox-gridc. The build is mainly for use with Grid Cartographer but still includes the wizardry pop fix according to the docs
  • Binary: DWDdosbox.zip
  • Another option for this is already in Staging's PC Speaker code (in a generic way, as well), however it would need to be externalized as a conf setting: see https://github.com/dosbox-staging/dosbox-staging/issues/963#issuecomment-812088248

DOSBox GunStick

  • *Game(s): Cosmic Sheriff (1989), Mike Gunner (1988), and Pack Regalo Gun Stick (1989)
  • What: : These games use this build as it turns the mouse cursor into a crosshair.
  • Sources:: patch included with binary
  • Binary: GunStick_dosbox.zip

DOSBox 0.63

  • Game(s): Viper (1998)
  • What: Most builds just crash, though X gives an error "CacheBlock overrun 2 written 8195 size 8192".

TC DOSBox

  • Game(s): Boppie's Great Word Chase (1985)
  • What: Wont boot with other forks. Issue discussed very briefly at https://github.com/exoscoriae/eXoDOS/issues/1586
  • Sources:: TC DOSBox binaries have been released by NewRisingSun however he has explicitly refused to share sources when asked, despite modifications being to GPL sources.
  • Binary: tc_dosbox.zip

mpubuild of DOSBox

  • Game(s): Casino Tournament of Champions (1995)
  • What: Game has a lot of cuttoff speech once you get past the intro stuff. It says welcome blah blah, after that it uses speech to read "We have a great deal to offer you. Games of chance for any taste." During the speech it cuts off at the word chance. This continues on the next screen where it cuts out at the words "Black Jack Tournament".
  • Sources:: This was built by ripsaw8080; source is (on vogons?)
  • Binary:mpubuild_dosbox.zip

STDOSBox

  • Game(s): SimTown (1995)
  • What: This game has an in game error message pop up anytime you build a house in the game. Happens with all forks as well.
  • Sources:: This was built by ripsaw8080; source is (on vogons?)
  • Binary: STdosbox.zip

kcgen avatar May 14 '22 19:05 kcgen

Do you want to detect the game and behave diffenently in staging or make normal staging more compatible?

LowLevelMahn avatar May 14 '22 20:05 LowLevelMahn

Made more compatible, ideally.

Worst case, we'd add a conf option to support a class of games (for example, I can see the cross-hair cursor being valuable for lots of POV shooter type games), or a conf setting to change some behavior in a generic way (that happens to fix some games).

We definitely wouldn't add one-off game-hacks (or detection) to Staging or game-specific conf settings unless it can be made modular and not riddle the codebase with inline game hacks. (The hacks need to be shunted away more as plugins that can be agnostically activated at a handful of checkpoints).

Given ripsaw8080 opted for one-off builds in a couple cases, my guess is those instances came with regressions/downsides -- so those builds might be the only option going forward. (My wish there would be that the source is made available to avoid bitrot and offer builds for platforms like ARM, Linux, and macOS)

kcgen avatar May 14 '22 20:05 kcgen

I think this exercise is probably to track if game-specific builds incorporate any changes that we might want to upstream ;)

I know about following additional game-specific builds:

Carmageddon

  • Game: Carmageddon (GOG and Steam releases)
  • What: Glide patch and additional changes, Windows-only.
  • Sources: Code dump is distributed with the game, I imported changes to branch forks/steam-carmageddon-1: 00e70c191d035cf4bdd4665f950d74234d2e3918

Blizzard's fork

  • Game: The Lost Vikings
  • What: One tiny bugfix that was incorporated in later SVN version long time ago, Blizzard-specific changes to show Blizzard splash screen. Change to remove DOSBox name from window title. Windows-only changes.
  • Sources: Patches included with old release of The Lost Vikings (back when Blizzard was offering this game to download for free). After review I decided it's not necessary to preserve these changes on a branch.

dreamer avatar May 14 '22 20:05 dreamer

Thanks for those additions @dreamer !

kcgen avatar May 14 '22 21:05 kcgen

Microsoft Flight Simulator v1.05 (ticket)

-- from ripsaw's readme -- The 8088 processor has different divide exception behavior than later Intel processors, and it is for this reason that MSFS v1.05 doesn't work correctly in DOSBox. There are actually a few quirks of the 8088 that DOSBox doesn't emulate; although some unofficial branches do, but I'm not sure if any get the divide exception behavior fully correct. Anyway, I've made workarounds for the few games affected by the quirks, including MSFS v1.05. The attached patch replaces the divide exception handler in v1.05 with the one from v2.13, which is less 8088-specific -- it generally works, but the demo @ mode appears sensitive to speed.

  • Sources: "some unofficial branches" (Daum, X, Staging, ECE, another?). Separately MartyPC is a recent very precise 8088 emulator, so may come in handy for comparison.

Torinde avatar Sep 23 '23 13:09 Torinde

Microsoft Flight Simulator v1.05 (ticket)

-- from ripsaw's readme -- The 8088 processor has different divide exception behavior than later Intel processors, and it is for this reason that MSFS v1.05 doesn't work correctly in DOSBox. There are actually a few quirks of the 8088 that DOSBox doesn't emulate; although some unofficial branches do, but I'm not sure if any get the divide exception behavior fully correct. Anyway, I've made workarounds for the few games affected by the quirks, including MSFS v1.05. The attached patch replaces the divide exception handler in v1.05 with the one from v2.13, which is less 8088-specific -- it generally works, but the demo @ mode appears sensitive to speed.

  • Sources: "some unofficial branches" (Daum, X, Staging, ECE, another?). Separately MartyPC is a recent very precise 8088 emulator, so may come in handy for comparison.

DOSBox-X indeed has a cputype=8086 setting specifically for games like these. No need to patch the games.

rderooy avatar Sep 23 '23 14:09 rderooy

Good to document both options; thanks @Torinde and @rderooy.

kcgen avatar Sep 23 '23 15:09 kcgen

I can't say I love this idea of basically supporting per-game DOSBox hacks. A much better way would be to patch the executable and leave DOSBox alone (like NewRisingSun has done for many games). The scope of fixes/changes you can do via DOSBox side hackery is also very limited; basically, you can only apply bandaids to a limited range of emulator problems. By patching the actual game, you have much greater freedom and are able to change behaviour, fix bugs, add features, etc.

Given its limited utility, fragile and hacky nature, plus all the naintenance complications this would introduce, personally I would not even entertain the idea further. So to be clear, in all these cases either improving the emulator in general or providing a custom patched EXE (by someone else, not by us) is the correct answer, I think.

johnnovak avatar Sep 23 '23 22:09 johnnovak

Since this is in the eXoDOS project - does the above include all of eXoDOS/eXoWin3x games that use other DOSBox variants besides original/SVN/Daum (#2945)/Staging?

It seems all of the cases above are "clear", except Viper 1998.

Regression from old original DOSBox? Can that be investigated?

  • Viper (1998) - DOSBox 0.63 works, other versions/builds mostly crash, X gives an error

.conf setting to add in Staging

  • Wizardry VI - PC speaker fix is already in Staging, however it would need to be externalized as a conf setting (#963)
  • Cosmic Sheriff (1989), Mike Gunner (1988), and Pack Regalo Gun Stick (1989) - .conf setting to turn the mouse cursor into a crosshair.

Fix source available in a patch/diff branch

  • Casino Tournament of Champions (1995) - a lot of cuttoff speech - fixed in build by ripsaw8080, source on vogons
  • SimTown (1995) - in game error message - fixed in build by ripsaw8080, source on vogons
  • Carmageddon (GOG and Steam releases) - Glide patch and additional changes https://github.com/dosbox-staging/dosbox-staging/commit/00e70c191d035cf4bdd4665f950d74234d2e3918
  • Microsoft Flight Simulator v1.05 - would require a cputype=8086, like in X

Fix identified, but source not available

  • Boppie's Great Word Chase (1985) - requires Transcopy format (#2224) due to copy protection, potentially will fix a "class of games"

Done

  • The Lost Vikings - the relevant part of the fix is already in SVN

Torinde avatar Sep 24 '23 06:09 Torinde

Game specific builds and plugin systems are out of scope. We have enough on our plates and enough complexity already, thank you 😅

johnnovak avatar Mar 29 '24 21:03 johnnovak