(address uint16, value byte)
| 55 | } |
| 56 | |
| 57 | func (m *Mapper3) Write(address uint16, value byte) { |
| 58 | switch { |
| 59 | case address < 0x2000: |
| 60 | index := m.chrBank*0x2000 + int(address) |
| 61 | m.CHR[index] = value |
| 62 | case address >= 0x8000: |
| 63 | m.chrBank = int(value & 3) |
| 64 | case address >= 0x6000: |
| 65 | index := int(address) - 0x6000 |
| 66 | m.SRAM[index] = value |
| 67 | default: |
| 68 | log.Fatalf("unhandled mapper3 write at address: 0x%04X", address) |
| 69 | } |
| 70 | } |
nothing calls this directly
no outgoing calls
no test coverage detected