Implement game pad and timer
This commit is contained in:
+12
-2
@@ -1825,8 +1825,18 @@ static void cpuReset(VB *sim) {
|
||||
|
||||
/* Determine how many clocks are guaranteed to process */
|
||||
static uint32_t cpuUntil(VB *sim, uint32_t clocks) {
|
||||
return sim->cpu.halt || sim->cpu.clocks > clocks ?
|
||||
clocks : sim->cpu.clocks;
|
||||
|
||||
/* Halting */
|
||||
if (sim->cpu.halt) {
|
||||
return
|
||||
sim->cpu.operation == CPU_HALTING &&
|
||||
!(sim->cpu.psw.id | sim->cpu.psw.ep | sim->cpu.psw.np) &&
|
||||
IRQ_LEVELS[sim->cpu.irq] < sim->cpu.psw.i
|
||||
? 0 : clocks;
|
||||
}
|
||||
|
||||
/* Not halting */
|
||||
return sim->cpu.clocks > clocks ? clocks : sim->cpu.clocks;
|
||||
}
|
||||
|
||||
#endif /* VBAPI */
|
||||
|
||||
Reference in New Issue
Block a user