SDLPoP, an open source port of Prince of Persia for Switch

nNZyCAZ.jpg
SDLPoP is an open source engine rewriting of the Prince of Persia dos game.
[prebreak]1[/prebreak]
Hi there,

I just wrote a port of SDLPoP for Switch.

Here you can find everything you need to install and run it: https://github.com/usineur/SDLPoP/releases/tag/switch-1.0

It's my first port for on this device, so do not hesitate to report bugs on Github or here.
Note that It has been only tested on 4.1.0.

Feel free to post any video of the port in action, i will add it to this post :)

Edit: a tuto made by Masterwin (for Spanish speakers)

Have fun,
usineur
 
Last edited by usineur,

usineur

Well-Known Member
OP
Newcomer
Joined
Mar 20, 2016
Messages
94
Trophies
0
Age
40
XP
2,097
Country
France
edit: Second impression, character always runs right - doesnt react to "left" input. Sadly unplayable. ;)

edit2: Its a Joystick/Deadzone (?) issue. If you enable use joystick only for directional movements in the menu - the character becomes controlable via the non digipad, digipad.

Sometimes all buttons are blocked after drinking a health cocktail but apart from that everything's just running beautifully! Thank you very much for that port! :)

Those issues are fixed (see here) and will be included in the next release, obviously.
Currently, I'm waiting for libnx updates, i really want to add a feature that doesn't exist yet before publishing the 1.1.

Also thx for feedbacks, glad you enjoy it :)
 
  • Like
Reactions: notimp

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
Those issues are fixed (see here) and will be included in the next release, obviously.
Currently, I'm waiting for libnx updates, i really want to add a feature that doesn't exist yet before publishing the 1.1.

Also thx for feedbacks, glad you enjoy it :)
I discovered another bug as I played through the game completely this weekend (and it was so much fun, thank you again for the great port):
The timer is buggy. I was confused first as I remembered almost all levels from my childhood and ran through them the right way first try but had problems with the time nevertheless.
Then I figured out: Quick loading and quick saving does not affect the timer. It runs. That means if I save at the start of level 1 and load the save over and over again for 45 min, the time's completely consumed.
So I beat the game with "-1.00" and discovered the next bug: As PoP does not have an onscreen keyboard (like ScummVM), it's not possible to enter anything in the hall of fame screen to proceed so I'm stuck there forever. Not that big issue as the game is done at that point anyway but I wanted to let you know.
Also I can turn on cheats in options but how can I use them? I think they are expecting a keyboard as well? Like using SHIFT+L for level skipping without affecting the time and so on.
 

usineur

Well-Known Member
OP
Newcomer
Joined
Mar 20, 2016
Messages
94
Trophies
0
Age
40
XP
2,097
Country
France
I discovered another bug as I played through the game completely this weekend (and it was so much fun, thank you again for the great port):
The timer is buggy. I was confused first as I remembered almost all levels from my childhood and ran through them the right way first try but had problems with the time nevertheless.
Then I figured out: Quick loading and quick saving does not affect the timer. It runs. That means if I save at the start of level 1 and load the save over and over again for 45 min, the time's completely consumed.
Pretty sure it comes from the wrong initial values the SDLPoP 1.0 release suffers.
By the way you can use the "Restore defaults" option in general settings to get those values correctly set.

Also there is an option called "Quicksave time penalty". It affects the timer if you have it set to "ON" (and should be activated by default).

So I beat the game with "-1.00" and discovered the next bug: As PoP does not have an onscreen keyboard (like ScummVM), it's not possible to enter anything in the hall of fame screen to proceed so I'm stuck there forever. Not that big issue as the game is done at that point anyway but I wanted to let you know.

Also I can turn on cheats in options but how can I use them? I think they are expecting a keyboard as well? Like using SHIFT+L for level skipping without affecting the time and so on.
Yeah, that's what i am waiting in libnx, an access to switch software keyboard. This feature doesn't exist yet.
So for now, you can't enter your name, and can't use some features that can't be bound to a button.
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
Pretty sure it comes from the wrong initial values the SDLPoP 1.0 release suffers.
By the way you can use the "Restore defaults" option in general settings to get those values correctly set.

Also there is an option called "Quicksave time penalty". It affects the timer if you have it set to "ON" (and should be activated by default).


Yeah, that's what i am waiting in libnx, an access to switch software keyboard. This feature doesn't exist yet.
So for now, you can't enter your name, and can't use some features that can't be bound to a button.
Thx for the quick reply man. I'll wait for the update whenever it comes to play through it once again. I'll try mods then as well. :)
 
  • Like
Reactions: usineur

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
Not tested, but it should work. Instructions are here: https://github.com/usineur/SDLPoP/blob/switch/mods/mods.txt

For this port, you should have
  • a "mods" folder in /switch/SDLPoP/
  • Put your mod in it (for example: for Prince4D, you should have /switch/SDLPoP/mods/Prince4D/)
  • edit the SDLPoP.ini and change the value of the 'levelset' option to the name of the mod (following the same example: levelset = Prince4D)
I want to keep the original PoP while having another one in the HBL for Prince4D. Therefore I created a new folder (sd:\switch\prince4D) where I copied the whole SDLPoP files in. I edited the levelset value in sd:\switch\prince4D\SDLPoP.ini to "prince4D" but no matter whether I place the prince4D files in sd:\switch\prince4D\mods\prince4D\ or sd:\switch\SDLPoP\mods\prince4D\ ... I always end up with the standard PoP levels.
What am I doing wrong?
 

usineur

Well-Known Member
OP
Newcomer
Joined
Mar 20, 2016
Messages
94
Trophies
0
Age
40
XP
2,097
Country
France
Try to copy the file KIRILL.DAT to LEVELS.DAT. Seems that Prince4D doesn't use this file with modded exe, but SDLPoP requires it.

EDIT: Also, as you are copying the full game in an other "main" directory, you can only copy all Prince4D data to /switch/Prince4D/data and keep the SDLPoP.ini unchanged.
 
Last edited by usineur,
  • Like
Reactions: lordelan

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
EDIT: Also, as you are copying the full game in an other "main" directory, you can only copy all Prince4D data to /switch/Prince4D/data and keep the SDLPoP.ini unchanged.
That sounds so easy that I dunno why I didn't figure that out lol. Thank you sir!
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
Try to copy the file KIRILL.DAT to LEVELS.DAT. Seems that Prince4D doesn't use this file with modded exe, but SDLPoP requires it.

EDIT: Also, as you are copying the full game in an other "main" directory, you can only copy all Prince4D data to /switch/Prince4D/data and keep the SDLPoP.ini unchanged.
I can't for the life of me get Prince4D to work, not even by using the "original" directory (not a separate one).
Did you (or anybody)?
Oddly enough Prince4D doesn't have a levels.dat which might be the cause?
 

usineur

Well-Known Member
OP
Newcomer
Joined
Mar 20, 2016
Messages
94
Trophies
0
Age
40
XP
2,097
Country
France
I can't for the life of me get Prince4D to work, not even by using the "original" directory (not a separate one).
Did you (or anybody)?
Oddly enough Prince4D doesn't have a levels.dat which might be the cause?
Yeah, read again what I told you:
Try to copy the file KIRILL.DAT to LEVELS.DAT. Seems that Prince4D doesn't use this file with modded exe, but SDLPoP requires it.

Just tested, it works.
4d.jpg
 
  • Like
Reactions: lordelan

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
Oh man I really oversaw this, sorry for that and thanks! =)

@usineur0 : Worked like a charm! I now have the "untouched" original game and the prince4D mod in the hbmenu and both are working as intended. This is awesome. Thank you again for porting one of my fav games ever to the Switch.

I wish there would be an open source version of Prince 2: The shadows and the flame as well. But maybe DosBox will appear on the Switch at some point.
 
  • Like
Reactions: usineur

Tebra

Well-Known Member
Newcomer
Joined
May 18, 2016
Messages
97
Trophies
0
XP
1,529
Country
Belgium
@usineur0 : Worked like a charm! I now have the "untouched" original game and the prince4D mod in the hbmenu and both are working as intended. This is awesome. Thank you again for porting one of my fav games ever to the Switch.

I wish there would be an open source version of Prince 2: The shadows and the flame as well. But maybe DosBox will appear on the Switch at some point.
You can use prince of percia 2 for Mega drive. It works very well with pFBA
 
  • Like
Reactions: lordelan

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,407
Trophies
1
Age
42
XP
5,456
Country
Germany
In case anyone's interested, here are the two most famous PoP mods (new level sets):
Prince4D and The Great Escape. I edited the NRO title and image as well.
Just extract to sd:\switch
They won't overwrite the main SDLPoP game.
Credits go to their owner (which are shown in hbmenu while highlighting the specific games).
prince4d.png thegreatescape.png
 

Attachments

  • 4DPrince.zip
    1.2 MB · Views: 162
  • Prince of Persia The Great Escape.zip
    976.1 KB · Views: 158
  • Like
Reactions: hallo23 and Tebra

Tebra

Well-Known Member
Newcomer
Joined
May 18, 2016
Messages
97
Trophies
0
XP
1,529
Country
Belgium
SDLPoP is an open source engine rewriting of the Prince of Persia dos game.
[prebreak]1[/prebreak]
Hi there,

I just wrote a port of SDLPoP for Switch.


usineur
Hi usineur0
could you explain me how to use cmake with Devkitpro for the switch.
How did you configure the build environment with cmake ?
Thanks
 

usineur

Well-Known Member
OP
Newcomer
Joined
Mar 20, 2016
Messages
94
Trophies
0
Age
40
XP
2,097
Country
France
Hi usineur0
could you explain me how to use cmake with Devkitpro for the switch.
How did you configure the build environment with cmake ?
Thanks

If you want to use cmake in your project
  • Copy Toolchain.cmake from SDLPoP repo to yours (leave it unchanged)
  • Copy CmakeLists.txt from SDLPoP repo to yours and adapt it to your sources
  • Build instructions: mkdir build && cd build && cmake .. && make
  • That's all
 
  • Like
Reactions: lordelan and Tebra
General chit-chat
Help Users
    Dark_Phoras @ Dark_Phoras: People, if you want to talk, just go to a café, or the park