Bochs/bochs/patches/patch.mouse-fix-linux-bsd

52 lines
1.8 KiB
Plaintext

----------------------------------------------------------------------
By Greg Alexander, 12/27/2000
Enable writes to the mouse output buffer and enable mouse DATA_READ command.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** bochs-2000_0325a/iodev/keyboard.cc Sat Mar 25 21:28:49 2000
--- iodev/keyboard.cc Wed Dec 27 09:06:40 2000
***************
*** 505,511 ****
break;
case 0xd3: // write mouse output buffer
! bx_panic("KBD: io write 0x64: command = 0xD3(write mouse outb)\n");
BX_KEY_THIS s.kbd_controller.expecting_port60h = 1;
break;
--- 505,513 ----
break;
case 0xd3: // write mouse output buffer
! //FIXME: Why was this a panic?
! bx_printf("KBD: io write 0x64: command = 0xD3(write mouse outb)\n");
! // following byte to port 60h written to output port as mouse write.
BX_KEY_THIS s.kbd_controller.expecting_port60h = 1;
break;
***************
*** 1264,1270 ****
--- 1266,1284 ----
bx_printf("[mouse] Get mouse information\n");
break;
+ case 0xeb: // Read Data (send a packet when in Remote Mode)
+ controller_enQ(0xFA, 1); // ACK
+ mouse_enQ_packet( ((BX_KEY_THIS s.mouse.button_status & 0x0f) | 0x08),
+ 0x00, 0x00 ); // bit3 of first byte always set
+ //assumed we really aren't in polling mode, a rather odd assumption.
+ bx_printf("[mouse] Warning: Read Data command partially supported.\n");
+ break;
+
default:
+ //EAh Set Stream Mode
+ //ECh Reset Wrap Mode
+ //EEh Set Wrap Mode
+ //F0h Set Remote Mode (polling mode, i.e. not stream mode.)
bx_panic("MOUSE: kbd_ctrl_to_mouse(%02xh)\n", (unsigned) value);
}
}