]> git.sesse.net Git - pistorm/commitdiff
Update emulator.c
authorbeeanyew <beeanyew@gmail.com>
Sat, 20 Feb 2021 14:38:16 +0000 (15:38 +0100)
committerbeeanyew <beeanyew@gmail.com>
Sat, 20 Feb 2021 14:38:16 +0000 (15:38 +0100)
emulator.c

index e6a7c6b129080a6f9e15d4adfb4fa6f21f9db934..1e205b1527ff9ad7617f53d8e98351f651d19fbb 100644 (file)
@@ -77,10 +77,12 @@ void *iplThread(void *args) {
 
   while (1) {
     if (!gpio_get_irq()) {
-      if (irq == 0)
-        irq = 1;
+      irq = 1;
       m68k_end_timeslice();
     }
+    else {
+      irq = 0;
+    }
 
     if (gayle_ide_enabled) {
       if (((gayle_int & 0x80) || gayle_a4k_int) && (get_ide(0)->drive[0].intrq || get_ide(0)->drive[1].intrq)) {
@@ -91,7 +93,7 @@ void *iplThread(void *args) {
       else
         gayleirq = 0;
     }
-    usleep(0);
+    //usleep(0);
   }
   return args;
 }