adituv / vba-rerecording

Automatically exported from code.google.com/p/vba-rerecording
GNU General Public License v2.0
1 stars 0 forks source link

GB emulation choppy #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run a gameboy game on Linux on a fast computer
2. It's choppy, as if it does 10 frames at once.
3.

What is the expected output? What do you see instead?
Smooth, as in 1 frame every 60th of a second,
instead of 10 frames, every 6th of a second.

What version of the product are you using? On what operating system?
Linux on a fast computer.

I've traced down the bug.
In src/sdl/SDL.cpp:
void systemFrame(int)
{
}

That's the per frame delay loop.
Note how it doesn't wait at all.
To fix it, I altered src/gb/GB.cpp and
src/GBA.cpp to call system10Frames every frame,
and changed the throttle by 1/10.

Also, I noticed FCEU had better timing logic,
so I copied and pasted that in to make it a
bit smoother.

Original issue reported on code.google.com by scubed.g...@lingcog.iit.edu on 8 Jun 2009 at 4:49

GoogleCodeExporter commented 9 years ago
You are right. The current timing is very problematical. Not only Gameboy 
games, but
also GBA games fail to run smooth on Linux.

This problem should be fixed, but unfortunately the Linux "branch" is quite 
stalled
these days.

Original comment by aquan...@gmail.com on 19 Jun 2009 at 3:32

GoogleCodeExporter commented 9 years ago
There is currently no plan to revive the SDL branch. Sorry, but WINE might be 
the workaround for now.

Original comment by aquan...@gmail.com on 24 Oct 2010 at 4:46