PoP2 graphic

About PR usage and development, and about the POP format.
Post Reply
guest

PoP2 graphic

Post by guest »

Do somebody know how to receive graphic from Prince of Persia 2 files (mainly from characters) ? Please write to asm3@o2.pl.
Thanks for replies.
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Post by poirot »

May be PR could extract some POP2 graphics when we could fix the block size bug.
Guest

Post by Guest »

I use the PR but i find some errors (wrong palette and invert image). Can You tell me how is save graphic in POP1 in *.dat file ? I do modul in Pascal that load BMP files, but i cannot load games dat files, even in Paint Shop Pro and MS Paint.
I need some graphic from PoP2 because i end alpha version of Prince of Persia 2 : Arena (soon to download).
Please help me !
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Post by poirot »

You have PR v0.2 alpha. I've uploaded PR v0.3 Beta, this version extracts perfect bitmaps except on title.dat, please read the readme file to see the changes. To save files in .dat format you have to compile them (extract the files first) using the -c option.

For the moment the program can't compile bitmaps and palettes, but you can extarct and start editing so when the program is done you can compile your work.

You could also download PRM: the actual version uses the old pr.dll, but you can replace it with the pr.dll v0.3 that is in the PR v0.3 package.
Guest

Post by Guest »

Unfortunately in this version (0.3) extracting from dat files dont't work when i use files from Prince of Persia 2, but when I use files from Prince of Persia 1 all work correctly! In the older version of resourcer (pgsrca1) extract from Prince of Persia 2 files work, but there was wrong palette. How can I extrack graphic from Prince of Persia 2 files correctly?
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Post by poirot »

Yeah!!! Very good news. I'm very happy to know that PG could extract POP2 images (never tryed with PG). PR can extract POP2 only if the .dat files are smaller then 64 kb. I'll increase this limit to 4 Gb in PR v0.4, I hope the index have the same format.
Guest

Post by Guest »

Hmm ...
Can You tell me how is save graphic in PoP1 data files?
I'll try to unpack datafiles from PoP2.
Thanks
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Post by poirot »

PG format is very difficult it uses 5 compression algorithms and an indexed file (the index is different in POP1 and POP2) and figuring out wasn't finished yet (only for big images that is what you have in POP2). If you really need to code a decompressor in Pascal I suggest you look in the PG source and see how are the compression made.

PR doesn't work because PR uses the indexed files in POP1 that POP2 hasn't, but PG looks for image headers which is a bit slower, but it works with POP2. Can you tell me wich image or wich .dat file could you unpack?

Indexes in POP2 are very big, and I'll tryo to figure out how they work.
Eero
Efendi
Efendi
Posts: 9
Joined: May 31st, 2003, 3:16 pm
Location: Tartu, Estonia

Post by Eero »

Cool! After we finish PoP1, why not to figure out Pop2 formats?
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Post by poirot »

I've been working a bit in pop2 indexes, now I know how they are made, I only need to figure out some bytes and we are done. Indexes in pop2 are very important because it is impossible to find headers in images bigger than 256 pixels width or height. PG looks for headers, that's why it only unpacks small bitmaps. PR looks at the index and unpacks whatever the index points without verifying the bitmap header, that is the only way to unpack big images.

I used PG to unpack some pop2 dat files and see the offsets and sizes and after that I compared them with the index, and figured out how index works in pop2, I only need to know some bytes.

If anybody wanna help, please post here!
freddytheking
Efendi
Efendi
Posts: 12
Joined: March 6th, 2004, 1:43 pm
Location: Oslo, Norway
Contact:

Post by freddytheking »

I like pop2 the graphic is good bether then pop1 so I like the graphic very well...:)
Post Reply