Guide: Undertale on Retro Handheld Devices

Last updated: 30NOV2021 (see Changelog for details)

Today we’re going to install and play Undertale on RK33265-based retro handheld devices thanks to the PortMaster app. The game can run on the following devices:

Anbernic RG351P (ArkOS final, TheRA, 351ELEC)
Anbernic RG351M (ArkOS final, TheRA, 351ELEC)
Anbernic RG351V (ArkOS, TheRA, 351ELEC)
Anbernic RG351MP (ArkOS, TheRA, 351ELEC)
PowKiddy RGB10 (ArkOS)
GameForce Chi (ArkOS)
RK2020 (ArkOS)
ODROID Go Advance (ArkOS)
ODROID Go Super (The RetroArena, RetroOZ)
PowKiddy RGB10 Max (The Retro Arena, RetroOZ)

The video below is a bit outdated, since it uses the older AnberPorts app and requires you to extract Linux files from a Windows PC. See below for the “simple conversion process” and the PortMaster solution instead.

Purchase and download Undertale

In order to run Undertale on your favorite retro device, you need to have the retail game assets. I recommend purchasing the game from GOG.com, where you can easily grab the Linux installer file, which has the exact assets you need. You cannot extract the correct assets from the PC or Mac versions of the game, you need the Linux version. I have also been told that the Humble Store version of the game is already pre-extracted, which is even easier.

Once you have purchased the game from GOG.com, it will show up in your library. Go into the Games section on your profile, and click the arrow at the bottom-right of your Undertale game, and select “View Downloads”. Change the system to Linux, and then click on the link under “Download Game Installers”. It will be a 128MB file in .sh format. Save that onto your PC.

Simple GOG conversion process

In the video above (and the instructions below), I show you how to install the Linux version of the game on your Windows PC so that you can extract the assets from the GOG version of the game. Turns out that the process is even easier. Thanks to Christian_Haitian (ArkOS developer) for turning me on to this fix.

  • Take the Linux game install file from GOG.com (the one in .sh format that is 128MB), and change the file extension from .sh to .gz.
  • Next, use 7zip to open the file, and grab the files.

Steam download process

You can also use Steam copies of Undertale to grab the game, using this method:

– On your PC, press Win+R and type: “steam://open/console” (Steam will now show console command)
– In the Steam console, type: “download_depot 391540 391544”
– After several minutes, it will show you the location of the game files on your PC. Be patient, some games take longer to download than others. Navigate to that location and grab those files!

For future reference, this method can be done when trying to download the Linux version of other games via Steam. The App ID and Depot ID of the game can be found on the site steamdb.info. When you search for a game on this site you’ll immediately see the App ID. Scroll down a bit and click on Depots. Here you’ll find all the available OS versions of the game and the corresponding Depot ID. The download command in the steam console is: “download_depot <appid> <depotid>”

If you are using a Mac computer, the process is the same, other than how to open up the Steam console. To do so, open the Terminal app and type the following line of code:

/Applications/Steam.app/Contents/MacOS/steam_osx -console

Install PortMaster and prep the Undertale port

In order to get this game working, you will need to be running PortMaster. Here is my guide to get it up and running:

And here are the instructions to install the game via PortMaster. Bottom line: once you have the PortMaster files installed for Undertale, move the Linux game files into the ports/undertale/assets folder.

Install Debian for Windows 10 (old version)

This is the old method to extract the GOG Linux files from a Windows PC, and it still works, and it’s a little fun. But at this point, it’s unnecessary thanks to the process highlighted above. If you still want to learn how to install Linux on your Windows PC and “install” a Linux game on your PC, here you go:

On your PC, go to the Microsoft Store, and then search for “Debian“. Install this free app, and then try and launch it. It will tell you that you need a Windows Subsystem for Linux (WSL). Head to this page, and in the “Manual Installation Steps” section, you’ll see the following code:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Go ahead and copy this code. Next, in your Windows Start Menu, search for the word “Powershell” and when the app pops up, right-click on it and select “Run as Administrator” and confirm the prompts. Inside PowerShell, paste that code above, and hit Enter. Once that is done, close out your windows and restart your PC.

Once you’ve rebooted, start up Debian again, and this time it will launch and install. It will prompt you to create a username and password.

Extract the Undertale assets

Open up the folder where you installed the Linux version of Undertale (the 128mb .sh file), and keep that window open and handy. Open up Debian and type the following:

/mnt/c/

Next, grab that .sh file and drag it into the Debian window. It will populate the rest of the code with the location of the .sh file, but you need to make some alterations to it. Change all of the backslashes to forward slashes, and remove the “C:/” from the code. Your final code will look something like this (assuming you put the .sh file in a folder named “undertale” on your Desktop):

/mnt/c/Users/(username)/Desktop/undertale/undertale_en_1_08_18328.sh

Hit Enter and you’ll be greeted by the user license. You will need to confirm “Y” that you want to see 21 more lines, just keep hitting Y and Enter until you’re at the bottom, when it asks you to accept the license. Next it will ask you to confirm the destination. Just press “1” and Enter. It will then ask you to create shortcuts, press “1” and Enter and then “2” and Enter to deselect these. Finally, press Enter to finish the install.

Now you need to find the installed files so you can grab those assets. Note that you will need to enable hidden files in order to find the “AppData” folder. Here is the file path of your assets:

This PC / Local Disk / Users / (username) / AppData / Local / Packages / TheDebianProject… / LocalState / rootfs / home / user / GOG Games / Undertale / game

Inside that folder you will find an “assets” folder and a “runner” file. Copy these files over to the ports/Undertale folder on your device’s SD card (within the EASYROMS or GAMES partition).


Changelog

30NOV2021
– re-wrote installation to accommodate new PortMaster instructions

13MAY2021
– added simple conversion process for Linux file

22MAR2021
– published guide
– added notes about Humble Store and Windows extract based on feedback

16 thoughts on “Guide: Undertale on Retro Handheld Devices

  1. Wow! I have the Steam version, but I also use Linux for gaming so I assume I would be able to extract the assets via my installed Linux version. I’ll try later, thanks for the guide! By the way if anyone wants to try running Linux on your computer, it’s not that scary 🙂 and you can still keep Windows around for a few things if needed.

    Like

  2. You might be able to extract the assets without going through WSL, specifically rename the .sh file to .gz and open it in 7-Zip, the assets should be under \data\noarch\game\, I don’t own the game on GOG so I can’t double check this.

    For Steam you can open the console via Win+R, type the following: steam://open/console
    A console tab should show up in the Steam client, where you can enter the command: download_depot 391540 391544
    Expect the following output:
    Downloading depot 391544 (119 MB) ..
    Depot download complete : “C:\Program Files (x86)\Steam\steamapps\content\app_391540\depot_391544” (227 files, manifest 5730345506996883260)

    the assets can be found in the folder Steam supplied, which might be on a different drive depending on your settings

    Like

    1. Great tip. Changing the extension and unpacking with 7-zip is much easier and more user friendly way of getting the assets.

      Like

  3. This is great! For anyone else wondering, steam console syntax is download_depot . So if you look up a game like Stardew Valley on steamdb.info, you can see the app_id in the URL (413150) and the Linux depot ID by checking the depots on the left side (413153).

    I still don’t have my device, so hopefully I’ll be able to test if this works soon…

    Like

  4. Anyone managed to make it work on 351ELEC ? I have anberports installed and assets extracted but everytime i try to run Undertale is shows the “Downloading,…” screen and goes back to list of games at Anberports.

    Like

  5. hi i went to find the files and it doesnt show a rootfs folder just a file called ext4.vhdx is this fixable
    and i use winrar so when i did the .gz it just had a.file

    Like

  6. RGB 10 Max 2. Installed windows GOG version to /ports folder, runs well. But the game screen is shifted to left, it’s 4:3 ratio on a 16:9 device. Does anyone know how to center game screen? Or should I just use another version of the game?

    Like

Leave a Reply to Vetle Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s