├── .gitignore ├── README-ES.md ├── README.md ├── sc3u-2.0a-x86.run.patch └── sc3u-patcher.sh /.gitignore: -------------------------------------------------------------------------------- 1 | sc3u-2.0a-x86.run 2 | sc3u 3 | loki_compat_libs-1.5.tar.bz2 4 | -------------------------------------------------------------------------------- /README-ES.md: -------------------------------------------------------------------------------- 1 | [English version](README.md) 2 | 3 | # SimCity 3000 Unlimited nativo para distribuciones GNU/Linux actuales 4 | 5 | Este es símplemente el resultado de un [proyecto](https://hackweek.suse.com/16/projects/old-games-on-modern-linux) para la [16 SUSE Hackweek](https://hackweek.suse.com/16/projects). 6 | 7 | Dado que ejecutar juegos de Loki u otros juegos nativos antiguos y propietarios puede ser un desafío, decidimos investigar un poco cuánto esfuerzo podría suponer preparar esos juegos para ser ejecutados en una distribuciones GNU/Linux actuales. 8 | 9 | ## Retos 10 | 11 | Para SimCity 3000 los mayores problemas fueron: 12 | 13 | - SimCity 3000 es 32 bits 14 | - No funciona con versiones actuales de glib. Esto se puede evitar con las Libererías de [Comptabilidad para Loki](http://www.improbability.net/loki/) 15 | - El parche 2.0 no se puede ejecutar debido a cambios en los estándares POSIX. 16 | - El sonido usa OSS, y no es posible usara padsp, aoss or esdcompact ni con openSUSE 42.3 ni con Debian SID 17 | 18 | ## Soluciones alternativas. 19 | 20 | Hay muchas soluciones alternativas en internet, incluyendo [una](https://www.juliogonzalez.es/como-ejecutar-simcity-3000-en-debian-i386-o-amd64/58) que escribín en castellano hace años, pero al final todas ellas requieren que el usuario ejecute muchos comandos diferentes, con muchos argumentos. 21 | 22 | Por lo tanto este repositorio intenta facilitar el procedimiento para que podamos símplemente instalar el juego, aplicar el parche, configurar el sonido y empezar a jugar. 23 | 24 | ## Instrucciones 25 | 26 | ### Obtén el juego 27 | 28 | Lo primero de todo, necesitas el CD original o una imagen ISO del CD original. 29 | 30 | Si no lo tienes prueba una de los siguientes enlaces: 31 | 32 | * [Amazon](https://www.amazon.com/s/ref=bl_sr_software?_encoding=UTF8&node=229534&field-brandtextbin=Loki%20Entertainment%20Software) 33 | * [Linux-Discount](http://www.linux-discount.de/software/games/LokiSoft) 34 | * [ixsoft](http://www.ixsoft.de/cgi-bin/web_store.cgi?ref=Catalogs/de/software-games-catalog.html) 35 | * [Linux-Onlineshop](https://www.linux-onlineshop.de/index.php?page=categorie&cat=1&next_page=1) 36 | 37 | ### Instalar el juego 38 | 39 | Inserta el CD o monta la imagen y usa un terminal para ir al directorio donde el CD/imagen está montada, y ejecuta: 40 | 41 | ```bash 42 | sudo linux32 ./setup.sh 43 | ``` 44 | 45 | Usa las rutas por defecto para la instalación cuando sean solicitadas, y responde **y** a las diferentes preguntas sobre qué instalar (así no necesitarás el CD o la ISO para jugar). 46 | 47 | ### Parchea el juego 48 | 49 | Clona este repositorio (si estás leyendo esto fichero desde el interfaz web de GitHub), y ve al directorio donde la copia local esté (usando un terminal). 50 | 51 | Asegúrate de tener installadas las herramientas requeridas. Los nombres de los paquetes que las proveen depende de tu distribución: 52 | 53 | - curl 54 | - cat 55 | - patch 56 | - tar 57 | 58 | Ejecuta: 59 | 60 | ```bash 61 | ./sc3u-patcher.sh 62 | ``` 63 | 64 | El script se ocupará de todo, solicitando tu clave para usar sudo cuando sea necesario. Ejecutará el parche oficial 2.0 para Simcity 2.0 (después de parchearlo), así que solo necesitarás seguir el asistente. 65 | 66 | En el caso de que no haya errores estarás listo para ejecutar SimCity 3000. 67 | 68 | ### ¡Pero no tengo sonido! 69 | 70 | Si, si estás usando [PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/) (casi todo el mundo ahora mismo), hay un paso final. 71 | 72 | Dado que el juego requiere OSS (hasta el momento no he sido capaz de hacer que funcione con padsp, aoss o esdcompat) necesitarás usar un programa que sea capaz de emular los dispositivos OSS y enviar el audio a PulseAudio. 73 | 74 | Necesitarás [osspd](https://sourceforge.net/projects/osspd/). 75 | 76 | #### openSUSE/SUSE 77 | 78 | Puedes ir a las [descargas de openSUSE](https://software.opensuse.org/download.html?project=home%3Ajuliogonzalez%3Abranches%3Ahome%3Aelvigia&package=ossp) y seleccionar to distribución para una instalación "One Click". Luego puedes añadir tu usuario al grupo de sistema ```audio```, reiniciar tu sesión y deberías ser capaz de ejecutar SimCity 3000 con sonido. 79 | 80 | #### Debian/Ubuntu 81 | 82 | Install osspd y el backend para PulseAudio: 83 | 84 | ```bash 85 | apt-get install osspd osspd-pulseaudio 86 | ``` 87 | 88 | #### Arrancando osspd durante los inicios del ordenador 89 | 90 | * systemd (openSUSE y Debian actual) 91 | 92 | ```bash 93 | sudo systemctl enable osspd 94 | ``` 95 | 96 | * SysVinit (Debian) 97 | 98 | ```bash 99 | sudo update-rc.d osspd enable 100 | ``` 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [Versión en Castellano](README-ES.md) 2 | 3 | # Native SimCity 3000 Unlimited for modern GNU/Linux distributions 4 | 5 | This is just one of the results of a [project](https://hackweek.suse.com/16/projects/old-games-on-modern-linux) for the [16th SUSE Hackweek](https://hackweek.suse.com/16/projects). 6 | 7 | Since running Loki and other old native and propietary games can be a challenge, we decided to research a little how much effort could take prepare such games to run on moderm GNU/Linux distributions. 8 | 9 | ## Challenges 10 | 11 | For SimCity 3000 the biggest problems were: 12 | 13 | - SimCity 3000 is 32 bits 14 | - It does not work with current glib versions. This can be avoided with [Loki Compatibility Libraries](http://www.improbability.net/loki/) 15 | - The patch 2.0 is not able to run because of changes to the POSIX standards 16 | - The sound uses OSS and it is not able to use padsp, aoss or esdcompat neither at openSUSE 42.3 or Debian SID 17 | 18 | ## Workarounds 19 | 20 | There are a lot of different workarounds on the Internet, including [one](https://www.juliogonzalez.es/como-ejecutar-simcity-3000-en-debian-i386-o-amd64/58) I wrote in Spanish years ago, but in the end all of them require the user to run a lot of different commands with a lot of arguments. 21 | 22 | So this repository tries to easy the procedure so we can run just install the game, apply the patch, configure sound and start playing. 23 | 24 | ## Instructions 25 | 26 | 27 | ### Get the game 28 | 29 | First of all, you need the original CD or an ISO image from the original CD. 30 | 31 | If you do not have it, try one of the following links: 32 | 33 | * [Amazon](https://www.amazon.com/s/ref=bl_sr_software?_encoding=UTF8&node=229534&field-brandtextbin=Loki%20Entertainment%20Software) 34 | * [Linux-Discount](http://www.linux-discount.de/software/games/LokiSoft) 35 | * [ixsoft](http://www.ixsoft.de/cgi-bin/web_store.cgi?ref=Catalogs/de/software-games-catalog.html) 36 | * [Linux-Onlineshop](https://www.linux-onlineshop.de/index.php?page=categorie&cat=1&next_page=1) 37 | 38 | ### Install the game 39 | 40 | Insert the CD or mount the image, and then use a terminal to proceed to the directory where the CD/image is mounted and run: 41 | 42 | 43 | ```bash 44 | sudo linux32 ./setup.sh 45 | ``` 46 | 47 | Use the default paths for installation when required, and answer **y** to the different questions about what to install (that way you will not need the CD or the ISO to run the game) 48 | 49 | ### Patch the game 50 | 51 | Clone this repository (if you are reading this file at GitHub WebUI), and proceed to the directory where the local clone is stored (using a terminal) 52 | 53 | Make sure you have the required tools installed. The names of the packages that provides them depends on your distributions: 54 | 55 | - curl 56 | - cat 57 | - patch 58 | - tar 59 | 60 | Run: 61 | 62 | 63 | ```bash 64 | ./sc3u-patcher.sh 65 | ``` 66 | 67 | The script will take care of everything, asking for your password to use sudo when required. It will start the official SimCity 3000 2.0 patch for you (after patching it), so you just need to follow the assitant. 68 | 69 | Provided that there were no errors, you are ready to run SimCity 3000. 70 | 71 | ### But I do not have sound! 72 | 73 | Yes, if you are using [PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/) (most people at this moment), there is a final step. 74 | 75 | Since the game requires OSS (so far I was not able to make it work with padsp, aoss or esdcompat), you will need to use a software that is able to emulate OSS devices and send the audio to PulseAudio. 76 | 77 | You need [osspd](https://sourceforge.net/projects/osspd/). 78 | 79 | #### openSUSE/SUSE 80 | 81 | You can proceed to [openSUSE downloads](https://software.opensuse.org/download.html?project=home%3Ajuliogonzalez%3Abranches%3Ahome%3Aelvigia&package=ossp) and select your distribution for One Click Install. Then add yourself to the system group ```audio```, restart your session and you will be able to run SimCity 3000 with audio. 82 | 83 | #### Debian/Ubuntu 84 | 85 | Install osspd and the backend for PulseAudio: 86 | 87 | ```bash 88 | apt-get install osspd osspd-pulseaudio 89 | ``` 90 | 91 | #### Enabling osspd on boot 92 | 93 | * systemd (openSUSE and modern Debian) 94 | 95 | ```bash 96 | sudo systemctl enable osspd 97 | ``` 98 | 99 | * SysVinit (Debian) 100 | 101 | ```bash 102 | sudo update-rc.d osspd enable 103 | ``` 104 | -------------------------------------------------------------------------------- /sc3u-2.0a-x86.run.patch: -------------------------------------------------------------------------------- 1 | --- sc3u-2.0a-x86.run 2016-09-05 07:30:59.000000000 +0200 2 | +++ sc3u-2.0a-x86.run 2017-11-15 12:28:02.635226616 +0100 3 | @@ -1,10 +1,14 @@ 4 | #! /bin/sh 5 | -skip=176 6 | +skip=180 7 | # This script was generated using Makeself 1.5.4 8 | -CRCsum=2069455402 9 | +CRCsum=1151330528 10 | MD5=00000000000000000000000000000000 11 | label="SimCity 3000 Unlimited 2.0a Update" 12 | -script=./update.sh 13 | +if [ `uname -m` == "x86_64" ]; then 14 | + script="linux32 ./update.sh" 15 | +else 16 | + script=./update.sh 17 | +fi 18 | targetdir=sc3u-2.0a-x86 19 | scriptargs="" 20 | keep=n 21 | @@ -48,11 +52,11 @@ 22 | fi 23 | if [ "$1" = "--list" ]; then 24 | echo Target directory: $targetdir 25 | - tail +$skip $0 | gzip -cd | tar tvf - 26 | + tail -n +$skip $0 | gzip -cd | tar tvf - 27 | exit 0; 28 | fi 29 | if [ "$1" = "--check" ]; then 30 | -sum1=`tail +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` 31 | +sum1=`tail -n +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` 32 | [ $sum1 -ne $CRCsum ] && { 33 | echo Error in checksums $sum1 $CRCsum 34 | exit 2; 35 | @@ -67,7 +71,7 @@ 36 | fi 37 | done 38 | if [ -x $MD5_PATH/md5 ]; then 39 | - md5sum=`tail +6 $0 | $MD5_PATH/md5`; 40 | + md5sum=`tail -n +6 $0 | $MD5_PATH/md5`; 41 | [ $md5sum != $MD5 ] && { 42 | echo Error in md5 sums $md5sum $MD5 43 | exit 2; 44 | @@ -126,7 +130,7 @@ 45 | location=`pwd` 46 | echo=echo; [ -x /usr/ucb/echo ] && echo=/usr/ucb/echo 47 | $echo -n Verifying archive integrity... 48 | -sum1=`tail +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` 49 | +sum1=`tail -n +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` 50 | [ $sum1 -ne $CRCsum ] && { 51 | $echo Error in check sums $sum1 $CRCsum 52 | eval $finish; exit 2; 53 | @@ -142,7 +146,7 @@ 54 | fi 55 | done 56 | if [ -x $MD5_PATH/md5 ]; then 57 | - md5sum=`tail +6 $0 | $MD5_PATH/md5`; 58 | + md5sum=`tail -n +6 $0 | $MD5_PATH/md5`; 59 | [ $md5sum != $MD5 ] && { 60 | $echo Error in md5 sums $md5sum $MD5 61 | eval $finish; exit 2; 62 | @@ -151,8 +155,8 @@ 63 | fi 64 | $echo -n "Uncompressing $label" 65 | cd $tmpdir 66 | -[ "$keep" = y ] || trap 'cd /tmp; /bin/rm -rf $tmpdir; exit $res' 67 | -if ( (cd $location; tail +$skip $0; ) | gzip -cd | { tar xvf - || failed=y ; } | (while read a; do $echo -n .; done; echo; )); then 68 | +[ "$keep" = y ] || trap 'cd /tmp; /bin/rm -rf $tmpdir; exit $res' 1 2 3 6 69 | +if ( (cd $location; tail -n +$skip $0; ) | gzip -cd | { tar xvf - || failed=y ; } | (while read a; do $echo -n .; done; echo; )); then 70 | if [ x$failed = xy ]; then 71 | echo 'File extraction failed!'; cd /tmp; /bin/rm -rf $tmpdir; eval $finish; exit 1 72 | fi 73 | -------------------------------------------------------------------------------- /sc3u-patcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | PATCH_FNAME='sc3u-2.0a-x86.run' 3 | LOKI_COMPAT='loki_compat_libs-1.5.tar.bz2' 4 | SC3U_PATH='/usr/local/games/SC3U' 5 | 6 | # Check for required programs 7 | RPROGRAMS="curl cat patch tar" 8 | for RPROGRAM in ${RPROGRAMS}; do 9 | if [ "$(which ${RPROGRAM} &> /dev/null; echo ${?})" != "0" ]; then 10 | echo "ERROR: Required binary ${RPROGRAM} not found. Install it to proceed" 11 | exit 1 12 | fi 13 | done 14 | 15 | # Download sc3u patch 16 | if [ ! -f ${PATCH_FNAME} ]; then 17 | curl http://updates.lokigames.com/sc3u/${PATCH_FNAME} -o ${PATCH_FNAME} 18 | fi 19 | 20 | # Fix compatibility problems 21 | patch -p0 < ${PATCH_FNAME}.patch 22 | 23 | # Run the patch 24 | sudo sh ${PATCH_FNAME} 25 | 26 | # Patch s3cu binary 27 | sudo cp ${SC3U_PATH}/sc3u ${SC3U_PATH}/sc3u.old 28 | cat <sc3u 29 | #!/bin/bash 30 | SCPATH=${SC3U_PATH} 31 | echo Running from \$SCPATH 32 | cd \$SCPATH 33 | export LD_LIBRARY_PATH=\$SCPATH/Loki_Compat/ 34 | LD_ASSUME_KERNEL=2.2.5 \$SCPATH/Loki_Compat/ld-linux.so.2 \$SCPATH/sc3u.dynamic 35 | EOM 36 | sudo cp sc3u ${SC3U_PATH}/sc3u 37 | sudo chmod +x ${SC3U_PATH}/sc3u 38 | 39 | # Download and install loki compat libary 40 | if [ ! -f ${LOKI_COMPAT} ]; then 41 | curl http://www.improbability.net/loki/${LOKI_COMPAT} -o ${LOKI_COMPAT} 42 | fi 43 | sudo tar -xjf ${LOKI_COMPAT} -C ${SC3U_PATH} 44 | 45 | # Remove downloads 46 | rm -f ${PATCH_FNAME} sc3u ${LOKI_COMPAT} 47 | --------------------------------------------------------------------------------