Properly check draw_bg every pixel

This commit is contained in:
alyosha-tas 2016-09-15 16:06:31 -04:00 committed by GitHub
parent c9d5ab3695
commit ec582fb35c
1 changed files with 8 additions and 7 deletions

View File

@ -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