Going great guns on a Prince of Persia port...

developing/porting a new game or gaming framework? post in here!
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Going great guns on a Prince of Persia port...

Post by tricky »

Kieran, I'm not trying to distract you, but as an owner of a B+ 128 (my favourite beeb after my original) I can't help but point out that depending on what you are doing with the shadow copy of the screen, you can display one while updating the other (but not vice-versa).
If I am reading the B+ service manual correctly, code in the last 4K of the 12K of RAM that overlaps sideways ROM accesses main RAM while in shadow mode, so a memcpy loop crossing &A000 should work!
Figure 5 RAM access in normal and shadow modes
In normal mode the RAM can be thought of as 44K from address &0000-&AFFF. The top 12K of this RAM from address &8000-&AFFF is paged into the memory map when required in place of the bottom 12K of the sideways ROM space, see 5.4.2. The remaining 20K of RAM is set aside for the shadow screen memory, while it always exists, it is not available to the system in normal mode. The bank of 44K RAM we shall call "normal RAM". In normal mode, VDUSEL (IC36 pin 17) is always zero.
Any code executing anywhere within normal RAM in normal mode will always access normal RAM, it cannot access shadow RAM.

In shadow mode the RAM can be thought of as 44K from address &0000-&AFFF, plus a parallel bank of 20K RAM from address &3000-&7FFF which we shall call "shadow RAM". As in normal mode, the top 12K of normal RAM is paged into the memory when required. In the address range &3000-&7FFF the PAL (IC36) is able to switch between shadow RAM and normal RAM. It selects access to the shadow memory if a) shadow mode is on b) it detects a VDU driver and c) the operand address is between &3000 and &7FFF, the part of the memory map used by the screen. Otherwise it selects access to normal RAM. The machines logic is set to shadow mode when logic 1 is written to D7 at address &FE34, this causes pin 17 (VDUSEL) to go high. &FE34 is the address of a register in the PAL and when D7 is set any screen access through the VDU drivers will cause the PAL to switch in the shadow memory by making pin 12 (CPUSEL) high. In shadow mode, VDUSEL is always set, and CPUSEL is low to access normal RAM and high to access shadow RAM.
When the paged RAM is selected in shadow mode, the top 4K, &A000 to &AFFF, is programmed by the PAL (IC36) to have the attributes of VDU drivers.
Any code executing between &0000-&9FFF in shadow mode will always access normal RAM.
Any code executing from sideways RAM between &A000-&AFFF will access the shadow RAN (if selected) when the operand address is between &3000-&7FFF. This special attribute is not available to any other sideways memory, ROM or RAM.
I must admit that I didn't even try this for AstroBlaster samples as it made my head hurt and hay it already had SWRAM.
Anyway, I just wanted it out there, I'm not suggesting you do it, not even as a stretch goal!
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: Going great guns on a Prince of Persia port...

Post by Matt Godbolt »

lurkio wrote:
Matt Godbolt wrote:Cripes mate that looks fantastic!
kieranhj wrote:The Master version needs ...
-- although if Matt were to find the time to implement it, it would benefit another recent game, White Light, too. (Hint, hint!)

:?:
Hahah hint taken. I'm actually working on jsbeeb at the moment, to add support for serial stuff and touchscreens. I'll be sure to make writable discs too. I have some ideas about this feature too...
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

tricky wrote:I must admit that I didn't even try this for AstroBlaster samples as it made my head hurt and hay it already had SWRAM.
Anyway, I just wanted it out there, I'm not suggesting you do it, not even as a stretch goal!
Yes, trying to read that also made my head hurt! If it’s a case of slightly rejigging the memory map and tweaking the addresses used for paging then I’ll add it to the list but going to come after the vanilla Master and NULA versions!

I may be using a couple of 65C102 opcodes but I don’t think they are critical.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Going great guns on a Prince of Persia port...

Post by trixster »

Whilst we're making requests, how about BBC Bs with lots of swram AND shadow ram? Mine has got a WE ram card so there's 20k shadow to play with!
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Going great guns on a Prince of Persia port...

Post by tricky »

I wouldn't say the B+ shadow ram is just a matter of rejigging the memory map as I think although you could siplay one screen while building the other, then I think you would have to copied the changed bits back, but maybe its not that bad!

WE Shadow RAM won't sole the double buffering the screen problem, just give you more RAM.
User avatar
daveejhitchins
Posts: 7878
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Going great guns on a Prince of Persia port...

Post by daveejhitchins »

Just like to 'chip-in' here and really ask a question that I already know the answer to - but what the Hell!

How about an Electron with Turbo, shadow RAM and AP6 with lots RAM (extra 112K!) - could also add 2 x ABR giving a total of 176K of sideways RAM :D :roll:

Always worth a punt . . . :oops:

Dave H :lol:
Available: ARA II : ARA III-JR/PR : ABR : AP5 : AP6 : ABE : ATI : MGC : Plus 1 Support ROM : Plus 3 2nd DA : Prime's Plus 3 ROM/RAM : Pegasus 400 : Prime's MRB : ARCIN32 : Cross-32
User avatar
sbadger
Posts: 499
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey
Contact:

Re: Going great guns on a Prince of Persia port...

Post by sbadger »

Lovely Stuff Kieran, or should I say, Prince of Paddington!



:-D
So many projects, so little time...
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: Going great guns on a Prince of Persia port...

Post by SteveF »

tricky wrote:If I am reading the B+ service manual correctly, code in the last 4K of the 12K of RAM that overlaps sideways ROM accesses main RAM while in shadow mode, so a memcpy loop crossing &A000 should work!
I might be misunderstanding what you're saying, but I wrote a test program to investigate the behaviour of this on real hardware and some people kindly ran it - have a look at the thread starting at http://www.stardot.org.uk/forums/viewto ... 87#p158387 Following on from that, my understanding is that code in the last 4K of the private 12K of RAM always accesses the displayed screen RAM, be that shadow or main RAM.
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

I think I can safely discount the possibility of a B+ version at this point. And as for your ultra-pimped Electron... :lol:
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
daveejhitchins
Posts: 7878
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Going great guns on a Prince of Persia port...

Post by daveejhitchins »

kieranhj wrote:And as for your ultra-pimped Electron... :lol:
:(

Dave H :lol:
Available: ARA II : ARA III-JR/PR : ABR : AP5 : AP6 : ABE : ATI : MGC : Plus 1 Support ROM : Plus 3 2nd DA : Prime's Plus 3 ROM/RAM : Pegasus 400 : Prime's MRB : ARCIN32 : Cross-32
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

daveejhitchins wrote::(
I’m not at all familiar with Electron hardware add-ons (despite it being my first computer - just a bit too young!)

On the positive side all the source to POP Beeb is in GitHub and built from a single BeebAsm master asm file. The code is structured across about 20 reasonably well defined modules and I will publish the final memory map when complete. So if anyone would like to port to their own more exotic Acorn configuration (Atom, Electron, B+) then I would be happy to provide guidance on where to find the various hooks for ram banking, shadow, disc access etc.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
danielj
Posts: 9900
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Going great guns on a Prince of Persia port...

Post by danielj »

kieranhj wrote:
daveejhitchins wrote::(
I’m not at all familiar with Electron hardware add-ons (despite it being my first computer - just a bit too young!)
I think you'll come a cropper, as shadow ram can't be paged in/out - it's either or or off, and AFAIK you can't write directly to it, you have to go via the OS routines... *this could be incorrect!

d.
User avatar
daveejhitchins
Posts: 7878
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Going great guns on a Prince of Persia port...

Post by daveejhitchins »

danielj wrote:I think you'll come a cropper, as shadow ram can't be paged in/out - it's either or or off, and AFAIK you can't write directly to it, you have to go via the OS routines... *this could be incorrect!
- - - AND!

Dave H :lol: :lol:
Available: ARA II : ARA III-JR/PR : ABR : AP5 : AP6 : ABE : ATI : MGC : Plus 1 Support ROM : Plus 3 2nd DA : Prime's Plus 3 ROM/RAM : Pegasus 400 : Prime's MRB : ARCIN32 : Cross-32
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Going great guns on a Prince of Persia port...

Post by RobC »

Depending on the amount of actual RAM needed, I wonder whether the Mega Games Cartridge could be used as a large data store with 16KBs of data paged in as required?
crj
Posts: 858
Joined: Thu May 02, 2013 5:58 pm
Contact:

Re: Going great guns on a Prince of Persia port...

Post by crj »

Terrifyingly, I realise that with modern hardware the limitation that the video subsystem always reads from main RAM needn't be an issue.

Suppose you'd attached enough RAM directly to a BBC B's CPU that it could happily emulate a BBC Master and more. That would leave the CPU's time on the main bus largely idle, apart from screen writes and memory-mapped I/O. The back of an envelope suggests some hardware trickery could react to a bank switch by blitting a different bank of screen memory into physical RAM quickly enough that it would keep ahead of the CRTC!

So nowadays, it's possible to make a shadow RAM system that supports bank switching without interfering at all with the video circuitry. Ulp!
paulb
Posts: 1767
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: Going great guns on a Prince of Persia port...

Post by paulb »

RobC wrote:Depending on the amount of actual RAM needed, I wonder whether the Mega Games Cartridge could be used as a large data store with 16KBs of data paged in as required?
Some kind of adjustable/scrolling window in the 16K sideways RAM/ROM region was done by various filing systems, and I did wonder whether Dave H might try and provide that with the MGC at some point. I did consider doing this with discrete logic, but you need quite a few ICs to make it work nicely, and the MGC has programmable logic, of course.

Another benefit of such a mechanism is the ability to access faster memory than the system RAM, although the 6502 instruction set really does favour zero page usage, thus limiting such benefits. And the screen accesses are still a bottleneck, too.
User avatar
daveejhitchins
Posts: 7878
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Going great guns on a Prince of Persia port...

Post by daveejhitchins »

RobC wrote:Depending on the amount of actual RAM needed, I wonder whether the Mega Games Cartridge could be used as a large data store with 16KBs of data paged in as required?
The MK II will have just such a block available :D

Dave H :D
Available: ARA II : ARA III-JR/PR : ABR : AP5 : AP6 : ABE : ATI : MGC : Plus 1 Support ROM : Plus 3 2nd DA : Prime's Plus 3 ROM/RAM : Pegasus 400 : Prime's MRB : ARCIN32 : Cross-32
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Going great guns on a Prince of Persia port...

Post by RobC »

daveejhitchins wrote:The MK II will have just such a block available :D
Sounds good. I was just wondering whether having lots of ROM available was good enough (as that's what the existing MGC provides)?
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Going great guns on a Prince of Persia port...

Post by Arcadian »

kieranhj wrote:I will post a new level 1 WIP when I get chance, hopefully later today.
Hi, still planning a demo ver with dethmunk's marvy new gfx? Or have I somehow managed to miss it? :oops:
Please subscribe to the ABug YouTube channel!
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

Arcadian wrote:
kieranhj wrote:I will post a new level 1 WIP when I get chance, hopefully later today.
Hi, still planning a demo ver with dethmunk's marvy new gfx? Or have I somehow managed to miss it? :oops:
Haha, I did promise that but then Dethmunk & I decided to keep you all in suspense for a bit longer whilst we got a further along with the graphics and Simon tinkered with the audio. I will endeavour to get a level 1 WIP demo released for the weekend in order to get feedback and compatibility testing with folks' real hardware setups etc. There are a couple of things I want to get sorted before then because these things tend to go wider than you expect!
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
Dethmunk
Posts: 224
Joined: Fri Jul 01, 2016 1:29 pm
Location: Guildford
Contact:

Re: Going great guns on a Prince of Persia port...

Post by Dethmunk »

Can't wait for people to play the demo.... I'm enjoying working on this Kieran. Sure seems to be coming together well too. I'm neglecting my Nintendo Switch, TV and Movies for this... tsk dam you retro gaming love.... :-)
Here's me working on some pixel stuff. LOL.
Pixels blurred to protect the innocent. ha ha. #sneakpeak

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

Re: Going great guns on a Prince of Persia port...

Post by FourthStone »

What a fantastic snapshot of modern retro computing!

Who could've imagined what computers would be like back then, that in 30 years we'd be using souped up terabyte computers to continue development and enjoyment of those first computers we all used.

I wonder if in another 30 years we'll have VR simulations of people reliving the 'old' 64bit age of computers with the users writing 8bit software to play on original hardware... the mind boggles.
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

FourthStone wrote:I wonder if in another 30 years we'll have VR simulations of people reliving the 'old' 64bit age of computers with the users writing 8bit software to play on original hardware... the mind boggles.
You mean something a bit like this? https://youtu.be/AiZvGwojvS8 :D
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
FourthStone
Posts: 1527
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Going great guns on a Prince of Persia port...

Post by FourthStone »

Where's the like button, that VR vid is quite funny :lol:
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

Hey folks,

I did promise you a demo this weekend but I'm going to renege on that and give you this wonderful screenshot of the newly redrawn Kid risking his life in the Palace instead, because I don't think you've seen these amazingly colourful backgrounds from Dethmunk yet:
Kid in the Palace!
Kid in the Palace!
The truth is that we're so close to getting the full game finished but it's not necessarily clear what is and isn't done yet. I can caveat this with you guys who understand it's work in progress but, with the best will in the world, stuff gets picked up quickly and travels further than you expect online and I can't provide a commentary for that. I already saw this when an early flickery version got sent to Jordan Mechner on Twitter by somebody else!!

As Dethmunk said, this has become a real labour of love for us and now has the focus & momentum from four professional game developers to make the best looking & sounding BBC game ever (and first BBC Master only game in the process.) I'd rather keep you waiting just a few more weeks to play the full thing and enjoy the whole experience from start to finish, not just level 1.

I hope you understand but please be patient... BBC forever! :D \:D/

PS. The amazingly talented musician who composed the tune for our Bad Apple demo has been inspired to recreate all of the original music from the PC version but in full channel SN chip audio just for the BBC Micro. That alone I think is worth waiting for!!
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Going great guns on a Prince of Persia port...

Post by lurkio »

Sounds like you've got a great team together. And the graphics just keep getting better.

Can't wait!

Good luck!

[-o<
User avatar
danielj
Posts: 9900
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Going great guns on a Prince of Persia port...

Post by danielj »

OOooh, you tease Kieran :D

It looks absolutely amazing. Very very exciting! Any NULA goodies?

d.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Going great guns on a Prince of Persia port...

Post by tricky »

Great work guys, this could be very big for our little community, I'm sure we can wait a little longer after all these years.
User avatar
kieranhj
Posts: 1103
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Going great guns on a Prince of Persia port...

Post by kieranhj »

Thanks for the support everyone!
danielj wrote:It looks absolutely amazing. Very very exciting! Any NULA goodies?
There will be a NULA version but that will definitely come a while after the standard Master release. (If nothing else I'll need a break after working on this almost continually for a year by the end.) I think Dethmunk has done an amazing job making the graphics look this good using just the regular Beeb palette - we're really trying to push it to see what can be done on original hardware first.

It would never have been commercially viable to make Master only games BITD but an interesting bar for us to set now..!
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: Going great guns on a Prince of Persia port...

Post by Matt Godbolt »

I am SO excited for this. Can we support this in some way? A Patreon, or some such thing? The amount of effort you all are putting in is amazing!
Post Reply

Return to “new projects in development: games”