Lode Runner (Electron)

developing/porting a new game or gaming framework? post in here!
Post Reply
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Lode Runner (Electron)

Post by 0xC0DE »

Working on a disassembly of Lode Runner (BBC Micro version) with the intention of creating an Acorn Electron version.

Question: does anyone know of a (homebrew) Acorn Electron version of Lode Runner? Or, does anyone already have a disassembly or full source of Lode Runner for the BBC Micro? I would rather discover this sooner than later :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
oss003
Posts: 3467
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: Lode Runner (Electron)

Post by oss003 »

I started it but then realised the resolution wasn't ideal for the Atom...... :(
I'll have a look how far I got and upload it if you want, it was a snapshot.
IIRC there are some Atom converted parts in ...

Greetings
Kees
Attachments
loderunner.txt
(213.2 KiB) Downloaded 26 times
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

oss003 wrote:
Wed Apr 28, 2021 5:20 pm
I started it but then realised the resolution wasn't ideal for the Atom...... :(
I'll have a look how far I got and upload it if you want, it was a snapshot.
IIRC there are some Atom converted parts in ...

Greetings
Kees
Thanks Kees! That will be really helpful to make sense of it all =D>
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Dave Footitt
Posts: 963
Joined: Thu Jun 22, 2006 10:31 am
Location: Abandoned Uranium Workings
Contact:

Re: Lode Runner (Electron)

Post by Dave Footitt »

Great job, and great choice of game. Absolutely loved Lode Runner and did briefly consider a NuLA rework of it, but I didn't think there were enough graphics in to make the effort worthwhile. Might be a bit easier now you've disassembled it though!
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

Dave Footitt wrote:
Sun May 02, 2021 10:29 pm
Great job, and great choice of game. Absolutely loved Lode Runner and did briefly consider a NuLA rework of it, but I didn't think there were enough graphics in to make the effort worthwhile. Might be a bit easier now you've disassembled it though!
Thanks Dave! When the disassembly is finished I will put it on GitHub.
I also hope this road will somehow lead me back to finishing Mountain Panic for the Electron one day :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

Question to anybody more familiar with the BBC Micro than I am.
I've disassembled this snippet of code from the BBC Micro version of Lode Runner.

Code: Select all

.readJoystick
                lda   #$00            
                sta   keysPressed
                sta   DDRB            ;set USER VIA Port B as Input
                lda   IRB
                eor   #$ff
                beq   checkMovementKeys ;no active inputs, so check keys instead
                sta   keysPressed
                rts
Is this in fact the standard way of reading a joystick on a Beeb or is something else going on here??
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
tricky
Posts: 5524
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lode Runner (Electron)

Post by tricky »

Is that matter compact?
It has the joystick on the user port.
The rest will have to start an and conversion and wait for the interrupt or just wait and then do the next channel/axis.
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

tricky wrote:
Tue May 04, 2021 9:39 pm
Is that matter compact?
It has the joystick on the user port.
The rest will have to start an and conversion and wait for the interrupt or just wait and then do the next channel/axis.
I just found it while disassembling Lode Runner. It could have been added later by someone, just like the protection code has been disabled in this version. Most importantly, I can remove this code from the Elk conversion I'm working on :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

I disassembled Lode Runner (BBC Micro version): https://github.com/0xC0DE6502/lode-runner-disassembled
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Snuggsy187
Posts: 214
Joined: Wed Apr 03, 2019 9:53 pm
Contact:

Re: Lode Runner (Electron)

Post by Snuggsy187 »

That's really quick work for such detailed notes ! :D =D> =D> =D>

I always get around 50% annotated, then lose the plot somehow (or get distracted with something else !). Always nice to see redundant cycle/bytes identified. Always tempting to deleted them, until you realise they're needed for timing and stuff like that ! No JMP (&6C) tables ? I find they're the biggest pain when disassembling ! You think you've found loads of unused code, then you find a JMP table :roll: :D
DROP PARCHMENT > POKE LOCK > PULL PARCHMENT > CURSE > BARGE DOOR > GO DOOR
User avatar
TobyLobster
Posts: 69
Joined: Sat Aug 31, 2019 7:58 am
Contact:

Re: Lode Runner (Electron)

Post by TobyLobster »

Excellent, nice work =D> =D> =D>
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

Thanks both! I'm now at the stage where everything in the source can be removed, moved, optimized, or whatever is needed because there are no hard coded addresses anymore. It's a relatively simple game so it's going fine so far!
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
jms2
Posts: 2948
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: Lode Runner (Electron)

Post by jms2 »

That's amazing disassembly and commenting work!

I must say this game really gets down to business doesn't it!... loads at &1900, executes at the start not somewhere in the middle, and goes straight into the main game loop with no messing about. I have never seen a game that starts off so "immediately" like that.
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

jms2 wrote:
Mon May 10, 2021 8:52 am
That's amazing disassembly and commenting work!

I must say this game really gets down to business doesn't it!... loads at &1900, executes at the start not somewhere in the middle, and goes straight into the main game loop with no messing about. I have never seen a game that starts off so "immediately" like that.
Thank you!

It doesn't go straight into the main game loop though. It does some initialisation, relocation, and there is even some disabled protection code.
See:

Code: Select all

                org     $5fd0
.init            lda     #$c8                            ;exec address of binary = &5FD0
                ldx     #$03
                jsr     OSBYTE                          ;*FX200,3
                lda     #$e1
                ldx     #$00
                jsr     OSBYTE                          ;*FX225,0 - ignores the function keys
                jmp     defineEnvelope
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
jms2
Posts: 2948
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: Lode Runner (Electron)

Post by jms2 »

Oh yes, I see now that the exec address is actually not at the start. I saw ".main JMP startgame" and thought that was the entry point!

Even so, having a tight main loop right at the beginning makes this a nice example for a beginner to look at.
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
oss003
Posts: 3467
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: Lode Runner (Electron)

Post by oss003 »

Nice job Kelvin .... did you have to change a lot except hiding the code on screen?

Greetings
Kees
User avatar
0xC0DE
Posts: 999
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lode Runner (Electron)

Post by 0xC0DE »

Thanks Kees! Moved most variables to zpage which freed up a lot of memory. Then moved a lot of data lower into memory. Removed things that depend on the OS (sound, keys). And added my own interrupt handler. Now I need to optimize sprite plotting and tilemap checking to gain more speed in MODE 1.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
Post Reply

Return to “new projects in development: games”