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

Method chrBankOffset

nes/mapper4.go:189–199  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

187}
188
189func (m *Mapper4) chrBankOffset(index int) int {
190 if index >= 0x80 {
191 index -= 0x100
192 }
193 index %= len(m.CHR) / 0x0400
194 offset := index * 0x0400
195 if offset < 0 {
196 offset += len(m.CHR)
197 }
198 return offset
199}
200
201func (m *Mapper4) updateOffsets() {
202 switch m.prgMode {

Callers 1

updateOffsetsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected