(ioBus *components.IOBus, mainBus *components.Bus)
| 39 | } |
| 40 | |
| 41 | func (k *DisplayAdapter) Connect(ioBus *components.IOBus, mainBus *components.Bus) { |
| 42 | k.ioBus = ioBus |
| 43 | k.mainBus = mainBus |
| 44 | k.screenBus = components.NewBus(arch.BUS_WIDTH) |
| 45 | k.displayRAM = newDisplayRAM(k.mainBus, k.screenBus) |
| 46 | |
| 47 | k.displayAdapterActiveBit = components.NewBit() |
| 48 | k.displayAdapterActiveBit.Update(false, true) |
| 49 | k.displayAdapterActiveBit.Update(false, false) |
| 50 | k.addressSelectAndGate = *components.NewANDGate8() |
| 51 | k.isAddressOutputModeGate = *components.NewANDGate3() |
| 52 | k.inputMARSetGate = *components.NewANDGate5() |
| 53 | k.displayRAMSetGate = *components.NewANDGate5() |
| 54 | k.inputMAROutBus = components.NewBus(arch.BUS_WIDTH) |
| 55 | |
| 56 | k.writeToRAM = components.NewBit() |
| 57 | k.writeToRAM.Update(false, true) |
| 58 | k.writeToRAM.Update(false, false) |
| 59 | k.writeToRAMToggleGate = *circuit.NewNOTGate() |
| 60 | |
| 61 | for i := range k.addressSelectNOTGates { |
| 62 | k.addressSelectNOTGates[i] = *circuit.NewNOTGate() |
| 63 | } |
| 64 | |
| 65 | for i := range k.inputMarSetNOTGates { |
| 66 | k.inputMarSetNOTGates[i] = *circuit.NewNOTGate() |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | func (k *DisplayAdapter) Update() { |
| 71 | // check if bus = 0x0007 |
nothing calls this directly
no test coverage detected