Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mGBA got stuck on libretro
I compiled mGBA as a libretro core and rans on RetroARCH (ARMv7 + OpenGLES + EGL + DRM/KMS + toolchain:arm-linux-gnueabi without hard float).

Core and ROM was loaded successfully, but it hangs on a white screen and didn't  responds any inputs.
I added some debug log prints on RetroArch source codes and I found that the main loop of RetroARCH stucks on core_run function, that is why RetroARCH can not response all input events.
I also added debug log prints into mGBA source codes:
static void _GBACoreRunFrame(struct mCore* core) {
    struct GBA* gba = core->board;
    int32_t frameCounter = gba->video.frameCounter;
    printf("TJDEBUG %s %d: frameCounter = %d\n", __func__, __LINE__, frameCounter);
    while (gba->video.frameCounter == frameCounter) {
    printf("TJDEBUG %s %d: video.frameCounter = %d\n", __func__, __LINE__, gba->video.frameCounter);

The result shows that when frameCounter equals 6, core will run infinitely at ARMRunLoop(core->cpu);, can not break out the while loop.

This problem has been bothering me for a while, and I would be grateful if someone could give me some ideas to debug the issues.

Thank you!
What game?
(08-23-2018, 04:47 AM)endrift Wrote: What game?

Hi endirft,

Thanks for reply.

I have tried many roms, like Super Mario Advance 4 - Super Mario Bros. 3 (U) (V1.1), Pokemon-Fire Red.gba, Metal Slug Advance (U).gba.
Both of them got the same result - only render first 6 frames and hang on.

This is the “stuck screen" that loading  Super Mario Bros. 3:

Hi endirft
After a long debugging time, I found the problem is that it struck on the function audioCallback in RetroARCH. There maybe something wrong in Audio setting of my Linux System.

Thanks for your reply again!

Forum Jump:

Users browsing this thread: 1 Guest(s)