Skip to content

Latest commit

 

History

History
160 lines (90 loc) · 7.01 KB

README.md

File metadata and controls

160 lines (90 loc) · 7.01 KB

Jet Boat Disassembly

This is a disassembly of the Software Invasion game Jet Boat. Originally written by Robin J. Leatherbarrow in 1984. It's not perfect, I will massage it over time now I undertstand more, and it may contain some commenting howlers or grammar or spelling mistakes.

I did not intend to decompile and understand its inner workings until revisitng this game some 35 years on, wondering why it juddered all the time and was so unplayable. It turns out that there is an issue with my Analogue Joystick port on my old BBC Model B which creates constant noise - the code always checks both keyboard and joystick input (rather than just switching to the one that started the game). That's not a problem on good BBC Micro but is on mine and a Master Compact (that doesn't have an analogue port). I recompiled a version that disabled joystick support for the Master Compact, which can be found on StarDot.

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.

I probably need to review the commenting now I have been through all of the code. I learnt a great deal going through this code which was nicely structured by Robin.

I assume too that he had a tool to design the map and chop it into individual tiles. It wouldn't be too hard to write something similar now.

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

I used the BBC Micro User Guide and New Advanced User Guide as references - the versions that dv8 remastered after a huge amount of work. Invaluable.

And the BBC Micro Memory Map by John Ripley and J.G.Harston was absolutely invaluable.

Building

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 command - the jetnew.ssd image contains the basic loaders, currently required as the memory relocator overwrites the hard coded key values with whatever it finds in memory. If it's blank, you will not be able to control the boat.

beebasm -i .\jetboat-commented.asm -do jetboat-new.ssd -di jetnew.ssd

  1. I run it then using beebjit created by Chris Evans(scarybeasts) using:

beebjit -0 jetboat-new.ssd

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

Note that when it compiles the binary is byte identical to the original.

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

Things to do:

  • Revisit some of the code comments now I know more
  • Add the lap times to the README.md
  • Transfer the memory map from Excel into markdown

Generating the map

I wrote a node.js script to inspect the BBC Micro binary and generate the map from it. To run it, install node.js. I used 14.17.0 to develop this. Then:

  1. Ensure the Jet Boat binary is available and named jetboa1 - it should NOT be in an SSD
  2. Run npm install canvas - I might get around to putting in a package.json if I need more libraries
  3. Run the script using node generate-map.js (in the Powershell on windows you'll have to use node ./generate-map.js)
  4. Open the generated jetboat-map.png image file
  5. Enjoy!

There are four levels each with different colours as below. Each level has 11 laps with increasing hazards per lap. The lap times also reduce per level per lap until it becomes impossible to complete.

alt text

Generating the stage hazards

I wrote a node.js script to inspect the BBC Micro binary and generate the map for each lap with the additional hazards on each. To run it, install node.js. I used 14.17.0 to develop this. Then:

  1. Ensure the Jet Boat binary is available and named jetboa1 - it should NOT be in an SSD
  2. Run npm install canvas - I might get around to putting in a package.json if I need more libraries
  3. Run the script using node generate-map-with-hazards.js (in the Powershell on windows you'll have to use node ./generate-map-with-hazards.js)
  4. Open the generated jetboat-maplap-n.png image files (where n is 0 to 10)
  5. Enjoy!

Lap 1 - Standard ducks, boats and rocks

By default:

  • 2 boats
  • 14 ducks
  • 8 rocks

alt text

Lap 2 - Buoys

Addition of:

  • 6 buoys

alt text

Lap 3 - Islands

Addition of:

  • 3 islands

alt text

Lap 4 - Sea Monsters

Addition of:

  • 3 sea monsters

alt text

Lap 5 - Channel Markers

Addition of:

  • 9 channel markers (some in pairs)

alt text

Lap 6 - Yachts

Addition of:

  • 6 yachts

alt text

Lap 7 - Crocodiles

Addition of:

  • 6 crocodiles

alt text

Lap 8 - Sandbanks

Addition of:

  • 5 sandbacks

alt text

Lap 9 - Lighthouses

Addition of:

  • 5 lighthouses

alt text

Lap 10 - Wooden Rafts

Addition of:

  • 5 wooden rafts

alt text

Lap 11 - Gondolas

Addition of:

  • 6 gondolas

alt text

Andy Barnes