Documentation (Prince of Persia 1 DAT Differences)

Discuss PoP1 for DOS here.

Moderator: English Moderator Team

Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3139
Joined: April 9th, 2009, 10:58 pm
Contact:

Documentation (Prince of Persia 1 DAT Differences)

Post by Norbert » August 26th, 2012, 4:10 pm

I have finished the first version of a document that describes the differences between the DAT files that are being supplied with PoP1 versions 1.0, 1.3 and 1.4:

2012-08-26_PoP1_DAT_Differences.pdf

The source document (.odt; OpenDocument) is also available, here.
Its main page on PoPOT.org is here.
Feedback is welcome. Just post it in this thread or send an e-mail.

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

Re: Documentation (Prince of Persia 1 DAT Differences)

Post by David » August 27th, 2012, 8:47 am

Some resources you mention are incorrectly exported by PR.

Actually, the following resources are images:

Skel.dat/skel/res751.bin (one-pixel empty)
Skel.dat/skel/res752.bin (one-pixel empty)
Skel.dat/skel/res776.bin (one-pixel empty)
changed from 1bpp to 4bpp

Vdungeon.dat/vdungeon/binary/res268.bin (door mask)
uses different compression

Vdungeon.dat/vdungeon/binary/res1314.bin to res1323.bin (chomper blood)
(no difference)

Vpalace.dat/vpalace/binary/res268.bin (door mask)
uses different compression

Vpalace.dat/vpalace/binary/res366.bin to res374.bin (wall patterns)
369: in 1.3 it's one row higher than in 1.0

Vpalace.dat/vpalace/binary/res1314.bin to res1323.bin (chomper blood)
(no difference)

Most of these images are monochrome, and I guess PR's autodetection didn't recognize them, and therefore they have been inserted into resources.xml as binary.

Digisnd3.dat/digisnd3/res10015.bin
I guess it's a sound, like the other resources in digisnd3.
The first byte is 0x81 instead of the usual 0x01, but I don't know why.
Again, the autodetection gone wrong.

Prince.dat/unknown/Prince.dat/pcspeaker001.pcs
If it's resource 20 then that's the level color variations palette.

I had a fixed version of PR on my website (which is now gone). It has all these bugs fixed. I see your PR page is referring to it. If you have it, feel free to put it on your site. If you don't, tell me, and I'll send you.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3139
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Documentation (Prince of Persia 1 DAT Differences)

Post by Norbert » August 27th, 2012, 5:45 pm

David wrote:If you don't, tell me, and I'll send you.
I don't have it. Yes, please send me a Windows binary package and a source package. This fixed version, is it based on version 1.2? Does it only include improvements/add features? If so, I think it should mention the changes in doc/changelog.txt (bottom), the ('to') year 2006 that's mentioned here and there should be changed, maybe the version number should be increased, and you should get credits. Does it fix the problem apoplexy complains about when you try to use 1.2 ("level import bug")? The user data count of PR 1.1 is incorrect; is it correct in your version? Does it include the checksum in the size of the level (PR 1.1 does, PR 1.2 does not)?

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

Re: Documentation (Prince of Persia 1 DAT Differences)

Post by David » August 28th, 2012, 9:39 am

It's based on PR 1.2.
The list of fixes can be found in fixes.txt.
User data count: It writes 9 so it's correct.
Size: It writes 0x901 for levels 0-14, and 0x900 for the potions level, so it's without the checksum. But FormatSpecifications.pdf says it should include the checksum.
Level import bug: It looks like certain level-related things are commented out in PR 1.2. I'm currently trying to fix it, but it looks like that some parts were rewritten in PR 1.2, and level import was forgotten!

I wanted to attach it, but it says "Cannot add another attachment, 0 is the maximum.".

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3139
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Documentation (Prince of Persia 1 DAT Differences)

Post by Norbert » August 28th, 2012, 10:13 am

David wrote:It's based on PR 1.2.
The list of fixes can be found in fixes.txt.
User data count: It writes 9 so it's correct.
Size: It writes 0x901 for levels 0-14, and 0x900 for the potions level, so it's without the checksum. But FormatSpecifications.pdf says it should include the checksum.
Level import bug: It looks like certain level-related things are commented out in PR 1.2. I'm currently trying to fix it, but it looks like that some parts were rewritten in PR 1.2, and level import was forgotten!
It's nice that you've worked on it and are still working on it as far as the level import goes. I see your work not as a temporary fix from the sideline, but as an improvement of PR that justifies a new release. By that I mean, not just a 'fixed.txt' version, but a PR 1.3 with an updated doc/changelog.txt, a different ('to') year instead of 2006, your name mentioned as a contributor, and so on. Fixes are as important as other improvements, and I don't even think you included just fixes, but also added more support for importing/exporting PoP2 images?
David wrote:I wanted to attach it, but it says "Cannot add another attachment, 0 is the maximum.".
I'll look into it.

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

Re: Documentation (Prince of Persia 1 DAT Differences)

Post by David » August 28th, 2012, 10:45 am

Norbert wrote:It's nice that you've worked on it and are still working on it as far as the level import goes.
I think I fixed the level import bug since the previous post. I tested it with Apoplexy and it looks like it works.
Norbert wrote:I see your work not as a temporary fix from the sideline, but as an improvement of PR that justifies a new release. By that I mean, not just a 'fixed.txt' version, but a PR 1.3 with an updated doc/changelog.txt, a different ('to') year instead of 2006, your name mentioned as a contributor, and so on.
You're right, it has so many changes (especially the PoP2 images support) that it deserves a new version number.
Norbert wrote:Fixes are as important as other improvements, and I don't even think you included just fixes, but also added more support for importing/exporting PoP2 images?
Yes, PoP2 images support is now near complete.
The only bug I can think of is that some images are exported with wrong colors.
But of course there may be hidden bugs.
Norbert wrote:I'll look into it.
Not so long ago I was able to upload attachments. For example: viewtopic.php?p=11347#p11347, that was a month ago.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3139
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Documentation (Prince of Persia 1 DAT Differences)

Post by Norbert » August 28th, 2012, 10:50 am

David wrote:Not so long ago I was able to upload attachments. For example: viewtopic.php?p=11347#p11347, that was a month ago.
Yes, but that's a different board.
phpBB's user/group/forum permissions settings are extremely complicated and very, very user-unfriendly.
The best thing for now is if you upload elsewhere or send via private message or e-mail.

Post Reply