Skip to content

ajgbarnes/bbc-micro-repton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repton

This is a disassembly of the Superior Software game Repton. Originally written by Tim Tyler in 1985.

This is an absolutely iconic game for the BBC Micro and Electron. And I have always been fascinated by this game and wanted to get inside its author's head who was 15 or 16 at the time he wrote it, hence... here we are.

You can play the game in your browser here at bbcmicro.co.uk

I do not hold the copyright to the original game, only the disassembly labelling and comments.

Feedback and comments are always appreciated to help preserve and understand the internals of this classic.

Maps are documented in the spreadsheet repton-maps.xlsx

Disassembly

I used the BeedDis by Phill Harvey-Smith which was fantastic.

I also used HxD for Window for inspecting the original binary and comparing my new one to it

And all editing was completed in Visual Studio Code and Simon M's excellent BBC Specific 6502 extension Beeb VSC

Building - Byte Identical

I use the rather excellent BeebAsm by Richard Talbot-Watkins and I compiled this on WIndows 10.

  1. Download the beebasm.exe into the same directory as your clone of this repository

  2. Run the following commands

beebasm -i repton1-commented.asm -di repton.ssd -do repton1.ssd

This generates REPTON1 - contains relocation routines and the main loading graphic

beebasm -i repton2-commented.asm

This generates a new REPTON2 - the main game file before EOR with $FF

python dirty_repton2.py

This replaces the REPTON2 file - the main game flie EOR'd with $FF

For now, manually add REPTON2 to the repton1.ssd file using e.g. BBC Explorer.

Note that when it compiles using this approach the binary files are byte identical to the original.

Building - Easier (And Without Obfuscation)

I use the rather excellent BeebAsm by Richard Talbot-Watkins and I compiled this on WIndows 10.

  1. Again download the beebasm.exe into the same directory as your clone of this repository

  2. Edit repton1-commented.asm and change the line of code from EOR $FF to EOR $00. This removes the de-obfuscation.

  3. Run the following commands

beebasm -i repton1-commented.asm -di repton.ssd -do reptona.ssd

This generates REPTON1 - contains relocation routines and the main loading graphic

beebasm -i repton2-commented.asm -di reptona.ssd -do repton1.ssd

This generates a new REPTON2 - the main game file which has not be obfuscated, and puts it into the same SSD image

Running the Game

  1. Run the file using beebjit created by Chris Evans(scarybeasts) using:

beebjit -0 repton1.ssd

  1. Shift+Break (F12) to run the compiled game

Devilishly Infuriating Music Only

To help me understand the in-game music code, I separated it out into repton-music.asm.

To build and run this:

  1. Using beebasm:

beebasm -i repton-music.asm -di MUSIC.SSD -do MUSIC1.SSD

  1. Load the disc into an emulator using beebjit using:

beebjit -0 MUSIC1.ssd

  1. Play the music using:

*MUSIC

  1. Enjoy...

Hope you can learn something from this disassembly and it inspires a project.

Loading Screen

alt text

Repton Sprites

alt text

Completion Screen

alt text

Andy Barnes Twitter: @ajgbarnes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published