Porting now some os3 library which use those 2 math libraries quite heavy, and os4 sdk just says to me:
Quote:
mathffp.library and mathtrans.library are not supported on AmigaOS4
Question is: how deal with it without much blood (i.e. some fast rewriting, etc). There is bunch of functions which is used from, like SPFlt, SPSub, SPFix, SPMul, SPDiv and SPSincos, so i need some replacement functions which will just works as expected without rewriting of code fully.
Maybe there is already some macroses/replacement-functions done for that ?
Those libraries were designed to be used by C library implmentations rather than called directly, you can just rewrite the code using standard C calls and maths operators , it will be simpler, more efficient, easier to maintain, and work on all plaforms.
@Andy Yep, i hope it will be rewritten later, but for now just need to make everything works
@Thomas Thanks ! All works ok for os4 version, and i want also make the same code works for os3 one with their old 2.x gcc, but have on linking undefs to sin() and cos(). If i add -lm on linking, it want then those mathtras and co. If i add just include of math.h it didn't helps. I find that #include <math-68881.h> helps and no undefs on linking, but then final graph a bit messed.
I presume your linking the 68k version against libnix and IIRC that uses mathtrans.library for the sin an cos etc, so if you use those stubs for libnix code you'll get circular dependencies.
I presume your linking the 68k version against libnix and IIRC that uses mathtrans.library for the sin an cos etc, so if you use those stubs for libnix code you'll get circular dependencies.
I compile all without libnix, but to make sin/cos links on 68k, i should add -lm, and that one use libnix so i am in loop as you say.
Seems just need some proper 68k sin/con realization, even if it will be assembler one it's ok, i can just build objects from and link to 68k version. Will do some google now for ready to use code
@all Seems i was too fast, and its the same for os3/os4 (i.e. m688881.h can be ok for os3/gcc2.x then). It looks like general problem with replaced funcs. Check attached image, that how it looks like with original sasc module, and with gcc (os3 or os4 version does not matter) module.
If anyone want to help and rewrite that module (a very small one, and use those math funcs just in few places) i will then just add it to repo with note at top who fix that. Source there (one small and well commented file): http://kas1e.mikendezign.com/misc/dopus5/modules/
All those math functions uses only in diskinfo_show_graph() in the source.
@salas00 Thanks a lot ! It almost fix the problems , at least now graph renders correctly, just by some reasons colors swapped. I.e. "used" now shows as "unused" and "unused" shows as "used" on graph. I.e:
But as you can see its anyway better even in compare with original sasc-os3 version which on os4 just show all wrong (maybe because of those mathlibs usage, dunno).
Anyway, with those replacement its almost fine now, just strange why colors swapped. Maybe something about differences with singed/unsigned default values for sasc/gcc. Or endianes somehow make differences there
It might be that the SPSub is wrong as well (similar to how SPDiv was) The autodoc documentation in this case does not clearly state which number should be subtracted from the other.