(address uint16, value byte)
| 44 | } |
| 45 | |
| 46 | func (m *Mapper7) Write(address uint16, value byte) { |
| 47 | switch { |
| 48 | case address < 0x2000: |
| 49 | m.CHR[address] = value |
| 50 | case address >= 0x8000: |
| 51 | m.prgBank = int(value & 7) |
| 52 | switch value & 0x10 { |
| 53 | case 0x00: |
| 54 | m.Cartridge.Mirror = MirrorSingle0 |
| 55 | case 0x10: |
| 56 | m.Cartridge.Mirror = MirrorSingle1 |
| 57 | } |
| 58 | case address >= 0x6000: |
| 59 | index := int(address) - 0x6000 |
| 60 | m.SRAM[index] = value |
| 61 | default: |
| 62 | log.Fatalf("unhandled mapper7 write at address: 0x%04X", address) |
| 63 | } |
| 64 | } |
nothing calls this directly
no outgoing calls
no test coverage detected