Hmmmm... can't the emulator be getting on with something while it's waiting for the next frame? Instead of doing 'pvr_wait_ready()' you can use 'pvr_check_ready()' and if it's not ready, start emulating the next frame? Just thinking out loud.BlackAura wrote:The emulator itself is more than fast enough to run at full speed. However, when displaying a frame, the Dreamcast's hardware requires that we wait around for it to be ready for us to start sending data. That means that, at the end of each frame, we need to wait until the graphics hardware is ready. In practice, that means that each frame lasts a multiple of 1/60th of a second.
That wouldn't be a problem, but occasionally a frame takes just over 1/60th of a second. The result is that the frame ends up taking 2/60th of a second, and is sitting around for almost an entire frame doing nothing. With the frameskipping, we can detect that a frame has taken too long, and then not draw a frame and get on with emulating the next frame instead. Hopefully, the next frame will take less that 1/60th of a second, so we'll still be running at full speed (with occasional frameskipping as required), but most importantly the sound system will still be properly synchronised.
I did some work on trying to get z80 running faster - did I ever send you that source? I tried to use some of the tricks that Stef did on M68000 on the Z80 - perhaps it's faster? PM me and I'll sort out sending you that source.