~/talk

Squeezing Mushrooms into Bytes : Mario's NES Memory Magic

Talkat Devoxx Belgium 2024 · 2024-10-07..10-11· [computing-history]
slides:none on file

NES games fit Super Mario Bros onto 32KB code + 8KB CHR by drawing 8x8 tiles from pattern tables (256 tiles per table), storing screens as 960 bytes of tile indices, compressing with meta‑tiles and run‑length repeats so the first level fits in ~1001 bytes; sprites are limited to 64 total and 8 per scanline causing per‑frame sprite rotation and visible flicker; Zelda adds battery‑backed RAM for saves. Quake III uses the 0x5f3759df constant and one Newton iteration for the fast inverse square root, trading tiny error (<0.1%) for ~4× speed.

AI-written summary · about

  1. 0:00Introduction to NES constraints
  2. 2:10NES hardware limitations
  3. 3:53Pattern tables and tile rendering
  4. 5:40Storing level data efficiently
  5. 8:50Sprites and hardware limits
  6. 12:44Color and palette tricks
  7. 13:07Arithmetic on an 8-bit CPU
  8. 14:33Random number generation
  9. 17:27Saving game state on NES
  10. 22:08From 2D to 3D with Quake 3
  11. 23:11Vector normalization in Quake
  12. 28:19Fast inverse square root
  13. 36:55Quake's math behind the magic
  14. 37:18Reflections on past challenges
  15. 38:43Bonus: Duck Hunt hardware tricks
  16. 40:53Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.