Live data from Hacker News

Neo Geo Dev: Fixed Point Numbers

mattgreer.dev

1–10 of 49 posts

Re: Neo Geo Dev: Fixed Point Numbers

#2
On the PC side, most developers stopped predominantly using fixed point for high performance code somewhere in the Pentium 1-3 era. For 486 class systems it was still pretty useful.

Other than on retro systems, fixed point is still useful in smaller microcontrollers.

Re: Neo Geo Dev: Fixed Point Numbers

#3
post #2

On the PC side, most developers stopped predominantly using fixed point for high performance code somewhere in the Pentium 1-3 era. For 486 class systems it was still pretty useful. Other than on retro systems, fixed point is still useful in smaller microcontrollers.

Michael Abrash books contain information on these kinds of optimizations, which were exactly on this transition point, as timeframe.

Re: Neo Geo Dev: Fixed Point Numbers

#4
This sort of thing is ordinary for consoles without floating point numbers. It's easy to do in software with integers, but sometimes hardware acceleration will use it too.

The SNES and GBA both supported affine transformations, where the elements of the multiplication matrix are fixed point numbers. The Playstation's geometry coprocessor (GTE) used fixed point matrices with quite low 16 bit precision. An emulator feature called PGXP is able to perform these calculations at higher precision.

Re: Neo Geo Dev: Fixed Point Numbers

#5
It's worth saying the original Playstation was entirely fixed point. You can go surprisingly far with it.

https://en.wikipedia.org/wiki/Fixed-point_arithmetic#Softwar...

I spent so much of the early stage of my career doing early mobile stuff I practically still think in fixed point, and always have to adjust to floats, for example, fixed point results can be compared exactly while with floats that is not a great idea. TeX uses fixed point entirely because it was reproducible across machines in an era where floating point was not.

Re: Neo Geo Dev: Fixed Point Numbers

#6
post #5

It's worth saying the original Playstation was entirely fixed point. You can go surprisingly far with it. https://en.wikipedia.org/wiki/Fixed-point_arithmetic#Softwar... I spent so much of the early stage of my career doing early mobile stuff I practically still think in fixed point, and always have to adjust to floats, for example, fixed point results can be compared exactly while with floats that is not a great ide…

I think fixed point would be used a lot more with proper support in programming languages

Re: Neo Geo Dev: Fixed Point Numbers

#7
post #6
post #5

It's worth saying the original Playstation was entirely fixed point. You can go surprisingly far with it. https://en.wikipedia.org/wiki/Fixed-point_arithmetic#Softwar... I spent so much of the early stage of my career doing early mobile stuff I practically still think in fixed point, and always have to adjust to floats, for example, fixed point results can be compared exactly while with floats that is not a great ide…

I think fixed point would be used a lot more with proper support in programming languages

What you would need is the language to track the expected range of the numbers. You often end up with multiple different multiply/divide implementations (shifting amounts before/after) based on if you can safely guarantee you are within an expected range or not.

Re: Neo Geo Dev: Fixed Point Numbers

#8
post #5

It's worth saying the original Playstation was entirely fixed point. You can go surprisingly far with it. https://en.wikipedia.org/wiki/Fixed-point_arithmetic#Softwar... I spent so much of the early stage of my career doing early mobile stuff I practically still think in fixed point, and always have to adjust to floats, for example, fixed point results can be compared exactly while with floats that is not a great ide…

> fixed point results can be compared exactly

You gain the ability to get stable results across machines, but there still necessarily exists a loss of precision, and different implementations of the same algorithm will get different results.

When would you want to compare fixed-point results bitwise though?

Post reply on HN