The universal 6502 RAM/ROM Expansion

This expansion was intended to give your PET or CBM computer 32kB RAM and 128kB FlashROM with many configuration options on a small board that mounts in the 6502 socket. Thanks to the use of a programmable logic chip the expansion now supports other 6502 based systems as well: currently the Commodore VIC-20 computer and many Commodore disk drives with a single 6502 CPU.

Support for other systems is possible, if their memory map is simple enough: RAM and ROM can be mapped in chunks of 2kB only.


Hardware information
Personality Chips
Flash Software


PET/CBM computers:
VIC-20 computers:
Disk drives:

Building the hardware

The PCB is double sided and requires advanced skills to be built. The layout files were created with Cadsoft's Freeware version of Eagle 4.09 and can be downloaded here. The file contains layouts and schematics for other projects, too. You can also buy the PCBs from me, just visit the order page.

The following components are needed, please see the construction page for building instructions.
socket adaptor
recommended: two 20 pin SIL adaptor rows part layout
you should already have this chip, it is in the
socket where you want to install this board.
IC2 1M FlashROM 
(DIL32, 5V only, "page write")
AT29C010A recommended, also
supported are W29EE011 and W29C011A.
27C256 and 27C512 EPROMs will also
work, if you can program them.
IC3/IC3a 256k SRAM e.g. 62256 (DIL28-3, DIL28-6, SOIC)
IC4 GAL16V8 (memory decoding)
IC5 74HCT245 (bus transceiver)
IC6 74HCT157 (multiplexer for banking lines)
RP1 4.7k resistor pack (9 resistors in 10 pin package)
100nF capacitor

S1 DIP switch (9 switches for configuration)

IC sockets
at least one 40 pin and one 32pin socket
are needed to make space for IC5 and IC6.
Sockets for IC3 and IC4 recommended.

Personality Chips

The hardware is versatile enough to be able to work in a lot of different 6502 based computers and peripherals. With the help of a programmable logic chip the memory mapping can be set in steps of 2kB, and modes like read/write, read only, write only, or write through are possible.

So far there are personality chips for the following 6502 systems: Commodore CBM/PET, Commodore 1541/1571 disk drives, Commodore VIC-20. You can download the configuration guide and the source files for the GAL chips in the download section below.

Flash Software

Each target system needs its own version of a flash program, but there are some common points which I will describe first.

The flashmode jumper S1 will put the hardware into a state where it is possible to write to the Flash ROM, which is normally write protected. There are two levels of write protection: The hardware jumper S1, and a software write protect that is part of the Flash chip. This way the probability is very low to corrupt the contents of the Flash ROM even if the hardware write protect is disabled. Also, the option ROM jumpers S6 and S7 will get a new function: they control the bank where the ROM image is written to. This way the system can run firmware from one bank and flash another firmware into another bank.

Important note: In spite of the software write protection it is not a good idea to run the system with the flashmode enabled. This is because any write to the Flash chip will put it into a special mode where normal reading does not work anymore, which effectively makes your computer crash, if you currently run your firmware from this chip. Unfortunately some firmwares contain bugs that cause writes to the ROM, e.g. the VIC-20 KERNAL ROM and the Speeddos-ROM for the 1541. Fixed ROMs for the VIC-20 are included in the ROM archive below, see the discussion on cbm-hackers about details on the fix. A fixed Speeddos-ROM can be downloaded from

There are flash programs for the PET and for the VIC-20, but both are still missing a user interface. Get them from the download section below. There are separate versions to flash the option ROMs and the firmware ROMs, and the images to be flashed have to be loaded to specific areas in RAM first:

PET, option ROM $9000-$AFFF: load 8kB image to $1000.
PET, firmware ROM $B000-$FFFF: load 20kB image $1000. Note that the I/O area ($E800-$EFFF) will be ignored.
VIC, option ROM $A000-$BFFF: load 8kB image to $2000.
VIC, firmware ROM $C000-$FFFF: load 16kB image to $2000.

Since the flash programs are assembled with padding bytes that fill the space to the data area, the flash programs can be easily concatenated with the raw binary data on a PC and then transferred to the target machine, e.g. with the C2N232 device. Here's an example file that takes the name of the input file and sends it to the PET:

flash.bat: (usage: flash romfile.bin)
copy /b petromflash.prg + %1 flash.prg
c2nload -c com2 -m pet flash.prg

On the PET, the PET can be put into flashmode before sending the file, on the VIC-20 (due to its ROM bug), the program must be loaded with flashmode switched off. After the program has loaded, just switch on flashmode and then issue a RUN command.

New: Marko Mäkelä wrote an improved flash program for the PET and VIC20 platforms. You can find it on Funet. Thank you very much, Marko! This program is easier to use and more powerful than mine, a very recommended download.

The flash software for disk drives is very different, I put its description to a separate page.



Thanks go to:


If you have questions about this project,  you can mail me: please visit my contact page.