1 |
|
/* |
2 |
|
* emul_op.cpp - 68k opcodes for ROM patches |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2000 Christian Bauer |
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 |
69 |
|
r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7], |
70 |
|
r->sr); |
71 |
|
#if ENABLE_MON |
72 |
< |
char *arg[2]; |
73 |
< |
arg[0] = "rmon"; |
74 |
< |
arg[1] = NULL; |
72 |
> |
char *arg[2] = {"rmon", NULL}; |
73 |
|
mon(1, arg); |
74 |
|
#endif |
75 |
|
QuitEmulator(); |
84 |
|
D(bug("*** RESET ***\n")); |
85 |
|
TimerReset(); |
86 |
|
EtherReset(); |
87 |
+ |
AudioReset(); |
88 |
|
|
89 |
|
// Create BootGlobs at top of memory |
90 |
< |
memset((void *)(RAMBaseHost + RAMSize - 4096), 0, 4096); |
90 |
> |
Mac_memset(RAMBaseMac + RAMSize - 4096, 0, 4096); |
91 |
|
uint32 boot_globs = RAMBaseMac + RAMSize - 0x1c; |
92 |
|
WriteMacInt32(boot_globs + 0x00, RAMBaseMac); // First RAM bank |
93 |
|
WriteMacInt32(boot_globs + 0x04, RAMSize); |
411 |
|
break; |
412 |
|
} |
413 |
|
|
415 |
– |
case M68K_EMUL_OP_MEMORY_DISPATCH: { // MemoryDispatch() replacement routine |
416 |
– |
int16 sel = r->d[0]; |
417 |
– |
D(bug("MemoryDispatch(%d)\n", sel)); |
418 |
– |
switch (sel) { |
419 |
– |
case -6: // GetLogicalRAMSize |
420 |
– |
r->d[0] = RAMSize; |
421 |
– |
break; |
422 |
– |
case -3: |
423 |
– |
r->d[0] = 0x1000; |
424 |
– |
break; |
425 |
– |
case 0: // HoldMemory |
426 |
– |
case 1: // UnholdMemory |
427 |
– |
case 2: // LockMemory |
428 |
– |
case 3: // UnlockMemory |
429 |
– |
case 4: // LockMemoryContiguous |
430 |
– |
case 6: // ProtectMemory |
431 |
– |
case 7: // UnprotectMemory |
432 |
– |
r->d[0] = 0; |
433 |
– |
break; |
434 |
– |
default: |
435 |
– |
printf("FATAL: MemoryDispatch(%d): illegal selector\n", sel); |
436 |
– |
r->d[0] = (uint32)-502; |
437 |
– |
break; |
438 |
– |
} |
439 |
– |
break; |
440 |
– |
} |
441 |
– |
|
414 |
|
case M68K_EMUL_OP_IRQ: // Level 1 interrupt |
415 |
|
r->d[0] = 0; |
416 |
|
if (InterruptFlags & INTFLAG_60HZ) { |
499 |
|
r->d[0], r->d[1], r->d[2], r->d[3], r->d[4], r->d[5], r->d[6], r->d[7], |
500 |
|
r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7], |
501 |
|
r->sr); |
502 |
+ |
#if ENABLE_MON |
503 |
+ |
char *arg[2] = {"rmon", NULL}; |
504 |
+ |
mon(1, arg); |
505 |
+ |
#endif |
506 |
|
QuitEmulator(); |
507 |
|
break; |
508 |
|
} |