1 |
|
/* |
2 |
|
* emul_op.cpp - 68k opcodes for ROM patches |
3 |
|
* |
4 |
< |
* SheepShaver (C) 1997-2002 Christian Bauer and Marc Hellwig |
4 |
> |
* SheepShaver (C) 1997-2004 Christian Bauer and Marc Hellwig |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
456 |
|
break; |
457 |
|
|
458 |
|
case OP_IDLE_TIME: |
459 |
– |
#if __BEOS__ |
459 |
|
// Sleep if no events pending |
460 |
< |
if (ReadMacInt32(0x14c) == 0) { |
461 |
< |
sleep(16667); |
463 |
< |
} |
464 |
< |
#endif |
460 |
> |
if (ReadMacInt32(0x14c) == 0) |
461 |
> |
Delay_usec(16667); |
462 |
|
r->a[0] = ReadMacInt32(0x2b6); |
463 |
|
break; |
464 |
|
|
465 |
+ |
case OP_IDLE_TIME_2: |
466 |
+ |
// Sleep if no events pending |
467 |
+ |
if (ReadMacInt32(0x14c) == 0) |
468 |
+ |
Delay_usec(16667); |
469 |
+ |
r->d[0] = (uint32)-2; |
470 |
+ |
break; |
471 |
+ |
|
472 |
|
default: |
473 |
|
printf("FATAL: EMUL_OP called with bogus selector %08x\n", selector); |
474 |
|
QuitEmulator(); |