Apple ][ Source FOUND!

Discuss other PoP1 related things here.
Andrew
Wise Scribe
Wise Scribe
Posts: 313
Joined: July 16th, 2009, 4:39 pm

Re: Apple ][ Source FOUND!

Post by Andrew »

David wrote:About the name: The sample from the "Making of PoP" book mentions "DRAX" and "DRAY" on pages 24 and 34.
Probably the first version was "DRAW", and Mechner incremented the last letter with each version.
Don't know why, but I find that pretty funny. Wonder what he'd have named the version after DRAZ, if there was one? Looped around to DRAA? Incremented by a letter to DRAZA? :P
David wrote:This file contains the effects of the "Secret Keys" that are mentioned in some text files that come in PoP downloads.
This is the first time I've ever downloaded this archive from PoPUW, and out of sheer curiosity was going through the various files inside till I came to PRINCE.FAQ. Can't tell you how increasingly confused quickly skimming through this file made me, and my brain almost melted when I finally came to Q22, namely "Is Prince bi/homosexual?". WTF?! Do some people really think he's going through all those trials because he likes Jaffar instead of the Princess? Have I been playing these games wrong all these years? Is this an insidious attempt to ruin my happy childhood memories? Does this conspiracy extend to other games like Mario too? :shock: :? (Come to think of it, Dastan was quite 'friendly' with the Joker on top of Brokeback Mountain. Hmm...)

Fortunately before my whole world collapsed I finally figured out that it was a FAQ not for PoP but for Image! Wow. (Phew!) Either Jalal has a really weird sense of humor or he blindly included anything that said "Prince" in the title. :lol:
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple ][ Source FOUND!

Post by David »

Andrew wrote: Wonder what he'd have named the version after DRAZ, if there was one? Looped around to DRAA? Incremented by a letter to DRAZA? :P
Perhaps continue to "[", the next character in ASCII?
Or maybe do what Perl and PHP do:
DRAZ -> DRBA -- And then nobody could figure out what that means...
Andrew wrote: till I came to PRINCE.FAQ
When I last downloaded the archive, this file (and some others) was not there.

By the way, that file shows its age...
4) How do I use Internet services like FTP, IRC and World Wide Web (WWW)?
4.1) How do I FTP?
4.2) How do I IRC?
4.3) How do I use WWW/http?
4.4) That's all very nice, but I only have e-mail access to The Net...
And other interesting things...
Hill, Dave; Prince: a pop life; 242 pages; Harmony books; 0-517-57282-6
It's "pop" and not "PoP", though...
The Kid - Of all the characters, this is probably closest to
being Prince. Although he disputes that "Purple Rain"
Remember that the Prince of Persia is often called Kid? (KID.DAT for example)
Andrew
Wise Scribe
Wise Scribe
Posts: 313
Joined: July 16th, 2009, 4:39 pm

Re: Apple ][ Source FOUND!

Post by Andrew »

David wrote:Perhaps continue to "[", the next character in ASCII?
Naah, DRA[ doesn't quite have the same ring to it. :D
David wrote:Or maybe do what Perl and PHP do:
DRAZ -> DRBA -- And then nobody could figure out what that means...
No wonder! At that point people will probably just think that they're random letters or something. :roll:
David wrote:And other interesting things...
Hill, Dave; Prince: a pop life; 242 pages; Harmony books; 0-517-57282-6
It's "pop" and not "PoP", though...
Hey, I missed that. "Prince: A PoP Life" - I like it! Sounds like a great title for a fictional autobiography of the Prince.
David wrote:When I last downloaded the archive, this file (and some others) was not there.
So it's a later addition by Jalal. Still wondering about his motivation (joke or mistake), but it's probably best not to inform him and let it be. Sort of like an Easter egg just for PoP fans. :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Apple ][ Source FOUND!

Post by Norbert »

Andrew wrote:[...], but it's probably best not to inform him and let it be.
Too late, I'm afraid.
After I'd read your post I informed (e-mailed) Jalal about the awkward file inside the ZIP.
He wrote me once that we can report dead links and such to him.
He does have an account on this forum, and he updates popuw.com now and then, so maybe he would've picked up on it anyway.
Or he added the file deliberately, a possibility you mentioned; could be.
Andrew
Wise Scribe
Wise Scribe
Posts: 313
Joined: July 16th, 2009, 4:39 pm

Re: Apple ][ Source FOUND!

Post by Andrew »

Norbert wrote:Too late, I'm afraid.
After I'd read your post I informed (e-mailed) Jalal about the awkward file inside the ZIP.
Oh well. That's fine, it's not a big deal anyway.
jalal
Sheikh
Sheikh
Posts: 38
Joined: March 4th, 2005, 7:28 pm
Contact:

Re: Apple ][ Source FOUND!

Post by jalal »

Hehehe. Well I did actually find this file INSIDE a Prince of Persia 1 archive. I got it from there (I don't think I will ever find it again), and yes I did update manuals.zip back in the February's batch of updates, added more files but didn't mention it in the news.

I guess I will keep it.
Andrew
Wise Scribe
Wise Scribe
Posts: 313
Joined: July 16th, 2009, 4:39 pm

Re: Apple ][ Source FOUND!

Post by Andrew »

Nice to hear from you after ages, Jalal. What're you up to nowadays?
jalal wrote:I guess I will keep it.
:D
jalal
Sheikh
Sheikh
Posts: 38
Joined: March 4th, 2005, 7:28 pm
Contact:

Re: Apple ][ Source FOUND!

Post by jalal »

Andrew wrote:Nice to hear from you after ages, Jalal. What're you up to nowadays?
Nothing much. The usual.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple ][ Source FOUND!

Post by David »

Andrew wrote:Fortunately before my whole world collapsed I finally figured out that it was a FAQ not for PoP but for Image! Wow. (Phew!) Either Jalal has a really weird sense of humor or he blindly included anything that said "Prince" in the title. :lol:
Maybe next time, he will add a FAQ about The Little Prince by Saint-Exupery?
Which could contain something like...

Q: Did the Prince really die near the end?
A: No, he just left his body so he could return to his home.

Hey, this also kind of matches what happens in PoP2...
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple ][ Source FOUND!

Post by David »

(Note to self: Move the previous few posts to a new topic.)

Norbert found this page about PoP for Apple II: http://pferrie.host22.com/misc/lowlevel14.htm

The Easter Eggs part sounds quite interesting:
EASTER EGGS

While digging through the game code, I found several hidden routines. They are listed here.

Before booting, hold both Apple keys, then press:
DEL only on //GS, displays an oscilloscope
use arrow keys to increase/decrease amplitude, space to change orientation, escape to quit
! displays a message, and then a lores animation
RETURN continally draws a fractal, press 'c' to change colours
@ displays a bouncing, spinning cube
^ pulse the drive head, move joystick to change tone, sounds like a motorcycle

When playing side B, press '^' after completing a level to see an animation of Jordan waving, press a key at the end to view it again (never exits=game over)
I did not know about that last one.
Here it is in the source: https://github.com/jmechner/Prince-of-P ... TER.S#L496
It's called after loading a level.

I tried this with this version: https://github.com/adamgreen/Prince-of-Persia-Apple-II (mentioned here)
I pressed Ctrl+A to reload the level (level 3 as it's the first on side B), and immediately pressed Shift+6 ("^").
However, either nothing special happens, or the game hangs with a black screen. The floppy drive light is stuck on.
Oh wait, it works with the three-sided version!
It's in lores mode, with shades of blue.

You can get the game from here: ftp://ftp.apple.asimov.net/pub/apple_II ... of_persia/

It seems that the images would be loaded from this file: https://github.com/adamgreen/Prince-of- ... /VID.STUFF
I already ran into it, but I could not decode it. Maybe now...
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Apple ][ Source FOUND!

Post by Norbert »

I still can't get any of the Easter eggs to work.
On 14 March, a new, unpacked .po image was added to asimov.net that should have all the Easter eggs included.
I'm guessing the reasons I can't get it to work are:
- for the first couple of Easter eggs the problem is that the documentation expects an actual Apple II, while my AppleWin uses both Alt keys as Apple keys, and all other keys that need to be pressed next might be completely different keys than those mentioned in the documentation, which means I don't know when to press what, nor whether my window manager is in the way, making the entire exercise pointless,
- for the last Easter egg that David got to work the problem is that following David's instructions simply doesn't give me the Easter egg. I've tried other things too, such as pressing keys during or right before/after finishing levels, but nothing works.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple ][ Source FOUND!

Post by David »

David wrote: January 29th, 2017, 11:30 am Oh wait, it works with the three-sided version!
I wish I had been more specific...
Norbert wrote: March 25th, 2018, 1:31 am - for the last Easter egg that David got to work the problem is that following David's instructions simply doesn't give me the Easter egg. I've tried other things too, such as pressing keys during or right before/after finishing levels, but nothing works.
It works for me on Windows with the emulator and disk image that comes with leapop-0.8.

For the record, the instructions are:
Skip to level 3, as it's the first level on side B. You can do that by typing "SKIP" on level 1 and then on level 2. (It doesn't work while music is playing.)
Press Ctrl+A to reload the level, and immediately press "^".

There are some things to watch out for:
* You need to time the "^" quite precisely. I usually need a couple tries for that.
* The AppleWin emulator "helpfully" uses the keyboard layout of the OS. Maybe "^" is not Shift+6 on your system. And it seems there is no option to change that.
But there is a workaround: Shift+Insert will insert whatever is on the clipboard, by typing it on the emulated keyboard.
You could try this: Copy a "^" to the keyboard, and use Shift+Insert while restarting the level.
Or still better: Copy a Ctrl+A character (ASCII 0x01) followed by many "^" characters, onto the clipboard, and paste the whole thing into AppleWin.
Then AppleWin will first press the Ctrl+A for you, and it will hold "^" after that.

I am going to try this on Linux as well.
Norbert wrote: March 25th, 2018, 1:31 am - for the first couple of Easter eggs the problem is that the documentation expects an actual Apple II, while my AppleWin uses both Alt keys as Apple keys, and all other keys that need to be pressed next might be completely different keys than those mentioned in the documentation, which means I don't know when to press what, nor whether my window manager is in the way, making the entire exercise pointless,
I can't do them now, either...
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Apple ][ Source FOUND!

Post by Norbert »

David wrote: March 25th, 2018, 10:33 amShift+Insert will insert whatever is on the clipboard, [...]
This sounds like a good solution.
So,
echo -e '\x01\x5E\x5E\x5E\x5E\x5E\x5E\x5E\x5E\x5E\x5E' > test.txt
xed test.txt
Then Ctrl+c the text in xed, give AppleWin focus, press Shift+Insert.
Unfortunately, this doesn't work. Maybe Wine isn't passing the key-combo to AppleWin.
(Shift+Insert works in xed, it pastes the chars.)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Apple ][ Source FOUND!

Post by Norbert »

David wrote: March 25th, 2018, 10:33 amI can't do them now, either...
They may not be included in the disk image that ships with leapop.
Maybe try the new image.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple ][ Source FOUND!

Post by David »

David wrote: March 25th, 2018, 10:33 am I am going to try this on Linux as well.
I tried it, but things aren't that straightforward.
For starters, when I run AppleWin in Wine, AppleWin eats 44% of CPU time, and wineserver eats another 27%.
The emulated Apple II is quite slow, except when I enable turbo mode.
There is an option to enable turbo mode with Scroll Lock. (Turbo mode lasts only while I *hold* Scroll Lock. It's not a toggle.)
David wrote: March 25th, 2018, 10:33 am Or still better: Copy a Ctrl+A character (ASCII 0x01) followed by many "^" characters, onto the clipboard, and paste the whole thing into AppleWin.
Then AppleWin will first press the Ctrl+A for you, and it will hold "^" after that.
That doesn't seem to work in Wine, at least Ctrl+A is not pasted.

For the record, this is what I tried:
* Execute this in bash: echo $'\1\1\1\1\1\1\1^^^^^^^^^^^^^^^^^^^^'
* Select the output and copy it to the clipboard. (Ctrl+Shift+C or right-click -> copy)
* In AppleWin, press Shift+Insert.
This doesn't work by itself, only if I first press Ctrl+A by hand.

Norbert wrote: March 25th, 2018, 11:11 am Then Ctrl+c the text in xed, give AppleWin focus, press Shift+Insert.
Unfortunately, this doesn't work. Maybe Wine isn't passing the key-combo to AppleWin.
There is also this little utility that copies its standard input to the clipboard:

Code: Select all

echo $'\1^^^^^^' | clipit
Shift+Insert seems to work in AppleWin if I start AppleII Basic.
(Boot from the MASTER.DSK that comes with AppleWin. You need to turn off hard disk emulation, so AppleII can boot from the floppy drive.)
To see every pasted character, including control characters, run this Basic program:

Code: Select all

10 GET A$
20 PRINT ASC(A$)
30 GOTO 10
RUN
If I press Ctrl+A manually, it shows up as a 1.
If I paste a string that contains a Ctrl+A, then that character won't show up. The "^" characters will show up as 94.

Code: Select all

echo -e '\x'{0,1}{{0..9},{A..F}} | clipit
It seems that something in AppleWin or Wine filters out all control characters (0-31 and 127), except newline (13).

Note that the above command will insert spaces between the control characters.
Here is a command that doesn't insert spaces, and also makes a hexdump to make that sure:

Code: Select all

for i in '\x'{0,1}{{0..9},{A..F}} ; do echo -en $i ; done | tee >(clipit) | od -t x1

Here is a screenshot of what the B-side (level 3) easter egg looks like.
Note that this screenshot is just a single frame from the animation, so it's not the whole experience.
apple_Mechner.png
Norbert wrote: March 25th, 2018, 1:31 am - for the first couple of Easter eggs
There is a video of them here:
OGV: https://github.com/fabiensanglard/Princ ... r-eggs.ogv
GIF: https://github.com/fabiensanglard/Princ ... r-eggs.gif
Post Reply