nba-emu / NanoBoyAdvance

A cycle-accurate Nintendo Game Boy Advance emulator.
GNU General Public License v3.0
978 stars 56 forks source link

Speed issues with the SDL build #20

Closed gdkchan closed 7 years ago

gdkchan commented 7 years ago

I just compiled the SDL version of the emulator to try it out. On my end most games runs at 30 fps usually (like for example Pokémon), while others runs at something around 55~60fps. I tested it with and without VSync flag set on SDL (didn't made any difference on speed, except for a few roms). I don't know if this is expected or a problem on my end. My CPU is an old Celeron clocked @ 2GHz.

fleroviux commented 7 years ago

The current code isn't very optimized for performance, one reason why I rewrite it. What I know though is that some of the Pokémon games (Firered and Leafgreen e.g) have very inefficient VBlank wait loops which could cause performance issues on the host system (since much more instructions need to be emulated per frame)

fleroviux commented 7 years ago

Hey, I rewrote and optimized a hell lot of code in the "version2" branch. Performance should be much better now. Though audio and a lot of PPU stuff are missing right now. Would you mind checking out the code and see if speed improved? If it was a core emulation issue speed should be much better now.

Thanks in advance

gdkchan commented 7 years ago

Tested the version2 branch. It now runs at 60fps with vsync and 110~140fps without it, great work!