Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
lokigames:sof [2024/04/01 17:52] – twolife | lokigames:sof [2024/04/03 08:46] (Version actuelle) – twolife | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== Soldier of Fortune ====== | ||
+ | ===== Install & patch the game ===== | ||
+ | |||
+ | To install the required utils : | ||
+ | < | ||
+ | # apt-get install xxd | ||
+ | </ | ||
+ | |||
+ | To install the game, mount your CD & run the installer with '' | ||
+ | < | ||
+ | # mount /dev/cdrom / | ||
+ | $ linux32 bash / | ||
+ | </ | ||
+ | |||
+ | Apply the the last released [[https:// | ||
+ | < | ||
+ | $ linux32 bash sof-1.06a-cdrom-x86.run | ||
+ | </ | ||
+ | |||
+ | ===== Video crash ===== | ||
+ | '' | ||
+ | |||
+ | The // | ||
+ | What's happening is that the buffer with the extensions is too large for the 8192 bytes allocated text-string use by vsprintf. The program crash after overwriting instruction memory with text data. | ||
+ | The most simple way to fix this, is to never let vsprintf write the buffer. It's only a message console, it's never used for anything useful in the game! | ||
+ | |||
+ | You can do it graphically, | ||
+ | Or you can do it in with '' | ||
+ | < | ||
+ | $ cp ref_gl.so ref_gl.so.orig | ||
+ | $ echo -n " | ||
+ | </ | ||
+ | |||
+ | ===== Audio crash ===== | ||
+ | < | ||
+ | ====== Soldier of Fortune Initialized ====== | ||
+ | |||
+ | Fatal signal: Segmentation Fault (SDL Parachute Deployed) | ||
+ | Segmentation fault | ||
+ | </ | ||
+ | |||
+ | This one is a little bit more complicated... | ||
+ | |||
+ | '' | ||
+ | |||
+ | But the '' | ||
+ | |||
+ | === Option 1 ==== | ||
+ | Use a libxdmcp6 package from [[https:// | ||
+ | |||
+ | === Option 2 ==== | ||
+ | Use [[https:// | ||
+ | |||
+ | < | ||
+ | $ cp liboasnd.so liboasnd.so.orig | ||
+ | $ elfhash -f sl_add -t sl_adx liboasnd.so | ||
+ | </ | ||
+ | |||
+ | === Option 3 ==== | ||
+ | I used a Python script to rename '' | ||
+ | < | ||
+ | # apt-get install virtualenv python3-pip | ||
+ | $ virtualenv venv-pip | ||
+ | $ . venv-pip/ | ||
+ | $ pip install lief | ||
+ | $ cp liboasnd.so liboasnd.so.orig | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | import lief | ||
+ | liboasnd = lief.parse(" | ||
+ | for idx, lsym in enumerate(filter(lambda e : e.exported, liboasnd.dynamic_symbols)): | ||
+ | if lsym.name == " | ||
+ | print(f" | ||
+ | lsym.name = " | ||
+ | liboasnd.write(liboasnd.name) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Optional: use sdl12-compat instead of bundled SDL-1.1 ===== | ||
+ | < | ||
+ | $ mv libSDL-1.1.so.0 libSDL-1.1.so.0.orig | ||
+ | $ ln -s / | ||
+ | </ | ||
+ | |||
+ | Now you can start the game, but when you try to walk forward you will get extreme stuttering and a flashing ethernet icon. | ||
+ | |||
+ | This is cause by the combinaison of broken game logic & framerate over 120 (ie: you have a much more powerful computer than what was available when the game was released). The easiest way to fix this is to force VSYNC at the SDL level. This works for my hardware (it locks framerate at ~60), but I know there is already 360hz and higher monitors on the market, so it may not works for you. | ||
+ | |||
+ | < | ||
+ | $ LD_PRELOAD=libX11.so.6 SDL12COMPAT_SYNC_TO_VBLANK=1 ./sof | ||
+ | </ |