Hamlet Apprentice
Joined: 15 Apr 2005 Posts: 151 Location: Turin (Italy)
|
Posted: Sun Dec 29, 2019 11:53 pm Post subject: My experience with System Shock Enhanced Edition from GOG |
|
|
Because this is a game I care a lot, I made an exception and got this game even if it is does not explicitly support Linux.
This is my experience in playing System Shock Enhanced Edition bought from GOG.com.
There might be in here something useful for other people.
This is a DOS game that was "enhanced" to run on Windows, adding key remapping, video resolution options etc. from the game interface.
My desktop runs KDE (which shouldn't matter), Systemd and ALSA + PulseAudio (which do matter).
Video hardware is a AMD Pitcairn XP (Radeon HD 7870 GHz Edition, 1002:6818) board running X11 radeon driver.
Audio hardware is a USB audio adapter Turtle Beach (10f5:0210) with no MIDI synthesiser.
Wine
I emerged virtual/wine with abi_x86_32 and staging patches (which are not needed to my knowledge).
Selected USE flags:- virtual/wine: abi_x86_32 staging;
- app-emulation/wine-staging (4.21): X alsa dos faudio fontconfig jpeg lcms mp3 ncurses nls openal opengl osmesa png pulseaudio run-exes ssl staging threads truetype udev udisks vaapi vulkan xcomposite xml;
- media-libs/mesa (19.3.1) X classic dri3 egl gallium gbm gles2 llvm osmesa unwind vaapi vdpau vulkan wayland.
Music (MIDI)
The game seems to work just fine except that there is no music.
It turns out this might be one of the two games I have played where I do want the music on.
The games uses MIDI music, and Wine's guide has pretty much all the fundamental information.
A point I half missed at first is that the MIDI audio and the game run on independent processes: MIDI is handled by a server running all the time on the system.
Wine's MIDI commands are directed to that server just as for any other application.
This implies that MIDI server does not need to support 32 bit ABI, and just needs to be there running when Wine is executing the game.
I opted for fluidsynth (media-sound/fluidsynth 2.1.0) just because I got the impression it is more alive than Timidity++, emerged with USE flags alsa dbus examples network pulseaudio readline sdl sndfile systemd threads.
I also installed some "sound fonts" (media-sound/fluid-soundfont 3.1).
Gentoo provides a Systemd system script to start the server, which miserably fails on my system.
From the documentation around, it appears like fluidsynth should not be run system-wide.
I ended up creating a Systemd configuration file to place in the new file (and directory) ${HOME}/.config/systemd/user/fluidsynth.service with the content: Code: | [Unit]
Description=FluidSynth Daemon
Documentation=man:fluidsynth(1)
After=sound.target
[Service]
Type=notify
NotifyAccess=main
EnvironmentFile=/etc/fluidsynth.conf
EnvironmentFile=-%h/.config/fluidsynth
ExecStart=/usr/bin/fluidsynth -is $OTHER_OPTS $SOUND_FONT
[Install]
WantedBy=multi-user.target
| and editing the environment file /etc/fluidsynth.conf (as administrator): Code: | # Mandatory parameters (uncomment and edit)
SOUND_FONT='/usr/share/sounds/sf2/FluidR3_GM.sf2'
# Additional optional parameters (may be useful, see 'man fluidsynth' for further info)
OTHER_OPTS='--disable-lash --audio-driver=pulseaudio --midi-driver=alsa_seq --sample-rate=48000'
|
The other environment file, ${HOME}/.config/fluidsynth, does not exist in my system,
but I suppose it could host the content above as well.
The game
I chose to segregate the game into its own wine area: Code: | export WINE_PREFIX="${HOME}/wine/SystemShockEE"
wine "${HOME}/download/games/SystemShock/setup_system_shock_enhanced_edition_1.1.8.exe" | and installed it into C:\Games\SystemShockEnhancedEdition.
To run the game I created a simple script to start the game, which makes sure the MIDI server is running.
My own script is bloated with error checking and care, but it boils down to: Code: | #!/usr/bin/env bash
systemctl --user restart 'fluidsynth.service'
export WINE_PREFIX="${HOME}/wine/SystemShockEE"
wine "${WINE_PREFIX}/drive_c/Games/SystemShockEnhancedEdition/sshock.exe"
systemctl --user stop 'fluidsynth.service' | (which turns the server off on exit because of the last command).
The issues
Amazingly, none whatsoever.
The game seems not to recognise all the buttons of my mouse (Logitech G5) as independent ones.
Not sure if it is from Wine's, from Windows API (?) or from the game; still can use 3 standard buttons, 2 extra ones and the wheel. |
|