Add an extremely crude method to slow things down

It's not configurable, and not accurate to any particular measure. But
it's something for now.
This commit is contained in:
Peter Evans 2018-04-06 11:49:54 -05:00
parent 281544bf43
commit f9d130ba97
1 changed files with 9 additions and 0 deletions

View File

@ -338,12 +338,21 @@ void
apple2_run_loop(apple2 *mach)
{
FILE *dlog = (FILE *)vm_di_get(VM_DISASM_LOG);
int sleep = 5;
if (dlog != NULL) {
vm_reflect_disasm(NULL);
}
int i = 0;
while (vm_screen_active(mach->screen)) {
i++;
if (i % sleep == 0) {
usleep(10);
i = 0;
}
if (vm_debug_broke(mach->cpu->PC)) {
mach->paused = true;
}