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

Method Connect

io/display.go:41–68  ·  view source on GitHub ↗
(ioBus *components.IOBus, mainBus *components.Bus)

Source from the content-addressed store, hash-verified

39}
40
41func (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
70func (k *DisplayAdapter) Update() {
71 // check if bus = 0x0007

Callers

nothing calls this directly

Calls 8

NewBusFunction · 0.92
NewBitFunction · 0.92
NewANDGate8Function · 0.92
NewANDGate3Function · 0.92
NewANDGate5Function · 0.92
NewNOTGateFunction · 0.92
newDisplayRAMFunction · 0.85
UpdateMethod · 0.65

Tested by

no test coverage detected