Browse Source

Add pit.dump

Fabian 5 years ago
parent
commit
28a6f1a84a
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/pit.js

+ 7 - 0
src/pit.js

@@ -311,3 +311,10 @@ PIT.prototype.port43_write = function(reg_byte)
     this.counter_mode[i] = mode;
     this.counter_read_mode[i] = read_mode;
 };
+
+PIT.prototype.dump = function()
+{
+    const reload = this.counter_reload[0];
+    const time = (reload || 0x10000) / OSCILLATOR_FREQ;
+    dbg_log("counter0 ticks every " + time + "ms (reload=" + reload + ")");
+};