MCPcopy Create free account
hub / github.com/fogleman/nes / writeRegister

Method writeRegister

nes/mapper1.go:107–118  ·  view source on GitHub ↗
(address uint16, value byte)

Source from the content-addressed store, hash-verified

105}
106
107func (m *Mapper1) writeRegister(address uint16, value byte) {
108 switch {
109 case address <= 0x9FFF:
110 m.writeControl(value)
111 case address <= 0xBFFF:
112 m.writeCHRBank0(value)
113 case address <= 0xDFFF:
114 m.writeCHRBank1(value)
115 case address <= 0xFFFF:
116 m.writePRGBank(value)
117 }
118}
119
120// Control (internal, $8000-$9FFF)
121func (m *Mapper1) writeControl(value byte) {

Callers 1

loadRegisterMethod · 0.95

Calls 4

writeControlMethod · 0.95
writeCHRBank0Method · 0.95
writeCHRBank1Method · 0.95
writePRGBankMethod · 0.95

Tested by

no test coverage detected