Forráskód Böngészése

PIT latch value - 1, fixes #65

copy 8 éve
szülő
commit
31ca64ccf6
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      src/pit.js

+ 2 - 1
src/pit.js

@@ -230,7 +230,8 @@ PIT.prototype.port43_write = function(reg_byte)
     {
         // latch
         this.counter_latch[i] = 2;
-        this.counter_latch_value[i] = this.counter_current[i];
+        var value = this.counter_current[i];
+        this.counter_latch_value[i] = value ? value - 1 : 0;
 
         return;
     }