MCPcopy Index your code
hub / github.com/fogleman/nes / MirrorAddress

Function MirrorAddress

nes/memory.go:129–134  ·  view source on GitHub ↗
(mode byte, address uint16)

Source from the content-addressed store, hash-verified

127}
128
129func MirrorAddress(mode byte, address uint16) uint16 {
130 address = (address - 0x2000) % 0x1000
131 table := address / 0x0400
132 offset := address % 0x0400
133 return 0x2000 + MirrorLookup[mode][table]*0x0400 + offset
134}

Callers 2

ReadMethod · 0.85
WriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected