RAM expansion unit

from Wikipedia, the free encyclopedia

Under RAM Expansion Unit ( REU ) are understood in the broadest sense, a memory expansion in the form of an extension card or module. The term is mainly used for memory expansions from Commodore for their home computers C64 and C128 .

The Commodore REUs for the home computers C64 and C128

A REU 1764 with utility disk and a stronger C64 power supply unit

introduction

The memory expansions produced by Commodore for the C64 and C128 ("RAM Expansion Units", "REUs" for short) are plug-in modules that can be plugged into the so-called "Expansion Port" of these home computers.

In 1985, the REUs were presented at the Consumer Electronics Show (CES) in Chicago . Originally developed for the C128, however, all REUs can also be operated on the C64 without restrictions (even if "C128 RAM EXPANSION" is explicitly stated on the circuit board of these plug-in modules). Since the "smaller" C64 can cause problems during operation due to the slightly higher power consumption compared to normal plug-in modules, a slightly more powerful C64 power supply was recommended and included with the 1764 model. This power supply is by no means, as is often assumed, rare. In practice, you can get it en masse on every flea market or even on well-known online auction platforms. The power supply of the C128, on the other hand, is already sufficiently large so that there are normally no problems with it.

The REU is a kind of external RAM disk that can be accessed from the computer, but not directly. This is due on the one hand to the fact that the C64 only has 64  Ki B address space , and on the other hand to the lack of support for REU in BASIC V2.0 or Kernal of the C64. In particular, the free BASIC memory of the computer is not automatically expanded. As a result, the REU can only be used by programs that explicitly implement memory access routines for the REU.

Technical data and functionality

On the surface, the three storage extensions only differ in their storage capacity. There are three different REUs:

  1. the Commodore 1700 with 128 K B (contains sixteen 64-K bit RAM chips)
  2. the Commodore 1764 with 256 KB (contains eight 256 KBit RAM chips)
  3. the Commodore 1750 with 512 KB (contains sixteen 256 KBit RAM chips)

The RAM chips are so-called dynamic RAMs (DRAMs) , which typically have to be refreshed at regular intervals so that they do not lose their content. This is done automatically from the computer. If you switch off the computer, all data stored in the REU will also be lost. Since the external memory cannot be addressed directly from the computer, an interface must exist through which one can read from the memory and write to the memory. This interface is formed by a DMA chip manufactured by MOS Technologies , the MOS 8726, also known as REC (RAM Expansion Controller). Using special registers ($ DF00- $ DF0A), which are displayed in the main memory of the C64 / 128 and which can therefore be accessed directly from the C64 / C128, the REC is informed which area of ​​the main memory is to be stored in which area REU (and vice versa) has to move.

Thanks to this DMA chip, the CPU does not have to transfer each byte individually from or to the REU (which requires several cycles for reading, writing and incrementing / comparing the end address during a copy process), but only two addresses (source address and destination address) and the size of the area to be transferred (in bytes) must be specified ( direct memory access ). The REU's DMA chip does the rest by itself: the number of clock cycles for the operation (apart from special bus cycles of the VIC II , where the DMA controller also has to wait) corresponds to the specified area (maximum 64 KB) is therefore multiple as fast as running on CPU. Compared to the bank-switching method of other memory expansions (e.g. GeoRAM ), where the memory is available immediately after selection via a bank-select register, it is still slower to access memory data - for For certain applications (see below) this is not a disadvantage, because the data would have been moved or compared in the memory anyway and the DMA controller can do this.

The DMA chip has 4 functions:

  • Fetch : data transfer from the REU to the computer
  • Stash : data transfer from the computer to the REU
  • Swap : Exchange of memory contents between the computer and the REU
  • Verify : Comparison of memory contents between computer and REU

The data transfer takes place at approx. 1  MB per second. By fixing the source and / or destination address, further functions are possible, including a. fast filling of memory areas (useful for graphic functions) or special graphic effects.

Increase in storage capacity

Theoretically, the REUs can be upgraded to 16 MB RAM, in practice, with some tinkering, 2 MB is realistic.

  • ... to 512 KB:

A 1700 or 1764 REU can be increased to 512 KB with a little effort. You then have a memory expansion that (unlike the 2 MB REU mentioned below) is 100% compatible with a 1750:

With the 1764 you only need 8 ICs of type '41256'. These are soldered into the eight slots that are not yet used on the board.

The 1700 requires 16 ICs of type '41256', which replace the existing ICs of type 4164. In addition, the jumper (J1) on the back of the REU board must be cut. (This is not necessary with the 1764 because it is already set in the factory.)

  • ... on 2 MB:

With a relatively high amount of tinkering, you can expand a REU to 2 MB: You need a 1750 with 512 KB or a 1700 or 1764, which was expanded to 512 KB with the help of the above instructions. The REU is then no longer 100% compatible with an original REU in 2 MB mode, but it can be reset to the original 1750 mode (512 KB) with a switch if problems arise.

Software for the REU

In contrast to the BASIC V2.0 of the C64, the BASIC V7.0 of the C128 already contains fairly comfortable commands for reading out or writing to the external RAM. These are the commands FETCH, STASH and SWAP, which fetch data from the REU, write to the REU and exchange data between the REU and normal C128 RAM. However, these commands still work with raw memory addresses, direct use of the REU memory, for example for storing BASIC programs or variables, is not easily possible.

With the C64, POKE or PEEK must be used instead , or machine programs must be written straight away , which is much more complex and, above all, uncomfortable.

Apart from the commands already built into the BASIC of the C128, there are also programs that use the special capabilities of the REU, such as E.g. floppy disk copying programs (floppy disks only need to be inserted once for reading and once for writing), assembler (programs can be tested immediately without going through saving on a floppy disk), a whole 1541 - or 1571 - Floppy disk can find space in the memory of a correspondingly large REU, etc.

The GEOS operating system can use a REU of its own accord without the need for additional software. Later GEOS versions also made it possible to use it as a disk cache . The CP / M operating system supplied with the C128 uses the REU as a RAM disk.

The "Globe" demonstration from the REU test / demo disk

Commodore also supplied a test / demo diskette with their REUs. It contained the program "RAMDOS", with which the REU can be addressed from BASIC like an extremely fast floppy disk drive. It also contains programs with which the REU can be tested. This also includes the then technically amazing "Globe" demonstration, which shows a large, rotating globe on the screen of the C64. A complete revolution of the globe takes a little longer than a second. The animation consists of 36 "high-resolution" graphics (300 × 200 pixels), which are loaded individually from diskette at the beginning of the demonstration and then temporarily stored in the REU (together they would not completely fit into the main memory of the C64). From there, with the help of the REU, they are copied directly into the graphics memory of the C64 so quickly that the impression of a rotating globe is created.

There is an unused installation point for a ROM chip on the REU board . It is assumed that a variant of the above-mentioned RAMDOS program should be installed there (hypothetically called "ROMDOS"), so that no loading from diskette would have been necessary. It is unclear why this was ultimately not done.

See also

Web links