x86 AT bridgeboard boot crash workaround

This commit is contained in:
Toni Wilen 2022-01-08 13:30:55 +02:00
parent 7337a29f66
commit 699eefbe32
2 changed files with 5 additions and 5 deletions

View File

@ -481,7 +481,7 @@ void keyboard_at_write(uint16_t port, uint8_t val, void *priv)
speaker_enable = val & 2;
if (speaker_enable)
was_speaker_enable = 1;
pit_set_gate(&pit, 2, val & 1);
pit_set_gate((PIT*)priv, 2, val & 1);
if (romset == ROM_XI8088)
{
@ -823,7 +823,7 @@ void keyboard_at_init()
{
//return;
memset(&keyboard_at, 0, sizeof(keyboard_at));
io_sethandler(0x0060, 0x0005, keyboard_at_read, NULL, NULL, keyboard_at_write, NULL, NULL, NULL);
io_sethandler(0x0060, 0x0005, keyboard_at_read, NULL, NULL, keyboard_at_write, NULL, NULL, &pit);
keyboard_at_reset();
keyboard_send = keyboard_at_adddata_keyboard;
keyboard_poll = keyboard_at_poll;

View File

@ -1731,7 +1731,7 @@ void portout(uint16_t portnum, uint8_t v)
{
case 0x60:
if (xb->type >= TYPE_2286) {
keyboard_at_write(portnum, v, NULL);
keyboard_at_write(portnum, v, &pit);
} else {
aio = 0x41f;
}
@ -1739,7 +1739,7 @@ void portout(uint16_t portnum, uint8_t v)
case 0x61:
//write_log(_T("OUT Port B %02x\n"), v);
if (xb->type >= TYPE_2286) {
keyboard_at_write(portnum, v, NULL);
keyboard_at_write(portnum, v, &pit);
} else {
timer_process();
//timer_update_outstanding();
@ -1796,7 +1796,7 @@ void portout(uint16_t portnum, uint8_t v)
break;
case 0x64:
if (xb->type >= TYPE_2286) {
keyboard_at_write(portnum, v, NULL);
keyboard_at_write(portnum, v, &pit);
}
break;