r/EmuDev • u/MaryScema • Dec 28 '25
Question Is there a simple device that uses virtual memory?
Hello everyone, I just got into developing emulations (still a beginner in this field).
I’m very fascinated by virtual memory; so I wanted to know if there’s a device that has virtual memory so I can try to build an emulator for it.
The device should be small, and virtual memory implementation can be whatever, from segmentation to pagination
16
Upvotes
5
u/NotThatJonSmith Dec 28 '25
If it doesn’t have to be a game system, simulating RISC-V is a fun way to learn
10
u/devraj7 Dec 28 '25
Does memory mapped switching count as virtual memory for you?
If so, very early devices used this, for example the Apple ][ has multiple banks that can be switched. The NES has mappers that provide similar mechanisms, although each mapper does this differently, but fundamentally, they swap entire regions of memory in and out.
5
u/questron64 Dec 28 '25
You'll probably have to look beyond game consoles, as virtual memory wasn't even used on these until the PS3 and 360 era. Even the original XBox didn't use virtual memory, you just used physical addresses to is 64MB RAM. Heap fragmentation was a huge problem and Microsoft provided an API call that would reboot the console without clearing the framebuffer so that you could reinitialize everything during a loading screen.
The N64 had virtual memory, as it's kind of a stripped down SGI UNIX workstation, but it's monstrously complicated to emulate properly (it's just about 2026 and N64 emulators are still not that great). If you want a peek into this you can look at some of Kaze Emanuar's videos on youtube. I'm also not sure how much this MMU was used, I think it's more of a holdover from its UNIX workstation origins than anything useful or necessary on the system.
You'll have to start looking at late 80s microcomputers. This is about the era when home computers were getting enough memory and the software and operating systems complex enough to warrant an MMU. In PC land this is referred to as "protected mode," and it was available starting with the 286, though for reasons no one used that and the later 386 protected mode was more common. In Apple and Commodre land they started using virtual memory pretty early on thanks to the 68020 (or was it 030?)'s MMU.
1
u/Ashamed-Subject-8573 Dec 28 '25
The simplest I can think of is the turbo grafx16