Expansion - C64 to 256kB

Not rated 16,098

Circuit Image

The inputs of the 74LS153 chip were mixed, which caused the address block decoding to fail. Currently, there are two Commodore 64 units (one owned by the author and another by Pekka Pessi) where this expansion has been implemented, as well as four Commodore 128 units (two expanded by the author and the other two by Wolfgang Scherr and Matthias Kirchner from Germany). The expansion did not achieve commercial success, even though the banked concept is technically superior to the Commodore REU. Furthermore, one additional program now supports the expansion: a transfer system called prlink. The addition of memory significantly enhances the efficiency of the Commodore 64, allowing for a workaround of the slow disk drive by using a portion of the memory as a RAM disk. In 1986, when the original article was written, commercial memory extensions were not available in Finland. Although there were some in the USA, they were largely ineffective, providing only 64.5 kB of memory at a high price. Constructing the memory expansion independently was estimated to cost between 300-400 Finnish marks, with one American dollar equivalent to five or six Finnish marks. The author built their expansion in March 1993 at a cost of 111 FIM, which could have been reduced by about 20 FIM. The design aimed to ensure compatibility with as many programs as possible, meaning the memory map could not undergo radical changes. After a reset, the computer remains nearly indistinguishable from an unexpanded version. The external appearance of the machine does not reveal the expansion, as Pekka required the expansion port for his IEEE-488 interface cartridge, which he also designed. The memory expansion is constructed on two add-on cards, and since the motherboard remains intact—no traces are cut—the expansion can be removed without soldering. The design focused on hardware that supports programming. While developing the RAM disk program, Pekka modified the hardware several times until he achieved satisfactory results. The relevant document can be retrieved in PostScript or LaTeX format via HTTP or anonymous FTP from FTP.FUNET.FI in the directory /pub/cbm/documents/projects/memory/c64/256kB. The processor of the Commodore 64, the MOS 6510, features an 8-bit data bus and a 16-bit address bus, allowing it to address only 64.5 kB of memory at any given time. Most 8-bit computers are limited to this 64 kB memory capacity. To add memory beyond this limit, the solution involves dividing the memory into banks of no more than 64.5 kB, which can be switched on and off. Some processors include a special circuit for this purpose, enabling the executing program to reside in one 64.5 kB bank while the processed data exists in another bank. For instance, the MOS 6509, a counterpart to the MOS 6510, operates in this manner, facilitating access to one megabyte of memory. The Commodore 128 employs a more advanced chip, the MOS 8722 MMU (Memory Management Unit), which allows activation of one 64.5 kB memory bank from a total of two banks at any given time. The expansion divides the 256.5 kB of memory into sixteen blocks of 16 kB each, with the processor capable of addressing up to four of these blocks simultaneously. Each group of four 16.5 kB segments of the address space can be mapped to any of the 16.5 kB blocks.

The schematic of the memory expansion circuit for the Commodore 64 is designed to integrate seamlessly with the existing architecture of the computer. The 74LS153 chip, functioning as a dual 4-to-1 multiplexer, is critical for the address decoding process. In the event of mixed inputs, the chip's output may fail to correctly identify which memory bank to activate, leading to operational failures. Therefore, ensuring correct input configuration is paramount for the functionality of the memory expansion.

The memory expansion consists of two main add-on cards, which house the additional memory chips and the necessary logic to manage bank switching. Each card is designed to fit within the existing expansion slots of the Commodore 64 without requiring any permanent modifications to the motherboard. This modular approach allows for easy installation and removal, catering to users who may wish to revert to the original configuration.

The memory management logic employs a series of address lines that connect to the MOS 6510 processor, ensuring that the expanded memory is mapped correctly within the 64.5 kB addressing limit. The design incorporates a bank switching mechanism, whereby the processor can select which 16 kB block of memory is active at any given time. This is achieved through control signals generated by the 74LS153, which interpret the address lines and enable the corresponding memory bank.

In addition to the basic memory expansion, the circuit includes provisions for a RAM disk feature, allowing users to utilize part of the expanded memory as a high-speed storage solution. This feature is particularly beneficial for alleviating the bottleneck caused by the slow disk drive of the Commodore 64, enhancing overall system performance.

Overall, the design of the memory expansion for the Commodore 64 adheres to principles of compatibility and efficiency, ensuring that users can enhance their systems without compromising functionality or performance. The careful consideration of the existing architecture and the use of modular components make this expansion a valuable upgrade for users seeking to maximize the capabilities of their Commodore computers.The inputs of the 74LS153 chip were mixed, which caused the address block decoding to fail. By now, I know of two Commodore 64 (mine and Pekka Pessi`s) where this expansion has been built, and of four Commodore 128s (of which two expanded by me, and the other two by Wolfgang Scherr and Matthias Kirchner from Germany). The expansion never became a success, although the banked concept is technically better than e. g. the Commodore REU. Meanwhile, there is one more program that supports the expansion: my transfer system prlink. Commodore 64 becomes remarkably more efficient by adding memory to it. Then the worst slow-down, incredibly slow disk drive, can be worked around by using a part of the memory as a RAM disk. In 1986, when the original article was written, there were no commercial memory extensions for sale in Finland.

(Commodore`s RAM Expansion Units came to our market in the year 1987. ) Of course there were some in the USA, but they were quite useless, as they had only 64 ½kB of memory, and the price was high as well. When built by oneself, the following memory expansion should have costed 300-400 Finnish marks. One American dollar (USD) is equivalent to five or six Finnish marks (FIM). I constructed my expansion in 1993 March, and it costed 111 FIM. It could easily have been about 20 FIM cheaper. Many goals were set to the expansion. As many programs as possible should work also with it installed. This means that there could not be any radical changes to the memory map. The address space of an expanded machine really remains same for a usual programmer. After reset, the computer doesn`t differ from an unexpanded one practically at all. Even taking a look at the machine from outside doesn`t reveal the expansion, as Pekka needed the expansion port for his IEEE-488 interface cartridge, also designed by himself.

The memory expansion is built in the machine on two add-on cards. As the mother board remains the same - no traces are cut - the expansion can be removed without a soldering iron. The design aimed to a hardware that supports programming. While making the RAM disk program, Pekka changed the hardware several times, until he was satisfied with it.

You can retrieve this document in PostScript or LaTeX format via HTTP or anonymous FTP. The files are at FTP. FUNET. FI in the directory /pub/cbm/documents/projects/memory/c64/256kB. The processor of Commodore 64, MOS 6510, has an 8-bit data bus, and its address bus is 16 bits wide. Like other 8-bit processors, it can address only 64 ½kB of memory at a time. In most 8-bit computers, the memory is limited to these 64 kilobytes. How could one add memory above this limit The solution is simple: the memory is divided into banks of no more than 64 ½kB, which are switched on and off. Some processors have been added a special circuit for this purpose, in which case the executing program can be in its own 64 ½kB bank and the processed data in another bank.

For example, MOS 6509, a fellow processor of MOS 6510, works in this way, enabling access to one megabyte. The Commodore 128 uses a sophisticated chip, MOS 8722 MMU (Memory Management Unit), which lets you to activate one 64 ½kB memory bank of a total of two memory banks at a time.

Our expansion divides the 256 ½kB of memory to sixteen blocks of sixteen kilobytes each. The processor can address up to four of them at a time. Every four 16 ½kB segment of the address space can be mapped to any 16 ½kB block. Figure 1 shows the mapping right after startup. However, the video 🔗 External reference