Compiling Prince Of Persia (SDLPoP) - Debian Linux Edition

 


A few months ago, I came across a blog post - Games for sysadmins: Prince of Persia 1 on Linux with SDLPoP, where the disassembled DOS version of Prince of Persia was compiled on Fedora 32. 

Fedora 32 is x86 and a Red Hat based distro having a Pi 500 which is Arm64 and running Raspberry Pi OS (Debian based), I thought it would be fun to try and get the game working on my setup. 

Just a quick history lesson, SDLPoP is an open-source (GPL v3) port of Prince of Persia that runs natively on Windows and Linux. It was originally programmed in 6502 assembler for the Apple II.

All the below steps are performed in the Terminal - 

Firstly, let’s make sure Raspberry Pi OS is up to date.              

            $ sudo apt update    

            $ sudo apt full-upgrade 

Now let’s install some essentials, note some of these packages might already be installed, but are listed here just in case. 

Install the Linux build tools.

            $ sudo apt-get install build-essential

Install git, which we will use to “copy” / clone the source code to the Pi.

            $ sudo apt-get install git-all 

Now let’s install the SDL framework.

            $ sudo apt-get install libsdl2-2.0-0   

            $ sudo apt-get install libsdl2-dev

            $ sudo pt-get install libsdl2-image-dev 

On my Pi, I have created a Projects directory where I copy my code, move to your “Project” directory. 

              $ cd Projects 

 “Copy” / Clone the Prince of Persia source from GitHub 

            $ git clone https://github.com/NagyD/SDLPoP 

Move to the source code and compile.  

           $ cd SDLPoP/src 

           $ make all 

 Move back a directory and play the game.    

            $ cd..        

Popular posts from this blog

Code the Classics - Volume II - macOS Guide

Behind the Pixels - Week 20

Behind the Pixels - Week 21