Top Qs
Timeline
Chat
Perspective

Shadow RAM (Acorn)

From Wikipedia, the free encyclopedia

Remove ads

Shadow RAM, on the Acorn BBC Micro, Master-series and Acorn Electron microcomputers is the name given to a special framebuffer implementation to free up main memory for use by program code and data. Some implementations of shadow RAM also permit double-buffered graphics.

Background

The BBC Micro, Master-series and Electron machines use the 8-bit 6502 and 65C102 processors with a 16-bit address space. This address space is split into 32 KB RAM (0x0000 to 0x7FFF), 16 KB sideways "paged" address space (0x8000 to 0xBFFF) and 16 KB operating system space (0xC000 to 0xFFFF). Video or screen memory is typically allocated from 0x7FFF downwards as necessary, occupying as little as 1 KB for Teletext mode 7 (and thus the region from 0x7C00 to 0x7FFF), or as much as 20 KB for modes 0-2 (and thus the region from 0x3000 to 0x7FFF). Thus, screen memory can therefore occupy a considerable amount of the available directly-addressed 32 KB RAM.

Remove ads

Overview

Summarize
Perspective

Shadow RAM is a block of RAM that can be considered to reside in parallel to the normal memory map and is accessed by the system only under certain conditions. When shadow RAM is enabled, the memory region normally used for screen memory becomes available for BASIC program use and for applications employing officially documented operating system interfaces. Given the maximum requirement of 20 KB for screen memory with the systems concerned, this amount of RAM is provided as shadow RAM.[1]

Shadow RAM was fitted as standard on the BBC Micro Model B+ and on the BBC Master series, but was an optional feature provided by third-party expansions on earlier BBC Micro systems and the Acorn Electron. The Aries-B20 product, initially sold by Cambridge Computer Consultants,[2] offered 20 KB shadow RAM for the BBC Model B, transparently diverting non-framebuffer accesses to the shadow RAM for addresses in the 20 KB video memory region.[1] The Master RAM Board, made by Slogger, offered similar functionality for the Electron.[3]

In systems based on the BBC Model B+, like the Acorn Cambridge Workstation, the screen memory can reside in either conventional RAM or shadow RAM. A programmable array logic (PAL) chip controls access to memory and exposes the screen memory to the CPU by redirecting memory accesses to the appropriate memory locations. When shadow mode is enabled, the PAL chip monitors the addresses of instructions fetched by the CPU, and where such instructions have been fetched from a range of memory from 0xA000 to 0xAFFF or from 0xC000 to 0xDFFF, they are considered to be part of the VDU drivers that may access the screen memory.[4]

Consequently, all memory accesses performed by instructions fetched from these VDU driver regions that then access memory in the range 0x3000 to 0x7FFF are considered to be accessing screen memory, and the PAL chip asserts a signal to select the "shadow" 20 KB memory bank for such instructions so that they may read from or write to the screen. All other RAM accesses while in shadow mode are directed towards a contiguous region of RAM from 0x0000 to 0x7FFF, if exposed) that does not host the screen memory. Meanwhile, in non-shadow or "normal" mode, this same contiguous region does host the screen memory, as is the convention in the traditional BBC Micro architecture, and the shadow memory is not accessible.[4]

Extra RAM

The Model B+ provides 32 KB of additional RAM, with 20 KB used to shadow the screen memory. The remaining 12 KB can be made available in the memory region associated with sideways RAM (from 0x8000 to 0xAFFF), but the operating system does not recognise applications installed in this memory precisely as it would for conventional sideways RAM.[5] This "private RAM" can be controlled independently, and since part of it coincides with the regions associated with VDU drivers, it provides a "killer feature" for games or other applications wishing to write to the screen memory directly in shadow mode, utilising their own fast routines instead of the more general, but slower, operating system routines.[6]

Subsequent expansions for the BBC Model B also augmented the shadow RAM with additional RAM that could be used for other purposes. For instance, the Aries-B32 product permitted shadow/sideways RAM combinations of 20 KB/12 KB and 16 KB/16 KB, or the use of the 32 KB RAM as two sideways RAM banks.[7]

The Slogger Master RAM Board offered a 32 K RAM solution for the Acorn Electron alongside a "turbo mode" enhancement.[3] The additional RAM provided in this solution was exposed as a print buffer by Slogger's replacement operating system ROM, but exposed this RAM at the base of the memory map (from 0x0000 to 0x2FFF), thus supporting the turbo functionality – independent, accelerated memory access within that lower region – within shadow mode. Indeed, all of the RAM provided by the Master RAM Board was "fast RAM", accessed by the CPU at 2 MHz.[8]

Remove ads

BBC Master Implementation

Summarize
Perspective

Unlike the expansion boards for earlier systems, the BBC Master implementation of shadow RAM permits the selection of either shadow memory or main memory for use as screen memory, this being done via the Access Control Register.[9] By switching between main and shadow memory on alternate frames, double-buffered video could be used. Acorn provided a demonstration program in BASIC showing scrolling cloud animation with and without double buffering. The video game Firetrack would also use double buffering if shadow RAM was present.

On the BBC Master (and also the BBC Model B+[10]), shadow RAM is activated by setting the most significant bit of the memory mode number. For example, to use mode 1 with shadow RAM enabled, mode 129 (128 combined with 1) is selected.

Another significant difference between the Master implementation of shadow RAM and previous implementations also offering 32 KB of shadow RAM is the allocation of the extra 12 KB beyond the 20 KB shadowing the screen memory. Instead of this memory occupying a single region from 0x8000 to 0xAFFF in sideways RAM space, as it does with the Aries-B32 product and the BBC Model B+, it instead occupies two regions in the Master as "private RAM": a 4 KB region from 0x8000 to 0x8FFF holding function key definitions, workspace for the operating system, and character and font definitions; an 8 KB region from 0xC000 to 0xDFFF holding paged (sideways) ROM and operating system workspace. Thus, the Master was able to support character set redefinition and to allocate memory to filing systems without the amount of available user RAM being reduced.[11]

Patent Dispute

A dispute arose between the designers of the Aries-B20 shadow RAM board (Aries Computers Limited) and two other companies offering similar products, Raven Micro Products and Watford Electronics, over the alleged infringement of patent GB2137382A describing techniques employed in the design of the Aries-B20 board.[12] The products involved were the Raven Micro Products (Raven-20) and Watford Electronics (32K RAM Expansion Board). Ultimately, in 1986, Watford Electronics acquired Aries Computers in a "five figure deal" including the patents involved, with Watford subsequently selling Aries' products alongside the company's own.[13]

Remove ads

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads