(index int)
| 187 | } |
| 188 | |
| 189 | func (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 | |
| 201 | func (m *Mapper4) updateOffsets() { |
| 202 | switch m.prgMode { |