MCPcopy
hub / github.com/fogleman/nes / readRegister

Method readRegister

nes/ppu.go:208–218  ·  view source on GitHub ↗
(address uint16)

Source from the content-addressed store, hash-verified

206}
207
208func (ppu *PPU) readRegister(address uint16) byte {
209 switch address {
210 case 0x2002:
211 return ppu.readStatus()
212 case 0x2004:
213 return ppu.readOAMData()
214 case 0x2007:
215 return ppu.readData()
216 }
217 return 0
218}
219
220func (ppu *PPU) writeRegister(address uint16, value byte) {
221 ppu.register = value

Callers 1

ReadMethod · 0.45

Calls 3

readStatusMethod · 0.95
readOAMDataMethod · 0.95
readDataMethod · 0.95

Tested by

no test coverage detected