Next Generation Emulation banner
1 - 2 of 2 Posts

· Registered
Joined
·
59 Posts
Discussion Starter · #1 · (Edited)
VBA main loop question: why VBA in main loop call emulator.emuMain twic in one cycle

My question is why VBA in main loop call emulator.emuMain (actually CPULoop) twice at on cycle?

BOOL VBA::OnIdle(LONG lCount)
{
if(emulating && debugger) {
.......
/* something need to handle first */
.......
} else if(emulating && active && !paused) {

for(int i = 0; i < 2; i++) {
emulator.emuMain(emulator.emuCount);

if(rewindSaveNeeded && rewindMemory && emulator.emuWriteMemState) {
rewindCount++;
if(rewindCount > 8)
rewindCount = 8;
if(emulator.emuWriteMemState(&rewindMemory[rewindPos*REWIND_SIZE],
REWIND_SIZE)) {
rewindPos = ++rewindPos & 7;
if(rewindCount == 8)
rewindTopPos = ++rewindTopPos & 7;
}
}

rewindSaveNeeded = false;
}

if(mouseCounter) {
if(--mouseCounter == 0) {
SetCursor(NULL);
}
}
return TRUE;
}
return FALSE;

// return CWinApp::OnIdle(lCount);
}
 
1 - 2 of 2 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top