19 Hacker News comments link this video. Each one links back to its thread.
alpaca128Feb 2024Strongly recommends
Not always, though it might depend on what platform you mean with retro. Kaze Emanuar on YT does a lot of development for the N64 and it feels like half the time he talks about how the memory bus affects all kinds of optimizations. In Mario 64 he replaced the original lookup table for the sine function because an approximation was faster and accurate enough (or rather two approximations for two different purposes). I love that channel, he reworked the entire Mario 64 code [0] to make it run at stable 60FPS...because he wanted his mods to run faster. [0] ▶ this video
in “How video games use lookup tables” · View on HN
CSMastermindJan 2024Strongly recommends
There's an amazing video about refactoring Mario 64 to reach 30 FPS and render 6x faster on N64: ▶ this video The changes were much more extensive than just removing the debug flags. They were also able to get local coop and a 4 player split screen working which were features originally intended for the game but cut for performance reasons.
in “Decompilation of Paper Mario for N64” · View on HN
ApofisApr 2024Recommends
If you found the video on Super Mario 64 being published with debug symbols interesting, check this out: After finding out about the debug symbols, a developer took a deeper dive through the codebase and optimized the ever living hell out of to get 60fps+. FIXING the ENTIRE SM64 Source Code (INSANE N64 performance) ▶ this video
in “I ported thousands of apps to Windows 95 [video]” · View on HN
WolfbetaJan 2024Recommends
I've recently been enjoying watching this young modder on YouTube optimize all of the original SM64 source code, doubling frame rate, and modding his own Return To Yoshi's Island ▶ this video
in “Super Mario 64 on the Web” · View on HN
rdlwOct 2023Recommends
If anyone is interested in new projects for N64 hardware, Kaze Emanuar has an amazing series about optimizing Super Mario 64 to run incredibly complex romhacks on original hardware. Interestingly, SM64 is usually throttled by memory speed. This means that using 'inline' is detrimental to performance, since making the program larger can cause another read from memory. Here's an overview video, he has many more specific videos about specific topics: ▶ this video
in “The Worlds First FPGA N64” · View on HN
psychphysicAug 2023Recommends
Excellent..more of this please. Super Mario 64 has also had stupendous rewrites from decompiled code I believe. ▶ this video His videos on the Sine function in sm64 is a fun watch as the limitations make nearly all optimizations justifiable.
in “Leaked Wipeout source code leads to near-total rewrite and remaster” · View on HN
Show 13 more comments
psychphysicMar 2023Recommends
If you like this stuff Kaze Emanuar does loads of neat work with the super mario 64 decompiled code. ▶ this video Loads of interesting quirks of the N64 to do with slow bus.
in “The model for the coins in Super Mario Odyssey is 65% simpler than in SM Galaxy” · View on HN
MarioManJan 2023Recommends
On a related note, Kaze has done a deep dive into optimizing the Super Mario 64 source code for his ROM hacks. Here’s one of his more popular videos on the subject: ▶ this video
in “Nintendo 64 Java” · View on HN
haiku2077Jul 2025Cites it
> Lookup tables are always faster than calculation - is that true? I know it's not always true on the Nintendo 64, because it shared a single bus between the RAM and "GPU": ▶ this video , [link]
in “I Ported SAP to a 1976 CPU. It Wasn't That Slow” · View on HN
phireMay 2025Cites it
Both use a unified memory architecture, where the GPU and CPU share the same pool of memory. On the N64, the CPU always ends up bottlenecked by memory latency. The RAM latency is quite high to start with, your CPU is sitting idle for ~40 cycles if it ever misses the cache, assuming RCP is idle. If RCP is not idle, contention with can sometimes push that well over 150 cycles. Kaze Emanuar has a bunch of videos (like this one ▶ this video ) going into detail about this flaw. The gamecube fixed this flaw in multiple ways. They picked a CPU with a much better cache subsystem. The PowerPC 750 had Multi-way caches instead of a direct mapped, and a quite large L2 cache. Their customisations added special instructions to stream graphics commands without polluting the caches, resulting in way less cache misses. And when it did cache miss, the latency to main memory is under 20 cycles (despite the Gamecube's CPU running at 5x the clock speed). The engineers picked main memory that was super low latency. To fix the issue of bus contention, they created a complex bus arbitration scheme and gave CPU reads the highest priority. The gamecube also has much less traffic on the bus to start with, because many components were moved out of the unified memory. --------------------------- The N64 famously had only 4KB of TMEM (texture memory). Textures had to fit in just 4KB, and to enable mipmapping, they had to fit in half that. This lead to most games on the N64 using very small textures stretched o
in “Palette lighting tricks on the Nintendo 64” · View on HN
01HNNWZ0MV43FFFeb 2025Cites it
For those who haven't heard, Kaze is the guy who optimized Mario 64's code, fixed some physics bugs, etc., claims roughly 6x speedup, so that he can make a mod / ROM-hack that runs smoother despite having better graphics: ▶ this video
in “RT64: N64 graphics renderer in emulators and native ports” · View on HN
Manuel_DDec 2024Cites it
Retro game coders achieve some pretty astounding results sometimes. One of my favorite examples is one who optimized super Mario 64 to such a degree that it runs with much better framerate on the original hardware. Also, multiplayer was added: ▶ this video
in “Programming the C64 with Visual Studio Code” · View on HN
echelonMar 2024Cites it
This is what James Lambert does as a follow up when Valve shuts down [1] his "Portal in N64" project [2]. James is like Kaze [3] and builds incredible N64 demos [4] and technical videos about them. [1] [link] [2] [link] [3] ▶ this video [4] [link]
in “VR Powered by N64 [video]” · View on HN
dharmabDec 2023Cites it
Similarly, a modder recently found that unrolling loops _hurt_ performance on the N64 because of RAM bus contention: ▶ this video
in “Ask HN: What's your "it's not stupid if it works" story?” · View on HN
kibwenJun 2023Cites it
Kaze has already done so, and picking the low-hanging fruit results in much greater improvements than the optimizations shown here (which frees up less than one millisecond per frame). Here's the previous video with explanations and video demonstration of their improvements: ▶ this video
in “Finding the best sine function for Nintendo 64” · View on HN
phireJun 2023Cites it
In one of Kaze's older videos [1] , he tracks both CPU and RCP time over various optimisations. The numbers make it pretty apparent that you can get significant RDP performance gains by reducing the amount of CPU bandwidth and/or improving it's access locality. The N64 is a unified memory system, and memory stalls triggered by the CPU will slow RDP down. The N64's memory controller appears to be very simple. As I understand it, if one sub-component attempts to access a DRAM row that is closed (DRAM rows are 2KB long), then the entire memory controller stalls for ~100ns as the RDRAM chip closes the previous row (writing out any dirty changes) and opens the new row. The controller doesn't appear to do any reordering to optimise access patterns. If multiple components are accessing the same 1MB bank simultaneously, you can hit pathological bad cases were the entire system slows down, as the memory controller is continually stalling for 100ns at a time while the memory chips close and reopen rows. Which is why some games can enable a high resolution mode when the memory expansion pack is present. They often don't need the extra 4MB of ram, but simply being able to strategically spread their data across eight different banks instead of four banks can massively improve performance. [1] ▶ this video
in “Finding the best sine function for Nintendo 64” · View on HN
ThaxllJun 2022Cites it
Are modern compiler good enough / have good optimization on old hardware so that you don't need to write ASM? I remember that impressive opti on Mario64 and it's using C / GCC: ▶ this video
in “Quake on the Game Boy Advance [video]” · View on HN
prophesiApr 2022Cites it
I think the main thing is that Nintendo had splitscreen multiplayer planned, but performance prevented it. Edit: Got farther into the video and he talks about this at 14:50 ( ▶ this video )
in “Overhauling Mario 64's code to reach 30 FPS and render 6x faster on N64 [video]” · View on HN
psychphysicNov 2022Critical
Just open source it. No one will judge you by 15 year old code if you have recently produced good code. That's what people will look at. Just look at the face palms at Nintendo HQ despite the amazing game they made ▶ this video
in “Ask HN: Publish old projects even though the source code embarrasses you by now?” · View on HN