(inputBus, outputBus *components.Bus)
| 25 | } |
| 26 | |
| 27 | func newDisplayRAM(inputBus, outputBus *components.Bus) *displayRAM { |
| 28 | m := new(displayRAM) |
| 29 | m.InputAddressRegister = *components.NewRegister("IMAR", inputBus, inputBus) |
| 30 | m.inputRowDecoder = *components.NewDecoder8x256() |
| 31 | m.inputColDecoder = *components.NewDecoder8x256() |
| 32 | |
| 33 | m.OutputAddressRegister = *components.NewRegister("OMAR", outputBus, outputBus) |
| 34 | m.outputRowDecoder = *components.NewDecoder8x256() |
| 35 | m.outputColDecoder = *components.NewDecoder8x256() |
| 36 | |
| 37 | m.inputBus = inputBus |
| 38 | m.outputBus = outputBus |
| 39 | |
| 40 | // 0xF0 x 0xA0 |
| 41 | for i := 0; i < 256; i++ { |
| 42 | for j := 0; j < 256; j++ { |
| 43 | c := memory.NewCell(inputBus, outputBus) |
| 44 | inputBus.SetValue(0x0000) |
| 45 | c.Update(true, false) |
| 46 | c.Update(false, false) |
| 47 | m.data[i][j] = *c |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | return m |
| 52 | } |
| 53 | |
| 54 | func (m *displayRAM) Enable() { |
| 55 | m.enable.Update(true) |
no test coverage detected