RAM expansion was a common topic in the Commodore 64 community in the 1980’s. Everyone seemed to need or want more RAM:
- Soon after the unit arrived in stores, Paul Bosacki published a way to upgrade the unit to 512kB
- Later, he pushed the expansion to 1MB
- Berkeley Softworks (later GeoWorks), jumped into the fray with the 512kB GeoRAM
- After the C128 arrived, Commodore got in the act, coming out with the 1700, 1764, and 1750 RAM Expansion Units, providing 128kB, 256kB, and 512kB of RAM, respectively.
- Lots of people soon determined all 17XX units could be upgraded to 512kB
- And, then, Andrew Mileski furthered that idea by piggybacking DRAM and pushing the 17XX to 2MB
Over time, RAM expansion options for the C64 have coalesced around two types: REU and GeoRAM. The REU is much faster, but the GeoRAM is easier to create and use.
Still, both suffer from a serious issue. Neither one makes RAM immediately available. Both contain RAM outside the CPU’s direct access. The Commodore REU can transfer memory from the unit to main system RAM around 1 million bytes/sec, while the GeoRAM has more humble speeds around 125KB/sec. Sometimes, though, one would like RAM to be instantly available.
Cartridges like EasyFlash and EasyFlash 3 map FLASH ROM directly into the C64 memory map to simplify writing cartridge data. Along those lines, it should be possible to map RAM directly into the C64 memory map as well, using the impressively capable and mysterious “Ultimax” mode.
- Treat the C64 memory map as 16 slices of memory, each 4KB in size.
- Allow the developer to select which portion of external RAM will “reside” in each 4kB slice.
- If the developer maps a slice of RAM, any read or write access to that RAM will trigger Ultimax mode and place the external RAM onto the system bus during a CPU cycle.
The functionality shares a lot with UltiMem, a product we offer for the VIC-20. But, the programmer can grow weary of manually configuring and reconfiguring each 4kB slice each time he/she wants to move to a different piece of RAM. For that, we should take a page from the C128 MMU and create the idea of a “mapping set”. A mapping set comprises 16 values, one for each slice of main memory. The C128 supports 4 different mappings, which makes the developer’s job easier. Set up the mapping and then just use it when needed.
So, let’s add a few more features:
- Support a “mapping set” of 16 values
- Support multiple mapping sets, which can be selected by storing a value into a specific register to denote the mapping set “ID”
Finally, though the Commodore REU may be too complicated to implement:
- Support GeoRAM registers for backwards compatibility
One should be wary of announcing success too early, but initial development shows this functionality is possible. At this point, the following functionality appears to be working:
- 512kB of SRAM
- GeoRAM register support
- Support for 128 “mapping sets”
- All memory slices except slice 0 and slide ‘D’ can reside externally
Of course, at this point, once something works, one needs to determine if anyone cares 🙂