@cheesestraws @Snial @Crutch @David Cook
So a little while back I was having trouble debugging some software I was writing when testing it in Basilisk II. After blaming RealBasic and myself, I realised that maths was been incorrectly evaluated, tested on real hardware and moved on.
I was writing something much simpler yesterday and it happened again, but this time the program was compiled C using CodeWarrior and the code in question was so basic it was insane that it wouldn't work... so I investigated.
What I found was that my install of Basilisk II... shows floating point values incorrectly! Note that everything is fine in 68k QEMU (emulated 68040).
In Basilisk II, I was using a IIci ROM with a 68040 and FPU, running B1-7.5.5. So to experiment, I set it to a 68030+68882... same issue... so I set it to be a 68030 without FPU... and the code works (using the SANE traps). Given this, I have written a little test program. I'm curious how widespread this issue is - is it just my setup? Is it just on Linux? Is it a specific version of Basilisk II? (By the way - how do you check the version easily?)
The weirdest thing is it is actually difficult to detect in code - if I test the value and compare with an integer, they compare as normal! It is almost as if the bug is in the code that displays a float, or converts it to a string, but only when emulating a physical FPU? (Edit - or possibly they've modified how floats are stored in their patches, but not updated the routine that displays a float?)
Here is my program run under an emulated 68030 without FPU :

Here it is run under an emulated 68030 with FPU :

Here it is run under an emulated 68040 :

I'd be interested to know if other people see similar behaviour? You can change the CPU / FPU under the "Memory/Misc" tab in Basilisk II Settings. For now I'll be leaving mine set to 68030 without FPU.

Edit - attached the test app.
So a little while back I was having trouble debugging some software I was writing when testing it in Basilisk II. After blaming RealBasic and myself, I realised that maths was been incorrectly evaluated, tested on real hardware and moved on.
I was writing something much simpler yesterday and it happened again, but this time the program was compiled C using CodeWarrior and the code in question was so basic it was insane that it wouldn't work... so I investigated.
What I found was that my install of Basilisk II... shows floating point values incorrectly! Note that everything is fine in 68k QEMU (emulated 68040).
In Basilisk II, I was using a IIci ROM with a 68040 and FPU, running B1-7.5.5. So to experiment, I set it to a 68030+68882... same issue... so I set it to be a 68030 without FPU... and the code works (using the SANE traps). Given this, I have written a little test program. I'm curious how widespread this issue is - is it just my setup? Is it just on Linux? Is it a specific version of Basilisk II? (By the way - how do you check the version easily?)
The weirdest thing is it is actually difficult to detect in code - if I test the value and compare with an integer, they compare as normal! It is almost as if the bug is in the code that displays a float, or converts it to a string, but only when emulating a physical FPU? (Edit - or possibly they've modified how floats are stored in their patches, but not updated the routine that displays a float?)
Here is my program run under an emulated 68030 without FPU :

Here it is run under an emulated 68030 with FPU :

Here it is run under an emulated 68040 :

I'd be interested to know if other people see similar behaviour? You can change the CPU / FPU under the "Memory/Misc" tab in Basilisk II Settings. For now I'll be leaving mine set to 68030 without FPU.

Edit - attached the test app.
Attachments
Last edited:











