BBC Micro Screen Viewer

I’ve Finally got my BBC Micro screen viewer working…mostly…ish. Whilst it’s not really massively useful to anyone, it was a brain exercise for me to understand how the Acorn Beeb got the 1s and 0s from the memory to the screen and made an interesting lunchtime project.

 

I started with a Beebem .uef snapshot/memory dump of BBC Micro game and then I read lots of webpages about where the screen info is stored in the Beebs memory.

 

Next I knocked up a simple proof of concept black and white bit viewer where you could manipulate the column width and row height of all of the 1’s and 0’s in the Beebs 32kb memory dump with the .uef header still attached.
I stepped through the memory until I found an area with something that looked like a black and white distorted version of the screen of the game that I’d taken the snapshot of.

 

I then did a lot of reading up on the Beebs memory map and on the different screen modes the Beeb had.
After finding out that the screen mode that the Beeb is running the game in is stored in the memory and which memory location it was, I made several different snaps of beebem in the same screen modes.
I wrote a program to step through each byte and list all of the locations that contained the same number as the screen mode the snapshot was in. Comparing this with the other snaps in the same mode, I was able to narrow the screen mode location down to one byte. As I knew where this byte was in the Beebs memory, I was able to then trim off the UEF header and leave just the 32kb of Beeb memory.

 

Whilst doing my research, I saw that the Beebs memory contained a lot of data in various locations about the screen properties and reading these properties from the snapshot, I was able to get a screen that looks spot on using a lot of different game snapshots.

 

bbc

There are still some issues with this program though.

1. It wont do multi mode displays.
2. Despite the screen start location being clear in the memory, the actual screen doesn’t always start here and sometimes some manual bit/byte stepping is required to get the screen correct.

Some very clever programmers of the day used some neat tricks to make a decent looking display fit into a smaller amount of memory so that the saved memory could be used for more game code and learning these tricks is taking a while….
e.g. the atic atac title screen displayed above uses double width pixels, so that you get a full screen full colour display but only use half the memory normally required. It was easy to spot this as normally a character is 8×8 pixels, 64 in total. You can calculate this from Beeb memory locations using “bytes per character” x “pixels per byte(+1)”. If the pixels are normal this will come out at 64. In the case above, it comes out as 32 and means that the pixels are stretched.
Ultimate used the stretched pixel method in several of their title screens however sometimes its easy to spot with the method above, other times a different method has been used to stretch them, one that’s not so obvious…

Anyway, good nerdy fun all the same and an interesting lil lunchtime coding project. Thats BBC Micro and ZX Spectrum memory to screen decodes done. Next…. Might take a stab at the Commodore 64…..

Leave a Reply

Your e-mail address will not be published. Required fields are marked *