MMU C64

Feel free to talk about any other retro stuff here including Commodore, Sinclair, Atari, Amstrad, Apple... the list goes on!
Travis Bryant moore
Posts: 124
Joined: Sun May 30, 2021 5:00 pm

MMU C64

Post by Travis Bryant moore »


Could a MMU have expanded the memory for the C64 and could have this allowed the c64 to use larger ram chips or roms through an mmu and could it have been added as an expansion cartridge. Though ultimate c64 uses fpga of the 6502 processor. And with much space left on the MEGA 65 I was thinking that mmu on a fpga could trick the ram or give a old 8 bit computer magical properties like one to two megabytes of memory. So I am going to say I must be wrong on this. Though some c64 products have access to sd cards or usbs. The goal of a mmu is to bank the memory addresses to make larger composite memory or have the ram read faster and write fast but as though it were as big as a hard drive with the mmu working as a memory manager between the hd, ram, and processor and keeping everything in order. ?

kelli217
Posts: 522
Joined: Sun Jul 05, 2020 11:27 pm

MMU C64

Post by kelli217 »


Are you familiar with the 1700, 1764, and 1750 RAM Expansion Units (REUs)?

They have MMUs.

They are in the form of expansion cartridges.

Scott Robison
Posts: 952
Joined: Fri Mar 19, 2021 9:06 pm

MMU C64

Post by Scott Robison »


The REU (RAM Expansion Unit) with its REC (RAM Expansion Controller) did this in a manner of speaking. The CPU can only access the same memory but it allowed DMA to very quickly copy memory between the main system and the REU. It's not an MMU in the same sense as the C128 MMU in that it never changes what memory the CPU sees, but it was pretty powerful nonetheless.

The real bottleneck for the C64 was its 64K address space. C128 had an MMU that allowed access to two 64K RAM blocks, but it made addressing the other bank somewhat awkward (you had to use relatively slow subroutines to JMP or JSR or load or store the "other bank". Still, it allowed some powerful tricks.

To add a real MMU to the C64 on an expansion cartridge would basically have to replace all the computing functionality of the C64, not unlike how the Turbo Chameleon or SuperCPU work.

TomXP411
Posts: 1761
Joined: Tue May 19, 2020 8:49 pm

MMU C64

Post by TomXP411 »



On 3/16/2022 at 11:58 AM, kelli217 said:




Are you familiar with the 1700, 1764, and 1750 RAM Expansion Units (REUs)?



They have MMUs.



They are in the form of expansion cartridges.



Actually, they are not RAM expansion cartridges, in the traditional sense. The REU does not allow direct access to its memory from the host system. Instead, the DMA controller in the REU copies data back and forth between system RAM and the REU quickly enough that you can pretend you have more memory, but applications are still using the host system's RAM. The host CPU never touches REU RAM. This really makes the REU a RAM Drive, not a true RAM expansion. 

On the other hand, the GeoRAM cartridge actually does map cartridge memory to address space on the host, giving you 512K of extra RAM, accessed through a 256 byte window at $DE00-$DEFF. And while GeoRAM does not have DMA features, it's actually a superior mechanism for actually expanding main memory.

An ideal system would actually have both: a mappable window into REU RAM, as well as a DMA controller to quickly move data around the system. It's unfortunate that no one has ever released such a product.


On 3/16/2022 at 11:30 AM, Travis Bryant moore said:




Could a MMU have expanded the memory for the C64 and could have this allowed the c64 to use larger ram chips or roms through an mmu and could it have been added as an expansion cartridge



Absolutely, it would. And yes, it could have been done as a cartridge - but with some limitations. 

Cartridges can't simply map memory "wherever" in the system. The Commodore 64's PLA (the chip that actually acts as a memory mapper) decides which chip is active when a specific address is set on the bus, and it has a fixed set of mappings available. Cartridge memory is allowed in certain places, including an 8K window that's always available, even when BASIC and the KERNAL are enabled. You can move that 8K window around on the cartridge,, though, so you could address as much memory as you want, 8K at a time. 

Of course, the expansion port also allows the cartridge to "take over" the system by flagging the DMA line. When this is done, the CPU and other components stop, and the cartridge has complete access to the system bus. During this time, the cartridge can do things like 1-cycle memory transfers, or even acting as the CPU and running a secondary process. (This how the 1541 Ultimate works when you press the menu button.)

 

 

Travis Bryant moore
Posts: 124
Joined: Sun May 30, 2021 5:00 pm

MMU C64

Post by Travis Bryant moore »


Thank you for the info. I like the idea " An ideal system would actually have both: a mappable window into REU RAM, as well as a DMA controller to quickly move data around the system. It's unfortunate that no one has ever released such a product. " If you had a memory mapper on Georam with REU ram and dma controller that was expandable. Would that make a memory management system? But would a 6502 need a new MMU instruction set for expanded memory manipulation?

Scott Robison
Posts: 952
Joined: Fri Mar 19, 2021 9:06 pm

MMU C64

Post by Scott Robison »



On 3/16/2022 at 3:09 PM, Travis Bryant moore said:




If you had a memory mapper on Georam with REU ram and dma controller that was expandable. Would that make a memory management system? But would a 6502 need a new MMU instruction set for expanded memory manipulation?



The way that the REU's REC chip and the 128's MMU chip work is just as IO devices. To control them you write bytes to their IO addresses.

Having native support in the CPU would make things easier to use in many cases. The 65816 has native support for 24 bit addresses, so it is more flexible in how extra memory can be accessed vs an REU. But it is not essential for a CPU to have native access to an MMU.

 

Travis Bryant moore
Posts: 124
Joined: Sun May 30, 2021 5:00 pm

MMU C64

Post by Travis Bryant moore »


Is the 65816 about the same as the Ricoh 5A22 used for the super nintendo? I wonder why no one made a 16 bit geobook using something similar.

Scott Robison
Posts: 952
Joined: Fri Mar 19, 2021 9:06 pm

MMU C64

Post by Scott Robison »



On 3/16/2022 at 3:45 PM, Travis Bryant moore said:




Is the 65816 about the same as the Ricoh 5A22 used for the super nintendo? I wonder why no one made a 16 bit geobook using something similar.



I think so, in that the SNES used a 65816 CPU core.

Travis Bryant moore
Posts: 124
Joined: Sun May 30, 2021 5:00 pm

MMU C64

Post by Travis Bryant moore »


https://en.wikipedia.org/wiki/Memory_management_unit  I looked it up on wiki and the MMU could address 2mb or more using some sort of pages and addressing memory to find store data on a page with algorithms for least used data so the most used data would be easier to access. I forgot I posted this page . I guess memory management units help systems use larger banks of memory. 

Travis Bryant moore
Posts: 124
Joined: Sun May 30, 2021 5:00 pm

MMU C64

Post by Travis Bryant moore »






 

Post Reply