8

A common feature of later games released for the Acorn Electron was the use of screen memory to store game code. This was commonly known as screen "garbage", and can be seen on games like Exile.

I don't remember seeing the same effect employed on any BBC Micro games though. There's no screen garbage visible on the BBC Micro version of Exile for instance.

Both the Elk and the Beeb suffered from the same memory constraints, so why was screen garbage only a feature of games for the Electron? Was there a way of masking the use of screen memory for game code on the Beeb that programmers couldn't make use of on the Electron?

  • What is the Elk you mention in the third paragraph? A shortening of Electron? – Wilson Jul 26 '17 at 8:10
  • @Wilson Yes, Elk and Beeb are common shorthand terms for the Electron and BBC Micro respectively. Similar to how the ZX Spectrum was affectionately known as the Speccy. – pmarflee Jul 26 '17 at 8:41
  • 1
    Yars' Revenge did the same thing on the Atari 2600 to great effect. Brilliant use of constrained memory. :-) – cbmeeks Jul 26 '17 at 12:41
  • @cbmeeks The Atari 2600 is different to most other machines of the time, including the Electron, because it doesn't have a frame buffer. Updating the display involves writing code that is in sync with the electron gun of a CRT. With Yar's Revenge, Howard Warsaw needed a way to generate random data, but didn't have the resources left on the cart to do it. He then realised he could use the game's data as the source of this random sequence. An ingenious solution, but not the same problem as faced by programmers of the Electron. – pmarflee Jul 26 '17 at 13:14
  • @pmarflee right..not the exact same problem but similar enough. My point was that both systems didn't have much RAM so the developers used game data in the screen area to their advantage. – cbmeeks Jul 26 '17 at 13:18
8

Yes. The BBC has a Motorola 6845 generating its screen addresses. That's a flexible chip, with which the developer has wide control over screen sizing and placement.

The Electron has a custom ULA designed by Acorn to produce the same video address generation as the 6845 when configured in one of the built-in modes but its functionality is fixed.

So on a BBC you can create, say, a 30-column display instead of the default 40-column display and the hardware will never even inspect memory beyond those 30 columns. On an Electron you can select between 40-column and 80-column output but those are your only options. If the programmer can afford only 30 columns of game graphics then at least 10 columns of game code will also be visible.

Minor exceptions are: using the mid-display interrupt to change the palette, and doing a similar thing with the tape output interrupt. So in both cases you don't change the actual width or height of the display, but you opt to make a vertical region of it blank by virtue of mapping all palette colours to black.

The former is usually used to reduce the 256-line output to the 156 bottom lines. See Spycat, Sim City or many others. The latter is much more rarely seen because it's not as obvious and because it severely impedes audio generation, the same counter being used for tape output and for audio generation, but contributed the small amount of empty space at the top of Southern Belle and Northern Star.

  • So through clever manipulation of the 6845, BBC Micro game programmers could use part of the video memory to store game code, and instruct the display controller not to output its contents to the screen? – pmarflee Jul 25 '17 at 21:02
  • 2
    Yes; through manipulation of the 6845 developers could make the amount of memory used for video smaller, then use what they've freed up as they wish. It's a highly-configurable system for which Acorn picked some default options. Whereas for the Electron they reimplemented only exactly those modes, via completely different logic. The 6502 is the only shared component. – Tommy Jul 25 '17 at 21:13
  • (not including Mode 7, of course — that would have implied a real SAA5050 or at least a character ROM, neither of which is a good option for a machine designed to compete with budget micros) – Tommy Jul 25 '17 at 21:17
  • 3
    @pmarflee it looks like the code is just small; I happen to be the author of an Electron emulator and I just ran it with suitable breakpoints inserted and the game proper doesn't touch the palette registers or any other video register during play, and in any case I assure you my code isn't able to do anything other than a 40- or 80-column display. The main game is 85 tape blocks long, so around 21.25kb, pretty much exactly the amount of RAM available outside of the display. – Tommy Jul 26 '17 at 3:32
  • 1
    Interesting. I guess it was just well programmed. – pmarflee Jul 26 '17 at 6:44
2

Sorry for being vague, but I believe of of the beeb racing games (may be revs) hides some code on screen in the sky area. A couple of timer interrupts to change the pallet was much easier than the practically unknown at the time "virtical rupture".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.