From dcb20980557f0fb492ff4a7320b0b45d627e6abe Mon Sep 17 00:00:00 2001 From: goyuken Date: Thu, 27 Feb 2014 20:58:00 +0000 Subject: [PATCH] NES: fix some peek memory semantics --- BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Core.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Core.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Core.cs index 598697cb5a..6e3386a80d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Core.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Core.cs @@ -498,11 +498,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } else if (addr < 0x4000) { - ret = ppu.ReadReg(addr & 7); + ret = ppu.PeekReg(addr & 7); } else if (addr < 0x4020) { - ret = ReadReg(addr); //we're not rebasing the register just to keep register names canonical + ret = PeekReg(addr); //we're not rebasing the register just to keep register names canonical } else { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index ee24609f9f..6950e57a3c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -403,7 +403,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES var RAM = new MemoryDomain("RAM", 0x800, MemoryDomain.Endian.Little, addr => ram[addr], (addr, value) => ram[addr] = value); var SystemBus = new MemoryDomain("System Bus", 0x10000, MemoryDomain.Endian.Little, - addr => ReadMemory((ushort)addr), (addr, value) => ApplySystemBusPoke(addr, value)); + addr => PeekMemory((ushort)addr), (addr, value) => ApplySystemBusPoke(addr, value)); var PPUBus = new MemoryDomain("PPU Bus", 0x4000, MemoryDomain.Endian.Little, addr => ppu.ppubus_peek(addr), (addr, value) => ppu.ppubus_write(addr, value)); var CIRAMdomain = new MemoryDomain("CIRAM (nametables)", 0x800, MemoryDomain.Endian.Little,