GBHawk: only latch new window y value if greater then current line (fixes pokemon crystal artifact)
This commit is contained in:
parent
318c6a7994
commit
7aa1a497f7
|
@ -189,7 +189,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
||||||
break;
|
break;
|
||||||
case 0xFF4A: // WY
|
case 0xFF4A: // WY
|
||||||
window_y = value;
|
window_y = value;
|
||||||
if (!window_started)
|
if (!window_started && (!LCDC.Bit(7) || (value > LY)))
|
||||||
{
|
{
|
||||||
window_y_latch = window_y;
|
window_y_latch = window_y;
|
||||||
window_y_tile = 0;
|
window_y_tile = 0;
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
||||||
break;
|
break;
|
||||||
case 0xFF4A: // WY
|
case 0xFF4A: // WY
|
||||||
window_y = value;
|
window_y = value;
|
||||||
if (!window_started)
|
if (!window_started && (!LCDC.Bit(7) || (value > LY)))
|
||||||
{
|
{
|
||||||
window_y_latch = window_y;
|
window_y_latch = window_y;
|
||||||
window_y_tile = 0;
|
window_y_tile = 0;
|
||||||
|
@ -732,14 +732,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
||||||
if (stat_line && !stat_line_old)
|
if (stat_line && !stat_line_old)
|
||||||
{
|
{
|
||||||
if (Core.REG_FFFF.Bit(1)) { Core.cpu.FlagI = true; }
|
if (Core.REG_FFFF.Bit(1)) { Core.cpu.FlagI = true; }
|
||||||
Core.REG_FF0F |= 0x02;
|
Core.REG_FF0F |= 0x02;
|
||||||
|
|
||||||
//if (LY == 46)
|
|
||||||
//{
|
|
||||||
//Console.Write(VBL_INT + " " + LYC_INT + " " + HBL_INT + " " + OAM_INT + " " + LY + " ");
|
|
||||||
//Console.Write(render_offset + " " + scroll_x + " " + total_counter + " ");
|
|
||||||
//Console.WriteLine(STAT + " " + cycle + " " + Core.cpu.TotalExecutedCycles);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stat_line_old = stat_line;
|
stat_line_old = stat_line;
|
||||||
|
|
|
@ -120,8 +120,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
||||||
break;
|
break;
|
||||||
case 0xFF4A: // WY
|
case 0xFF4A: // WY
|
||||||
window_y = value;
|
window_y = value;
|
||||||
if (!window_started)
|
if (!window_started && (!LCDC.Bit(7) || (value > LY)))
|
||||||
{
|
{
|
||||||
window_y_latch = window_y;
|
window_y_latch = window_y;
|
||||||
window_y_tile = 0;
|
window_y_tile = 0;
|
||||||
window_y_tile_inc = 0;
|
window_y_tile_inc = 0;
|
||||||
|
|
Loading…
Reference in New Issue