ZPrince - a source port of Prince of Persia

Prince of Persia related subjects that do not have their own boards.
Post Reply
User avatar
mickey96
Beylerbey
Beylerbey
Posts: 70
Joined: November 29th, 2008, 2:19 pm
Location: Nairobi, Kenya
Contact:

ZPrince - a source port of Prince of Persia

Post by mickey96 »

I want to make a source port of Prince of Persia, because FreePrince is abandoned, called ZPrince

It will be for:
Windows and Unix (Linux, BeOS)

It will use SDL for the 2d platform engine's API.

Features to be introduced.
Sloped tiles
Better sound and music
Remove 24 rooms limit.
Customize engine via configurations
Player setup and skins
Display messages when player is killed by something.
Spikes on walls (like in PoP2)
PoP2 Support
No copy protection
Push walls
Potions that give you extra time, deactivate chompers.
Buttons that deactivate chompers, trigger scripts.
Have backgrounds like the SNES version.
True color images support.
Dat file resource size and offset limit is gone.

Feel free to expand this list.

[Edit: changed from Sticky to Normal. --Norbert]
Refueled my car! Now I can keep going!
User avatar
Veke
Wise Scribe
Wise Scribe
Posts: 399
Joined: November 23rd, 2008, 7:58 pm
Location: Finland

Re: ZPrince - a source port of Prince of Persia

Post by Veke »

So... do you have any idea of how you are going to do this?
User avatar
mickey96
Beylerbey
Beylerbey
Posts: 70
Joined: November 29th, 2008, 2:19 pm
Location: Nairobi, Kenya
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by mickey96 »

Veke wrote:So... do you have any idea of how you are going to do this?
Here's my plan:
1. Collect some people to join the team Miliclan
2. Look for a programmer.
3. Start the project.
4. Support the port until I die, or the team dies.
Refueled my car! Now I can keep going!
User avatar
mk1995
The Prince of Persia
The Prince of Persia
Posts: 1160
Joined: February 27th, 2009, 10:09 pm
Location: Germany

Re: ZPrince - a source port of Prince of Persia

Post by mk1995 »

Now I hope you're prepared to pay money to your team if it needs to be. If not, try to get some hobbyists.
Image
Just to make something clear: I will not reply to daft PMs like "Where can I find X?" or "Can you give me a link to Y?". Most of your questions are likely answerable if only you took your bloody time to look through these forums and use Google if all else fails. Sheesh...
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by poirot »

too much work... freeprince is 75% finished, why don't you just take over this project?
User avatar
mickey96
Beylerbey
Beylerbey
Posts: 70
Joined: November 29th, 2008, 2:19 pm
Location: Nairobi, Kenya
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by mickey96 »

Two questions:

Where can I find the source of FreePrince?
Which compiler do I need to compile it (hope it is free software)?

EDIT: I've sent Jordan Mechner mail. This what I wrote:
Hello Jordan,

Can you release the source code of Prince of Persia so that I can port it? If you have it and you can release it, send me an attachment.

If don’t have it and\or cannot release it, please write to me and let me know.
Refueled my car! Now I can keep going!
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by poirot »

gforge.lug.fi.uba.ar

I've used gcc for linux and lcc and visual c for windows (there are also successful compiling in dev c++).
mrsid
Efendi
Efendi
Posts: 11
Joined: July 7th, 2009, 1:13 pm

Re: ZPrince - a source port of Prince of Persia

Post by mrsid »

In case you're interested, I've reverse-engineered the animation code of PoP from the Apple II version.
Based on this document released by Jordan a couple of weeks ago: http://jordanmechner.com/wp-content/upl ... rce009.pdf

Of course the source code documentation itself is quite meaningless, since the labels and variable names mentioned in the document make no sense, unless you have the source too.
But the information it contains was enough to get me started. With the information on page 14 in the PDF, I found the framedeflist and the seqtable in memory, and started disassembling the code that uses it, thereby finding all the Char* variables mentioned on pages 17/18, and then I went from there.
I've started to reproduce the whole source code, with labels. It already includes most of the other parts of the code aswell, such as handling the
level layout, moving the kid around, detecting joystick/keyboard and more.
There are still huge holes in my understanding of the code, but like a crossword puzzle, the more I fill in, the easier it becomes to understand the rest.

I've also verified that the framedeflist and the seqtable are the same in the PC version, so the information I've found also applies there, and it's directly
useful for freeprince. The state machine code in freeprince is nice, but it has very little to do with the actual way that PoP works, and this is
the reason why the animation positioning (locomotion) in fp is so broken.

Also see this thread on the state of getting the source code released:
http://jordanmechner.com/blog/2009/05/p ... /#comments
It's a matter of Jordan sending the disks to someone who can read them and convert the files to PC text formats.
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by poirot »

This is really cool. I've been working a lot in the reverse engineering of the game (mostly in PC) and come out with a great format specifications document. If you have reversed all that stuff it would be great that you add it in this document too. It would be great to add some stuff from mechner's recently open specifications.

And getting the PC source code too.

This is the specs file: http://www.princed.org/content/files/do ... ations.pdf

If you'd like to contribute, just let me know.

BTW: Reading a link to princed.org in Jordan's blog was awesome!
mrsid
Efendi
Efendi
Posts: 11
Joined: July 7th, 2009, 1:13 pm

Re: ZPrince - a source port of Prince of Persia

Post by mrsid »

Yes, I read your document when trying to piece together all the various sources of information. I think it's mostly accurate,
but I remember one or two things were slightly wrong.
As soon as I'm done, I'll put together a document with all the information I've found. This should allow you (or anyone else)
to take the freeprince code and implement correct player locomotion and all actions such as sword fighting correctly.
I'll also put the disassembled and annotated code online, for the people who can read 6502 assembly.
Eagle-Head Priest 97
Wise Scribe
Wise Scribe
Posts: 342
Joined: July 11th, 2009, 4:28 am
Location: Somewhere in the Milky Way
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by Eagle-Head Priest 97 »

This sounds really great, except for the sloped tiles idea. I can just imagine how horrible it would look to see the prince sliding down a slope and jumping off at the bottom to reach a ledge. It sounds like something Ubisoft would do...
Former Member of popuw.com/forum
Image
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by poirot »

Excellent idea! If you remember what things were wrong in the document, please let me know.

My assembler is not as good as htamas or david's but I managed to do some hacks and interesting stuff for the PC version.
a_nice_guy
Efendi
Efendi
Posts: 6
Joined: September 29th, 2009, 3:16 pm

Re: ZPrince - a source port of Prince of Persia

Post by a_nice_guy »

I'm really looking forward to this project, however this thread is almost 3 months old now, and I see no news about it. So, how are things?
I'd like to lend you a hand in this. I'm not a programmer, so I can't help with coding, but I'm interested in running PoP on GP2X and Dingoo A320 handheld consoles, so I could make ports to that devices.

Here's how Freeprince looks on them:
Image
Dingoo A320
Image
GP2X F200

I could also probably make ports to GP2X WIZ and OpenPandora consoles.

Hope with these pictures I can at least motivate you guys to either continue supporting Freeprince, or develop ZPrince.
Autor_Serwisu
Vizier
Vizier
Posts: 102
Joined: January 22nd, 2005, 9:23 pm
Location: Poland
Contact:

Re: ZPrince - a source port of Prince of Persia

Post by Autor_Serwisu »

Uhh... I'm too old for this - I didn't know anything about Dingoo or GP2X. It can emulate C64 and CPC! Wonderful!
Post Reply