Page 1 of 5

Apple ][ Source FOUND!

Posted: April 6th, 2012, 5:53 pm
by _Zaphod_
look on jordanmechner.com

Yup, the original apple ][ source of prince of persia has been located.

he is now working out how to image it.

[Edit: Added "Apple ][" to the thread's subject text. --Norbert]

Re: Source FOUND!

Posted: April 21st, 2012, 11:59 pm
by _Zaphod_
Source now posted to teh internetz. ;)

SO.. anyone up for more source ports? :)

Re: Source FOUND!

Posted: May 18th, 2012, 10:30 pm
by Andrew
_Zaphod_ wrote:Source now posted to teh internetz. ;)

SO.. anyone up for more source ports? :)
Yeah, exactly what I was thinking! Would be great if someone can create an advanced Windows port for this so we can play it under modern operating system versions without the need for DOSBox. Similar to how we have advanced source ports for Doom and other games. Might spark interest in this classic all over again... :)

Re: Source FOUND!

Posted: September 7th, 2012, 10:22 am
by David
I figured out how to compile and run the sources.

I found out that a level editor is included in the sources. I got it to work partially, i.e. editing works but saving/testing/etc. doesn't.
It's similar to this one: http://vimeo.com/2280934
I've attached the disk images to this post, so if you are interested you can try it out in an Apple II emulator.
You need to put disk 1 into drive 1 and disk 2 into drive 2, then boot from drive 1.
When the level editor title appears, you need to press one of the Apple keys (emulators usually map these to the alt keys), or one of the joystick buttons.
After this, you can use the arrow keys to move around, and the space/enter keys to do things.

There is a crack intro at the beginning, here's why:
The editor originally used a special 18-sector-per-track disk format. I don't know how to make such disks, so I arranged data on regular (16-sector-per-track) disks, in the same format as it is in the cracked version of the game.
The first 16 sectors of each track are on disk 1, and the extra sectors are on disk 2.

Re: Source FOUND!

Posted: September 7th, 2012, 10:56 am
by Norbert
Interesting. :)

I'm trying it out with xkegs, but I get this error:
-----
Disk 3.5 error: size is 143360, not 800K. Will try to mount anyway
read of disk ../level_editor_1.dsk q_trk 23 ret: 141312, errno: 11
-----
Any ideas?

[Edit: Never mind, I had to get myself a proper ROM and select it.]

Re: Source FOUND!

Posted: September 8th, 2012, 12:58 pm
by David
If you're using KEGS, you need to put the disk images into s6d1 and s6d2. (s5 expects 800k, s6 expects 140k disks.)
(KEGS is actually an Apple IIgs emulator, but it will work.)
KEGS will try to boot from the hard disk. When the "Copyright Apple Computer" appears, press ctrl-alt-esc, select Control Panel, goto Slots, at StartUp, select Slot 6 with the left-right keys. Quit from the control panel. Restart KEGS.

Re: Source FOUND!

Posted: September 8th, 2012, 2:18 pm
by Norbert
David wrote:If you're using KEGS, you need to put the disk images into s6d1 and s6d2. (s5 expects 800k, s6 expects 140k disks.)
(KEGS is actually an Apple IIgs emulator, but it will work.)
KEGS will try to boot from the hard disk. When the "Copyright Apple Computer" appears, press ctrl-alt-esc, select Control Panel, goto Slots, at StartUp, select Slot 6 with the left-right keys. Quit from the control panel. Restart KEGS.
Yep, that works. :)
Enter switches between the room and level view, Space can be used to select and add tiles.
Like you wrote, saving/playing and such gives errors ("Halting for emul COP at <number>").

Re: Source FOUND!

Posted: September 8th, 2012, 7:58 pm
by David
I got the Load and Play menuitems to work. Save still doesn't work.
When starting to Play, the screen will start to fill with garbled graphics, and when it's full, the game will eventually start. (I guess the game data is loaded into the same place where the double hi-res screen memory is.)
I attached the new version to this post.

Re: Source FOUND!

Posted: September 8th, 2012, 8:37 pm
by Norbert
In xkegs, Load appears to hang the program. Sometimes it's responsive for about 1/2 second or so, then the console shows: "Disk timer expired, drive off: <number>"
Play does load the first room properly, but then shows the same message on the console.
I'll give it a try in (sdl)mame... although I'm not sure that program can run images unknown to it.

Re: Source FOUND!

Posted: September 9th, 2012, 8:43 am
by David
Norbert wrote:In xkegs, Load appears to hang the program. Sometimes it's responsive for about 1/2 second or so, then the console shows: "Disk timer expired, drive off: <number>"
Play does load the first room properly, but then shows the same message on the console.
It works for me in KEGSWIN (0.91). (Which, I assume, is based on the same code as xkegs.)
The Load dialog behaves a bit odd, though: you have to press space on the filename first, then enter.
"Disk timer expired, drive off: <number>" is not an error, it just means that the disk was not used for a certain time.

Re: Source FOUND!

Posted: September 9th, 2012, 7:52 pm
by David
Luckily I have Linux installed, so I could check what is causing the problem.
I downloaded KEGS from http://www.zophar.net/linux/apple2/kegs.html, and compiled it.
The problem is that the speed is set to "Unlimited" by default. To change this: open the settings with F4, set Speed to 1.0MHz with the left-right keys, then exit config.

Re: Source FOUND!

Posted: September 9th, 2012, 8:44 pm
by Norbert
Yeah, that works. :)
The "cell" level (level 1) can be finished; winning returns you to the start of level 1.
The "guards" level (level 2) can be played until the first raise button.
Movement is with the ijkl-keys (and ou to run-jump) and Alt is used to fight and make small steps.
I had to press the Up-arrow to make these keys work.

Re: Source FOUND!

Posted: September 10th, 2012, 9:32 am
by David
Norbert wrote:The "guards" level (level 2) can be played until the first raise button.
Yes, the raise/drop buttons don't work yet (on any level), because the editor uses a special format to store door events, and that area is currently zeroed on the disk. (see EDITOR.S in the source)
Norbert wrote:Movement is with the ijkl-keys (and ou to run-jump) and Alt is used to fight and make small steps.
I had to press the Up-arrow to make these keys work.
The game has two control modes: Joystick (Ctrl-J) and Keyboard (Ctrl-K), and the game starts in joystick mode. The keyboard mode works as you wrote. In joystick mode, you can use the numeric keypad. (This is the default setting in KEGS.)
And, due to the codes of these keys, ctrl-k=up and ctrl-j=down.

Re: Source FOUND!

Posted: September 10th, 2012, 9:50 am
by Norbert
David wrote:Yes, the raise/drop buttons don't work yet (on any level), [...]
They do work in level 1.
You can reach the sword, take it, go all the way back, fight the guard, and enter the level exit door.

Re: Source FOUND!

Posted: April 14th, 2013, 12:44 pm
by David
I found out that the files in the DRAZ folder are images.
They include scanned images, screenshots, sprite sheets, and various things that didn't make it into the final game.
I converted the images into PNG and attached them to this post.
Note: I had to put the ZIP into another ZIP, because it was 1.7 MB, which was too big to attach.