(address uint16)
| 38 | } |
| 39 | |
| 40 | func (m *Mapper225) Read(address uint16) byte { |
| 41 | switch { |
| 42 | case address < 0x2000: |
| 43 | index := m.chrBank*0x2000 + int(address) |
| 44 | return m.CHR[index] |
| 45 | case address >= 0xC000: |
| 46 | index := m.prgBank2*0x4000 + int(address-0xC000) |
| 47 | return m.PRG[index] |
| 48 | case address >= 0x8000: |
| 49 | index := m.prgBank1*0x4000 + int(address-0x8000) |
| 50 | return m.PRG[index] |
| 51 | case address >= 0x6000: |
| 52 | index := int(address) - 0x6000 |
| 53 | return m.SRAM[index] |
| 54 | default: |
| 55 | log.Fatalf("unhandled Mapper225 read at address: 0x%04X", address) |
| 56 | } |
| 57 | return 0 |
| 58 | } |
| 59 | |
| 60 | func (m *Mapper225) Write(address uint16, value byte) { |
| 61 | if (address < 0x8000) { |
nothing calls this directly
no outgoing calls
no test coverage detected