1
0
mirror of https://github.com/simh/simh.git synced 2026-01-27 04:22:24 +00:00

PDP11: Improve idling.

This commit is contained in:
Lars Brinkhoff
2022-10-26 12:59:49 +02:00
committed by Mark Pizzolato
parent 64a9c021f3
commit da5e7f4769
4 changed files with 16 additions and 9 deletions

View File

@@ -308,6 +308,7 @@ ng_cycle(int us, int slowdown)
static uint32 usec = 0;
static uint32 msec = 0;
uint32 new_msec;
int running = 0;
int saved;
new_msec = (usec += us) / 1000;
@@ -323,7 +324,7 @@ ng_cycle(int us, int slowdown)
if ((status[0] & 1) == 0)
goto age_ret;
} else if (ng_type != TYPE_DAZZLE)
return 1;
return 0;
if (sync_period)
goto age_ret;
@@ -333,6 +334,7 @@ ng_cycle(int us, int slowdown)
if (ng_type == TYPE_DAZZLE && (status[console] & TKRUN) == 0)
continue;
running = 1;
time_out = fetch(dpc[console], &inst);
DEBUGF("[%d] PC %06o, INSTR %06o\n", console, dpc[console], inst);
dpc[console] += 2;
@@ -355,5 +357,5 @@ ng_cycle(int us, int slowdown)
age_ret:
display_age(us, slowdown);
return 1;
return running || !display_is_blank();
}