03-01-2019, 08:51 AM
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:
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Ā
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Ā