Disassemblies of PoP2

Second part of the best game ever made.
FluffyQuack
Sheikh
Sheikh
Posts: 44
Joined: June 6th, 2004, 7:05 pm

Re: Disassemblies of PoP2

Post by FluffyQuack »

David wrote: December 3rd, 2022, 8:30 pmHm, it seems that each newer version of IDA Free supports fewer executable formats and CPUs.
(Guess why?)

I used IDA Free 4.3 to make this disassembly.
I think 5.0 still supports DOS executables.

BTW, you should open the *.idb file instead of PRINCE.EXE, though that might display the same error message.
Yeah, you're right, it looks like newer versions of IDA Free v7.0 don't support DOS executables any more. That's rather silly, especially since a commercial copy of IDA is crazy expensive.

Luckily, ScummVM's website got permission to host v5.0 of IDA Free. That's downloadable from here: https://www.scummvm.org/news/20180331/
David
The Prince of Persia
The Prince of Persia
Posts: 2808
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Disassemblies of PoP2

Post by David »

FluffyQuack wrote: December 4th, 2022, 2:48 am Luckily, ScummVM's website got permission to host v5.0 of IDA Free. That's downloadable from here: https://www.scummvm.org/news/20180331/
Ah, you found a copy.

Meanwhile I found some archives of old IDA versions as well:
David wrote: December 3rd, 2022, 8:30 pm I used IDA Free 4.3 to make this disassembly.
You can find an archived copy here:
https://web.archive.org/web/20051230200 ... eida43.exe
David wrote: December 3rd, 2022, 8:30 pm I think 5.0 still supports DOS executables.
That one is archived here:
https://web.archive.org/web/20111009003 ... ware.shtml
David wrote: December 3rd, 2022, 8:30 pm Hm, it seems that each newer version of IDA Free supports fewer executable formats and CPUs.
Maybe this is a warning that in the long term I should switch to a different disassembler...
FluffyQuack
Sheikh
Sheikh
Posts: 44
Joined: June 6th, 2004, 7:05 pm

Re: Disassemblies of PoP2

Post by FluffyQuack »

I've been using your IDA disassembly to figure out how some stuff works in POP2 and it's pretty good reference, but I haven't been able to find the animation script/sequence data. It was hardcoded into POP1. Is it among the data files in POP2? Is it in sequence.dat? I see that file has 233 entries of data. I guess each entry corresponds to one animation?

Edit: Okay, sequence.dat definitely contains the animation sequence data. I'm writing a function that can parse it and output it to a text format, and this is my result so far: https://pastebin.com/raw/uqsNeHvh

One thing which surprises me is that they kept the frame data (the data with frame render offsets and weight information) hardcoded. It makes sense for the sequence data to be an external asset so they could edit it without having to recompile the game, but that data is tightly connected to the frame data so I'm surprised they didn't externalize that too.
FluffyQuack
Sheikh
Sheikh
Posts: 44
Joined: June 6th, 2004, 7:05 pm

Re: Disassemblies of PoP2

Post by FluffyQuack »

Extracted the frame data array and updated the sequence data conversion.

POP2 IR:
Frame data array: https://pastebin.com/raw/njY5KdbN
Sequence data: https://pastebin.com/raw/xbq6bSr0

POP2 1.0/1.1:
Frame data array: https://pastebin.com/raw/3Kc5KCpg
Sequence data: https://pastebin.com/raw/dD7JdMUg
Post Reply