Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to integrate Wanderbar with mGBA, but need some advice
#1
Hello! I've been working on integrating my Wanderbar sidebar thingy into Windows mGBA 0.6.1, but I know almost nothing about Qt and threads, plus the mGBA source code is light-years more advanced and cleaner than anything I could ever produce.

Still, I've been poking at the code and learning how things work. I've mostly got my Wanderbar working with mGBA now, but the biggest (and probably final) snag is that I need to call my Wanderbar's "doLogic" function before each GB/GBC/GBA CPU instruction.

Currently, I do that call in thread.c, around this part. (This actually works fine until my Wanderbar needs to update the browser, after which it crashes & I can't debug the cause, but it appears to be thread-related)

[Image: thread.c.jpg]

The issue is that I need to move this call out of thread.c and make it so that GameController.cpp (or maybe Window.cpp) calls my Wanderbar logic function instead. So basically I can't find a clear way to make it so that GameController.cpp knows when a core CPU instruction is about to be executed.

I figure that's probably not even how something like this should be handled, but again, I'm out of my league here with threads and Qt and such. Is there any way to make this work somehow? Currently my best guess is to try to create something like the debugger that's in the "if" statement in the code above, but that's also all written in C and part of the core, so I don't think that'll work either Sad
Reply



Messages In This Thread
Trying to integrate Wanderbar with mGBA, but need some advice - by Mato - 02-21-2019, 09:31 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.