unknown I: offset = 6208 = 0x1840, size=32
* 1 byte at 0x1840: Last used room. In PoP2, the modifier remapping affects tunnels only. The top bit of the first modifier is cleared to hide the tunnel (until the kid enters it).
* 4 bytes at 0x1841: Always contains "JEFF". Might be a reference to the programmer, Jeffrey Charvat.
* 1 byte at 0x1845: The type of the level. 1=desert, 2=temple, 3=caverns, 4=ruins, 5=rooftops, 6=final.
* 1 byte at 0x1846: Unknown. On the original levels they can be: 1,2,5,9,10,12,13,15,22.
* 1 byte at 0x1847: Level number (1..14). Used to decide what special events happen.
- On Gameplay level 2 it is erroneously set to 10. Therefore, the special event that would cause the level to end won't happen.
* array of 12 words at 0x1848: Which optional resources should be loaded.
0: spike
1: lava
2: skeleton (ruins)
3: slicer
4: dart gun
5: pusher
6: turn floor
7: skeleton (caverns)
8: guard run
9: guard jump
10: guard fall
11: potion
Items 0..7 are overridden by the contents of the level.
At 0x1860 is the (documented) start position. (size=3)
unknown II: offset = 6243 = 0x1843, size=4
* 3 bytes at 0x1843: Unknown. Always contains 0,1,0.
* 1 byte at 0x1846: Type of guards on the level. 0=guard, 2=skeleton, 5=head, 7=bird, 255=none.
At 0x1867 are the (documented) static guards. (size=32*116=3712=0xE80)
As I mentioned earlier, the checkpoints are at 0x26E7.
* 2 bytes at 0x26E7: Room and tile of checkpoint 1.
* 2 bytes at 0x26E9: Room and tile of checkpoint 2.
* 14 bytes at 0x26EB: Not used.
At 0x26F9 are the dynamic guards. (size=32*34=1088=0x440)
unknown III: offset = 0x2B39, size=32*30=960.
For each tile of each room, tells which set of background musics should be used. (0 or 1)
Set 1 seems to indicate danger.
Unknowns in the PoP2 level format
Re: Unknowns in the PoP2 level format
Nice.
I like that PoP2 has a lot more information in the levels file.
Lots of new possibilities for custom levels too.
I like that PoP2 has a lot more information in the levels file.
Lots of new possibilities for custom levels too.
Re: Unknowns in the PoP2 level format
How did you figure this out? I understand you saw more dangerous areas, but it's interesting how you noticed or thought about changes in music.David wrote:unknown III: offset = 0x2B39, size=32*30=960.
For each tile of each room, tells which set of background musics should be used. (0 or 1)
Set 1 seems to indicate danger.
I created an XLS file with an overview of all locations where this byte is not set to 0.
You're right that there's clearly a difference in music when the prince moves from 0 to 1 (loose tiles, shooters, and so on) and vice versa.
I'll include a music screen in apoplexy 2.0 that'll allow users to change those bytes. Little extra work, but relatively easy.
- Attachments
-
- music_not_0.xls
- music != 0
- (387.5 KiB) Downloaded 240 times
Re: Unknowns in the PoP2 level format
I'm not just using the information about music, but I'm also using other information.
For example, I always set the last room used to 32, fix the event level number (for gameplay 2), and enable more resources for the levels.
Simply enabling all resources for all levels won't work, I've learned.
Also, according to the resource settings of the original PoP2, this guard can fall (and run), but not jump, which might explain his strange behavior...
For example, I always set the last room used to 32, fix the event level number (for gameplay 2), and enable more resources for the levels.
Simply enabling all resources for all levels won't work, I've learned.
Also, according to the resource settings of the original PoP2, this guard can fall (and run), but not jump, which might explain his strange behavior...
- Attachments
-
- optional_resources.xls
- default optional PoP2 resources
- (30.5 KiB) Downloaded 205 times
Re: Unknowns in the PoP2 level format
I started to disassemble PoP2.Norbert wrote:How did you figure this out?
Also, most MIDI music resources have a name embedded in them. (But the game refers to them by their resource IDs.)
For the background music, the name looks like this: "Cav1A.mff".
Here, "Cav" is the level type (Cav/Ruins/Temple), "1" is the set (1=normal, 2=danger, 3=?), and "A" is the index within the set (A-P for sets 1 and 2, or A-D for set 3).
This happens only in PoP2 1.1 (not in IR or 1.0), and I don't think it's related to the resource settings. Those tell what images to load, not what a guard can do.Norbert wrote:Also, according to the resource settings of the original PoP2, this guard can fall (and run), but not jump, which might explain his strange behavior...
Something similar can be done on level 1.
Also, the "fall" refers to the "special" falling, for example when a guard falls off the bridge or the roof (on level 1 or the second half of level 13).
It also includes the landing after jump and the bowing of the birdman.
Re: Unknowns in the PoP2 level format
All those 'unused checkpoints' are either 0 or 90, which may be suspicious.David wrote:unknown I: [...]
* 1 byte at 0x1846: Unknown. On the original levels they can be: 1,2,5,9,10,12,13,15,22.
unknown II: [...]
* 3 bytes at 0x1843: Unknown. Always contains 0,1,0.
As I mentioned earlier, the checkpoints are at 0x26E7.
[...]
* 14 bytes at 0x26EB: Not used.
I reversed all of them (0->90, 90->0) and played - also finished - several levels, but didn't see/hear any differences.
Here's an overview of all unknown bytes:
Spoiler: show
Re: Unknowns in the PoP2 level format
I found a reference to the game using different music for dangerous places:
https://macintoshgarden.org/games/prince-of-persia-2 (the last image, i.e. the second page of the article)
At the bottom of the middle column it writes: "The ambient music is unobtrusive and peril sensitive."