Disassemblies of BBC Micro Games
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
- Rich Talbot-Watkins
- Posts: 2054
- Joined: Thu Jan 13, 2005 5:20 pm
- Location: Palma, Mallorca
- Contact:
Re: Disassemblies of BBC Micro Games
Level7 has disassembled Hopper
http://www.level7.org.uk/miscellany/hop ... sembly.txt
I wrote to them to suggest it a month or so ago - completely impressed with the turnaround there!
Hopper is known to be one of at least two games that were written with Neil Raine's GOAL game framework, so presumably the whole bytecode engine is there. I wonder what secrets we will learn?
http://www.level7.org.uk/miscellany/hop ... sembly.txt
I wrote to them to suggest it a month or so ago - completely impressed with the turnaround there!
Hopper is known to be one of at least two games that were written with Neil Raine's GOAL game framework, so presumably the whole bytecode engine is there. I wonder what secrets we will learn?
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Added to list.
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
The Hunt (graphical text adventure from Robico Software) has been disassembled by Level7:
http://level7.org.uk/miscellany/the-hun ... sembly.txt
http://level7.org.uk/miscellany/the-hun ... sembly.txt
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Never realised this game was partially written in basic, one of the games I bought when I was a kid but sadly no longer have.TobyLobster wrote: ↑Sun Mar 12, 2023 8:18 am Level7 has disassembled Omega Orb:
http://level7.org.uk/miscellany/omega-o ... sembly.txt
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
- Cybershark
- Posts: 741
- Joined: Wed Jun 14, 2006 11:16 pm
- Contact:
Re: Disassemblies of BBC Micro Games
Yes, most of his earlier games - prior to him becoming the conversion king - were chunks of code which were handled by a BASIC shell.fizgog wrote: ↑Sun Mar 12, 2023 8:59 amNever realised this game was partially written in basic, one of the games I bought when I was a kid but sadly no longer have.TobyLobster wrote: ↑Sun Mar 12, 2023 8:18 am Level7 has disassembled Omega Orb:
http://level7.org.uk/miscellany/omega-o ... sembly.txt
Could've really done with that disassembly a couple of weeks back, when we were playing this on the High Score Challenge. Would be amazing to fix those energy-draining enemy explosions!
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Level7 has disassembled Cyborg Warriors (written by Tony Oakden, published by Superior Software):
http://level7.org.uk/miscellany/cyborg- ... sembly.txt
http://level7.org.uk/miscellany/cyborg- ... sembly.txt
Re: Disassemblies of BBC Micro Games
Level7 have disassembled Zalaga (Nick Pelling, Aardvark)
http://www.level7.org.uk/miscellany/za ... sembly.txt
http://www.level7.org.uk/miscellany/za ... sembly.txt
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Level7 has disassembled Arcadians by Nick Pelling (aka Orlando) http://www.level7.org.uk/miscellany/arc ... sembly.txt
Re: Disassemblies of BBC Micro Games
Well done Level7TobyLobster wrote: ↑Tue Jun 20, 2023 8:46 pm Level7 has disassembled Arcadians by Nick Pelling (aka Orlando) http://www.level7.org.uk/miscellany/arc ... sembly.txt
Another cracking disassembly of a great game by a beeb legend.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
Re: Disassemblies of BBC Micro Games
Your list is missing DASMFW (DisASseMbler FrameWork), which is a modern reimplementation of the old F9DASM for 6809, but now works for several CPUs, mostly Motorola and MOS (6502).TobyLobster wrote: ↑Sun Aug 08, 2021 9:05 pm Disassemblers:
* 6502Bench (SourceGen) https://github.com/fadden/6502bench/ (Windows only)
* bbc-disgo https://github.com/dave-f/bbc-disgo (Go based)
* BBC Disasm https://github.com/chriskillpack/bbcdisasm (Go based)
* BeebDis https://github.com/prime6809/BeebDis (Pascal based)
<<SNIP>>
https://github.com/Arakula/dasmfw
AFAICT, it works similarly to BeebDis, but with more processing and output formatting options.
You can give it a custom info file (several, actually) for your machine-specific memory map.
It's developed with Windows C++, but should compile easily on other platforms.
Disassembled code can be reassembled natively with Kingswood as65 assembler on Windows, but you can also define your own assembly directives, if you want to use something different.
I've spent a year on and off (190+ Commits so far) reverse-engineering Vic-20 Jetpac (6502) with DASMFW, AS65 and MAME Debugger, it works great, the only gotcha is that it doesn't have functionality for local variables (yet), but you can work around that.
https://github.com/phillipeaton/JETPAC_ ... etpacX.a65
Last edited by D-Type on Thu Jun 22, 2023 2:03 pm, edited 1 time in total.
P*h*i*l*l*i*p EEaattoonn in real life
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Thanks, added.
Re: Disassemblies of BBC Micro Games
Level 7 have done 3D Pool, clearly enjoying the Nick Pelling back catalogue at the moment
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Added, thanks.
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
Level 7 has disassembled Frak!
http://level7.org.uk/miscellany/frak-disassembly.txt
Links to all game disassemblies can be found in the initial post.
http://level7.org.uk/miscellany/frak-disassembly.txt
Links to all game disassemblies can be found in the initial post.
Re: Disassemblies of BBC Micro Games
Very nice work by Level7TobyLobster wrote: ↑Tue Aug 01, 2023 8:33 am Level 7 has disassembled Frak!
http://level7.org.uk/miscellany/frak-disassembly.txt
Links to all game disassemblies can be found in the initial post.
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
I was wondering if anyone is able to disassemble, or decrypt, the machine code DATA statements to Gordon Key's game listings?
- McBrolly (Micro User June 1987)
- Dune Hunter (Micro User November 1987)
- Block Breaker (Micro User April 1989)
There's another game I'm interested in 'studying', the game Wizard's Castle, from Micro User December 1985. This also contains some obfuscated machine code
Although I'm aware of the BBC Games Archive ability to disassemble games listed on their site, I find it difficult to see what's going on. In the case of Block Breaker, the supplied copy has been ready compiled, to decrease load time. Perhaps I can be pointed somewhere to help in how to figure out these displays?
I'm obviously aware of Key's earlier games, but these latter three have a quality to them that deserves a closer look (that said, this thread on McBrolly highlights one or two of its shortcomings, including that annoying bug that results in instant death when starting a particular level).
Thanks in advance
- McBrolly (Micro User June 1987)
- Dune Hunter (Micro User November 1987)
- Block Breaker (Micro User April 1989)
There's another game I'm interested in 'studying', the game Wizard's Castle, from Micro User December 1985. This also contains some obfuscated machine code
Although I'm aware of the BBC Games Archive ability to disassemble games listed on their site, I find it difficult to see what's going on. In the case of Block Breaker, the supplied copy has been ready compiled, to decrease load time. Perhaps I can be pointed somewhere to help in how to figure out these displays?
I'm obviously aware of Key's earlier games, but these latter three have a quality to them that deserves a closer look (that said, this thread on McBrolly highlights one or two of its shortcomings, including that annoying bug that results in instant death when starting a particular level).
Thanks in advance
Last edited by sa_scott on Mon Aug 21, 2023 9:19 am, edited 1 time in total.
--
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
Re: Disassemblies of BBC Micro Games
Those games with DATA statements ought to be relatively easy to disassemble, because it's possible to work out what each machine code routine is doing (from the context where it's called). However the built-in disassembly view won't be able to do it because the code is embedded as text. It will be necessary to run the routine which converts the text to hex values, and then use a disassembler on an emulated BBC (rather than on the site) to actually disassemble it.
In the case of Block Breaker, the code is in a "ready to disassemble" format so it should just be a case of scrolling past the BASIC until you hit the machine code. However, there's another problem - the disassembler doesn't know what's code and what isn't, so it doesn't know where the start of the code is. Because many 6502 instructions consist of one opcode and one data byte, it's possible to be offset by one byte, ie trying to interpret the data as code and the code as data. The online disassembly view isn't a great deal of help because of this issue (unless it has some clever features that I've yet to discover).
In the case of Block Breaker, the code is in a "ready to disassemble" format so it should just be a case of scrolling past the BASIC until you hit the machine code. However, there's another problem - the disassembler doesn't know what's code and what isn't, so it doesn't know where the start of the code is. Because many 6502 instructions consist of one opcode and one data byte, it's possible to be offset by one byte, ie trying to interpret the data as code and the code as data. The online disassembly view isn't a great deal of help because of this issue (unless it has some clever features that I've yet to discover).
Re: Disassemblies of BBC Micro Games
If one can extract the DATA statements, plus the decoder into an emulator, with a disassembler running, would that suffice?jms2 wrote: ↑Mon Aug 21, 2023 9:19 am Those games with DATA statements ought to be relatively easy to disassemble, because it's possible to work out what each machine code routine is doing (from the context where it's called). However the built-in disassembly view won't be able to do it because the code is embedded as text. It will be necessary to run the routine which converts the text to hex values, and then use a disassembler on an emulated BBC (rather than on the site) to actually disassemble it.
In the case of Block Breaker, the code is in a "ready to disassemble" format so it should just be a case of scrolling past the BASIC until you hit the machine code. However, there's another problem - the disassembler doesn't know what's code and what isn't, so it doesn't know where the start of the code is. Because many 6502 instructions consist of one opcode and one data byte, it's possible to be offset by one byte, ie trying to interpret the data as code and the code as data. The online disassembly view isn't a great deal of help because of this issue (unless it has some clever features that I've yet to discover).
I write that as if I know what I'm talking about. In terms of knowledge level, I'd like to get from this:
to this:
Bit of a tall order, granted
--
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
Re: Disassemblies of BBC Micro Games
Very simple for block breaker, took me 5 mins
1. save the ballbre file to disk
2. We can see the program relocates to 0e00, so for quickness use this https://www.white-flame.com/wfdis/ and load the program at 0e00
3. Look for the CALL statements in the basic program - note them down about 4 of them
4. Goto the locations in the above disassembler using "G" and then "SHIFT A" at that location
5. Repeat for the other CALLS, if they have not already been dissembled
6. You now have the disassembly to look at.
Hard part is knowing what the disassembly does
1. save the ballbre file to disk
2. We can see the program relocates to 0e00, so for quickness use this https://www.white-flame.com/wfdis/ and load the program at 0e00
3. Look for the CALL statements in the basic program - note them down about 4 of them
4. Goto the locations in the above disassembler using "G" and then "SHIFT A" at that location
5. Repeat for the other CALLS, if they have not already been dissembled
6. You now have the disassembly to look at.
Hard part is knowing what the disassembly does
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
- MillieTD83
- Posts: 179
- Joined: Mon Aug 24, 2009 6:53 pm
- Location: Thetford, UK
- Contact:
Re: Disassemblies of BBC Micro Games
"Everything else is poppycock! Isn't that so?"sa_scott wrote: ↑Mon Aug 21, 2023 2:33 pmIf one can extract the DATA statements, plus the decoder into an emulator, with a disassembler running, would that suffice?jms2 wrote: ↑Mon Aug 21, 2023 9:19 am Those games with DATA statements ought to be relatively easy to disassemble, because it's possible to work out what each machine code routine is doing (from the context where it's called). However the built-in disassembly view won't be able to do it because the code is embedded as text. It will be necessary to run the routine which converts the text to hex values, and then use a disassembler on an emulated BBC (rather than on the site) to actually disassemble it.
In the case of Block Breaker, the code is in a "ready to disassemble" format so it should just be a case of scrolling past the BASIC until you hit the machine code. However, there's another problem - the disassembler doesn't know what's code and what isn't, so it doesn't know where the start of the code is. Because many 6502 instructions consist of one opcode and one data byte, it's possible to be offset by one byte, ie trying to interpret the data as code and the code as data. The online disassembly view isn't a great deal of help because of this issue (unless it has some clever features that I've yet to discover).
I write that as if I know what I'm talking about. In terms of knowledge level, I'd like to get from this:
dog-scream.jpg
to this:
boffin-rimmer.jpg
Bit of a tall order, granted
REPEAT PRINT'"FOZZY!!!!! ";:UNTIL FALSE
BBC Master 128 w/MultiOS, PiTubeDirect, Econet, Datacentre+CF-IDE interface, Gotek
BBC Master 128 w/MultiOS, PiTubeDirect, Econet, Datacentre+CF-IDE interface, Gotek
Re: Disassemblies of BBC Micro Games
But seriously, thanks for breaking that down. I'll give it a gofizgog wrote: ↑Mon Aug 21, 2023 4:10 pm Very simple for block breaker, took me 5 mins
1. save the ballbre file to disk
2. We can see the program relocates to 0e00, so for quickness use this https://www.white-flame.com/wfdis/ and load the program at 0e00
3. Look for the CALL statements in the basic program - note them down about 4 of them
4. Goto the locations in the above disassembler using "G" and then "SHIFT A" at that location
5. Repeat for the other CALLS, if they have not already been dissembled
6. You now have the disassembly to look at.
Hard part is knowing what the disassembly does
--
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
Re: Disassemblies of BBC Micro Games
I disassembled the McBrolly code, but have not labelled everything. Looks like it does the sprite drawing at least.
Re: Disassemblies of BBC Micro Games
Marvellous! Thank you!TobyLobster wrote: ↑Mon Aug 21, 2023 9:52 pm I disassembled the McBrolly code, but have not labelled everything. Looks like it does the sprite drawing at least.
dis.asm.txt
Since Dino and Hunkie Egg were published earlier in 1987, it would be interesting to see if those (unobfuscated) assembly listings used similar code? Would help to disentangle further how it works?
--
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
Stephen Scott, Digital Media Muckerupper
Games: Androidz Redux, Headcase Hotel, Polymer Picker
www.sassquad.net
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact:
- TobyLobster
- Posts: 622
- Joined: Sat Aug 31, 2019 7:58 am
- Contact: