]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
x86 AT bridgeboard boot crash workaround
authorToni Wilen <twilen@winuae.net>
Sat, 8 Jan 2022 11:30:55 +0000 (13:30 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 8 Jan 2022 11:30:55 +0000 (13:30 +0200)
pcem/keyboard_at.cpp
x86.cpp

index 7b64520b48b7820535a43fe640a85582b8e9f335..07729ac6b91bf5cb3d299b43b700668df9002dc6 100644 (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;
diff --git a/x86.cpp b/x86.cpp
index 17b88f8b7588b42cb9847496d26d17662c5e90ca..f70816cc2167663d8ccc01ccc3eab7a9f2541c37 100644 (file)
--- 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;