Show HN: I486SX_soft_FPU – Software FPU Emulator for NetBSD 10 on 486SX
116 mezantrop 39 4/27/2025, 9:04:13 PM github.com ↗
First Release is Here!
I'm excited to announce the first release of i486SX_soft_FPU — a software FPU emulator for the classic Intel 486SX CPU, running on NetBSD 10!
This project brings floating-point support back to life for 486SX machines, even though modern NetBSD versions no longer natively support processors without a hardware FPU. If you're into retrocomputing, operating system hacking, or just love old-school hardware, check it out!
Project page: https://github.com/mezantrop/i486SX_soft_FPU Contributions, feedback, and testing are all very welcome!
Let's keep these vintage machines alive!
#retrocomputing #NetBSD #486SX #opensource
I know OpenBSD dropped support for i486 in 6.8, making 6.7 the last that runs natively on them (FPU or not). The support was lost when moving to LLVM 9 and enabling `-march=i586 on i386`. However, old Socket 3 boards can still run the latest version of OpenBSD if one drops a Pentium Overdrive in. :)
According to [1] they do
"Any i486 or better CPU should work - genuine Intel or a compatible such as Cyrix, AMD, or NexGen."
[1] https://wiki.netbsd.org/ports/i386/
It uses kernel 3.7
For 486, there was a release just two months ago using kernel 6.13: https://github.com/marmolak/gray486linux
1: https://github.com/mezantrop/i486SX_soft_FPU/blob/main/READM...
In JPEGSnoop I see Raw Image Orientation = Landscape. Maybe it was taken and encoded horizontally and the image itself is stored in a right-to-left scan order.
Very cool project!
It just so happens first room when starting the game - rooftop - has sloped roof vents and later walls with sloped edge. Even on fast FPUless 90MHz NexGen Nx586 (AMD K6 father) FPS drops down to 10-14fps on that roof https://www.youtube.com/watch?v=41O2bNG2qKA&t=234s while staying above 30 when facing away from slopes.
What this NetBSD project does is not exactly like that though, it lets programs use regular 487 float instructions, which are trapped by the kernel, which steps in and emulates what the hardware float instruction would have done.
It worked very well for regular program, because most programs would not use float instructions to any significant degree.
If you however were going to use floats a lot for long calculations, a soft-float library would be much faster.
At least this is my impression, working with 2.2.x/2.4.x kernels, gcc 2.7~3.3, and glibc ~2.2
The benefit of OP’s solution in the kernel is that it works for everything out of the box, including pre-compiled binaries, and those that you can’t rebuild for whatever reason to begin with.
After some experiments, I remembered university course and was able to understand what is going on.
When using float types or operations, fpu emulation is used, which takes huge amount of memory for anything.
I think atmel is using gcc, but not sure if you emulation is part of gcc or atmel libraries.
There is no reason that you cannot use this code with this license in a larger BSD work. It is “compatible” in that sense.
This specific code has additional restrictions (not charging). That does not add any restrictions to the rest of the code though.
So, if you are charging, you are in violation of the license just for this code snippet. Linus Torvalds, the copyright holder, could try to enforce the license against you. Since he gives it away, no financial damages. Which means the remedy would be that you would not be able to use this code anymore (but could still use the rest of BSD).
I do not expect Linus to pursue enforcement on this one.
It would be a very difficult case to win anyway as you would have to prove that people were being charged specifically for the Linus code and not for other code covered by BSD (which allows charging).
I would argue that this license has not even been violated, unless somebody has put a price tag on this specific code.
Then again -- and IANAL -- the license is worded so vaguely that I doubt any of it is enforcible. "You may not distibute this for a fee" -- what is "this"? Is it the entire kernel or does it apply to small excerpts of it? Because apparently "small partial excerpts may be copied without bothering with copyrights". But do you mean copyright attribution or are you rescinding your copyright entirely if I only copy "small partial excerpts"? But what is a small partial excerpt? And so on and so forth...
The entire concept of “compatibility” is an artifact of copyleft. In the rest of the license universe, each piece of code is covered by its own license and it does not matter what licenses other code uses.
This license does not apply to the rest of BSD. The BSD license does not apply to this code.