From 1b7be5151d2f33c75f70f09fb49190c958d5e3f7 Mon Sep 17 00:00:00 2001 From: Dan Luu Date: Sat, 23 Mar 2013 00:12:08 -0400 Subject: [PATCH] PIC ICW1 --- PIC.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PIC.js b/PIC.js index 00e14fe..97315b9 100644 --- a/PIC.js +++ b/PIC.js @@ -72,6 +72,16 @@ PIC.prototype.ioport_write = function(mem8_loc, x) { mem8_loc &= 1; if (mem8_loc == 0) { if (x & 0x10) { + /* + ICW1 + // 7:5 = address (if MCS-80/85 mode) + // 4 == 1 + // 3: 1 == level triggered, 0 == edge triggered + // 2: 1 == call interval 4, 0 == call interval 8 + // 1: 1 == single PIC, 0 == cascaded PICs + // 0: 1 == send ICW4 + + */ this.reset(); this.init_state = 1; this.init4 = x & 1;