I’ve recently started to restore some of my childhood games on Linux, building a library of PC classics like RollerCoaster Tycoon, Cossacks or Sims in addition to my collection of Emulators. Wii, NDS, PC, PSX and many more platforms were accessible right at my fingertips.

Emulating all these games made me wonder whether it might be possible to revisit some of my favorite iOS games as well, but I had no clue whether an emulator even existed until I discovered TouchHLE

What is TouchHLE?

TouchHLE is a high-level iOS 2.0 emulator. A high-level emulator is like a translator who understands the general meaning of a conversation, but doesn’t focus on every small detail. It loosely mimics the system the software was meant to run on, instead of actually emulating the entirety of iOS.

TouchHLE is not meant to run modern iOS software and focuses on classic games like “Monkey Ball”. It does not officially support Linux, but with a few workarounds it can be build successfully.

How to get TouchHLE running?

I will provide step-by-step instructions on how to build TouchHLE on Fedora 38 Workstation. The instructions will most likely also be useful when on a different distribution.

Pre requieries:

You will need the following packages installed: git, gcc, gcc-c++, cmake, alsa-lib-devel. If you are on Fedora you can use the following commands:

sudo dnf install git
sudo dnf install gcc
sudo dnf install gcc-c++
sudo dnf install cmake
sudo dnf install alsa-lib-devel

Furthermore, you will need RustUp, which is easily installed using this command:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 

Now log out of your system and log back in.

Next we will download and compile sndio:

git clone https://caoua.org/git/sndio
cd sndio/
./configure
make
sudo mkdir /var/run/sndiod
sudo useradd -r -g audio -s /sbin/nologin -d /var/run/sndiod sndiod
sudo make install
sudo ldconfig
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
cd ..

For further installation instructions, visit the sndio website. Most importantly, make sure that sndio is in your $PATH (./configure instructs this but you should be good to go).

You can try the installation by typing “sndiod” in the Terminal, which should output nothing.

You will need to type “export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH” each time you want to run TouchHLE in a new terminal to tell the compiler where to find “libsndio.so.7”. This might differ on other distros!

Building TouchHLE

First, let us get a hold of the git repo:

git clone https://github.com/hikari-no-yume/touchHLE 
cd touchHLE
git submodule update --init

Now we can download additional dependencies (boost), installing boost through the package manager is possible but does not work on Fedora with TouchHLE for some reason:

cd vendor && wget https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz && tar -xf boost_1_83_0.tar.gz && mv boost_1_83_0 boost
cd ..

The following command will alter a build instruction to use the downloaded boost package instead of searching for it on the system. If you use another distro, you might be able to skip this step:

sed -i 's/os.eq_ignore_ascii_case("windows")/os.eq_ignore_ascii_case("linux")/g' 'src/cpu/dynarmic_wrapper/build.rs'
cd ..

Now you should be able to run:

cargo run --release

In the TouchHLE folder and the app should build and start successfully. In order to emulate an app, you need to place an IPA file in the “touchHLE_apps” folder and restart TouchHLE. A list of working apps can be found on the TouchHLE website. These apps do offer controller support. Refrain from downloading IPA’s from Archive.org as they do not respect copyright 😉

Results

Figuring out these instructions took quite some time, but the results are worth it! TouchHLE can be used quite stable on Linux, and it’s certainly amazing to see classic IOS 2.0 games running on Linux and my childhood can be relived:

Did you know you can follow this blog in the Fediverse? Just type “@Aaron” in your search bar. Also make sure to visit the Guestbook and leave a message.

Lastly, big thanks to hikari_no_yume @hikari for creating this great project.

By Aaron

One thought on “Emulating IOS 2.0 games on Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.