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

Struct DumbPeripheral

cpu/cpu_test.go:1018–1025  ·  view source on GitHub ↗

Dumb peripheral that just contains a register In 'ENABLE' state: emits the values 0x00DA for data mode, and 0x00AD for address mode In SET state: sets the flags outputDataMode and outputAddressMode based on the data/address value on the bus

Source from the content-addressed store, hash-verified

1016// In SET state:
1017// sets the flags outputDataMode and outputAddressMode based on the data/address value on the bus
1018type DumbPeripheral struct {
1019 ioBus *components.IOBus
1020 mainBus *components.Bus
1021
1022 value components.Register
1023 outputDataMode bool
1024 outputAddressMode bool
1025}
1026
1027func NewDumbPeripheral() *DumbPeripheral {
1028 p := new(DumbPeripheral)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected