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.27 by cebix, 2001-07-11T19:26:13Z vs.
Revision 1.33 by gbeauche, 2005-03-19T17:43:03Z

# Line 1 | Line 1
1   /*
2   *  emul_op.cpp - 68k opcodes for ROM patches
3   *
4 < *  Basilisk II (C) 1997-2001 Christian Bauer
4 > *  Basilisk II (C) 1997-2005 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
# Line 240 | Line 240 | void EmulOp(uint16 opcode, M68kRegisters
240                          r.a[0] = PutScrapPatch;
241                          Execute68kTrap(0xa647, &r);             // SetToolTrap()
242  
243 +                        // Install GetScrap() patch
244 +                        if (GetScrapPatch) {
245 +                                r.d[0] = 0xa9fd;
246 +                                r.a[0] = GetScrapPatch;
247 +                                Execute68kTrap(0xa647, &r);     // SetToolTrap()
248 +                        }
249 +
250                          // Setup fake ASC registers
251                          if (ROMVersion == ROM_VERSION_32) {
252                                  r.d[0] = 0x1000;
# Line 346 | Line 353 | void EmulOp(uint16 opcode, M68kRegisters
353                          break;
354  
355                  case M68K_EMUL_OP_ETHER_READ_PACKET:
356 <                        EtherReadPacket((uint8 **)&r->a[0], r->a[3], r->d[3], r->d[1]);
356 >                        EtherReadPacket(r->a[0], r->a[3], r->d[3], r->d[1]);
357                          break;
358  
359                  case M68K_EMUL_OP_SOUNDIN_OPEN:         // Sound input driver functions
# Line 437 | Line 444 | void EmulOp(uint16 opcode, M68kRegisters
444  
445                          if (InterruptFlags & INTFLAG_60HZ) {
446                                  ClearInterruptFlag(INTFLAG_60HZ);
447 +
448 +                                // Increment Ticks variable
449 +                                WriteMacInt32(0x16a, ReadMacInt32(0x16a) + 1);
450 +
451                                  if (HasMacStarted()) {
452  
453                                          // Mac has started, execute all 60Hz interrupt functions
# Line 499 | Line 510 | void EmulOp(uint16 opcode, M68kRegisters
510                          break;
511                  }
512  
513 +                case M68K_EMUL_OP_GET_SCRAP: {          // GetScrap() patch
514 +                        void **scrap_handle = (void **)Mac2HostAddr(ReadMacInt32(r->a[7] + 4));
515 +                        uint32 type = ReadMacInt32(r->a[7] + 8);
516 +                        int32 length = ReadMacInt32(r->a[7] + 12);
517 +                        GetScrap(scrap_handle, type, length);
518 +                        break;
519 +                }
520 +
521                  case M68K_EMUL_OP_CHECKLOAD: {          // vCheckLoad() patch (resource loader)
522                          uint32 type = r->d[1];
523                          int16 id = ReadMacInt16(r->a[2]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines