Macintosh conversion/editing

Discuss other PoP1 related things here.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Macintosh conversion/editing

Post by Norbert »

David wrote: April 28th, 2018, 1:38 pm
Norbert wrote: April 24th, 2018, 9:51 pm Something else that should be possible is to create a program that converts DOS levels to Macintosh levels, either straight from DAT to the game image, or from (e.g. apoplexy) XML exports.
There indeed was such a converter, called PoP Macintosh Total Pack: http://popuw.com/mac.html
The converter is not in that linked PoP Macintosh Total Pack, which has a hard-drive.dsk that is more like an The Ultimate Collection for Macintosh, with PoPE, PoPMap, etc. What you meant is - http://popuw.com/totalpack.html - the old (v2.06) PoP1 DOS Total Pack, which has an Operating Environment drop-down with "Mac (Basilisk II): PoP1". The program is closed source, but, based on files it ships with, it uses ResEdit inside the Macintosh environment for the actual conversion. (Copy/paste of the levels block, probably.) The Mac start-up option doesn't work under my Wine.
realXCV
Beylerbey
Beylerbey
Posts: 72
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Macintosh conversion/editing

Post by realXCV »

Based on its behavior, I think it's more like: the levels were pre-converted to the mac format using PoPMap, gathered in an external file so when you click start, it just has to copy them back to the virtual hard drive.
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Macintosh conversion/editing

Post by David »

Norbert wrote: September 8th, 2018, 2:48 pm The converter is not in that linked PoP Macintosh Total Pack, which has a hard-drive.dsk that is more like an The Ultimate Collection for Macintosh, with PoPE, PoPMap, etc. What you meant is - http://popuw.com/totalpack.html - the old (v2.06) PoP1 DOS Total Pack, which has an Operating Environment drop-down with "Mac (Basilisk II): PoP1".
Oh, sorry about that. It's been a while since I used these.
Indeed, it's the old DOS Total Pack (pop1tp_v206_full.exe) that contains the DOS-to-Mac level conversion.
Norbert wrote: September 8th, 2018, 2:48 pm The program is closed source, but, based on files it ships with, it uses ResEdit inside the Macintosh environment for the actual conversion. (Copy/paste of the levels block, probably.)
Although there is a "ResEdit 2.1.3.sea" (installer) file in the "basilisk" folder, it's not on the emulated hard disk, and therefore I don't think it's used.

I found this in launcher_p.exe:

Code: Select all

00125B09:iC745EC615F8500                 mov (d)   [ebp-14],00855F61
00125B10:i33C9                           xor       ecx,ecx
00125B12:i8B55EC                         mov       edx,[ebp-14]
00125B15:i8B45F0                         mov       eax,[ebp-10]
00125B18:i8B18                           mov       ebx,[eax]
00125B1A:iFF5314                         call (d)  [ebx+14]
00125B1D:i8D959F6FFFFF                   lea       edx,[ebp-00009061]
00125B23:iB940900000                     mov       ecx,00009040
00125B28:i8B45F0                         mov       eax,[ebp-10]
00125B2B:i8B18                           mov       ebx,[eax]
00125B2D:iFF530C                         call (d)  [ebx+0C]
0x855F61 is the offset where Level 0 starts in the Starterdisk.hfv disk image used by Total Pack.
0x9040 is the length of the written level data for the 16 levels together. (Each level is 0x900 bytes, plus there is a 4-byte header before each resource, containing its size.)

So it seems that Total Pack simply writes the levels into the disk image from this hardcoded offset.
It does not have any knowledge about the format of the MacOS file system or the resource fork, nor does it use any helper programs like ResEdit or HFVExplorer.

To verify this, just rename Starterdisk.hfv and create an empty file with this name.
Total Pack will still write the level data to the same offset. The size of the file will increase to 0x855F61 + 0x9040 = 0x85EFA1 = 8777633 bytes.
realXCV wrote: September 8th, 2018, 4:20 pm Based on its behavior, I think it's more like: the levels were pre-converted to the mac format using PoPMap, gathered in an external file so when you click start, it just has to copy them back to the virtual hard drive.
I don't think so. Total Pack will happily convert on the fly whatever levels you copy to the "custom" folder.
In the main window select "xx: Custom Games...", and press Play. In the next window, on the "Custom Games Setup" tab you can choose from the DAT files in the "custom" folder.
Plus, conversion of the levels is just the first step. After that, Total Pack still has to put them onto the disk image somehow, and I wrote above how it happens.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Macintosh conversion/editing

Post by Norbert »

David wrote: September 8th, 2018, 9:22 pmSo it seems that Total Pack simply writes the levels into the disk image from this hardcoded offset.
Ah.
Not the most elegant/portable solution...
realXCV
Beylerbey
Beylerbey
Posts: 72
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Macintosh conversion/editing

Post by realXCV »

Norbert wrote: September 8th, 2018, 11:52 pm
David wrote: September 8th, 2018, 9:22 pmSo it seems that Total Pack simply writes the levels into the disk image from this hardcoded offset.
Ah.
Not the most elegant/portable solution...
True. This limits you as what you can do in the emulator as the file needs to stay at some very specific location.
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Macintosh conversion/editing

Post by David »

David wrote: July 1st, 2018, 12:11 pm
realXCV wrote: July 1st, 2018, 2:03 am I'm not sure exactly what "LC" means but I know that that file contains the tilesets for color Macs with a small resolution (Persia (BW) uses the same resolution and Persia(COLOR) uses a larger one).
LC might mean Low-resolution Color.
I know this is old, but...
I found a page that explains the difference between LC and COLOR:
http://macintoshgarden.org/games/prince-of-persia (scroll down to the comments)

So it seems that LC refers to the Macintosh LC: https://en.wikipedia.org/wiki/Macintosh_LC
Post Reply