Outils pour utilisateurs

Outils du site


lokigames:sin

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

lokigames:sin [2023/12/05 15:10] – créée - modification externe 127.0.0.1lokigames:sin [2024/04/22 17:53] (Version actuelle) twolife
Ligne 1: Ligne 1:
 +====== SiN ======
 +
 +===== Install the game =====
 +
 +To install the required utils & library:
 +<code>
 +# apt-get install patchelf xxd libsmpeg0:i386
 +</code>
 +
 +To install the game, mount your CD & run the installer with ''linux32'' from the ''util-linux'' package :
 +<code>
 +# mount /dev/cdrom /media/cdrom
 +$ linux32 bash /media/cdrom/setup.sh
 +</code>
 +
 +And now the fun begins :-) The installer is a mess and doesn't do half of what it is supposed to. We need to do a good half of the job ourself :
 +<code>
 +cd <installation-directory>
 +install -m 755 /mnt/cdrom/bin/x86/registergui ./
 +tar xfz /mnt/cdrom/base/maps.tar.gz -C ./base/
 +mv ref_soft.so.gz ref_soft.so
 +mv ref_gl.so.gz ref_gl.so
 +mv game.so.gz game.so
 +mv game.so base/game.so
 +mv sin.exe.gz sin.exe
 +</code>
 +
 +===== Register the game =====
 +The file ''sin.exe'' is "//encrypted//" (I didn't spend time on this, maybe it's trivial to bypass, maybe not) ; and we need to combine the provided tool with our cdkey to get a usable binary.
 +
 +The hard part in today's world is to get the required libraries to run that tool. We need GTK1.2 compiled for i386.
 +
 +After that it's easy:
 +<code>
 +./registergui sin.exe
 +</code>
 +
 +===== Remove a useless dependency =====
 +The game is linked to 2 versions of the SDL library: ''libSDL-1.1.so.0'' & ''libSDL-1.2.so.0'' ; it's useless and harmful, since you will not find a libSDL-1.1 for you distribution easily. Lets remove that:
 +<code>
 +patchelf --remove-needed libSDL-1.1.so.0 sin.exe
 +</code>
 +
 +
 +===== Fix crash when using the OpenGL renderer =====
 +Like in [[sof|others]] [[heretic2|games]] we need to patch the OpenGL renderer to prevent a crash.
 +
 +<code>
 +echo -n "2020" | xxd -r -p -seek 0x38A08 - ref_gl.so
 +</code>
 +
 +===== Prevent a game crash =====
 +This is due to a change in ''libgcc'' that broke some binaries that where compiled with gcc 2.95 in an unusual way (like compiling C++ code with ''gcc'' instead of ''g++'').
 +
 +==== Option a ====
 +You can use a little [[https://github.com/twolife/lokishim|shim]] that add back functions required by a bunch of old games like this one. 
 +
 +<code>LD_PRELOAD="/path/to/lokishim.so" ./sin.exe +set vid_ref gl +set gl_driver_lib /usr/lib/i386-linux-gnu/libGL.so.1</code>
 +
 +==== Option b ====
 +The missing function can be found in a //very// old ''libstdc++'', and you can use ''libstdc++-3-libc6.2-2-2.10.0.so'' from [[https://www.improbability.net/loki/loki_compat_libs-1.5.tar.bz2|https://www.improbability.net/loki/]]
 +
 +<code>LD_PRELOAD="./libstdc++-3-libc6.2-2-2.10.0.so" ./sin.exe +set vid_ref gl +set gl_driver_lib /usr/lib/i386-linux-gnu/libGL.so.1</code>
  
lokigames/sin.txt · Dernière modification : 2024/04/22 17:53 de twolife

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki