Weird level sequence...

Prince of Persia related subjects that do not have their own boards.
Post Reply
User avatar
Prince Of Apollia
Efendi
Efendi
Posts: 15
Joined: March 6th, 2023, 7:36 pm

Weird level sequence...

Post by Prince Of Apollia »

I am creating a new story based pop1 game, but for this to work, when I enter the end gate on lvl 13 I have to get to lvl 1, how is this possible. I can't find it on the custom pop page, anyone any ideas. For in case I have to code this in manually. How can I change prince.exe in to code and back to exe?

Thanks
teljesnegyzet
Efendi
Efendi
Posts: 14
Joined: September 20th, 2021, 8:29 pm

Re: Weird level sequence...

Post by teljesnegyzet »

Change these:

Code: Select all

83 3E 9E 0F 0D 74 23 83 3E 9E 0F 0F 74 1C B8 29 00 EB E5 FF 06 18 3D EB 11
->

Code: Select all

B8 29 00 EB F3 90 83 3E 18 3D 0D 75 06 C7 06 18 3D 00 00 FF 06 18 3D EB 11
and

Code: Select all

C6 06 22 3D B9 EB 20 79 03 0D 03
->

Code: Select all

C6 06 22 3D B9 EB 20 6C 03 0D 03
In exchange, Level 13 and 15 now have ending music.
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Weird level sequence...

Post by David »

I came up with my own hack before I saw the post by teljesnegyzet.

You need to hex-edit prince.exe.

I changed the code which decides which level to load after the potions level:

Code: Select all

In play_level():
seg003:0189 83 7E 06 10              cmp     [bp+level], 16
seg003:018D 75 0C                    jnz     loc_498B
seg003:018F A1 9E 00                 mov     ax, copyprot_level
seg003:0192 89 46 06                 mov     [bp+level], ax
seg003:0195 C7 06 9E 00 FF FF        mov     copyprot_level, 0FFFFh
Search: 83 7E 06 10 75 0C A1 9E 00
Change: 10 to 0E ("16" to "14")
Change: A1 9E 00 to B8 01 00 ("mov ax, copyprot_level" to "mov ax, 1")
Offsets in 1.0 unpacked: 0x622C, 0x622F..0x6231
User avatar
Prince Of Apollia
Efendi
Efendi
Posts: 15
Joined: March 6th, 2023, 7:36 pm

Re: Weird level sequence...

Post by Prince Of Apollia »

Thanks, just how to I hex-edit prince.exe? Is there any tool for this on popot.org?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: Weird level sequence...

Post by Norbert »

Prince Of Apollia wrote: March 19th, 2023, 1:25 pm Thanks, just how to I hex-edit prince.exe? Is there any tool for this on popot.org?
If you already use apoplexy, you can press F12 on its main screen.
If you prefer to use a stand-alone program, see the how-to for wxHexEditor.
Post Reply