- mouse type definitions moved to siminterface.h and BX_* prefix added
- mouse type 'ps2' is now the default again
This commit is contained in:
parent
b054e3ac36
commit
5ed6a80f69
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: config.cc,v 1.22 2004-12-07 21:06:25 vruppert Exp $
|
||||
// $Id: config.cc,v 1.23 2004-12-09 18:47:34 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -1150,8 +1150,8 @@ void bx_init_options ()
|
||||
"Mouse type",
|
||||
"The mouse type can be one of these: 'none', 'ps2', 'imps2', 'serial', 'serial_wheel'",
|
||||
mouse_type_list,
|
||||
0,
|
||||
0);
|
||||
BX_MOUSE_TYPE_PS2,
|
||||
BX_MOUSE_TYPE_NONE);
|
||||
bx_options.com[i].Omode->set_ask_format ("Choose the type of mouse [%s] ");
|
||||
|
||||
bx_options.Oips = new bx_param_num_c (BXP_IPS,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: siminterface.h,v 1.128 2004-11-30 21:02:56 vruppert Exp $
|
||||
// $Id: siminterface.h,v 1.129 2004-12-09 18:47:35 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Before I can describe what this file is for, I have to make the
|
||||
@ -1273,6 +1273,12 @@ enum {
|
||||
#define BX_CLOCK_TIME0_LOCAL 1
|
||||
#define BX_CLOCK_TIME0_UTC 2
|
||||
|
||||
#define BX_MOUSE_TYPE_NONE 0
|
||||
#define BX_MOUSE_TYPE_PS2 1
|
||||
#define BX_MOUSE_TYPE_IMPS2 2
|
||||
#define BX_MOUSE_TYPE_SERIAL 3
|
||||
#define BX_MOUSE_TYPE_SERIAL_WHEEL 4
|
||||
|
||||
BOCHSAPI extern char *bochs_start_names[];
|
||||
BOCHSAPI extern int n_bochs_start_names;
|
||||
BOCHSAPI extern char *floppy_type_names[];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: keyboard.cc,v 1.95 2004-12-07 21:06:34 vruppert Exp $
|
||||
// $Id: keyboard.cc,v 1.96 2004-12-09 18:47:36 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -125,7 +125,7 @@ bx_keyb_c::resetinternals(bx_bool powerup)
|
||||
void
|
||||
bx_keyb_c::init(void)
|
||||
{
|
||||
BX_DEBUG(("Init $Id: keyboard.cc,v 1.95 2004-12-07 21:06:34 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: keyboard.cc,v 1.96 2004-12-09 18:47:36 vruppert Exp $"));
|
||||
Bit32u i;
|
||||
|
||||
DEV_register_irq(1, "8042 Keyboard controller");
|
||||
@ -1224,8 +1224,8 @@ bx_keyb_c::kbd_ctrl_to_mouse(Bit8u value)
|
||||
{
|
||||
// if we are not using a ps2 mouse, some of the following commands need to return different values
|
||||
bx_bool is_ps2 = 0;
|
||||
if ((bx_options.Omouse_type->get() == MOUSE_TYPE_PS2) ||
|
||||
(bx_options.Omouse_type->get() == MOUSE_TYPE_IMPS2)) is_ps2 = 1;
|
||||
if ((bx_options.Omouse_type->get() == BX_MOUSE_TYPE_PS2) ||
|
||||
(bx_options.Omouse_type->get() == BX_MOUSE_TYPE_IMPS2)) is_ps2 = 1;
|
||||
|
||||
BX_DEBUG(("MOUSE: kbd_ctrl_to_mouse(%02xh)", (unsigned) value));
|
||||
BX_DEBUG((" enable = %u", (unsigned) BX_KEY_THIS s.mouse.enable));
|
||||
@ -1248,7 +1248,7 @@ bx_keyb_c::kbd_ctrl_to_mouse(Bit8u value)
|
||||
} else if ((value == 100) && (BX_KEY_THIS s.mouse.im_request == 1)) {
|
||||
BX_KEY_THIS s.mouse.im_request = 2;
|
||||
} else if ((value == 80) && (BX_KEY_THIS s.mouse.im_request == 2)) {
|
||||
if (BX_KEY_THIS s.mouse.type == MOUSE_TYPE_IMPS2) {
|
||||
if (BX_KEY_THIS s.mouse.type == BX_MOUSE_TYPE_IMPS2) {
|
||||
BX_INFO(("wheel mouse mode enabled"));
|
||||
BX_KEY_THIS s.mouse.im_mode = 1;
|
||||
} else {
|
||||
@ -1538,8 +1538,8 @@ bx_keyb_c::mouse_motion(int delta_x, int delta_y, int delta_z, unsigned button_s
|
||||
return;
|
||||
|
||||
// redirect mouse data to the serial device
|
||||
if ((BX_KEY_THIS s.mouse.type == MOUSE_TYPE_SERIAL) ||
|
||||
(BX_KEY_THIS s.mouse.type == MOUSE_TYPE_SERIAL_WHEEL)) {
|
||||
if ((BX_KEY_THIS s.mouse.type == BX_MOUSE_TYPE_SERIAL) ||
|
||||
(BX_KEY_THIS s.mouse.type == BX_MOUSE_TYPE_SERIAL_WHEEL)) {
|
||||
DEV_serial_mouse_enq(delta_x, delta_y, delta_z, button_state);
|
||||
return;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: keyboard.h,v 1.27 2004-12-07 21:06:35 vruppert Exp $
|
||||
// $Id: keyboard.h,v 1.28 2004-12-09 18:47:36 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -46,12 +46,6 @@
|
||||
#define MOUSE_MODE_REMOTE 12
|
||||
#define MOUSE_MODE_WRAP 13
|
||||
|
||||
#define MOUSE_TYPE_NONE 0
|
||||
#define MOUSE_TYPE_PS2 1
|
||||
#define MOUSE_TYPE_IMPS2 2
|
||||
#define MOUSE_TYPE_SERIAL 3
|
||||
#define MOUSE_TYPE_SERIAL_WHEEL 4
|
||||
|
||||
class bx_keyb_c : public bx_keyb_stub_c {
|
||||
public:
|
||||
bx_keyb_c(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: serial.cc,v 1.61 2004-12-07 21:06:35 vruppert Exp $
|
||||
// $Id: serial.cc,v 1.62 2004-12-09 18:47:36 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2004 MandrakeSoft S.A.
|
||||
@ -892,12 +892,12 @@ bx_serial_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
} else {
|
||||
if (BX_SER_THIS s[port].io_mode == BX_SER_MODE_MOUSE) {
|
||||
if (BX_SER_THIS detect_mouse == 2) {
|
||||
if (bx_options.Omouse_type->get() == MOUSE_TYPE_SERIAL) {
|
||||
if (bx_options.Omouse_type->get() == BX_MOUSE_TYPE_SERIAL) {
|
||||
BX_SER_THIS mouse_internal_buffer.head = 0;
|
||||
BX_SER_THIS mouse_internal_buffer.num_elements = 1;
|
||||
BX_SER_THIS mouse_internal_buffer.buffer[0] = 'M';
|
||||
}
|
||||
if (bx_options.Omouse_type->get() == MOUSE_TYPE_SERIAL_WHEEL) {
|
||||
if (bx_options.Omouse_type->get() == BX_MOUSE_TYPE_SERIAL_WHEEL) {
|
||||
BX_SER_THIS mouse_internal_buffer.head = 0;
|
||||
BX_SER_THIS mouse_internal_buffer.num_elements = 6;
|
||||
BX_SER_THIS mouse_internal_buffer.buffer[0] = 'M';
|
||||
@ -1307,7 +1307,7 @@ bx_serial_c::serial_mouse_enq(int delta_x, int delta_y, int delta_z, unsigned bu
|
||||
|
||||
/* enqueue mouse data in multibyte internal mouse buffer */
|
||||
int bytes = 3;
|
||||
if (bx_options.Omouse_type->get() == MOUSE_TYPE_SERIAL_WHEEL) bytes = 4;
|
||||
if (bx_options.Omouse_type->get() == BX_MOUSE_TYPE_SERIAL_WHEEL) bytes = 4;
|
||||
for (int i = 0; i < bytes; i++) {
|
||||
tail = (BX_SER_THIS mouse_internal_buffer.head + BX_SER_THIS mouse_internal_buffer.num_elements) %
|
||||
BX_MOUSE_BUFF_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user