From: Toni Wilen Date: Sat, 8 Jan 2022 11:30:55 +0000 (+0200) Subject: x86 AT bridgeboard boot crash workaround X-Git-Tag: 4910~26 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=699eefbe3205f94a95ba279cf11d058965c84b63;p=francis%2Fwinuae.git x86 AT bridgeboard boot crash workaround --- diff --git a/pcem/keyboard_at.cpp b/pcem/keyboard_at.cpp index 7b64520b..07729ac6 100644 --- a/pcem/keyboard_at.cpp +++ b/pcem/keyboard_at.cpp @@ -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; diff --git a/x86.cpp b/x86.cpp index 17b88f8b..f70816cc 100644 --- a/x86.cpp +++ b/x86.cpp @@ -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;