MCPcopy Create free account
hub / github.com/djhworld/simple-computer / Update

Method Update

io/display.go:70–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70func (k *DisplayAdapter) Update() {
71 // check if bus = 0x0007
72 k.addressSelectNOTGates[0].Update(k.mainBus.GetOutputWire(8))
73 k.addressSelectNOTGates[1].Update(k.mainBus.GetOutputWire(9))
74 k.addressSelectNOTGates[2].Update(k.mainBus.GetOutputWire(10))
75 k.addressSelectNOTGates[3].Update(k.mainBus.GetOutputWire(11))
76 k.addressSelectNOTGates[4].Update(k.mainBus.GetOutputWire(12))
77 k.addressSelectAndGate.Update(
78 k.addressSelectNOTGates[0].Output(),
79 k.addressSelectNOTGates[1].Output(),
80 k.addressSelectNOTGates[2].Output(),
81 k.addressSelectNOTGates[3].Output(),
82 k.addressSelectNOTGates[4].Output(),
83 k.mainBus.GetOutputWire(13),
84 k.mainBus.GetOutputWire(14),
85 k.mainBus.GetOutputWire(15),
86 )
87
88 k.isAddressOutputModeGate.Update(
89 k.ioBus.IsSet(),
90 k.ioBus.IsAddressMode(),
91 k.ioBus.IsOutputMode(),
92 )
93
94 k.displayAdapterActiveBit.Update(k.addressSelectAndGate.Output(), k.isAddressOutputModeGate.Output())
95
96 // switch between writing to display RAM and writing to address register
97 if k.writeToRAM.Get() {
98 k.writeToDisplayRAM()
99 } else {
100 k.writeToInputMAR()
101 }
102
103}
104
105func (k *DisplayAdapter) toggleWriteToRAM() {
106 k.writeToRAMToggleGate.Update(k.writeToRAM.Get())

Callers

nothing calls this directly

Calls 9

writeToDisplayRAMMethod · 0.95
writeToInputMARMethod · 0.95
IsSetMethod · 0.80
IsAddressModeMethod · 0.80
IsOutputModeMethod · 0.80
UpdateMethod · 0.65
GetOutputWireMethod · 0.65
OutputMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected