diff options
| -rw-r--r-- | nes/bus.go | 12 | ||||
| -rw-r--r-- | nes/nes.go | 6 |
2 files changed, 9 insertions, 9 deletions
@@ -13,9 +13,9 @@ func (n *Console) Read(addr uint16) uint8 { func (n *Console) Write(addr uint16, v uint8) { switch { - case addr < 0x2000: - n.RAM[addr&0x7FF] = v - case addr >= 0x4020: - n.Cart.Mapper.CPUWrite(addr, v) - } -}
\ No newline at end of file + case addr < 0x2000: + n.RAM[addr&0x7FF] = v + case addr >= 0x4020: + n.Cart.Mapper.CPUWrite(addr, v) + } +} @@ -6,9 +6,9 @@ import ( ) type Console struct { - CPU *cpu.CPU + CPU *cpu.CPU Cart *cart.Cartridge - RAM [0x800]uint8 + RAM [0x800]uint8 // PPU, APU, controllers once they exist cycles uint64 } @@ -31,4 +31,4 @@ func (n *Console) StepFrame() { for done := 0; done < cyclesPerFrame; { done += n.Step() } -}
\ No newline at end of file +} |