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 |
86 |
|
EtherReset(); |
87 |
|
|
88 |
|
// Create BootGlobs at top of memory |
89 |
< |
memset((void *)(RAMBaseHost + RAMSize - 4096), 0, 4096); |
89 |
> |
Mac_memset(RAMBaseMac + RAMSize - 4096, 0, 4096); |
90 |
|
uint32 boot_globs = RAMBaseMac + RAMSize - 0x1c; |
91 |
|
WriteMacInt32(boot_globs + 0x00, RAMBaseMac); // First RAM bank |
92 |
|
WriteMacInt32(boot_globs + 0x04, RAMSize); |
410 |
|
break; |
411 |
|
} |
412 |
|
|
413 |
– |
case M68K_EMUL_OP_MEMORY_DISPATCH: { // MemoryDispatch() replacement routine |
414 |
– |
int16 sel = r->d[0]; |
415 |
– |
D(bug("MemoryDispatch(%d)\n", sel)); |
416 |
– |
switch (sel) { |
417 |
– |
case -6: // GetLogicalRAMSize |
418 |
– |
r->d[0] = RAMSize; |
419 |
– |
break; |
420 |
– |
case -3: |
421 |
– |
r->d[0] = 0x1000; |
422 |
– |
break; |
423 |
– |
case 0: // HoldMemory |
424 |
– |
case 1: // UnholdMemory |
425 |
– |
case 2: // LockMemory |
426 |
– |
case 3: // UnlockMemory |
427 |
– |
case 4: // LockMemoryContiguous |
428 |
– |
case 6: // ProtectMemory |
429 |
– |
case 7: // UnprotectMemory |
430 |
– |
r->d[0] = 0; |
431 |
– |
break; |
432 |
– |
default: |
433 |
– |
printf("FATAL: MemoryDispatch(%d): unimplemented selector\n", sel); |
434 |
– |
r->d[0] = (uint32)-502; |
435 |
– |
break; |
436 |
– |
} |
437 |
– |
break; |
438 |
– |
} |
439 |
– |
|
413 |
|
case M68K_EMUL_OP_IRQ: // Level 1 interrupt |
414 |
|
r->d[0] = 0; |
415 |
|
if (InterruptFlags & INTFLAG_60HZ) { |