mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-17 06:31:14 +00:00
Generate CursorDeviceDispatch() call onto the SheepShaver Procedures region
This commit is contained in:
parent
1eab606dcb
commit
aa6e44d380
@ -34,6 +34,10 @@
|
||||
#include "video.h"
|
||||
#include "adb.h"
|
||||
|
||||
#ifdef POWERPC_ROM
|
||||
#include "thunks.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
@ -377,18 +381,19 @@ void ADBInterrupt(void)
|
||||
// Update mouse position (absolute)
|
||||
if (mx != old_mouse_x || my != old_mouse_y) {
|
||||
#ifdef POWERPC_ROM
|
||||
static const uint16 proc[] = {
|
||||
PW(0x2f08), // move.l a0,-(sp)
|
||||
PW(0x2f00), // move.l d0,-(sp)
|
||||
PW(0x2f01), // move.l d1,-(sp)
|
||||
PW(0x7001), // moveq #1,d0 (MoveTo)
|
||||
PW(0xaadb), // CursorDeviceDispatch
|
||||
PW(M68K_RTS)
|
||||
static const uint8 proc_template[] = {
|
||||
0x2f, 0x08, // move.l a0,-(sp)
|
||||
0x2f, 0x00, // move.l d0,-(sp)
|
||||
0x2f, 0x01, // move.l d1,-(sp)
|
||||
0x70, 0x01, // moveq #1,d0 (MoveTo)
|
||||
0xaa, 0xdb, // CursorDeviceDispatch
|
||||
M68K_RTS >> 8, M68K_RTS
|
||||
};
|
||||
BUILD_SHEEPSHAVER_PROCEDURE(proc);
|
||||
r.a[0] = ReadMacInt32(mouse_base + 4);
|
||||
r.d[0] = mx;
|
||||
r.d[1] = my;
|
||||
Execute68k(Host2MacAddr((uint8 *)proc), &r);
|
||||
Execute68k(proc, &r);
|
||||
#else
|
||||
WriteMacInt16(0x82a, mx);
|
||||
WriteMacInt16(0x828, my);
|
||||
|
Loading…
x
Reference in New Issue
Block a user