diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs index 7e5e60089e..508608b8d0 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs @@ -71,6 +71,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo bool resetSignal; public void FrameAdvance(bool render) { + videoProvider.FillFrameBuffer(); + lagged = true; if (resetSignal) { diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs index 78d3391e1e..5494e5072d 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs @@ -121,7 +121,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo public int bottom = 231; public int left = 0; public int right = 255; - + NES emu; public MyVideoProvider(NES emu) { @@ -130,6 +130,11 @@ namespace BizHawk.Emulation.Consoles.Nintendo int[] pixels = new int[256 * 240]; public int[] GetVideoBuffer() + { + return pixels; + } + + public void FillFrameBuffer() { int backdrop = emu.CoreInputComm.NES_BackdropColor; bool useBackdrop = (backdrop & 0xFF000000) != 0; @@ -148,9 +153,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo else pixels[((y - top) * width) + (x - left)] = emu.palette_compiled[pixel & 0x7FFF]; } } - return pixels; } - public int VirtualWidth { get { return BufferWidth; } } + public int VirtualWidth { get { return BufferWidth; } } public int BufferWidth { get { return right - left + 1; } } public int BufferHeight { get { return bottom - top + 1; } } public int BackgroundColor { get { return 0; } }