RAMWerks

An Apple II RAM Card Testing Program

The Central Processing Unit (CPU) at the heart of the Apple II computer is the MOS 6502. This 8-bit microprocessor (with a 16-bit address bus) was introduced in 1975 – a year before the Apple I computer. The 6502 can directly address up to 64 KB (65536 bytes) of Random Access Memory (RAM). The original Apple II could use 4 KB -48 KB of RAM with the upper 16K of memory reserved for device I/O and ROM (Read Only Memory).

When Apple released the 16K Language Card in 1979 (to support Apple II Pascal), the full 64K of memory became available as RAM. The Language Card was inserted into slot zero of the Apple II and used bank switching to select the ROM firmware or Language Card RAM in the 48K – 64K memory area. Initially Apple’s 16K Language Card was only available with the expensive Apple II Pascal system. However, many less expensive alternatives, such as Microsoft’s 16K RAM Card, soon appeared.

Apple II Language Card

As Apple II software applications became more complex, the 64K RAM maximum become a limiting factor for users who worked with large amounts of data. A number of third party RAM expansion cards were marketed that provided additional memory, using the bank-switching technology developed by Apple.

In 1981, Saturn Systems (later Titan Technologies) introduced the Saturn RAM Card. This peripheral card came in 32K, 64K and 128K configurations. The Saturn Card could be used in peripheral card slot zero, in which case the first 16K of RAM on the card was used as a Language Card. Alternatively, it could be used in any slot 1-7, if a Language Card was installed in slot zero. The Saturn Card came with software to support creation of fast RAM disks in DOS, Pascal and CP/M. It also provided software to relocate DOS and BASIC program data into the extra RAM, in both cases freeing up memory in the Apple II native RAM space.

Saturn 128K RAM Card

Several Saturn-compatible RAM cards soon became available. The RAMEX 128 card (below) from British company Vergecourt offered similar functionality to the Saturn 128 card.

RAMEX 128 Card

The Apple IIe (released in 1983) came with a new Auxiliary hardware slot that replaced peripheral card slot zero. The IIe Auxiliary Slot had been designed to support both bank-switched RAM and 80-column text display. Apple developed a 64K 80-Column Text Card (below) supporting both features on a single card.

Apple IIe 80 Column 64K Memory Expansion card

Applied Engineering (based in Carrollton, Texas) soon became a significant source of Apple II RAM expansion cards. Their RAMWorks series of cards extended the Apple IIe’s RAM into the megabyte range. The RAMWorks III card, installed in the IIe Auxiliary slot, added both 80-column text support and up to 1 MB of RAM, with an additional 2 MB of RAM possible via an optional expansion board. These cards were used primarily to create fast RAM disks supporting DOS, ProDOS, Pascal and CP/M at a time when external hard disks for the Apple II were quite expensive. The cards also came with software to expand the memory available to programs such as VisiCalc and AppleWorks.

Applied Engineering RAMWorks III Card

While the RAMWorks cards required an Apple IIe, Applied Engineering’s RAMFactor card could work in both the II Plus and IIe. Installed in any slot 1-7 (other than slot 3), this card contained firmware to automatically create RAM disks under DOS, ProDOS, Pascal and CP/M as well as firmware to allow partitioning of the card’s RAM across these operating systems. Apple sold a similar card, the Apple II Memory Expansion Card (also known as the ‘Slinky’). There is an interesting article in The Apple II Review (1986) comparing Apple II memory expansion options available at the time.

Applied Engineering RAMFactor Card
Apple II Memory Expansion (‘Slinky’) Card

There are number of modern RAMWorks card clones available. ReActiveMicro sells the RAMWorks IIII (below), a card that provides 80-column text display and 4 MB of additional RAM on the Apple IIe, using modern low-power components. This card is software-compatible with the original Applied Engineering RAMWorks III card.

ReActiveMicro RAMWorks IIII Card

Garrett’s Workshop designs, manufactures and sells the RAM2E card (below). This Apple IIe card is RAMWorks-compatible, offering up to 8MB of RAM and 80-column text display using modern, low power components.

Apple IIe RAM2E Card
RAMWerks 1

In 2023 I acquired a 1024K Applied Engineering RAMWorks III card (containing 32 x 256 kBit RAM chips) for my Apple IIe. The software Applied Engineering provided to test the memory on the card could not test modern RAMWork card clones containing more than 1 MB of RAM. I therefore decided to create an alternative RAMWorks memory test program, named RAMWerks 1.0, written in Apple II UCSD Pascal with a few assembly language ‘helpers’. Typically such programs are written entirely in Assembly language, as Pascal (by design) limits access to the underlying hardware. That being the case, I decided to model the RAMWorks-compatible cards as logical systems rather than hardware artifacts.

At the hardware level the original RAMWorks III Card (RW3) contains up to 32 DRAM Chips arranged into 4 Blocks (A,B,C,D). Each block can contain a maximum of 256K of RAM, for a card maximum of 1024K (1 MB). RW3 card blocks can have either 64K or 256K of memory installed, using 64kBit DRAM chips or 256kBit DRAM chips. Each RW3 block must be populated with DRAM chips of the same size. Each RW3 block must also be completely populated or empty. You cannot mix 64kBit and 256kBit DRAM chips within a block.

Logically RAMWorks-compatible cards consist of a number of 64K RAM banks accessed one at a time via bank-switching. For example, on a 1024K RW3 there are 16 x 64K banks. The Apple IIe ROM uses bank-switching to select whether the 6502 addresses the 64K bank of main motherboard memory or the single 64K bank of auxiliary memory available on the Extended 80 Column card . The RW3 firmware extended this functionality to select which of its 64K banks of auxiliary memory the 6502 addresses. The first 64K bank (Bank Zero) on the RW3 card is used to emulate an Apple IIe Extended 80 column card, supporting 80 column display and Auxiliary Memory (including HiRes graphics). The RW3 supports switching between 127 additional 64K banks on the card for a maximum RAM size of 8MB (8192K).

To test the memory on a RAMWorks card we test the first 64K bank functionally (testing both 80-column text display and hires graphics) and then create a RAM disk using the remaining 64K blocks. Testing uses a non-destructive block verification algorithm to write, read and verify the underlying memory. There are 128 x (512 byte data blocks) in a 64K RAM bank. As each bit of each data block is on a different DRAM chip we don’t test just read/write bit patterns but also test for ‘stuck bits’.

RAMWerks 2

In 2024 the RAMWerks software was extended to support testing of additional Apple II RAM card types: the RAMFactor / Apple Memory Expansion cards and Saturn-type memory cards. RAMWerks 2 scans the Apple II’s slots for compatible RAM cards and displays a list of installed cards that it can test.

RAMWerks 2 – Menu Screen

Version 2 of RAMWerks has been tested with RAMWorks III (Applied Engineering), RAMWorks IIII (ReActiveMicro), RAM2E (Garrett’s Workshop), RAMFactor(Applied Engineering), Saturn 128K (Titan Technologies), RAMEX 128K (Vergecourt). During this public beta test I hope that you will test RAMWerks with other RAM cards.

RAMWerks 2 has been tested on Apple II, II+ and IIe computers. It will adapt to 40 or 80 column displays and is compatible with 64K and 128K systems. The software will test RAM card memory sizes between 128K and 8MB (4MB max on RAMWorks cards – see below) and supports single pass and continuous pass testing of all RAM card types. The table below lists current RAMWerks 2 testing functionality and limitations for each RAM card type. RAMWerks 2 does not currently test Language Cards installed in slot 0 on Apple II or Apple II+ computers.

RAMWorksRAMFactorSaturn
SlotsAUX4,5,61,2,3,4,5 1
Min RAM128K256K128K
Max RAM4MB 28MB128K
Current RAMWerks 2 Limitations

1 RAMWerks will only display and test the first Saturn card found in the computer. 2 RAMWerks currently cannot test RAMWorks-type cards configured with more than 4 MB of RAM.

Entering a slot number displays information about the RAM card in that slot and an option to perform a single or continuous (multiple) pass test. The screenshots below demonstrates how this works for an 8MB RAMFactor card in slot 4.

RAMWerks 2 – 8MB RAMFactor Card Information
RAMWerks 2 – Testing an 8MB RAMFactor Card

When testing Saturn-type cards the interface is a little different, as the screenshot below (of a 40 column display) shows.

RAMWerks 2 – 128K Saturn Card Info (40 column display)
RAMWerks 2 – Testing a Saturn 128K Card (40 column display)

As each card memory block is tested, RAMWerks displays either ‘OK‘ (if the block passes all tests) or the total number of errors encountered when testing the block. If continuous testing is selected, then the cumulative block errors encountered are displayed when the user stops testing.

RAMWerks 2 – Testing a 4MB RAMWorks-Compatible Card

Testing consists of writing, reading and verification using two 512 byte block march patterns ($00 and $FF) sequentially across each 64K RAM bank on the card. On Saturn type cards, 16K RAM banks are used. Testing includes the following 6 steps for each 512 byte block of memory, with read / write error checking at each step:

Step 1Read 512 byte block data and store – R/W check
Step 2Write $00 bit pattern to each byte of the block – R/W check
Step 3Read 512 byte block & compare to $00 bit pattern – stuck bits?
Step 4Write $FF bit pattern to each byte of the block – R/W check
Step 5Read 512 byte block and compare to $FF bit pattern – stuck bits?
Step 6Write original 512 byte block data to block and compare – stuck bits?
Testing steps for each 512 byte memory block

RAMWerks completes a memory test of a 1MB RAMWorks or RAMFactor card in approximately 4 minutes and the test of a 4MB RAMWorks or RAMFactor card in approximately 16 minutes. A 128K Saturn card test takes approximately 4 minutes. While testing each RAM bank RAMWerks displays ‘??‘. When finished testing a RAM bank RAMWerks displays the number of errors encountered or ‘OK‘ if no errors occurred.

If you would like to help test RAMWerks, download the RAMWerks 2 disk using the link below. Insert the disk into Drive #1 and reboot. This is a work-in-progress. Please email your comments to me at RAMWerks@henrylowe.net.