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

Comparing BasiliskII/src/adb.cpp (file contents):
Revision 1.13 by gbeauche, 2004-11-13T14:28:49Z vs.
Revision 1.14 by gbeauche, 2004-11-22T22:42:55Z

# Line 34 | Line 34
34   #include "video.h"
35   #include "adb.h"
36  
37 + #ifdef POWERPC_ROM
38 + #include "thunks.h"
39 + #endif
40 +
41   #define DEBUG 0
42   #include "debug.h"
43  
# Line 377 | Line 381 | void ADBInterrupt(void)
381                  // Update mouse position (absolute)
382                  if (mx != old_mouse_x || my != old_mouse_y) {
383   #ifdef POWERPC_ROM
384 <                        static const uint16 proc[] = {
385 <                                PW(0x2f08),             // move.l a0,-(sp)
386 <                                PW(0x2f00),             // move.l d0,-(sp)
387 <                                PW(0x2f01),             // move.l d1,-(sp)
388 <                                PW(0x7001),             // moveq #1,d0 (MoveTo)
389 <                                PW(0xaadb),             // CursorDeviceDispatch
390 <                                PW(M68K_RTS)
384 >                        static const uint8 proc_template[] = {
385 >                                0x2f, 0x08,             // move.l a0,-(sp)
386 >                                0x2f, 0x00,             // move.l d0,-(sp)
387 >                                0x2f, 0x01,             // move.l d1,-(sp)
388 >                                0x70, 0x01,             // moveq #1,d0 (MoveTo)
389 >                                0xaa, 0xdb,             // CursorDeviceDispatch
390 >                                M68K_RTS >> 8, M68K_RTS
391                          };
392 +                        BUILD_SHEEPSHAVER_PROCEDURE(proc);
393                          r.a[0] = ReadMacInt32(mouse_base + 4);
394                          r.d[0] = mx;
395                          r.d[1] = my;
396 <                        Execute68k(Host2MacAddr((uint8 *)proc), &r);
396 >                        Execute68k(proc, &r);
397   #else
398                          WriteMacInt16(0x82a, mx);
399                          WriteMacInt16(0x828, my);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines