Skip to content
0:00 / 0:00

#nintendo64#sineapproximation#lookuptables

Finding the BEST sine function for Nintendo 64

Kaze Emanuar

326K subscribers • 3 videos on Hallway

YouTube
  • Recommended by 3 people: 2 on Hacker News and 1 on Lobsters.
  • Presented by Kaze Emanuar

Intermediate. Assumes working knowledge.

417K views3 years ago3 recommendations

Game developmentSystems programmingPerformance and optimizationGame programming

Kaze Emanuar explores various polynomial approximations and lookup tables to find the fastest and most accurate sine function for the Nintendo 64.

To try everything Brilliant has to offer—free—for a full 30 days, visit brilliant.org/KazeEmanuar. The first 200 of you will get 20% off Brilliant’s annual premium subscription. Patreon: patreon.com/Kazestuff 🎥 youtube.com/@KazeClips 🐦 twitter.com/KazeEmanuar MERCH: kazemerch.myspreadshop.com/all This video was sponsored by Brilliant. Einleitung Why is sine Important? Mario 64's sine Ocarina of Time's sine Interwoven co/sine 3rd order sines Numerics 5th order sines 4th order cosine conclusion

Why it's here

3 people recommend this, 1 disputes it

What people say. Recommended as a great deep dive into low-level math optimization and the trade-offs of lookup tables on retro hardware.

dbremneron Lobsters • Recommends

Finding the BEST sine function for Nintendo 64

eskaon Hacker News • Recommends

On “How do computers calculate sine?”

You might also find this video interesting: "Finding the BEST sine function for Nintendo 64" link to this video

qingcharleson Hacker News • Recommends

On “SNES Coprocessors: DSP-1 and Friends”

Yeah, I used a ton of trig tables for software renderers in the late 80s/early 90s, but I'm just throwing ideas out there, since I've seen a lot of really great optimizations recently that were mostly missed during that time. This guy puts a lot of work into figuring out if there is a faster way to do trig calcs on the N64 than was used in SM64 (spoiler: there is): link to this video Jez (CEO of Argonaut) once offered me an interview for the Starfox/DSP team, so I almost worked on this thing. He was very active on the coding groups on Usenet around that time.

qingcharleson Hacker News • Recommends

On “SNES Coprocessors: DSP-1 and Friends”

This is the video that got me thinking: link to this video I was writing software texturers etc in the late 80s/early 90s, and even recently I've seen x86 people humble me with all sorts of info that I had no idea about at the time, concerning pipelining etc. I would just sit all day randomly reordering assembler instructions and reprofiling teapot renders to see if anything would move the needle.

psychphysicon Hacker News • Disputes

On “Finding the best sine function for Nintendo 64”

I find him a bit abrasive even though I enjoy his videos (and actually submitted this a couple days ago). It's alot of cool work, but the way he presents it to laymen is kind of annoying. Even if he had never heard of data orientated design in the original video series (where he claims to not know what its called when you organise data to improve throughput) he should by now because clearly he does huge amounts of research. (Case in point at 9:300 he talks about localised memory patterns as though he's the first to come up with it). Again, love his work, watch every video and even submit to HN because I think others would. But that doesn't mean he's not very annoying. 0 link to this video

qingcharleson Hacker News • Mentions

On “You (Probably) Shouldn't Use a Lookup Table”

I always used to use lookup tables for sin/cos in the days of software 3D rendering. The developers of Mario 64 did the same, but this video dives into those LUTs and brings them into question: link to this video

qingcharleson Hacker News • Mentions

On “RIP Google Groups Dejanews.com Archive”

These are the sorts of questions I would like to solve. Were we mistaken in using fixed point for everything? Are there actually faster ways of doing most of these tasks. That recent Mario 64 rewrite has me questioning everything. At least Nintendo's first party developers made the same mistake, and they had the hardware guys right there. link to this video

boricjon Hacker News • Mentions

On “Less Slow C++”

It's not useless if it's good enough for the problem at hand. Kaze Emanuar has two entire videos dedicated to optimizing sin() on the Nintendo 64 and he's using approximations like this without issues in his homebrew: - link to this video - link

somaton Hacker News • Mentions

On “Even Faster Asin() Was Staring Right at Me”

…cpu requests the memory controller ignored the 9th bit, presenting a normal 8 bit byte. They were hoping that by having high speed memory, 250 mHz, the cpu ran at 90mHz, it could provide for everyone and it did ok, there are some very impressive games on the n64. but on most of them the cpu is running fairly light, gotta stay off that memory bus. link to this video (Kaze Emanuar: Finding the BEST sine function for Nintendo 64)…