MCPcopy Create free account
hub / github.com/fogleman/nes / Write

Method Write

nes/mapper40.go:63–77  ·  view source on GitHub ↗
(address uint16, value byte)

Source from the content-addressed store, hash-verified

61}
62
63func (m *Mapper40) Write(address uint16, value byte) {
64 switch {
65 case address < 0x2000:
66 m.CHR[address] = value
67 case address >= 0x8000 && address < 0xa000:
68 m.cycles = -1
69 case address >= 0xa000 && address < 0xc000:
70 m.cycles = 0
71 case address >= 0xe000:
72 m.bank = int(value)
73 default:
74 // log.Fatalf("unhandled mapper40 write at address: 0x%04X", address)
75 fmt.Printf("unhandled mapper40 write at address: 0x%04X\n", address)
76 }
77}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected