Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory corruption (Bugs 1.25 Beta) (*solved*)
#9
And if we're going to do that we need fast floating point routines for all the math functions.

I've been focusing on integer stuff - figuring that very fast, but inaccurate whole-number solutions will be fine for games playing. Things like wireframe vectors are going to need fast sin/cos/tan/sqrt.

We might need a fast log function too.

Can we find or write fast assembler for all this? Maybe. Not sure. We might have to dig into todos to do it. And between you and me, I'm not an awesome assembler writer.

Ahem. Right now I have a sqr(long) routine that...gets it right about 60% of the time. And my head's hurting trying to find out why! The 16 bit version was a lot easier to cope with than the 32 bit version. Working with numbers bigger than 16 bits is really a pain! (For those that don't know, the z80 processor can deal with 16 bit numbers internally pretty well. 32 bit means holding it in 2 16 bit registers and manually dealing with how one affects the other each time you change it. So even long=long+1 takes a lot more steps than integer=integer+1 !)

EDIT: Fixed it and posted the routine over in the help and tutorials section.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)