Macintosh conversion/editing

Discuss other PoP1 related things here.
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: June 23rd, 2018, 6:06 pm To prevent misunderstandings: I'm not working on an editor right now, because I cannot.
Someone - David, maybe? - would have to help me to find a suitable disk image I could use.
I don't know how to get started.
The only working emulation I know of, to access the game, is to run an image inside an old Mac OS.
If I would create an modern editor, it cannot run this editor inside an old Mac OS.
So, is the problem that you don't know how to find where the levels are inside the disk image?
Norbert wrote: June 28th, 2018, 3:34 pm Attached are all the different files/disk images that I know exist.
I think the 2MG file is the Apple II version, not the Macintosh version.
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: June 30th, 2018, 5:32 pmSo, is the problem that you don't know how to find where the levels are inside the disk image?
No, that shouldn't be a problem.

I'll explain the issue by analogy.
For Harem Adventures, I picked the (non-NokiaUI) 176x208 version, and MicroEmulator. It's unlikely that anyone else will make a level editor for Harem Adventures. This means my choice made that particular version of Harem Adventures the moddable version.
Before I get started with a Macintosh level editor, I want to make sure I pick the 'best' file/disk image and emulator. There are MacBinary (.bin), BinHex (.hqx) and StuffIt (.sit) files, and also unencoded/expanded Hierarchical File System (.hfs) disk images. I want to avoid the proprietary StuffIt, but this still leaves various options. I can't simply pick what works best in an emulator, for instance a disk image, because my level editor should be able to modify the game. The other way around, I can't simply pick what I can edit easiest, because an emulator still needs to run it. On top of that I'd like to use the same emulator on all platforms (at least Windows and GNU/Linux), preferably have the game as a single file to simplify sharing possible future mods, and use the color version of the game. Plus, I don't mind picking a cracked version of the game, that includes cheats or whatever, but at the same time I want the original game, so it shouldn't be a version where crackers removed tiles or levels to crack copy-protection.
I created a multi-page PDF [Edit: Newer PDF here.] that explains how to run this port (on Linux) because it's so complicated. A boot disk, a ROM file, HFS files, a customly compiled BasiliskII. It's like climbing a mountain. Not to mention the possible copyright problems here; could an editor ever work out-of-the-box without including a ROM file.
I theory I could do all this work by myself. That is, figure out what "LC" in "Persia(LC)" means, figure out how to run .bin files, look into the exact differences between all these files, etc. But on my TODO list is already the creation of another level editor. So, now I'm looking around and asking on this forum what's the best choice for this. How would I even run/unpack/whatever .hqx files, for example. Which version of the game should I use, and which emulator?
The reason that I 'suddenly' decided to create a level editor of the Apple II version is that I'd noticed that adamgreen's GitHub fork contains a suitable, single, 3.5" disk image. With the Macintosh, I don't know what to use.
realXCV
Beylerbey
Beylerbey
Posts: 72
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Macintosh conversion/editing

Post by realXCV »

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). Unless you plan to have your editor runs in a tiny window, you should go with "Persia (COLOR)" and ignore the two others.

I don't think you should link your editor to one specific emulator. I don't want to be forced to use an emulator when I have access to a physical Macintosh that can run the game natively. This would make the .hfs files unsuitable for me. Besides, the only file your editor need to edit is the main application (Prince of Persia.bin in my bin.zip file). People creating mods should just have to distribute this file and not the whole game.

Now, what to use. We'll assume BasiliskII for this example. Sit files are proprietary so you can exclude them. hqx files could work but they have some CRC in them and they usually hide a .sit file. Not the best choice. hfs and most disk images... Not the first thing I would use. Plain file? Nope. We need something that will preserve the resource fork. MacBinary? Lets see... Easy to use? Yes. Easy to edit? Yes. Easy to transfer on the emulator? Yes. Easy to decode? Yes. Supported on actual Macs? Yes again.
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 »

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.
realXCV wrote: July 1st, 2018, 2:03 am MacBinary? [...] Easy to transfer on the emulator? Yes.
What do you mean?
Is there some tool that can copy a MacBinary file to/from a disk image file without user interaction? (as it would be needed for a level editor)
There is HFVExplorer, but it requires user interaction (drag and drop).
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: July 1st, 2018, 12:11 pmThere is HFVExplorer, but it requires user interaction (drag and drop).
I don't mind requiring some user-interaction.
My problem with HFVExplorer is that it's not free and open source software, and that it's Windows-only.
(It vaguely says maybe the source is now available, but I don't see it anywhere.)

I think maybe mkisofs could work.
For Windows, the mkisofs.exe command-line tool is available via this and this.
Would be one-way though, I think.
realXCV
Beylerbey
Beylerbey
Posts: 72
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Macintosh conversion/editing

Post by realXCV »

According to the official documentation, HFVExplorer is under GPL.
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 »

realXCV wrote: July 1st, 2018, 2:53 pm According to the official documentation, HFVExplorer is under GPL.
It vaguely says maybe the source is now available, but I don't see it anywhere.
Also, I've been unable to reach Lauri Pesonen to request source code.
realXCV wrote: July 1st, 2018, 2:03 amyou should go with "Persia (COLOR)"

[...]

only file your editor need to edit is the main application (Prince of Persia.bin in my bin.zip file).
Which of these should I pick?
realXCV
Beylerbey
Beylerbey
Posts: 72
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Macintosh conversion/editing

Post by realXCV »

"Prince of Persia.bin" is the main application. This is where the levels are stored, what your editor will edit and what modders will have to distribute. The various Persia(X) files contain the tileset graphics. The game automatically picks which one is best. if you want to display the actual graphics in your editor and not just simplified ones, you should use what's in Persia(COLOR) for that.

Now, back to emulator question...

I just did a few tests with various emulators to see which one would be the best and... lets just say that it's hard to pick one. I did my tests on Windows 10 on a quite powerful computer and on macOS 10.13 on a 2011 iMac.

Windows:

BasiliskII:
- Quite easy to setup
- Music is played at the right speed.
- MacBinary files are automatically converted when transfered using HFVExplorer.
- Gameplay is too slow.

Sheepshaver:
- Setup just like Basilisk II.
- Music is played at the right speed.
- Also supports HFVExplorer.
- Gameplay looks slow but it's actually the right speed.
- Has a tendency of forgetting the sound settings so you have to go set the output device in the Sounds control panel in Mac OS.
- Recommended for Windows users.

QEMU:
- A bit hard to setup.
- No sounds and can't be configured to run in 256 colors which is required by the game.

PearPC:
- Doesn't support OS 9 and lower.

macOS:

BasiliskII:
- Setup similar to the Windows version.
- Music is played at the right speed.
- No HFVExplorer but supports a shared folder on the host machine where you just have to double click on the .bin file to have macOS decode it without loosing its resource fork.
- Gameplay still too slow.

Sheepshaver.
- Setup similar to the WIndows version.
- Music is played at the right speed.
- Correct gameplay speed.
- Forgets its sound settings.
- Also supports the shared folder like BasiliskII.
- Doesn't refresh the screen correctly. When entering a new room, you often get a black screen with only some regions displaying something. You can make the remaining parts appear if you make your cursor visible and move it across the screen. This issue can be seen as soon as the intro.

QEMU:
- Same as the Windows version.

PearPC:
- Doesn't support OS 9 and lower.
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 »

I've started working on the level editor.
Will take some months to finish.
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: July 1st, 2018, 3:12 pm
realXCV wrote: July 1st, 2018, 2:53 pm According to the official documentation, HFVExplorer is under GPL.
It vaguely says maybe the source is now available, but I don't see it anywhere.
Also, I've been unable to reach Lauri Pesonen to request source code.
This is what the readme of HFVExplorer says about the source:

Code: Select all

  GNU GPL (General Public License) now. See "Copying".
  Source code available by request, email: [...]
Giving out the source only by request is quite unreliable and not future-proof.
If a website disappears, at least you still have a chance of finding it in the Web Archive.
But you can't really do anything with a non-working e-mail address.

Of course the people who requested and received the source were free to upload it anywhere, but I couldn't find that anywhere.
However I found this forum thread from 2015: https://www.emaculation.com/forum/viewt ... f=6&t=8564 ("lpe" is probably Lauri Pesonen.)
lpe wrote: > Might I politely inquire if there is any sign of HFV Explorer sources too?

I found some HFV Explorer files but not yet a complete set. But I still need to check many old hard disks and a lot of backup media. If I will find a full set of files, I will post them. I would say there is a fair chance that the files are there. It will take some time though.

Hmm, I was pretty sure that these boxes were lost. I already found some family photos and other documents which are of great value to me, so I'm pretty glad now.

Lauri
So it seems nobody has the source (since they are asking for it), not even the author!

This is why I include the source in every SDLPoP release.
That way every user has the source, and thus it's quite unlikely that every copy disappears from the world.
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: July 7th, 2018, 4:52 pmHowever I found this forum thread from 2015: [...]
I've just now used that forum's e-mail functionality to contact the author.
As you wrote, the thread is from 2015, which is not that long ago.
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 »

Norbert wrote: July 3rd, 2018, 10:04 pm I've started working on the level editor.
Will take some months to finish.
Making good progress, but still about two months to go.

I noticed the skeleton looks like it's just chilling, laying there like a model.
Do you see what I mean? :)
mac_skeleton.png
mac_skeleton.png (2.33 KiB) Viewed 3184 times
Falcury
Calif
Calif
Posts: 565
Joined: June 25th, 2009, 10:01 pm

Re: Macintosh conversion/editing

Post by Falcury »

Norbert wrote: July 3rd, 2018, 10:04 pm I've started working on the level editor.
Will take some months to finish.
Hey, very cool! :)
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: July 28th, 2018, 1:55 pm I noticed the skeleton looks like it's just chilling, laying there like a model.
This takes "skinny model" to a whole new level...
Norbert wrote: July 28th, 2018, 1:55 pm Do you see what I mean? :)
mac_skeleton.png
Like on some of the pictures here? https://www.google.com/search?q=lying+model&tbm=isch
(Maybe you could find and show a picture which you think is similar enough?)

The princess in the cutscene before level 4 is also lying, although I'm not sure how similar is the pose.

And then there is this meme: https://knowyourmeme.com/memes/draw-me- ... ench-girls

A funny coincidence, I checked a certain webcomic for updates just before I read your post, and its header picture also features a laid back character (an anthropomorphic tigress): https://www.tigerknight.com/img/99/header.jpg
Her arms don't really match the skeleton, though...
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: July 29th, 2018, 9:29 pm(Maybe you could find and show a picture which you think is similar enough?)
It's difficult to find something similar.
Maybe this kind of gives you an idea of the posture that I'm seeing...
chilling.png
chilling.png (59.34 KiB) Viewed 3158 times
Post Reply