CusPop TODO list

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David »

"level 1 crouching start" seems to work for me...
Note that it also changes the level of the "closing gate" special event.

"level 1 music", however, has two problems in its current form:
(See the end of the post for a hack that seems to work!)

1. The current hack changes only this part: [1]

Code: Select all

seg005:02EB 83 3E AA 4C 00                       cmp     need_level1_music, 0
seg005:02F0 74 30                                jz      loc_6102
seg005:02F2 83 3E 9E 0F 01                       cmp     current_level, 1 ; Special event: music when crouching
seg005:02F7 75 29                                jnz     loc_6102
SDLPoP: if (need_level1_music != 0 && current_level == 1) {

But the level number in this part should also be changed: [2]

Code: Select all

seg003:0041 83 7E 06 01                          cmp     [bp+level], 1 ; <-- here
seg003:0045 75 05                                jnz     loc_483C
seg003:0047 B8 01 00                             mov     ax, 1
seg003:004A EB 02                                jmp     short loc_483E
seg003:004C                      loc_483C:
seg003:004C 2B C0                                sub     ax, ax
seg003:004E                      loc_483E:
seg003:004E A3 AA 4C                             mov     need_level1_music, ax
SDLPoP: need_level1_music = (level == 1);

2. But even then, the music plays only if I start the game directly on the new level, using megahit.
That's because [2] is in init_game(), instead of play_level().
[Note: In the original game, the music plays only of you start directly on level 1, but not if you shift+L there from level 14.]

How to solve this?
The easiest way I found is to force the need_level1_music variable to be 1 always.
(We can do this without the danger of getting music on the wrong level, because the level number is re-checked in [1].)
That is: In [2], instead of changing the level number, just replace jnz with 2*NOP.

So what you need to do is: (in addition to what CusPoP currently does)
Search: 83 7E 06 01 75 05
Change: 75 05 to 90 90
Dark77
Wise Scribe
Wise Scribe
Posts: 296
Joined: October 26th, 2010, 7:10 pm
Location: Poland

Re: CusPop TODO list

Post by Dark77 »

Thank you! Now it all works. You were right, the crouching start setting works properly.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David »

Another TODO item: Guard skills: viewtopic.php?p=19945#p19945
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David »

doppelganger wrote:I could swear I saw a '1 minute remaining' message somewhere... maybe in a port of the game?
Maybe on the SEGA Genesis? viewtopic.php?p=19994#p19994
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: CusPop TODO list

Post by salvadorc17 »

David wrote:Another TODO item: Guard skills: viewtopic.php?p=19945#p19945
Guard skill should be configurable, does it not use the vales based on guard colors, some will have more skills than other..
User avatar
doppelganger
Vizier
Vizier
Posts: 119
Joined: April 24th, 2015, 9:04 am
Location: India

Re: CusPop TODO list

Post by doppelganger »

David wrote:
doppelganger wrote:I could swear I saw a '1 minute remaining' message somewhere... maybe in a port of the game?
Maybe on the SEGA Genesis? viewtopic.php?p=19994#p19994
Yep. The Sega Genesis.
Doppelgänger
Hmm.. These mortals know about me.. :evil:

Download 'Hell of A Palace' now from Popot!
theruler
Scholar Scribe
Scholar Scribe
Posts: 3
Joined: August 17th, 2017, 8:42 pm

Re: CusPop TODO list

Post by theruler »

I would add the possibility to enlarge the strings of "Folder Game messages" due to the fact other languages may need more room.

We've (me and user Micartu from Oldgamesitalia.net) custom translated POP1 into italian end actually enlarged the strings.
If you have plans to do this in cuspop?, I could provide the pointers, if you do not already have them yet. But I bet you have.

In pop1.3 we have 777 Bytes "free" (it reads "unused content for full version") at 0x01C964 to move the new translated text into.
Or 188 Bytes at 0x01DC4F or (have to test this location) 444 Bytes at 0x01EE3B

Sorry if it has been already discussed before.
Cheers
Last edited by theruler on August 17th, 2017, 9:51 pm, edited 2 times in total.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: CusPop TODO list

Post by Norbert »

theruler wrote:I've custom translated POP1 into italian [...]
Just to respond to this bit; I hope it's not too painful to read, but a solid Italian translation (section "Translated versions of Prince of Persia 1") may already exist.
Welcome to the Princed forum, by the way.
theruler
Scholar Scribe
Scholar Scribe
Posts: 3
Joined: August 17th, 2017, 8:42 pm

Re: CusPop TODO list

Post by theruler »

Thanks for the reply, I am already aware of that version.
The aim was to translate the 1.3 version and enlarge the text strings. I personally don't like truncated text.

Any plan to let the user change the 40 Letters of the potion level at 0x01CDA2 (v1.3 unpacked)?
Useful for fan translated manuals.
I'll PM you the new tables for your copy protection codes pdf.
Attachments
prince_005.png
prince_005.png (4.13 KiB) Viewed 9222 times
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David »

Hello, theruler, and welcome to the forum!
theruler wrote: I would add the possibility to enlarge the strings of "Folder Game messages" due to the fact other languages may need more room.

We've (me and user Micartu from Oldgamesitalia.net) custom translated POP1 into italian end actually enlarged the strings.
If you have plans to do this in cuspop?, I could provide the pointers, if you do not already have them yet. But I bet you have.
Well, we have some disassemblies of PoP1 here: viewtopic.php?f=68&t=3423
With them, it's possible to find out where are the offsets of the texts used.
However, CusPoP currently does not have the ability to write texts at non-fixed offsets.
theruler wrote: In pop1.3 we have 777 Bytes "free" (it reads "unused content for full version") at 0x01C964 to move the new translated text into.
Or 188 Bytes at 0x01DC4F or (have to test this location) 444 Bytes at 0x01EE3B
Just for clarity, these offsets are for the unpacked v1.3.

The beginning of dseg (data segment) in the disassembly is 0x1C370 in the EXE.
The contents of the mentioned offsets are:
0x01C964..0x01CC6D: (dseg:05F4..08FD) Review quotes and how to purchase. Usable.
0x01DC4F..0x01DD0B: (dseg:18DF..199B) kid_is_unpack_tbl -- This area is overwritten on startup. Not usable.
0x01EE3B..0x01EFF7: (dseg:2ACB..2C87) global_xlat_tbl -- Only the preceding 0x40 bytes are used, and only in CGA mode. Usable.
theruler wrote: Any plan to let the user change the 40 Letters of the potion level at 0x01CDA2 (v1.3 unpacked)?
Useful for fan translated manuals.
Why don't just disable the potions level altogether?
theruler
Scholar Scribe
Scholar Scribe
Posts: 3
Joined: August 17th, 2017, 8:42 pm

Re: CusPop TODO list

Post by theruler »

David wrote:Hello, theruler, and welcome to the forum!
Hallo, Thank you!
David wrote: Well, we have some disassemblies of PoP1 here: viewtopic.php?f=68&t=3423
With them, it's possible to find out where are the offsets of the texts used.
However, CusPoP currently does not have the ability to write texts at non-fixed offsets.
ah, bummer.
I saw the disassembled too late. I've had just found the pointers via hex editor

David wrote: Just for clarity, these offsets are for the unpacked v1.3.

The beginning of dseg (data segment) in the disassembly is 0x1C370 in the EXE.
The contents of the mentioned offsets are:
0x01C964..0x01CC6D: (dseg:05F4..08FD) Review quotes and how to purchase. Usable.
0x01DC4F..0x01DD0B: (dseg:18DF..199B) kid_is_unpack_tbl -- This area is overwritten on startup. Not usable.
0x01EE3B..0x01EFF7: (dseg:2ACB..2C87) global_xlat_tbl -- Only the preceding 0x40 bytes are used, and only in CGA mode. Usable.
Thanks for the advice.
David wrote: Why don't just disable the potions level altogether?
Cause I like it so much! It would be a waste to get rid of it and for completeness sake we decided to leave it as it was intended, in conjunction with the translated manual.
It should be easy to implement, isn't it?
As soon as we revised the manual we will provide the exact letter sequence, if you mind to add them to Norbert's pdf.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: CusPop TODO list

Post by Norbert »

The prince instantly dies if he hits anyone, used for Ghost of Persia.
David explained to me how to do this.

Offset 0x2B2F, change
01 75 14 83 3E 9E 0F 0C 75 0D 83 3E 4A 4C 00 74 06 A1 4A 4C
to
00 74 14 90 90 90 90 90 90 90 83 3E 4A 4C 00 74 06 B8 9C FF

Also, I changed the color of palace wall marks to white.
Offset 0x1b48, change
30 00 50 B8 26 00 50 B8 14
to
3F 00 50 B8 3F 00 50 B8 3F
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: CusPop TODO list

Post by Norbert »

David wrote: November 26th, 2016, 9:34 pm Another TODO item: Guard skills: viewtopic.php?p=19945#p19945
Done.

For Falcury, how to update princed.org:
Spoiler: show
Unpack: https://www.popot.org/other_useful_tool ... op-2.2.zip

Copy the attached new princehack.xml (version 004) to CusPop-2.2/src/

On line 11 of parsecommands.php change
if (ereg("([a-z]*)\((.*)\)",$cmd,$reg)) {
to
if (preg_match("/([a-z]*)\((.*)\)/",$cmd,$reg)) {

Run: php cuspopgenerator.php > cuspop.php

At the top of cuspop.php modify the action from 'gethack.php' to 'cuspop/gethack.php'.

Copy cuspop.php to public_html/cuspop/

Copy the new princehack.xml to:
- a new directory public_html/downloads/CusPop/princehack_004/
- public_html/cuspop/cuspop/ [sic]

In public_html/downloads/index.php change princehack_003 to princehack_004.
Attachments
princehack_004.zip
princehack.xml 004
(18.02 KiB) Downloaded 183 times
Falcury
Calif
Calif
Posts: 565
Joined: June 25th, 2009, 10:01 pm

Re: CusPop TODO list

Post by Falcury »

Norbert wrote: February 11th, 2018, 11:36 am For Falcury, how to update princed.org:
Done. Thanks for the instructions, Norbert.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: CusPop TODO list

Post by Norbert »

Changing the chomper speed:
viewtopic.php?f=76&t=4175
Post Reply