Mar 24, 2013 23:29
Some mysterious calculation is resulting in the number -1.61061279E+09, probably a subtraction.
On a real c64, this is represented by the bytes 9f c0 00 00 6c. either the c0 doesn't belong there or the 6c doesn't belong there. I won't know until I catch it in the act. it only occurs in the Star Trek game, and not very reliably. If I can find the right random seed to make it happen early enough in the game, I can nail it.
Also, I just had an idea on how to get a tiny speed bump and postpone 32-bit division a little longer. The power and square root operators are wonky because they involve a log as one step, and the log involves an inverse square root. Well, I just remembered John Carmack had a famous "fast square root" that involved casting a float as a long integer, and subtracting it from a magic number. I think I might be able to use that here, though I'd need a 40-bit magic number.
programming