Prince of Persia – DOSBox and Native

Jarret B

Active Member
Staff member
Joined
May 22, 2017
Messages
252
Reaction score
235
Credits
6,039
In 1989, one of the best games, that ended up on many consoles, was released. Prince of Persia started on the Apple II. In 1990, they ported it to MS-DOS.

They eventually ported the game to these other platforms:
  • NEC PC-9801
  • MS-DOS
  • Amiga
  • Atari ST
  • Sharp X68000
  • Amstrad CPC
  • SAM Coupé
  • TurboGrafx-16
  • Game Boy
  • FM Towns
  • Master System
  • Super NES
  • Sega CD
  • NES
  • Macintosh
  • Game Gear
  • Genesis
  • Game Boy Color
  • Mobile
  • Xbox 360
  • PlayStation 3
  • Blackberry
  • iOS
  • Nintendo 3DS
  • Wii
  • Android
The game was known for its fluid movement in gameplay. It is said that Prince of Persia was the predecessor of ‘Assassin’s Creed’.

Playing on Linux with DOSBox

I am using Ubuntu 20.04 in a Virtual Machine to do this, but it should be backwards compatible with other Ubuntu versions.

In a terminal, perform an update and upgrade any files. Next, you need to install DOSBox with the command:

sudo apt install dosbox -y

DOSBox is an MS-DOS emulator for Linux to use to execute DOS games and apps.

We now need to create a folder to be used in which to install the DOS programs. We can use a directory called ‘dosbox’ in the Home Folder:

mkdir ~/dosbox

From a terminal, type ‘dosbox’ to start the program. Once started, type ‘exit’ and press enter to close the program. It has created configuration files we can edit to make changes.

To edit the DOSBox configuration, run the command:

nano ~/.dosbox/dosbox-0.74-3.conf

Be aware that the version may be different, so if it doesn’t work, check the filename in the ‘.dosbox’ folder. Once opened, go to the end of the file and add a line:

mount c /home/jarret/dosbox

Change your username as required. Any files you place into the ‘dosbox’ folder will be mounted as drive ‘c’.

You also want to find the line ‘joysticktype=auto’ and change it to ‘joysticktype=none’ if you plan on using the keyboard.

We can find the original Prince of Persia game at ‘https://dosgames.com/game/prince-of-persia/’. Specifically, at ‘https://dosgames.com/files/DOSBOX_POP.ZIP’. You can download the file and place the contents into the ‘dosbox’ folder. Make sure you grab the file that is meant for DOSBox since it does not require installation. It will create another folder inside ‘dosbox’ called ‘dosbox_pop’. It may be best to rename the folder ‘pop’. DOS does not recognize folder and file names over 8 characters.

Open DOSBox and at the DOS prompt, switch to the ‘C’ drive with the command ‘c:’. You then need to go into the Prince of Persia folder with the command ‘cd pop’, or whatever name you changed it to. To start the game, type ‘prince’ and press enter.

Realize that this game is the original. It is being run under DOSBox, but if you want to play it natively in Linux, then read on.

Native Prince of Persia

There is a project rebuilding the Prince of Persia game on Github. This program is what we will install on your Linux system (Ubuntu), but you may get it to work on other distros. There is one, maybe two, packages to install. You’ll have to change my commands to make them work for you.

Let’s start by getting the necessary files from Github. Open a web browser and go to ‘https://github.com/nagyd/sdlpop’. Here, under the green ‘Code’ button, select ‘Download ZIP’. Save the file where you can get to it in a bit when it is completed its download. After the download, open the ZIP file and extract it to your Home Folder. It should extract a folder named ‘SDLPoP-master’. Switch into the folder in a terminal.

One package you may not need is ‘build-essential’. On most systems, this is pre-installed.

The main package you need to get is the ‘libsdl2-image-dev’ package with the command:

sudo apt install libsdl2-image-dev -y

Once installed, make sure you are in the ‘SDLPop-master/src’ folder in a terminal. Type the following commands:

make all
sudo make install


You should now find ‘SDLPoP’ in your menu to run.

Once you start the game, click somewhere in the window to show the menu, as shown in Figure 1.

Here, you can make all kinds of changes to the game. Some will help you perform saving the game, recording game play, etc. The controls are as follows (some are not from the original game, but added in this version):
  • Left: turn or run left
  • Right: turn or run right
  • Up: jump or climb up
  • Down: crouch or climb down
  • Shift: pick up things
  • Shift+Left/Right: careful step
  • Shift: attacks when you have your sword drawn
  • Home or Up+Left: jump left
  • Page Up or Up+Right: jump right
  • Shift while falling: grab onto ledge
  • Esc: Pause game
  • Space: Show how much time is left.
  • Ctrl+A: Restart level.
  • Ctrl+G: Save game (on levels 3..13).
    • This saves only the level number, the remaining time, and the number of hit points.
  • Ctrl+L: Load game (press in the intro).
    • The game will continue from the beginning of the level where you saved.
  • Ctrl+J: Joystick/gamepad mode.
  • Ctrl+K: Keyboard mode.
    • The initial mode is joystick/gamepad if such a device is detected, otherwise keyboard mode.
    • Since version 1.18, SDLPoP automatically changes the input mode when there is input from either device. As a result, Ctrl+K and Ctrl+J are now redundant.
  • Ctrl+R: Return to intro.
  • Ctrl+S: Sound on/off.
  • Ctrl+V: Show version of SDLPoP.
  • Ctrl+Q: Quit game.
  • Ctrl+C: Show versions of SDL:
    • COMP: the SDL version SDLPoP was compiled against, i.e. the version of the SDL headers.
    • LINK: the SDL version SDLPoP was linked against, i.e. the version of SDL2.dll (or its equivalent on other platforms).
  • Alt+Enter: Toggle full-screen mode.
  • F6: Quicksave: Save the exact state of the game.
  • F9: Quickload: Load what the last quicksave saved.
  • F12: Save a screenshot to the screenshots folder.
  • Backspace: Display the in-game menu. (Esc will also display the menu by default, but you can turn that off.)
  • `: Fast forward. (It's the key above Tab. It might have a different label depending on your keyboard layout.)
  • Ctrl+Tab (in game, or on title screen): Start or stop recording.
  • Tab (on title screen): View/cycle through the saved replays in the SDLPoP directory.
  • F (while viewing a replay): Skip forward to the next room.
  • Shift+F (while viewing a replay): Skip forward to the next level.
  • Shift+L: Go to next level.
  • C: Show numbers of current and adjacent rooms.
  • Shift+C: Show numbers of diagonally adjacent rooms.
  • -: Decrease remaining time by one minute.
  • +: Increase remaining time by one minute.
  • R: Resurrect kid.
  • K: Kill guard.
  • Shift+I: Flip the screen upside down.
  • Shift+W: Slow falling.
  • H: Look at the room to the left.
  • J: Look at the room to the right.
  • U: Look at the room above.
  • N: Look at the room below.
  • Shift+B: Toggle hiding of non-animated objects. (Also known as "blind mode".)
  • Shift+S: Restore a lost hit-point. (Like a small red potion.)
  • Shift+T: Give more hit-points. (Like a big red potion.)
  • Ctrl+B: Go back to the room where the prince is. (Undo H,J,U,N.)
  • Shift+F12: Save a screenshot of the whole level to the screenshots folder, thus creating a level map.
  • Ctrl+Shift+F12: Save a screenshot of the whole level with extras to the screenshots folder. You can find the meaning of each symbol in Map_Symbols.txt.
  • [: Shift kid 1 pixel to the left.
  • ]: Shift kid 1 pixel to the right.
  • T: Toggle display of timer (remaining minutes:seconds:ticks). Also shows the total elapsed ticks during playback.
  • F: Toggle display of the remaining feather fall time. (Only if "Fix quick save in feather mode" is enabled.)
  • Shift+F9: Quickload but keep the currently loaded level.
The game runs smoothly like the original. To make some of the cheats work properly, you need to enable them in the settings from the menu (click on the screen with the mouse).

Conclusion

For those of you who remember Prince of Persia, or those who want to see it, it was a very different-looking game for anything else in the old DOS days.

Give it a whirl. I’m sure you’ll like it.
 


Joined
May 12, 2022
Messages
35
Reaction score
11
Credits
536
I believe that, that particular game, the one with the red jacket and white pants, they made it to troll us and keep us playing and never solve it, and it keeps wasting time. I remember the first version I played it ( on DOS ) it had only 15 min ! very bad snappy behavior of jumps that doesn't correct itself. I remember that on Windows 7 tried to play it up to the point with guides on the web. The first one (the green haired - white shirt version ) had u stick with drinking poison all the way in the 2nd level. Nasty piece of trollery for kids. The only thing I liked was that u had to think and use ur imagination a bit. with my true gaming experience formed around C.S 1.6 and Warcraft III and the ubisoft's PoP Warrior Within, the ancient PoP is not worth remembering.
And the Warrior Within :
Perfect game. perfect plan. but the scenario sucks. There's "Dahaka" the god of time or a demon sent by gods to kill Prince, raises your wanted lvl to 6 stars and the creature only exists in the Warrior Within episode. and the prince was a wimp.
All the PoPs suck but I appreciate the movie, great story, great acting, games score 0.5 , the movie scores 9.5.

1663570191210.png
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Latest posts

Top