Page 1 of 1

How fast is the Emulator?

PostPosted: Feb 26, 2002 @ 7:32am
by Daywalker
Hi, I want to know how fast the emulator is compared to the speed of a normal PPC. I don't have one, so I'm using the emulator and the game is running at 120 FPS, so I'm interested how fast that's on a PPC.

PostPosted: Feb 26, 2002 @ 9:02am
by Phantom
The main issue is probably not the average speed compared to a PPC, but the huge difference in speed of floating point code on the emulator and the PPC. Floating point code will run MUCH faster on the emulator than on a PPC.

PostPosted: Feb 26, 2002 @ 10:36am
by MirekCz

PostPosted: Feb 26, 2002 @ 2:15pm
by Daywalker
:cry: Sh**, Im using much floating point code (almost only!). MirekCz, how fast is your computer? I've got an 900 Celeron, but it's a laptop and not that fast.

PostPosted: Feb 26, 2002 @ 5:19pm
by MirekCz
Duron 600.
Try to avoid FPU, if you use a lot of FPU you will end with few fps or even lower.

PostPosted: Feb 26, 2002 @ 7:41pm
by Daywalker
How would you calculate this w/o using FPU?:

Player.xpos+=ms_needed_for_one_frame*acceleration*0.001;

I could maybe lock the game at 30 fps or update the positon all 5 frames but isn't there a better solution?

PostPosted: Feb 26, 2002 @ 8:54pm
by refractor
Yes. As MirekCz said above, use "Fixed Point" maths.

I put a link to an ARM document about fixed point in the 3d thread earlier today (it's around elsewhere apparently but I didn't look for it):


Read the proviso(s) in that thread too, you need to work out what kind of accuracy you need, and methods of retaining it in your system - using fixed point is fast, but it doesn't come without a bit of extra calculation :(

In your example, you need to have *at least* enough accuracy in your fixed-point system to represent 0.001..ish, which means you want *at least* 10 bits of "decimal" (1/2^10 = 1/1024) to get *close* (0.0009765625) by my (hasty) calculations.

So, then, you'd say that:

0.001 is about 1/1024

So, in (binary) fixed point, 1/1024 =

0.0000000001

So, you multiply your (fixed point) number by that and shift it back to where it should be, and you have your result * "0.001"(ish).

Let me know if you want any more information, examples, etc, and I'll do some when I get bored at work tomorrow. :)

Cheers,

Refractor