Elite BeebAsm Source

Got a programming project in mind? Tell everyone about it!
Post Reply
User avatar
kieranhj
Posts: 677
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Elite BeebAsm Source

Post by kieranhj » Fri Jul 13, 2018 9:25 am

I thought it had been too long since I gave you any presents so here is an initial port of the BBC Elite source code from BBC BASIC to BeebAsm. It can be built on a modern PC development environment to produce binary identical exexcutables. Everything is in GitHub here: https://github.com/kieranhj/elite-beebasm.

Some caveats at this point:
  • The BBC Cassette source built for DFS has been ported for simplicity to begin with as it only generates two executables (loader and main game)
  • Python is required to complete the checksum and encryption parts of the build process previously done in BBC BASIC
  • The build process is brittle so modifications are not yet possible - the checksum & encrytions scripts are likely to fail due to hard coded symbols
  • The game source is still incredibly terse (i.e. unreadable) but is at least has one instruction per line (all 10,000 of them)
I am very open to PR's if anyone would like to improve the readability of the source files to add whitespace after the assembler instructions, rename the variables and labels to something more readable, identify and document important functions etc. I'm sure the non-Windows folks will want to improve the build process for Linux etc. as well, please do so.

Happy Friday everyone!
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

User avatar
kieranhj
Posts: 677
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Elite BeebAsm Source

Post by kieranhj » Fri Jul 13, 2018 5:19 pm

Quick update, I've improved the whitespace so assembler instructions are legible and all labels are on their own line. If anyone feels like identifying and renaming labels to something more meaningful then please feel free. :)
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

chrisn
Posts: 367
Joined: Sat Apr 19, 2014 11:31 am
Location: UK
Contact:

Re: Elite BeebAsm Source

Post by chrisn » Fri Jul 13, 2018 5:51 pm

This is great! =D> A while ago I started annotating some of the source code. Will dig out my notes and see if I can contribute anything.

tom_seddon
Posts: 127
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: Elite BeebAsm Source

Post by tom_seddon » Fri Jul 13, 2018 7:24 pm

Great stuff! I was going to do some stuff with the Elite code a couple of years ago, but the prospect of making it build on the PC was just too daunting, and the source was barely more comprehensible than a disassembly anyway.

I did convert the 2nd processor I/O code to dasm format, producing nearly byte-identical output to the file on the executive version disk - the differences were in some of the pregenerated tables (no obvious side effects). Shouldn't be hard to dig it out and make it build with BeebAsm... (I also got it building a useable loader, though I don't remember why and I'm not sure I bothered making that bit a byte-for-byte match.)

--Tom
Last edited by tom_seddon on Fri Jul 13, 2018 7:25 pm, edited 1 time in total.

User avatar
tricky
Posts: 2535
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Elite BeebAsm Source

Post by tricky » Fri Jul 13, 2018 10:42 pm

Thanks Kieran, top man (not the shop).

Post Reply