Prince of Persia

new games to be launched and discussed here
User avatar
kieranhj
Posts: 820
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Prince of Persia

Post by kieranhj » Thu Mar 29, 2018 11:27 pm

Hi Stardot friends,

The wait is over! We're finally ready to release Prince of Persia to the world. It's been a long journey to this point and I'm completely knackered from basically crunching on this for the last week solid, along with my partners in crime simonm, Dethmunk and Inverse Phase. We hope you enjoy the game as much as we enjoyed making it.

The newest and most up-to-date build will always be on our Bitshifters page: https://bitshifters.github.io/posts/pro ... -beeb.html

The game requires a vanilla BBC Master 128K, with all 4x sideways RAM banks free and PAGE at &E00. It has been tested on real floppy hardware, DataCentre and MAMMFS (thanks to Hoglet for the last minute panic debugging and sbadger for additional testing and feedback.)

If you find any bugs please post them on my GitHub site and I'll get round to looking at them when I've had a nice long sleep!

Thanks again to everyone here for their encouragement and support throughout. :-D
john.Credits.png
john.Credits.png (22.3 KiB) Viewed 2952 times
EDIT: Please post any bug reports here: https://github.com/kieranhj/pop-beeb/issues
Last edited by kieranhj on Fri Mar 30, 2018 11:05 am, edited 1 time in total.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

SteveF
Posts: 516
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Prince of Persia

Post by SteveF » Thu Mar 29, 2018 11:37 pm

Congratulations guys, an amazing effort!

User avatar
richardtoohey
Posts: 3717
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Prince of Persia

Post by richardtoohey » Thu Mar 29, 2018 11:39 pm

=D> I'll give it a go this weekend. :D

User avatar
davidb
Posts: 2514
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Prince of Persia

Post by davidb » Thu Mar 29, 2018 11:41 pm

Congratulations! :D It's a remarkable achievement and I can only barely imagine the amount of work that went into making it.

User avatar
kieranhj
Posts: 820
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Prince of Persia

Post by kieranhj » Thu Mar 29, 2018 11:49 pm

Thanks everyone. I thought that Easter weekend might mean people had some time to dust off the old hardware and play it for real! In terms of work, GitHub says there are 688 commits... I'll do some more technical post-mortem later on, including final memory map.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

steve3000
Posts: 2089
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Prince of Persia

Post by steve3000 » Thu Mar 29, 2018 11:59 pm

Wow! Well done! =D> Looking forward to some free time to play this at the weekend.

User avatar
ctr
Posts: 226
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: Prince of Persia

Post by ctr » Fri Mar 30, 2018 12:55 am

Bravo!

This is brilliant. The graphics look incredible, the animation is absolutely rock solid and the sound works really well. And it's a good game!

Diminished
Posts: 183
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Prince of Persia

Post by Diminished » Fri Mar 30, 2018 1:22 am

This is great.

I know the PC version of this game very well, so I set out to try to complete it on my first try. The jump timing seems to differ very slightly from the PC version, although I'm almost certain this was a quirk of the PC port rather than a problem with this Master port. At first I also thought the combat timing was different, but actually I think this is simply a consequence of latency caused by playing it in an emulator (and an in-browser one at that) rather than on original hardware.

Unfortunately, I got to the end of level 7 and it turned out Jaffar's magic was a little stronger than I remembered... I know you asked for bugs to be submitted via GitHub, but I wasn't sure how or where to do that, nor was I sure whether I'd be able to submit a screenshot. This anomaly happened when I exited level 7, heading to level 8. I've no idea if it's a game bug or an emulator bug, or what:
Screen Shot 2018-03-30 at 02.00.26.png
Terrific work, though. I'm curious to know what percentage of Mechner's original code remains ...

EDIT: here are pages 0 and 1, if they help:

Code: Select all

0000  00 14 28 ff 03 20 19 91  ..(.. ..
0008  00 52 95 02 00 80 00 35  .R.....5
0010  11 15 00 35 15 99 86 00  ...5....
0018  28 04 c0 02 00 00 00 c9  (.......
0020  00 c9 2a 00 00 03 00 c3  ..*.....
0028  d0 c5 00 03 00 14 14 14  ........
0030  00 00 00 00 04 01 00 00  ........
0038  10 02 00 00 00 00 00 c9  ........
0040  00 86 99 ff 05 02 05 01  ........
0048  00 b2 9b 03 0b 00 00 ff  ........
0050  00 86 99 ff 05 02 05 01  ........
0058  00 b2 9b 03 0b 00 00 ff  ........
0060  b2 9b 37 56 06 00 01 00  ..7V....
0068  00 49 9b 02 0b 02 00 01  .I......
0070  0f 95 00 9a ff 18 00 c0  ........
0078  00 28 03 ec a1 0f 02 01  .(......
0080  c3 03 0c 93 6a 00 00 14  ....j...
0088  06 00 00 00 40 06 00 00  ....@...
0090  05 7b 00 12 0e 04 00 00  .{......
0098  01 00 00 a3 0e ff 01 00  ........
00a0  ff 00 00 0a 03 00 00 80  ........
00a8  00 00 00 00 00 00 00 00  ........
00b0  90 c2 7f 27 00 09 80 c0  ..'....
00b8  00 00 0a 18 00 40 00 00  .....@..
00c0  14 0f 00 00 00 41 75 64  .....Aud
00c8  69 6f 34 20 24 00 41 06  io4 $.A.
00d0  02 c8 52 ff 19 91 01 0f  ..R.....
00d8  82 bb 09 24 00 00 01 81  ...$....
00e0  00 00 00 a1 01 00 80 1e  ........
00e8  00 07 00 00 e2 00 00 a1  ........
00f0  0b ff 0a 18 0f 00 01 80  ........
00f8  22 80 8e ed 01 0e 80 00  ".......

0100  90 ed f9 ee 30 a1 3d 8f  ....0.=.
0108  21 8c ca 8b 1c 94 df 93  !.......
0110  94 82 00 27 82 df 87 1e  ...'....
0118  84 02 ed ff 8c ff 19 80  ........
0120  1d ff 51 fa 18 17 48 18  ..Q...H.
0128  5b 18 df 28 04 a7 1e 57  [..(...W
0130  1d b2 21 08 8e 22 dc 21  ..!..".!
0138  44 21 8e 22 dc 21 44 21  D!.".!D!
0140  8e 22 dc 21 44 21 8e 22  .".!D!."
0148  dc 21 44 21 8e 22 dc 21  .!D!.".!
0150  44 21 8e 22 dc 21 44 21  D!.".!D!
0158  8e 22 dc 21 44 21 8e 22  .".!D!."
0160  dc 21 44 21 8e 22 dc 21  .!D!.".!
0168  44 21 8e 22 dc 21 44 21  D!.".!D!
0170  8e 22 dc 21 44 21 8e 22  .".!D!."
0178  dc 21 44 21 8e 22 dc 21  .!D!.".!
0180  44 21 8e 22 dc 21 44 21  D!.".!D!
0188  8e 22 dc 21 44 21 8e 22  .".!D!."
0190  dc 21 44 21 8e 22 dc 21  .!D!.".!
0198  44 21 8e 22 dc 21 44 21  D!.".!D!
01a0  8e 22 dc 21 44 21 8e 22  .".!D!."
01a8  dc 21 44 21 8e 22 dc 21  .!D!.".!
01b0  44 21 8e 22 dc 21 44 21  D!.".!D!
01b8  8e 22 dc 21 44 21 8e 22  .".!D!."
01c0  dc 21 44 21 8e 22 dc 21  .!D!.".!
01c8  44 21 8e 22 dc 21 44 21  D!.".!D!
01d0  8e 22 dc 21 44 21 8e 22  .".!D!."
01d8  dc 21 44 21 8e 22 dc 21  .!D!.".!
01e0  44 21 8e 22 dc 21 de da  D!.".!..
01e8  69 da 40 23 dc 5d 66 29  i.@#.]f)
01f0  13 1b 09 0c b1 ab ff 00  ........
01f8  a8 f3 0b a1 35 ed fb 77  ....5..w  
EDIT 2: I had another crash after this one; looking at the code dump, it seems like it died while executing perfectly valid code, so I thought maybe it's a jsbeeb problem. Switched to Safari and I got as far as Level 12 with no issues. However, when I just ran out of time on Level 12, I got a black screen rather than the "losing" cinematic featuring the Princess, so there may be some issue with that. Difficult to know where problems lie with so many execution layers stacked on top of one another. I wish I had a Master. :(

I reiterate, though, it's a fabulous conversion.
Last edited by Diminished on Fri Mar 30, 2018 6:12 am, edited 2 times in total.

User avatar
FourthStone
Posts: 816
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Prince of Persia

Post by FourthStone » Fri Mar 30, 2018 2:27 am

Simply incredible effort =D>

Can't wait to spend some time playing this beauty, from an initial play on level 1 it looks, sounds and plays fantastic!

User avatar
tricky
Posts: 3772
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Prince of Persia

Post by tricky » Fri Mar 30, 2018 5:39 am

Well done guys, definitely something for the weekend sir ;)

User avatar
danielj
Posts: 7558
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Prince of Persia

Post by danielj » Fri Mar 30, 2018 6:03 am

You beauties :D

User avatar
oss003
Posts: 3105
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Prince of Persia

Post by oss003 » Fri Mar 30, 2018 6:34 am

WOW ...... :shock:
Well done guys .... fantasic job ..... never seen such game on a BBC .... =D> =D> =D> =D>
I'll give it a try this weekend.

Greetings
Kees

User avatar
daveejhitchins
Posts: 5142
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Prince of Persia

Post by daveejhitchins » Fri Mar 30, 2018 7:02 am

Maybe the Game can be showcased at Wakefield?

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
danielj
Posts: 7558
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Prince of Persia

Post by danielj » Fri Mar 30, 2018 7:27 am

I'll certainly have it on my Master up there.

d.

User avatar
richardtoohey
Posts: 3717
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Prince of Persia

Post by richardtoohey » Fri Mar 30, 2018 7:46 am

tricky wrote:something for the weekend sir ;)
We've got this and 16shades levels of grey in another of your posts, I'm beginning to wonder what's going on! :lol:

Oops, off-topic [-X :-#

User avatar
sbadger
Posts: 400
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey
Contact:

Re: Prince of Persia

Post by sbadger » Fri Mar 30, 2018 7:56 am

Well done again chaps. I think next is for me to get a crt hooked up. Then it should look even better!
So many projects, so little time...

RobC
Posts: 2709
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Prince of Persia

Post by RobC » Fri Mar 30, 2018 8:31 am

Looks amazing - can't wait to try it out =D> :D =D>

I'll have a Compact running at Wakefield so another machine that it can be run on.

Vectrex
Posts: 3
Joined: Tue Jun 13, 2017 2:20 pm
Location: Melbourne, Australia
Contact:

Re: Prince of Persia

Post by Vectrex » Fri Mar 30, 2018 9:15 am

That's pretty amazing. The only suggestion at all is to use a high pitched 'ting' sound for when your sword hits the guards sword.
I'm sure the rights holder would be happy for you guys to do a small physical release with a bit going to them. I think this deal was done on some other retro port from another game?

User avatar
marcusjambler
Posts: 684
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Prince of Persia

Post by marcusjambler » Fri Mar 30, 2018 10:02 am

Wow.... Astonishing and fantastic work guys =D> =D> =D>

User avatar
kieranhj
Posts: 820
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Prince of Persia

Post by kieranhj » Fri Mar 30, 2018 10:02 am

RobC wrote:Looks amazing - can't wait to try it out =D> :D =D>

I'll have a Compact running at Wakefield so another machine that it can be run on.
Compact might be a problem i’m afraid as we’ve discovered the game crashes on MOS 3.5 (I don’t have that to test / debug.)

Also it needs a DFS definitely not going to work on ADFS although I could do an ADFS version in future perhaps.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

User avatar
tricky
Posts: 3772
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Prince of Persia

Post by tricky » Fri Mar 30, 2018 10:35 am

Would it work from MMC on a Compact?

User avatar
danielj
Posts: 7558
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Prince of Persia

Post by danielj » Fri Mar 30, 2018 10:58 am

The compact has mos 4, not 3.5... It'll be suckit and see I guess?

d.

User avatar
kieranhj
Posts: 820
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Prince of Persia

Post by kieranhj » Fri Mar 30, 2018 11:00 am

Diminished wrote:This is great.

I know the PC version of this game very well, so I set out to try to complete it on my first try. The jump timing seems to differ very slightly from the PC version, although I'm almost certain this was a quirk of the PC port rather than a problem with this Master port. At first I also thought the combat timing was different, but actually I think this is simply a consequence of latency caused by playing it in an emulator (and an in-browser one at that) rather than on original hardware.

Unfortunately, I got to the end of level 7 and it turned out Jaffar's magic was a little stronger than I remembered... I know you asked for bugs to be submitted via GitHub, but I wasn't sure how or where to do that, nor was I sure whether I'd be able to submit a screenshot. This anomaly happened when I exited level 7, heading to level 8. I've no idea if it's a game bug or an emulator bug, or what:

Terrific work, though. I'm curious to know what percentage of Mechner's original code remains ...

EDIT: here are pages 0 and 1, if they help:

EDIT 2: I had another crash after this one; looking at the code dump, it seems like it died while executing perfectly valid code, so I thought maybe it's a jsbeeb problem. Switched to Safari and I got as far as Level 12 with no issues. However, when I just ran out of time on Level 12, I got a black screen rather than the "losing" cinematic featuring the Princess, so there may be some issue with that. Difficult to know where problems lie with so many execution layers stacked on top of one another. I wish I had a Master. :(

I reiterate, though, it's a fabulous conversion.
Glad you're enjoying the game. Thanks for digging in for the bug report.

You must be very experienced at the game as I didn't think anyone would get anywhere close to completing it that quickly. I find it nails hard by modern standards hence adding the "easy guards" cheat for our less youthful reflexes! I've been living with the game for a year and only managed to complete a full playthrough this week whilst testing the final builds

I did successfully reach the final Epilogue without crashes on real hardware but this is a complex piece of software so I've no doubt that some pesky bugs remain. There's around 48K of 6502 code and the game makes extensive use of rapid bank switching and disc overlays to juggle everything required in and out of memory. It should be relatively OS friendly (although not MOS 3.5 as I've recently discovered :) ) as there's no IRQ abuse, 'mostly' standard OS calls and, other than Hazel, generally respectful of OS RAM allocation.

I doubt very much there is a bug in jsbeeb as this has been extensively tested over the last few years. That PAGE 1 dump looks very suspicious! Did you get a crash info screen at all in either instance? There is a BRKV handler that is supposed to bring up crash information but it isn't always able to succeed.

In terms of the original code, all of Jordan's gameplay code remains intact, and should be exactly one-for-one behaviour with the Apple II version. I know that Jordan considers the original PC version to be "definitive" so there are likely some differences (not least the variable frame rate) for players more familiar with PC than Apple. For the Master though it is all new code for sprite plotting and screen handling, music & audio, memory management and I/O (disc access & keyboard) not to mention two different decompression codecs running simultaneously (one for music, the other for graphics!)

If you get chance to playthrough on b-em emulator and experience another crash, please could you save the state and send me the file?
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

garfield
Posts: 403
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: Prince of Persia

Post by garfield » Fri Mar 30, 2018 3:44 pm

FYI the title screen says (C) 1990 Jordan Mechner. The original was actually copyrighted in 1989 for the Apple 2. ( You might have taken the title screen from one of the later conversions i.e. Amstrad CPC )

Just nitpicking, but it irked me for some reason! :o :lol:

Great work so far.

User avatar
CMcDougall
Posts: 6823
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: Prince of Persia

Post by CMcDougall » Fri Mar 30, 2018 4:38 pm

kieranhj wrote: it needs a DFS definitely not going to work on ADFS .
that goes without saying :lol:

great conversion!! =D> =D> =D> I had it on my first 286PC with a 10mb HDisc :shock:

I have a Compact, but sure its MOS 5.00, and also some have 5.1 :?

Putting DFS 2.45 on it is easy, I just took the file off the ADFS compact welcome disc & blew to 16k 128 eprom :mrgreen:

also got MMFS1.xx on it too, so that would be easier to check as saves me getting out the PSU / disc box out 8)
ImageImageImage

minwah
Posts: 85
Joined: Tue Jul 21, 2015 12:12 pm
Contact:

Re: Prince of Persia

Post by minwah » Fri Mar 30, 2018 5:06 pm

This looks absolutely brilliant!

I'm having a spot of bother with it though. If I leave the intro running, it hangs on this screen:
20180330_173546.jpg
If I press ']' to start the game, I get a brief noise / slightly corrupted title screen graphic, and then seems to crash to blank screen.

Using a BBC Master, MOS 3.2 (switchable MOS rom) with DataCentre. I have done *DTRAP. P.~PAGE reports E00 (had to unplug ROM B DFS 5A to achieve that).

Any ideas?
20180330_174519.jpg
BBC Master | IFEL Switchable MOS | Sundby PiTubeDirect (Pi 3) | RetroClinic DataCentre | Deltronics Control It

User avatar
danielj
Posts: 7558
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Prince of Persia

Post by danielj » Fri Mar 30, 2018 5:24 pm

You've plugged RAMFS into one of the sideways RAM slots and configured it to be ROM, not RAM :( You need all 4 banks for it to work. Put RAMFS where the graphics extension ROM is, and change LK19 to be in the west position to make sure you've got RAM in banks 4 & 5.

d.

minwah
Posts: 85
Joined: Tue Jul 21, 2015 12:12 pm
Contact:

Re: Prince of Persia

Post by minwah » Fri Mar 30, 2018 5:32 pm

danielj wrote:You've plugged RAMFS into one of the sideways RAM slots and configured it to be ROM, not RAM :( You need all 4 banks for it to work. Put RAMFS where the graphics extension ROM is, and change LK19 to be in the west position to make sure you've got RAM in banks 4 & 5.
Aah, thank you!

Are the banks needed for sideways RAM 4-7? I had it like this for years...I guess I've not run anything that needs that much sideways RAM until now.

Thanks again!
BBC Master | IFEL Switchable MOS | Sundby PiTubeDirect (Pi 3) | RetroClinic DataCentre | Deltronics Control It

User avatar
danielj
Posts: 7558
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Prince of Persia

Post by danielj » Fri Mar 30, 2018 5:33 pm

Yup, 4-7. You've been using it as a Master 96 instead of a Master 128 :D

User avatar
Dave Footitt
Posts: 806
Joined: Thu Jun 22, 2006 9:31 am
Location: Abandoned Uranium Workings
Contact:

Re: Prince of Persia

Post by Dave Footitt » Fri Mar 30, 2018 5:56 pm

Blimey that's an incredible job!

Great work =D>

Post Reply