×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library

65Dis A Risc OS Game Disassembler

Back to 8BS
Or
Return To On Line Magazine
By John Simpson 19/08/2005

Click here to download the program and an example disassembly of Chuckie Egg. CESOURCE.txt a disassembled version of Chuckie Egg, made using 65dis.

65dis is a BASIC V file that is run from the command line. Filetype is &FFB (Basic), the ",ffb" needs to be removed from the filename.

The command *65dis on its own gives help on how to use it. It expects files to be in proper BBC format with attributes for length, load address and exec address set. On RISC OS these are not usually set by default, so to set them I *load the file into an emulator and then *save it again with the right attributes. [On RISC OS the BBC emulators generally read and write natively to the host machine's ADFS drives]

65dis is rather crude in the way that it works, and very memory hungry. You need to set a Next slot of about 4MB to disassemble a typical game, before going to the command line and running it. It does have some nice features though:

- It automatically starts at the Exec address (read from the attributes) and "follows" any jumps or branches within the code, marking as data any regions which are never executed.

- You can give it a list of other start addresses, to cater for the situation where (for example) part of the code is entered via a vector and there is no jump or branch instruction to that location within the code.

- You can specify which processor to disassemble for

- It knows all the illegal opcodes

I developed it after getting frustrated with aodis on the PC, which just mindlessly disassembles anything it finds and produces lots of illegal opcodes, then gives up and fails to disassemble real code later on.

I hope someone finds it useful and that my rubbish coding is not too embarrassing.

John


 Back to 8BS
Or
Return To On Line Magazine