|
|
| version 1.7, 2004/01/13 05:30:58 | version 1.9, 2004/03/05 04:39:59 |
|---|---|
| Line 3 | Line 3 |
| #include "cpucore.h" | #include "cpucore.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| #include "keystat.h" | |
| // マウス ver0.28 | // マウス ver0.28 |
| Line 19 void mouseif_sync(void) { | Line 20 void mouseif_sync(void) { |
| // 今回の移動量を取得 | // 今回の移動量を取得 |
| mouseif.b = mousemng_getstat(&mouseif.sx, &mouseif.sy, 1); | mouseif.b = mousemng_getstat(&mouseif.sx, &mouseif.sy, 1); |
| if (np2cfg.KEY_MODE == 3) { | if (np2cfg.KEY_MODE == 3) { |
| mouseif.b &= keyext_getmouse(&mouseif.sx, &mouseif.sy); | mouseif.b &= keystat_getmouse(&mouseif.sx, &mouseif.sy); |
| } | } |
| mouseif.rx = mouseif.sx; | mouseif.rx = mouseif.sx; |
| mouseif.ry = mouseif.sy; | mouseif.ry = mouseif.sy; |
| Line 83 void mouseint(NEVENTITEM item) { | Line 84 void mouseint(NEVENTITEM item) { |
| if (item->flag & NEVENT_SETEVENT) { | if (item->flag & NEVENT_SETEVENT) { |
| if (!(mouseif.portc & 0x10)) { | if (!(mouseif.portc & 0x10)) { |
| pic_setirq(0x0d); | pic_setirq(0x0d); |
| TRACEOUT(("mouse int")); | |
| nevent_set(NEVENT_MOUSE, mouseif.intrclock << mouseif.timing, | nevent_set(NEVENT_MOUSE, mouseif.intrclock << mouseif.timing, |
| mouseint, NEVENT_RELATIVE); | mouseint, NEVENT_RELATIVE); |
| } | } |
| Line 132 static void IOOUTCALL mouseif_o7fdd(UINT | Line 134 static void IOOUTCALL mouseif_o7fdd(UINT |
| static void IOOUTCALL mouseif_o7fdf(UINT port, REG8 dat) { | static void IOOUTCALL mouseif_o7fdf(UINT port, REG8 dat) { |
| if (dat & 0xf0) { | if (!(dat & 0xf0)) { |
| mouseif.mode = (UINT8)dat; | |
| if (dat == 0x93) { | |
| setportc(0); | |
| } | |
| } | |
| else { | |
| if (dat & 1) { | if (dat & 1) { |
| setportc((REG8)(mouseif.portc | (1 << (dat >> 1)))); | setportc((REG8)(mouseif.portc | (1 << (dat >> 1)))); |
| } | } |
| Line 146 static void IOOUTCALL mouseif_o7fdf(UINT | Line 142 static void IOOUTCALL mouseif_o7fdf(UINT |
| setportc((REG8)(mouseif.portc & (~(1 << (dat >> 1))))); | setportc((REG8)(mouseif.portc & (~(1 << (dat >> 1))))); |
| } | } |
| } | } |
| else if (dat & 0x80) { | |
| mouseif.mode = (UINT8)dat; | |
| setportc(0); | |
| } | |
| (void)port; | (void)port; |
| } | } |
| Line 181 static REG8 IOINPCALL mouseif_i7fd9(UINT | Line 181 static REG8 IOINPCALL mouseif_i7fd9(UINT |
| else { | else { |
| ret |= (x >> 4) & 0x0f; | ret |= (x >> 4) & 0x0f; |
| } | } |
| // TRACEOUT(("%x %x mouse [%x] %d -> %x", CPU_CS, CPU_IP, portc & 0x20, y, ret)); | |
| (void)port; | (void)port; |
| TRACEOUT(("mouse read %x", ret)); | |
| return(ret); | return(ret); |
| } | } |