Running A Game On A PC With No System RAM

As a clear sign of how desperate these RAMpocalypse times are becoming, we have [PortalRunner] over on YouTube contemplating how to run modern-day software on a PC that has no sticks of that most precious PC-related commodity that is not printer ink. What fallbacks do we have when purchasing some sticks of DDR5 is inconceivable due to budgetary limitations or chronic sticker shock symptoms? As it turns out, quite a few.

Of course, it should be noted up front that none of these options are particularly good or desirable. The video starts with simply trying to push Linux to see how little RAM it really needs using boot arguments. This unfortunately soft-bricks the system if not enough RAM is allocated for boot. Next is the idea of leaning heavily into swap, as today’s SSDs ought to be a lot faster than memory page swapping from a HDD. Only this turns out to be also too slow to be usable due to the sheer overhead that this adds.

Even more desperate is to try and use the video RAM on GPUs as a kind of system RAM, which sort-off works, but also with enormous overhead and an if possible worse experience than running a system off basically a pure swap file. Ultimately the most viable method is to lean into the CPU’s many megabytes of cache and modify a CoreBoot BIOS image to simply not initialize system RAM.

As long as you can squeeze your software into the BIOS image and available CPU cache memory, you can run amazing software like the Snake clone in the video. Of course this concept could be expanded upon, and maybe even made to work with UEFI BIOSes, but there will probably not be anyone running Linux from a 32 MB L3 cache any time soon.

39 thoughts on “Running A Game On A PC With No System RAM

      1. This was over 20 years ago when they were current machines. I can’t find any reference to it now though. They had more than enough resources with just the processor and cache to run basic software. If I recall correctly they used a script to load the Fourth programme and removed the ram and drives.

    1. I assume you mean Forth but I vaguely remember something called fourth so I’m not sure. I think space invaders should be doable, having never looked at the code or the hardware

  1. Just thinking about good old fashioned DOS RAM drives.
    I guess now people will be looking at inverting that concept.
    I wonder if there’s a way to get BIOS to start with USB drives allocated as RAM.

  2. He can’t limit Linux’ memory below 512MB because he is most likely using an initramfs that contains all kernel modules and installed firmwares, not just the ones relevant to booting on his device. And when it is compressed, Linux briefly needs even more RAM, because it can’t decompress it in place.

  3. This sounds equivalent to ripping a car’s engine out, then making it run on it’s starter motor, windscreen wiper engine or interior fan motors!

    1. Some early electric cars were in fact just powered by starter motors. Though usually from a much more substantial vehicle.

      1. Neighbor of my grandfather’s had a “wagon” that he had made with two starter motors on the steerable front axis. Lead-acid battery. He used it for carting things around his property. 13-yr-old me thought it was the coolest ever.

        His garage was also filled up with nickelodeons in various states of repair, so he had to park his car outside. Priorities.

  4. Could be enough to run OpenWRT, so you can turn old PC mainboards without RAM into routers, to avoid the looming US routercalypse.

  5. since the fellow’s not running linux, I should say it’s not terribly complicated to put a simple windowed/tiled OS onto a cheap MCU board like a Xiao ESP32C6 and get acceptable-resolution output over VGA (assuming you have a spare VGA-in monitor and would prefer that over an I2C/whatever display for ants). you don’t need external PSRAM module (tho it’d help), it consumes near-zero electricity, it’s silent (as far as humans are concerned), you can program/power it over USBC, and of course, it’s quite a bit smaller.

    then you simply need to write an entire suite of software to make it productive, because no software is going to be compatible with your DIY GlowiesOS. BUT, I say, getting a simple notepad application working inside a draggable window is pretty neat. I found it helpful to set up a virtual machine in QEMU matching my target hardware specs, writing a bare-metal OS for it and a simple thin client to send frames to on workstation, and when that’s confirmed working, porting that for my target hardware (for how I did things, I think this was the only way to do it because I would’ve quit early on trying to deal with Espressif’s Rust crates if I couldn’t see the “end result” early on in QEMU).

    if you wanted to get Serious about the project, the RP2040 may be a more attractive target due to the PIOs, and the ESP32-P4 may also be more desirable due to its PPA for graphical OS effects — but I do not have bags of either of those sitting in my house. there are plenty of other options, too; for example, you could use an active adapter for VGA->HDMI, but I was upset at the idea of spending 4x the price of the MCU board for an adapter which would make the whole thing more expensive than an SBC with native HDMI output… but then if I use an SBC, the project’s no longer cool to me because I could just slap on Ubuntu or whatever (and then run it headless anyway because I never use a desktop experience with linux). + the modern SBC is just painfully overprovisioned — I get it doesn’t make economic sense to manufacture 32MB DRAM modules anymore, but it just feels so wasteful to have so many resources idling; what the heck am I supposed to do with 512MB+ of RAM? It’s no wonder everything is so bloated and unoptimized; we have over-abundance of resources. The modern designer is spending so much time reducing power consumption today by DISABLING the hardware, too (and good for them). The CPU, we’ve figured out how to rapidly downvolt it reliably and automatically — they have new LED computer monitors coming out that simply don’t refresh if the frame isn’t new, to reduce power consumption. -and of course on the other hand, you have the wastoids checking what their LLM wrote on social media overnight, reading static text on a 240hz monitor.

    uh – I should stop myself before I spend rest of day ranting.

    1. Going back to kB of RAM doesn’t sound very appealing to me – plus IIRC the ESP family has no cache on any of their models.

      It would definitely be a cool project if you use something a bit less horrible than the C6, and with PSRAM, such as the S3 (dual-core 240mhz) or the P4 (dual-core 400mhz plus graphics stuff). otherwise outputting video would cripple you on a single core without video handling and peanuts of memory, abd the usefulness of your programs would be conditioned by whatever few kB of ram you have left after the framebuffer etc

  6. I haven’t bought RAM in three years and I feel like I can easily wait out this stupid rampocalypse, especially given that memory prices are now falling rapidly. (OpenAI will probably be bankrupt before building out the infrastructure that the spoken-for memory was going to and Google just found a way to make memory in a data center have effectively perform at 6X its capacity.) The computer I am using has 16 GB of DDR3 and it works great for everything I need a computer to do.

    1. DDR5 prices are plummeting on the news that demand is not what was forecast, that Sam was writing informal memos and investors were taking it literally as a given. Sell those sticks fast at a markup bc 30 days from now your fortune will dissipate

  7. The 9950X3D2 has 192MB of L3 cache (and 16MB of L2) which should be enough for plenty of older games and other software – however the cache-as-RAM mode seems to be unavailable, as memory initialisation has been moved to the PSP (line 69): https://git.furworks.de/coreboot-mirror/coreboot/commit/a2455b2967ad3ab7e95785820e49f600b06477f6

    If no DRAM is provided I believe you just get three beeps directly from the PSP. Of course, if someone paid AMD enough money they could probably get an embedded solution but it’s probably more practical to provide a tiny DDR5 setup (maybe one chip from an 8GB stick can be used to get 1GB? Not sure how that works with the split channels, might need 2GB, or it might not work at all if you need on-die ECC.).

    1. You’d need all the chips, but not all the address lines on the memory module. Of course, you’d also need to reprogram the little eeprom on the module to restate its size. Or you could just do the latter part.

  8. It’s also possible to write code that needs noo RAM, at all.
    Instead, the CPU registers hold the information.
    Some diagnostic ROMs for IBM PC 5150 did work that way, I think.

    1. Some of the old 8bit CPUs can be run in a breadboard with nothing more than power and a clock you can add some LEDs to the address pins if you want some visuals. You can hard wire the data pins to execute a NOP instruction and the CPU will happily run the NOP the advance to the next address where it finds another NOP and keeps going till it’s out of address space. Search youtube for CPU on breadboard and you’ll find several examples. I don’t think you can do this with an 8086 without some external logic since the data/address bus are multiplexed.

  9. The Altos 486 was announced in November 1984. It could run Unix in 512K (yes K…not M) of ram, with a floppy drive and 5, 10 or 20 megabyte hard disk option. This was an intel 80186 based system which could handle up to four serial terminals or printers. Your 32MB of cache ram could theoretically run 64 of these, for a 256 user system. The kids these days just don’t know … now get off my lawn.

  10. Again, WHY the US is not building RAM making chip factories using megabucks in profits from, say, residential real estate companies selling $100K houses for $600K?

    Me no compute, there is a hot demand, and it clearly spells “business opportunity for many years to come” yet nobody is in a visible hurry to finance and build megafactories, train engineers/technicians, etc.

    Regardless, GPUs became de-facto their own computers within computers, at this point naive me is at a loss to explain WHY entire OS doesn’t just live in/on the GPU board and the “main” computer is merely a keyboard/network interface for the GPU (which would probably shrink its use down to the level of, say, 2000’s “personal computer”, ie, Raspberry Pi ~2/3).

    1. You’ve just described a UMA system, which is in fact what most PC’s with integrated graphics are (with a bit of hand-waving).

    2. The IBM PC Jr and the Mac M series use shared memory, too, for example.
      Here, the main RAM and video memory are same thing and accessible by both CPU and graphics chip.
      Depending on how it’s implemented in can be very fast or very slow.
      The PC Jr used slow RAM, which slowed things down.
      The current Macs used fast one, by contrast.

  11. What’s wrong with DDR4? It’s cheap, readily available used in good working condition, works in boards modern enough to have pretty fast CPUs available. Then again, I’m not the sort who understands anyone buying new hardware at retail prices from a store, ever, but I am pretty sure most people of a crafty nature would be about the same.

    Buy a broken 9th Gen Intel 300-series board off ebay for $10, diagnose the fault, make it work again which is 9 times out of 10 some passives knocked off somewhere. Add a $50 used six-core i5, and $120 for 32GB DDR4-3200…

    …and sometimes, the hardware listed as ‘not working/parts only’ turn out to just be fully working when on the bench in front of someone reasonably competent. For instance AM4 boards will have zero reaction to the power button unless there is a working CPU in the socket. And on just about every modern-ish board boot will hang at the ‘VGA’ debug light if there is no video cable plugged in. Lots of used hardware flippers do not know these things and they end up selling working hardware for pennies on the dollar.

    Leave the DDR5 stuff to the rich people who don’t know any better.

  12. This is so ridiculous… Why can’t we simply make more RAM? Are we supposed to believe that in the 21st century we are completely unable to scale up production of these chips? That no country on Earth can build more factories, that we just don’t have the ability? It just feels like humanity is devolving lately

    1. Because money. Do you want to sell X RAM for Y $ each ? Or build a new factory for 10 billions and sell 2X RAM for Y/2 $ each ?

    2. that’s a weird take. Everyone is building more factories to scale up production… the problem is that it’ll take a while, the PRESENT and NEAR FUTURE production is already reserved, and those factories are being built on promises that AI is not a bubble and it will keep increasing demand.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.