Skip to content

Comment on Picophysics: Single file physics for games on platforms like N64, PSX, DCparent

Comments

Most of the older consoles don't have an FPU. Fixed point is king on those older systems.

Only one of the consoles listed lacks an FPU, the other two (N64 and DreamCast) both have FPUs. Despite its age, the FPU on the N64 was plenty fast and it was used extensively.

The N64's FPU will usually be faster than doing fixed point on the CPU.

You are actually multiplier/divider bound, and the CPU can multiply about 10 bits per cycle and only divide 1 bit per cycle. Since you aren't multiplying the sign/exponent bits, it's faster to multiply/divide the 24 mantissa bits of a 32-bit float than it is to multiply/divide the 32 bits of an int.

And with fixed point, you then have to throw in the extra shift instruction (which floating point automatically does internally).

Though, this only applies to fixed point on the CPU. The RSP has no FPU, but it does have a 128 bit vector unit with 8 16bit lanes which is pretty good at fixed point stuff. If you can vectorise your algorithm, it will be faster on the RSP.

According to Kaze Emanuar, the N64 is actually memory bandwidth bound in almost everything it does.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.