diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs index 2fd132bf32..90222b7827 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs @@ -200,7 +200,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //check all the conditions that can cause things to render in these 8px bool renderspritenow = reg_2001.show_obj && (xt > 0 || reg_2001.show_obj_leftmost); - bool renderbgnow = reg_2001.show_bg && (xt > 0 || reg_2001.show_bg_leftmost); + bool renderbgnow; for (int xp = 0; xp < 8; xp++, rasterpos++) { @@ -295,13 +295,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } } - ////////////////////////////////////////////////// - //Sprite Evaluation End - ////////////////////////////////////////////////// + ////////////////////////////////////////////////// + //Sprite Evaluation End + ////////////////////////////////////////////////// + renderbgnow = reg_2001.show_bg && (xt > 0 || reg_2001.show_bg_leftmost); - //process the current clock's worth of bg data fetching - //this needs to be split into 8 pieces or else exact sprite 0 hitting wont work due to the cpu not running while the sprite renders below - Read_bgdata(xp, ref bgdata[xt + 2]); + //process the current clock's worth of bg data fetching + //this needs to be split into 8 pieces or else exact sprite 0 hitting wont work due to the cpu not running while the sprite renders below + Read_bgdata(xp, ref bgdata[xt + 2]); //bg pos is different from raster pos due to its offsetability. //so adjust for that here