logoalt Hacker News

Quake runs in just 276 kB RAM on the Arduino Nano Matter board

147 pointsby smirutrandola10/01/202438 commentsview on HN

Comments

Dwedit10/01/2024

The game is not running from RAM, it is running from Flash ROM. This means that code and static data can be placed on ROM rather than in RAM.

This is comparable to the GBA, which has 384KB of total RAM, and a ROM cartridge slot for storing the game code and data. But the GBA is only 16MHz, the EFR32MG24 system used for this project is overclocked to 136.5MHz.

show 2 replies
smirutrandola10/01/2024

Link to the video showing Quake running: https://www.youtube.com/watch?v=hVnfwzxTJ00

vardump10/01/2024

A great achievement, given the hardware.

Quake will probably run at 60 FPS on RP2350. Double buffered and with full sound quality. But it's nowhere near as hard to achieve it as on Arduino Nano Matter board. RP2350 got 520 kB RAM, dual core Cortex M33 and can run even at 300 MHz (150 MHz nominal).

Earlier: https://news.ycombinator.com/item?id=41195669

bittwiddle10/01/2024

Impressive memory optimizations. Streaming out converted pixel values was a neat way of pulling off the "framebuffer" without having enough memory for storing all the 16 bit values. Solid engineering.

show 1 reply
ant6n10/01/2024

The real hackery is the port for GBA mentioned in the article (running on 16.7MHz): https://www.xda-developers.com/how-quake-ported-game-boy-adv...

show 1 reply
rasz10/03/2024

>In a PC or in other Quake ports, all the data is available from RAM (if not even from the CPU data cache), which had a relatively high bandwidth and low latency even back to 1996. In fact, the bandwidth for sequential reads varied a lot but with a 40 MHz EDO 64-bit DRAM (already available on 1996) one could get a maximum throughput of 320 MB/s.

The youth, so sweet and naive :) EDO ram on average Pentium motherboard does around 50-70MB/s. 256-1024KB of L2 cache bumps that to 70-120MB/s depending on chipset and cache type (and obviously usage pattern, Quake wasnt optimized on that aspect at all). Tiny 8KB of L1 below 200MB/s.

show 1 reply
thesnide10/02/2024

This shows the power of having a fixed computing budget.

Many modern software should really be done this way to limit the amount of energy used. Specially on laptops, but also in the cloud.

Yet, it is mostly never worth it to optimize compared to adding more features to fill a list ;)

lacoolj10/01/2024

what's with the website load time? like individual elements on this page taking multiple seconds to show. is it not 2024 yet?

show 3 replies
anthk10/01/2024

This is witchcraft...