ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/emul_op.cpp
(Generate patch)

Comparing BasiliskII/src/emul_op.cpp (file contents):
Revision 1.6 by cebix, 1999-10-21T22:39:50Z vs.
Revision 1.11 by cebix, 1999-10-31T23:18:32Z

# Line 42 | Line 42
42   #include "extfs.h"
43   #include "emul_op.h"
44  
45 + #if ENABLE_MON
46 + #include "mon.h"
47 + #endif
48 +
49   #define DEBUG 0
50   #include "debug.h"
51  
# Line 64 | Line 68 | void EmulOp(uint16 opcode, M68kRegisters
68                                     r->d[0], r->d[1], r->d[2], r->d[3], r->d[4], r->d[5], r->d[6], r->d[7],
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] = {"rmon", NULL};
73 +                        mon(1, arg);
74 + #endif
75                          QuitEmulator();
76                          break;
77                  }
# Line 402 | Line 410 | void EmulOp(uint16 opcode, M68kRegisters
410                          break;
411                  }
412  
405                case M68K_EMUL_OP_MEMORY_DISPATCH: {    // MemoryDispatch() replacement routine
406                        int16 sel = r->d[0];
407                        D(bug("MemoryDispatch(%d)\n", sel));
408                        switch (sel) {
409                                case -6:        // GetLogicalRAMSize
410                                        r->d[0] = RAMSize;
411                                        break;
412                                case -3:
413                                        r->d[0] = 0x1000;
414                                        break;
415                                case 0:         // HoldMemory
416                                case 1:         // UnholdMemory
417                                case 2:         // LockMemory
418                                case 3:         // UnlockMemory
419                                case 4:         // LockMemoryContiguous
420                                case 6:         // ProtectMemory
421                                case 7:         // UnprotectMemory
422                                        r->d[0] = 0;
423                                        break;
424                                default:
425                                        printf("FATAL: MemoryDispatch(%d): illegal selector\n", sel);
426                                        r->d[0] = (uint32)-502;
427                                        break;
428                        }
429                        break;
430                }
431
413                  case M68K_EMUL_OP_IRQ:                  // Level 1 interrupt
414                          r->d[0] = 0;
415                          if (InterruptFlags & INTFLAG_60HZ) {
# Line 503 | Line 484 | void EmulOp(uint16 opcode, M68kRegisters
484                          break;
485   #endif
486  
487 +                case M68K_EMUL_OP_BLOCK_MOVE:           // BlockMove() replacement
488 +                        memmove(Mac2HostAddr(r->a[1]), Mac2HostAddr(r->a[0]), r->d[0]);
489 +                        break;
490 +
491                  default:
492                          printf("FATAL: EMUL_OP called with bogus opcode %08x\n", opcode);
493                          printf("d0 %08lx d1 %08lx d2 %08lx d3 %08lx\n"
# Line 513 | Line 498 | void EmulOp(uint16 opcode, M68kRegisters
498                                     r->d[0], r->d[1], r->d[2], r->d[3], r->d[4], r->d[5], r->d[6], r->d[7],
499                                     r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7],
500                                     r->sr);
501 + #if ENABLE_MON
502 +                        char *arg[2] = {"rmon", NULL};
503 +                        mon(1, arg);
504 + #endif
505                          QuitEmulator();
506                          break;
507          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines