Shovel Knight: Treasure Trove on Retro Handheld Devices

Last updated: 13MAY2021 (see Changelog for details)

Let’s figure out how to play Shovel Knight: Treasure Trove on various retro handheld devices. We will primarily focus the install guide on the RG351P and RG351M, but additional instructions for other RK3326 devices are also found below.

I’ve been playing this game for a few days now and I really love it. It reminds me of a cross between the Duck Tales and Mega Man NES games, with some lite RPG elements. Fair warning, the games are pretty difficult, but there are cheat codes available if that’s your thing.

Big shoutout to developer JohnnyonFlame for getting this port up and running on these devices. He’s also the developer who made all of those awesome Super Mario 64 ports possible! If you have the means to do so, please consider donating a coffee to show your support for his work.

Table of Contents
Purchase and download the game
GOG-specific instructions
Steam-specific instructions
Load the game onto your RG351P or RG351M
A note on controls
RG351V instructions (351ELEC and ArkOS)
PowKiddy RGB10 (ArkOS)
More to come

Changelog

Purchase and download the game

In order to play Shovel Knight: Treasure Trove, you will need the game files from the Linux version of this game. I recommend buying the game from the Humble Store, since the games will already be in the appropriate file system. Be sure to watch for sales, since the MSRP for this game ($40) is pretty steep. However, bear in mind that by purchasing this game, you are getting four games in one, and you can also play it on your home PC or Mac, too.

If you already own the game via GOG.com or Steam, see the instructions below on how to extract the game files.

Once you have purchased the game, download the Linux version onto your computer. Extract the .tar file twice using 7Zip (or Archive Utility if you are on a Mac), and you should have a folder named and organized as such:

shovelknight
> 64 (folder)
> 32 (folder)
> data (folder)
> shovelknight (binary file)
> softwarelicense.txt

GOG-specific instructions

If you happen to already own the game via GOG.com, it’s easy to extract the Linux data files. 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 Shovel Knight game, and select “View Downloads”. Change the system to Linux, and then click on the link under “Download Game Installers”. 

The downloaded file will be in .sh format. All you have to do is change the file extension from .sh to .gz, and then open it with 7zip. Inside you will find all of the game data files you need, organized as such:

shovelknight
> 64 (folder)
> 32 (folder)
> data (folder)
> shovelknight (binary file)
> softwarelicense.txt

Steam-specific instructions

If you happen to already own the game via Steam, here are instructions on how to download the Linux version of Shovel Knight via a Windows PC. Thanks to dhimdi and yalsi86 on Reddit for figuring out the method:

  • Press Win+R and open “steam://open/console” (Steam will now show console command)
  • Enter “download_depot 250760 250764” (It will eventually show download location)
    You will end up with having: 32 (folder), 64 (folder), data (folder)
  • You don’t need the shovelknight (binary) and softwarelicense.txt in the main folder, the Steam Linux version is already set.

Note: The game will prompt you that it doesn’t find the Steam client (duh!) each time you go back to the main menu of the game.. a bit annoying!

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>

Load the game onto your RG351P or RG351M

This method will work with both ArkOS and 351ELEC operating systems.

First, we’re going to add some files to the “ports” folder of your SD card. Insert the card into your computer and then navigate to the EASYROMS (ArkOS) or GAMES (351ELEC) partition, and then the ports folder.

Inside the ports folder, copy over the shovelknight folder that we just downloaded and extracted.

Next, download and extract this file and place the “Shovel Knight.sh” file and the folder named “box86” inside the ports folder as well. Inside the box86 folder, you should see the following file organization:

box86
> native (folder)
> lib (folder)
> box86 (binary file)

If you look inside the Shovel Knight.sh file, you will find the following code:

#!/bin/bash
cd /roms/ports/shovelknight/32

export LIBGL_NOBANNER=1
export LIBGL_ES=2
export LIBGL_GL=21
export LIBGL_FB=4
export BOX86_LOG=0
export LD_LIBRARY_PATH=/roms/ports/box86/lib:/usr/lib32:/roms/ports/box86/native
export BOX86_LD_LIBRARY_PATH=/roms/ports/box86/lib:/roms/ports/box86/native:/usr/lib32/:./:lib/:lib32/:x86/
export BOX86_DYNAREC=1
export SDL_GAMECONTROLLERCONFIG="03000000091200000031000011010000,OpenSimHardware OSH PB Controller,a:b0,b:b1,y:b3,x:b2,start:b6,back:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b8,guide:b9,leftx:a0~,lefty:a1~,rightx:a2,righty:a3,lefttrigger:b10,righttrigger:b11,platform:Linux,"
/roms/ports/box86/box86 ShovelKnight

After that, eject your SD card from the computer, insert it into your device, and boot it up from the Ports menu. Enjoy!

One note: if you are using 351ELEC, the Ports menu is hidden by default. To turn it on, press START to open the Main Menu, then select Game Collection Settings > Systems Displayed > PORTS, and make sure it is checked.

A note on controls

In my testing, the most important part for me was to confirm that all buttons were registering on the various devices. That being said, some of the buttons may not correspond to what you prefer on your specific device. Luckily, the Shovel Knight options menu lets you remap the entire controller to your liking, so it just takes a few moments to set up the controls on your device.

RG351V instructions (351ELEC and ArkOS)

If using 351ELEC, just follow the steps above but place all of the files in the “ports” folder on the second SD card.

If using ArkOS, as of 10MAY2021, the Shovel Knight setup files (minus the game data files) are pre-loaded on ArkOS for the RG351V. If adding them manually, you need to place the data files on the first SD card, and the “Shovel Knight.sh” script on the second SD card. This is how they should be broken up:

SD1:
ports/box86 folder
ports/shovelknight folder

SD2:
ports/Shovel Knight.sh

For 351ELEC. replace the “Shovel Knight.sh” contents with this code so that the buttons are properly mapped. If you are using the 10MAY2021 (and beyond) version of ArkOS with the script pre-loaded, you don’t have to do anything else.

#!/bin/bash
cd /roms/ports/shovelknight/32

export LIBGL_NOBANNER=1
export LIBGL_ES=2
export LIBGL_GL=21
export LIBGL_FB=4
export BOX86_LOG=0
export LD_LIBRARY_PATH=/roms/ports/box86/lib:/usr/lib32:/roms/ports/box86/native
export BOX86_LD_LIBRARY_PATH=/roms/ports/box86/lib:/roms/ports/box86/native:/usr/lib32/:./:lib/:lib32/:x86/
export BOX86_DYNAREC=1
export SDL_GAMECONTROLLERCONFIG="03000000091200000031000011010000,OpenSimHardware OSH PB Controller,a:b0,b:b7,x:b3,y:b2,leftshoulder:b4,rightshoulder:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0~,lefty:a1~,guide:b12,leftstick:b8,lefttrigger:b10,rightstick:b9,back:b1,start:b6,rightx:a2,righty:a3,righttrigger:b11,platform:Linux,"
/roms/ports/box86/box86 ShovelKnight

PowKiddy RGB10 instructions (ArkOS)

I have only tested this for ArkOS on the PowKiddy RGB10, but it’s working great. Theoretically, this should also work on the ODROID Go Advance and RK2020 devices as well, but they are untested.

Follow the same instructions as for the RG351P/M, but replace the “Shovel Knight.sh” contents with this code so that the buttons are properly mapped:

#!/bin/bash
cd /roms/ports/shovelknight/32

export LIBGL_NOBANNER=1
export LIBGL_ES=2
export LIBGL_GL=21
export LIBGL_FB=4
export BOX86_LOG=0
export LD_LIBRARY_PATH=/roms/ports/box86/lib:/usr/lib32:/roms/ports/box86/native
export BOX86_LD_LIBRARY_PATH=/roms/ports/box86/lib:/roms/ports/box86/native:/usr/lib32/:./:lib/:lib32/:x86/
export BOX86_DYNAREC=1
export SDL_GAMECONTROLLERCONFIG="190000004b4800000010000001010000,GO-Advance Gamepad (rev 1.1),a:b1,b:b0,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftx:a0,lefty:a1,guide:b12,leftstick:b14,lefttrigger:b13,rightstick:b15,righttrigger:b16,start:b17,platform:Linux,"
/roms/ports/box86/box86 ShovelKnight

ODROID Go Super and RGB10 Max instructions (RetroOZ)

You can play this game in stunning widescreen with the ODROID Go Super running the latest (0.45b and higher) version of RetroOZ.

The .045b version will come with everything you need other than the shovelknight data file itself. So to install, just copy the shovelknight folder from your purchased Linux version of the game into the “ports” folder on your RetroOZ SD card. Just like magic, it works! This should work for the RGB10 Max as well, as long as it’s running the correct version of RetroOZ.

More to come

I’m still working on how to get this game running on other firmwares like EmuELEC, and I will update this guide as those features are unlocked.


Changelog

13MAY2021
– added link to cheats database
– added GOG instructions

12MAY2021
– added OGS and RGB10 Max instructions

10MAY2021
– added Steam instructions
– updated zip file with licenses
– added info about ArkOS pre-load on RG351V

09MAY2021
– published guide

26 thoughts on “Shovel Knight: Treasure Trove on Retro Handheld Devices

  1. Wow, this is super cool! Maybe I’ll finally get around to playing my copy of Shovel Knight haha. Is there any chance that box86 could be used to run more Linux games on this device? Looking at their compatability list, there are a lot of interesting games on there (e.g. Hitman, Fez, Stardew Valley, Baba is you, Fallout 2, Paper Please, Cave Story +, Nuclear Throne, Binding of Isaac, Freedom Planet, etc.) I don’t know how well these would all work without mouse support, but if Shovel Knight can run, then perhaps other games could run as well.

    Like

    1. My guess is you’re using 351ELEC, which auto-hides the ports folder. Go into the Main Menu > Game Collection Settings > Systems Displayed and make sure that PORTS is checked.

      Like

  2. I have the GOG version of the game. When I download the Linux files, it’s only a .sh. How do I make this work?

    Like

  3. Thanks for this guide, and thanks to JohnnyonFlame for porting Shovel Knight over! The game plays great on the RG351V with 351ELEC. I ran into a bit of a problem with the controls though. I followed the guide and replaced the contents of the .sh file with the code under the 351ELEC/ArkOS section, but for some reason the B button brought up the Curios menu, which should’ve been the Select button, both Y and Select were Attack, and the A button was Jump. I had to go back into the .sh file and swap the input values for Select, B and A around so the buttons were mapped correctly.

    I’m not sure if there was a mistake in the button mapping or if the problem was on my device’s end. It’s all good now, though. The game’s playing just fine.

    Like

    1. Yes, I was mostly preoccupied with just making sure that the buttons worked than making sure they’re keyed correctly. I made a section called “A note about controls” which addresses this. Luckily you figured it out, that the game allows you to completely remap the buttons to your liking!

      Like

  4. For everybody wondering, I have gotten it to work with the Steam Version of the game using the following steps:

    – open Win+R and steam://open/console
    – type in “download_depot 250760 250764”
    – verify that the folder structure looks like the one mentioned above, without “softwarelicense” and the binary in the main folder
    – transfer this folder to the “shovelknight” folder in your ports part of the ROM partition.

    Like

  5. Just to clarify regarding Steam on Windows to download the Linux version:

    1. Press Win+R and open “steam://open/console”
    (Steam will now show console command)
    2. Enter “download_depot 250760 250764”
    (It will eventually show download location)

    You will end up with having:
    32 (folder), 64 (folder), data (folder)

    You don’t need the “shovelknight (binary)” and “softwarelicense.txt” in the main folder as mentioned by the guide, the Steam Linux version is already set.

    Now follow the rest of the guide and simply enjoy this game!
    Note: The game will prompt you that it doesn’t find the Steam client (duh!) each time you go back to the main menu of the game.. a bit annoying!

    Like

  6. Now to my question, does anyone know where the save files are located which the game creates to store your progress? I’m using 351ELEC. Much appreciated if anyone does know?

    Like

  7. Hey there!
    Do you believe the other games tested with box86/64 would run on rg351? Like owlboy, mark of the ninja, into the breach, ftl?

    Like

    1. From what JohnnyonFlame told me, a LOT of games don’t run with box86, so it’ll be a lot of trial and error until he (or someone else in the community) finds other games that will run as well as this one. But there’s hope! Owlboy would be great.

      Like

  8. The game works great on 351ELEC!
    Scraping doesn’t seem to be working…

    Any chance you can upload the box art & video for us?
    Thanks again for another great tutorial!

    Like

    1. Same for me. Returns to EmuStation each time I tried on the 351P 😦
      I noticed that the paths in the .sh file point to “/rom/ports/…” where on 351elec the path could be “/storage/roms/ports…”
      I tried changing the .sh file accordingly, but no success: keeps on returning to EmuStation. I will keep an eye here to see if an update on this is provided. I am as well interested to see if someone got this running on 351P running 351elec.

      Like

      1. Nope! Ignore my previous post… All is good in the .sh file, I just forgot to copy the “data” folder…
        Stupid me 🙂

        Like

  9. It can be cool to do a review of “how it works” so maybe other people can try to make other games compatible (i actually tryingto make FEZ work on RG351M)

    Like

  10. Hey I ended up buying on GOG and downloaded the Linux version and extracted but the folders I have are: Data, meta and scripts, I did a little digging and if you go to data\noarch\game then it has the folders/files you mentioned and I can then follow your instructions. Love your videos and all the ports you have done are great on my RG351v.

    Hope the helps!!

    Liked by 1 person

  11. For the RG351V you can put the data files on the 2nd microSD card. To do this modify the *.sh file. Where it lists /roms/ports/* change it to /roms2/ports/* in all 6 locations.

    This will point the script to the 2nd microSD card letting it load from there.

    Unfortunately I don’t own this game to verify, but it should work just fine.

    Like

  12. Game and controls all working fine. Issue I have is that there are no button combos to exit the game. When I go through the in game options to exit then the game does shut down but produces the red software error every time. This then remains on screen for a few seconds before getting back into 351ELEC.
    Any ideas of a cleaner way to sort this out?

    Like

Leave a 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 )

Google photo

You are commenting using your Google 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