Apple II port to BBC Master computer
Posted: October 13th, 2017, 6:08 pm
Hey folks,
I thought I would join your lovely forum and introduce myself. For the last six months or so I have been porting the original Apple II 6502 source & sprites to the BBC Master computer. For those of you outside of the UK, the BBC Micro computer series was created by Acorn in the early 1980's and was a familiar sight in all British schools of the era. Many coders taught themselves to program on this machine and have gone on to have careers in software development (including myself!)
I've always loved Prince of Persia, having played the original PC version back in the day as a teenager. After discovering the Apple II source had been released on GitHub, I decided to take a look. As the BBC Micro uses the same 6502 CPU as the Apple II, the code was very familiar even if the hardware internals and memory mapping of the Apple II were not. Thankfully Jordan Mechner was a surprisingly forward-thinking & careful programmer back in the late 80's and, whilst there was a lot of code, it was well structured with jump table interfaces for every module and a clean separation between gameplay logic and rendering.
Given the RAM requirements, I decided to limit my port to the BBC Master model which comes with 128K RAM as standard. Unfortunately this RAM is not in two simple 64K memory banks but distributed across the memory map in a somewhat inconvenient manner. This was the first of many challenges but I have made considerable progress so far. The game is certainly not complete yet but I have got far enough to share with the folks in the Acorn / BBC Micro enthusiasts scene. For similar reasons, I thought there might be people interested in this project here.
I've been keeping a development blog, of sorts, on the Acorn / BBC Micro enthusiasts forum Stardot, which you can read here: http://www.stardot.org.uk/forums/viewto ... 53&t=13079
You can try out the latest playable build using the online BBC Micro emulator (known as jsbeeb) here: https://bitshifters.github.io/jsbeeb/?d ... del=Master
(The keys are: z left x right ' up / down ; up-left # up-right Enter action. Your keyboard mapping may vary!)
As I said, there is still plenty of work still to do including porting the rest of the gameplay functions (it will crash if you trigger an unimplemented gameplay feature), the cutscenes & attract mode, music & sound effects, updated graphics designed for the BBC Micro screen resolution & colours and likely a whole load more optimisation to remove the flicker & graphical glitches. But it is certainly playable!
All code is posted on my GitHub repo here: https://github.com/kieranhj/pop-beeb and should be easily built by anyone else using the BeebAsm assembler. If anyone here is deeply familiar with the Apple II 6502 source, as I am becoming, I will no doubt be interested to ask you some questions when it comes to some of the gnarlier corners of the code.
Let me know what you think!
-kieranhj
I thought I would join your lovely forum and introduce myself. For the last six months or so I have been porting the original Apple II 6502 source & sprites to the BBC Master computer. For those of you outside of the UK, the BBC Micro computer series was created by Acorn in the early 1980's and was a familiar sight in all British schools of the era. Many coders taught themselves to program on this machine and have gone on to have careers in software development (including myself!)
I've always loved Prince of Persia, having played the original PC version back in the day as a teenager. After discovering the Apple II source had been released on GitHub, I decided to take a look. As the BBC Micro uses the same 6502 CPU as the Apple II, the code was very familiar even if the hardware internals and memory mapping of the Apple II were not. Thankfully Jordan Mechner was a surprisingly forward-thinking & careful programmer back in the late 80's and, whilst there was a lot of code, it was well structured with jump table interfaces for every module and a clean separation between gameplay logic and rendering.
Given the RAM requirements, I decided to limit my port to the BBC Master model which comes with 128K RAM as standard. Unfortunately this RAM is not in two simple 64K memory banks but distributed across the memory map in a somewhat inconvenient manner. This was the first of many challenges but I have made considerable progress so far. The game is certainly not complete yet but I have got far enough to share with the folks in the Acorn / BBC Micro enthusiasts scene. For similar reasons, I thought there might be people interested in this project here.
I've been keeping a development blog, of sorts, on the Acorn / BBC Micro enthusiasts forum Stardot, which you can read here: http://www.stardot.org.uk/forums/viewto ... 53&t=13079
You can try out the latest playable build using the online BBC Micro emulator (known as jsbeeb) here: https://bitshifters.github.io/jsbeeb/?d ... del=Master
(The keys are: z left x right ' up / down ; up-left # up-right Enter action. Your keyboard mapping may vary!)
As I said, there is still plenty of work still to do including porting the rest of the gameplay functions (it will crash if you trigger an unimplemented gameplay feature), the cutscenes & attract mode, music & sound effects, updated graphics designed for the BBC Micro screen resolution & colours and likely a whole load more optimisation to remove the flicker & graphical glitches. But it is certainly playable!
All code is posted on my GitHub repo here: https://github.com/kieranhj/pop-beeb and should be easily built by anyone else using the BeebAsm assembler. If anyone here is deeply familiar with the Apple II 6502 source, as I am becoming, I will no doubt be interested to ask you some questions when it comes to some of the gnarlier corners of the code.
Let me know what you think!
-kieranhj