Ultimate Amiga
Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Forum => Topic started by: Mia on February 06, 2017, 05:01:26 PM
-
single precision (4 bytes) AMOS floating point numbers are not IEEE 754 - without digging into the code, does anyone have a description of the format please?
specifically I'm converting 32bit float wav files - I'm doing the endian-ness changes, but the value returned is just incorrect as AMOS stores them in the so called "Fast Floating Point Format" - but I've been unable to find any references yet...
there is a nice hex/binary converter here:
http://babbage.cs.qc.cuny.edu/IEEE-754.old/32bit.html
any ideas?
-
Motorola fast floating point is a format included in a pair of libraries with AmigaOS. You need to include the Motorola name in your search query.
-
Awesome, yup found the conversion method in the OS ;)
http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node0278.html
-
The FFP format is described in the RKM here:
http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node047D.html
-
and there's the full library specs on:
http://wiki.amigaos.net/wiki/Math_Libraries
I got it working, by loading D0 with a fake integer of the float data:
Dreg(0)=DATA
DATA=Lib Call(6,Lvo("SPFieee"))
Loke Varptr(FLOAT#), Leek(Varptr(DATA))
it's not too slow, I'm just so happy it's working now 8)