--- np2/io/mouseif.c 2004/03/19 00:30:01 1.12 +++ np2/io/mouseif.c 2005/05/20 13:59:47 1.15 @@ -114,6 +114,8 @@ static void setportc(REG8 value) { if ((value ^ mouseif.upd8255.portc) & 0x10) { if (!(value & 0x10)) { if (!nevent_iswork(NEVENT_MOUSE)) { + // 割り込みを入れとく + pic_setirq(0x0d); nevent_set(NEVENT_MOUSE, mouseif.intrclock << mouseif.timing, mouseint, NEVENT_ABSOLUTE); } @@ -151,9 +153,11 @@ static void IOOUTCALL mouseif_o7fdf(UINT portc = 0; if (dat & uPD8255_CTRL) { mouseif.upd8255.mode = (UINT8)dat; +#if 0 pic_resetirq(0x0d); nevent_set(NEVENT_MOUSE, mouseif.intrclock << mouseif.timing, mouseint, NEVENT_ABSOLUTE); +#endif } else { sft = (dat >> 1) & 7; @@ -179,7 +183,11 @@ static REG8 IOINPCALL mouseif_i7fd9(UINT ret |= mouseif.rapid; } ret &= 0xf0; +#if 1 + ret |= 0x40; // for shizuku +#else ret |= 0x50; +#endif portc = mouseif.upd8255.portc; if (portc & 0x80) { x = mouseif.latch_x; @@ -251,10 +259,12 @@ void mouseif_reset(void) { ZeroMemory(&mouseif, sizeof(mouseif)); mouseif.upd8255.porta = 0x00; mouseif.upd8255.portb = 0x00; - mouseif.upd8255.portc = 0x10; + mouseif.upd8255.portc = 0xf0; // ver0.82 mouseif.upd8255.mode = 0x93; mouseif.intrclock = pccore.realclock / 120; mouseif.moveclock = pccore.realclock / 56400; + mouseif.latch_x = -1; + mouseif.latch_y = -1; } void mouseif_bind(void) {