Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to integrate Wanderbar with mGBA, but need some advice
#4
Question 
Thanks to your suggestion, I've got 0.7.0 compiled and running now. I'm way out of my league with this level of abstraction/threading/callbacks though, so I've spent the last week trying to solve the puzzle.

Basically, each time a CPU instruction is run, I specifically need for GBAApp to be notified. I've gotten it so CoreController is notified each time an instruction is executed, but I don't know how to pass it upward to GBAApp. For reference, here's basically where I am now - this is the callback I added to CoreController.cpp, and it gets called as intended:

Code:
// WANDERBAR ADDITION
m_threadContext.instructionCallback = [](mCoreThread* context) {
    CoreController* controller = static_cast<CoreController*>(context->userData);

    // obviously this doesn't work but I basically just want to pass word on up to GBAApp that an instruction has just been executed
    bool t = QMetaObject::invokeMethod(GBAApp, "instructionHasRunSoSendMessagePlease");
};

My hunch is that what I'm asking is crazy and/or not possible, but I hope I'm wrong. Do you have any suggestions/advice? I'm so way in over my head hereĀ  Tongue
Reply



Messages In This Thread
RE: Trying to integrate Wanderbar with mGBA, but need some advice - by Mato - 03-01-2019, 08:51 AM

Forum Jump:


Users browsing this thread:
2 Guest(s)

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