VirtualBox

Changeset 1531 in vbox


Ignore:
Timestamp:
Mar 16, 2007 1:54:28 PM (18 years ago)
Author:
vboxsync
Message:

Implemented INT15h, fn 0xC2 (mouse), subfn 3 - set resolution. MSD and Windows 3.x
setup no longer misdetect mouse as Logitech and properly report generic PS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r1530 r1531  
    42274227          //      2 = 100 dpi, 4 counts per millimeter
    42284228          //      3 = 200 dpi, 8 counts per millimeter
     4229#ifdef VBOX
     4230          comm_byte = inhibit_mouse_int_and_events(); // disable IRQ12 and packets
     4231          if (regs.u.r8.bh < 4) {
     4232            ret = send_to_mouse_ctrl(0xE8); // set resolution command
     4233            if (ret == 0) {
     4234              ret = get_mouse_data(&mouse_data1);
     4235              if (mouse_data1 != 0xfa)
     4236                BX_PANIC("Mouse status returned %02x (should be ack)\n", (unsigned)mouse_data1);
     4237              ret = send_to_mouse_ctrl(regs.u.r8.bh);
     4238              ret = get_mouse_data(&mouse_data1);
     4239              if (mouse_data1 != 0xfa)
     4240                BX_PANIC("Mouse status returned %02x (should be ack)\n", (unsigned)mouse_data1);
     4241              CLEAR_CF();
     4242              regs.u.r8.ah = 0;
     4243            } else {
     4244              // error
     4245              SET_CF();
     4246              regs.u.r8.ah = UNSUPPORTED_FUNCTION;
     4247            }
     4248          } else {
     4249            // error
     4250            SET_CF();
     4251            regs.u.r8.ah = UNSUPPORTED_FUNCTION;
     4252          }
     4253          set_kbd_command_byte(comm_byte); // restore IRQ12 and serial enable
     4254#else
    42294255          CLEAR_CF();
    42304256          regs.u.r8.ah = 0;
     4257#endif /* VBOX */
    42314258          break;
    42324259
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy