Subversion Repositories group.electronics

Rev

Rev 172 | Rev 175 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 172 Rev 173
Line 93... Line 93...
93
            }
93
            }
94
 
94
 
95
        }
95
        }
96
 
96
 
97
        public bool Tick(ref byte shadow) {
97
        public bool Tick(ref byte shadow) {
-
 
98
           
98
            UInt16 data;
99
            UInt16 data;
99
            byte tmpshadow = shadow;
100
            byte tmpshadow = shadow;
100
            if (Globals.BiosOutput.TryGetValue(this.address, out data)) {
101
            if (Globals.BiosOutput.TryGetValue(this.address, out data)) {
-
 
102
 
101
                this.value = (UInt16)((data & mask) >> shift);
103
                this.value = (UInt16)((data & mask) >> shift);
102
 
104
 
103
                if (this.value == 1)
105
                if (this.value == 1)
104
                    Globals.setBit(shadow, this.pin);
106
                    Globals.setBit(ref shadow, this.pin);
105
                else
107
                else
106
                    Globals.clearBit(shadow, this.pin);
108
                    Globals.clearBit(ref shadow, this.pin);
107
 
-
 
108
 
-
 
109
            }
109
            }
110
 
110
 
111
            if (tmpshadow == shadow)
111
            if (tmpshadow == shadow)
112
                return false;
112
                return false;
113
 
113
 
114
            return true;
114
            return true;
115
        }
115
        }
116
 
116
 
117
 
-
 
118
    }
117
    }
119
 
118
 
120
 
119
 
121
    public abstract class Control {
120
    public abstract class Control {
122
        public UInt64 value { get; set; }
121
        public UInt64 value { get; set; }