Extracted Mac resource files (PoP 1 and 2)
Posted: April 19th, 2018, 11:06 pm
The Mac resources are mostly stored in resource forks.
These resources are a bit difficult to get at, because there is no easy/obvious way to extract them.
Apple published a utility for editing the resources, but that program can't extract them.
I managed to extract them using rezycle, which runs on Mac OS X.
For PoP1, the main file "Prince of Persia" contains: the code and data segments, menus/error messages/prompts, icons, fonts, levels, color palettes, sounds and music, plus some other stuff that I cannot identify.
The graphical data has three separate variants: black/white, grayscale and color.
For PoP2, the data is spread out over many more separate files.
The main file "Prince of Persia 2" contains: the code and data segments, menus/error messages/prompts, icons, fonts, levels, music instruments and MIDI driver stuff, and yet more things that I cannot identify.
Interestingly, the PoP2 code segments retain a lot of symbol information.
The "Data" subdirectory of PoP2 for Mac contains the rest of the data files.
There are four files with a .dat extension: DigiSnd.dat, MIDISnd.dat, NISDIGI.dat, and NISMIDI.dat.
The .dat files do not have any resources hidden away in a 'resource fork'. However, all the other files (those with a .rsrc extension) do.
The .rsrc files mostly match the DOS DAT equivalents. Although there seems to be no equivalent for SEQUENCE.DAT (I guess that is the sequence table).
In the attached zip files, I only included the extracted resource forks.
Edit:
It would be nice to somehow get all of those code segments into a disassembly database.
Unfortunately, IDA Freeware does not support m68k code. Maybe there are alternatives.
These resources are a bit difficult to get at, because there is no easy/obvious way to extract them.
Apple published a utility for editing the resources, but that program can't extract them.
I managed to extract them using rezycle, which runs on Mac OS X.
For PoP1, the main file "Prince of Persia" contains: the code and data segments, menus/error messages/prompts, icons, fonts, levels, color palettes, sounds and music, plus some other stuff that I cannot identify.
The graphical data has three separate variants: black/white, grayscale and color.
For PoP2, the data is spread out over many more separate files.
The main file "Prince of Persia 2" contains: the code and data segments, menus/error messages/prompts, icons, fonts, levels, music instruments and MIDI driver stuff, and yet more things that I cannot identify.
Interestingly, the PoP2 code segments retain a lot of symbol information.
The "Data" subdirectory of PoP2 for Mac contains the rest of the data files.
There are four files with a .dat extension: DigiSnd.dat, MIDISnd.dat, NISDIGI.dat, and NISMIDI.dat.
The .dat files do not have any resources hidden away in a 'resource fork'. However, all the other files (those with a .rsrc extension) do.
The .rsrc files mostly match the DOS DAT equivalents. Although there seems to be no equivalent for SEQUENCE.DAT (I guess that is the sequence table).
In the attached zip files, I only included the extracted resource forks.
Edit:
It would be nice to somehow get all of those code segments into a disassembly database.
Unfortunately, IDA Freeware does not support m68k code. Maybe there are alternatives.