CusPop TODO list

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.

Moderator: English Moderator Team

David
The Prince of Persia
The Prince of Persia
Posts: 1505
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David » August 13th, 2016, 11:11 am

"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 » August 13th, 2016, 1:06 pm

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: 1505
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David » November 26th, 2016, 9:34 pm

Another TODO item: Guard skills: viewtopic.php?p=19945#p19945

David
The Prince of Persia
The Prince of Persia
Posts: 1505
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David » December 3rd, 2016, 10:35 am

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: 527
Joined: August 27th, 2011, 2:04 am

Re: CusPop TODO list

Post by salvadorc17 » December 3rd, 2016, 10:49 pm

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: 115
Joined: April 24th, 2015, 9:04 am
Location: India

Re: CusPop TODO list

Post by doppelganger » December 14th, 2016, 10:10 am

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 » August 17th, 2017, 8:47 pm

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: 3167
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: CusPop TODO list

Post by Norbert » August 17th, 2017, 9:30 pm

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 » August 17th, 2017, 9:46 pm

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 114 times

David
The Prince of Persia
The Prince of Persia
Posts: 1505
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David » August 18th, 2017, 11:00 am

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 » August 18th, 2017, 6:41 pm

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: 3167
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: CusPop TODO list

Post by Norbert » December 10th, 2017, 3:27 pm

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

Post Reply