()
| 68 | } |
| 69 | |
| 70 | func (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 | |
| 105 | func (k *DisplayAdapter) toggleWriteToRAM() { |
| 106 | k.writeToRAMToggleGate.Update(k.writeToRAM.Get()) |
nothing calls this directly
no test coverage detected