Added port 0xE9 hack switch to runtime options.
This commit is contained in:
parent
4f906524de
commit
4db9f76819
@ -1727,6 +1727,7 @@ void bx_init_options()
|
|||||||
misc->add(SIM->get_param(BXPN_MOUSE_ENABLED));
|
misc->add(SIM->get_param(BXPN_MOUSE_ENABLED));
|
||||||
misc->add(SIM->get_param(BXPN_KBD_PASTE_DELAY));
|
misc->add(SIM->get_param(BXPN_KBD_PASTE_DELAY));
|
||||||
misc->add(SIM->get_param(BXPN_USER_SHORTCUT));
|
misc->add(SIM->get_param(BXPN_USER_SHORTCUT));
|
||||||
|
misc->add(SIM->get_param(BXPN_PORT_E9_HACK));
|
||||||
misc->set_options(misc->SHOW_PARENT | misc->SHOW_GROUP_NAME);
|
misc->set_options(misc->SHOW_PARENT | misc->SHOW_GROUP_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ void bx_unmapped_c::init(void)
|
|||||||
s.port8e = 0x00;
|
s.port8e = 0x00;
|
||||||
s.shutdown = 0;
|
s.shutdown = 0;
|
||||||
s.port_e9_hack = SIM->get_param_bool(BXPN_PORT_E9_HACK)->get();
|
s.port_e9_hack = SIM->get_param_bool(BXPN_PORT_E9_HACK)->get();
|
||||||
|
SIM->get_param_num(BXPN_PORT_E9_HACK)->set_handler(param_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static IO port read callback handler
|
// static IO port read callback handler
|
||||||
@ -283,3 +284,19 @@ return_from_write:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bit64s bx_unmapped_c::param_handler(bx_param_c *param, bool set, Bit64s val)
|
||||||
|
{
|
||||||
|
if (set) {
|
||||||
|
char pname[BX_PATHNAME_LEN];
|
||||||
|
param->get_param_path(pname, BX_PATHNAME_LEN);
|
||||||
|
if (set) {
|
||||||
|
if (!strcmp(pname, BXPN_PORT_E9_HACK)) {
|
||||||
|
BX_UM_THIS s.port_e9_hack = (val != 0);
|
||||||
|
} else {
|
||||||
|
BX_PANIC(("param_handler called with unexpected parameter '%s'", pname));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
@ -44,6 +44,7 @@ private:
|
|||||||
Bit32u read(Bit32u address, unsigned io_len);
|
Bit32u read(Bit32u address, unsigned io_len);
|
||||||
void write(Bit32u address, Bit32u value, unsigned io_len);
|
void write(Bit32u address, Bit32u value, unsigned io_len);
|
||||||
#endif
|
#endif
|
||||||
|
static Bit64s param_handler(bx_param_c *param, bool set, Bit64s val);
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Bit8u port80;
|
Bit8u port80;
|
||||||
|
Loading…
Reference in New Issue
Block a user