GBHawk: Clean up frame display routines
This commit is contained in:
parent
96fa7feb09
commit
9b161ced56
|
@ -126,7 +126,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
||||||
|
|
||||||
// send the image on VBlank
|
// send the image on VBlank
|
||||||
SendVideoBuffer();
|
SendVideoBuffer();
|
||||||
for (int j = 0; j < frame_buffer.Length; j++) { frame_buffer[j] = _vidbuffer[j]; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
REG_FF0F_OLD = REG_FF0F;
|
REG_FF0F_OLD = REG_FF0F;
|
||||||
|
@ -287,18 +286,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
||||||
return frame_buffer;
|
return frame_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] SendVideoBuffer()
|
public void SendVideoBuffer()
|
||||||
{
|
{
|
||||||
if (ppu.blank_frame)
|
if (GBC_compat)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _vidbuffer.Length; i++)
|
if (!ppu.blank_frame)
|
||||||
{
|
{
|
||||||
_vidbuffer[i] = (int)color_palette[0];
|
for (int j = 0; j < frame_buffer.Length; j++) { frame_buffer[j] = _vidbuffer[j]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
ppu.blank_frame = false;
|
ppu.blank_frame = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ppu.blank_frame)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _vidbuffer.Length; i++)
|
||||||
|
{
|
||||||
|
_vidbuffer[i] = (int)color_palette[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return _vidbuffer;
|
for (int j = 0; j < frame_buffer.Length; j++) { frame_buffer[j] = _vidbuffer[j]; }
|
||||||
|
|
||||||
|
ppu.blank_frame = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int VirtualWidth => 160;
|
public int VirtualWidth => 160;
|
||||||
|
|
|
@ -154,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink
|
||||||
|
|
||||||
// send the image on VBlank
|
// send the image on VBlank
|
||||||
L.SendVideoBuffer();
|
L.SendVideoBuffer();
|
||||||
for (int j = 0; j < L._vidbuffer.Length; j++) { L.frame_buffer[j] = L._vidbuffer[j]; }
|
|
||||||
|
|
||||||
L.vblank_rise = false;
|
L.vblank_rise = false;
|
||||||
do_frame_fill = true;
|
do_frame_fill = true;
|
||||||
|
@ -170,7 +169,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink
|
||||||
|
|
||||||
// send the image on VBlank
|
// send the image on VBlank
|
||||||
R.SendVideoBuffer();
|
R.SendVideoBuffer();
|
||||||
for (int j = 0; j < R._vidbuffer.Length; j++) { R.frame_buffer[j] = R._vidbuffer[j]; }
|
|
||||||
|
|
||||||
R.vblank_rise = false;
|
R.vblank_rise = false;
|
||||||
do_frame_fill = true;
|
do_frame_fill = true;
|
||||||
|
|
|
@ -274,7 +274,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x
|
||||||
|
|
||||||
// send the image on VBlank
|
// send the image on VBlank
|
||||||
L.SendVideoBuffer();
|
L.SendVideoBuffer();
|
||||||
for (int j = 0; j < L._vidbuffer.Length; j++) { L.frame_buffer[j] = L._vidbuffer[j]; }
|
|
||||||
|
|
||||||
L.vblank_rise = false;
|
L.vblank_rise = false;
|
||||||
do_frame_fill = true;
|
do_frame_fill = true;
|
||||||
|
@ -289,7 +288,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x
|
||||||
|
|
||||||
// send the image on VBlank
|
// send the image on VBlank
|
||||||
C.SendVideoBuffer();
|
C.SendVideoBuffer();
|
||||||
for (int j = 0; j < C._vidbuffer.Length; j++) { C.frame_buffer[j] = C._vidbuffer[j]; }
|
|
||||||
|
|
||||||
C.vblank_rise = false;
|
C.vblank_rise = false;
|
||||||
do_frame_fill = true;
|
do_frame_fill = true;
|
||||||
|
@ -304,7 +302,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x
|
||||||
|
|
||||||
// send the image on VBlank
|
// send the image on VBlank
|
||||||
R.SendVideoBuffer();
|
R.SendVideoBuffer();
|
||||||
for (int j = 0; j < R._vidbuffer.Length; j++) { R.frame_buffer[j] = R._vidbuffer[j]; }
|
|
||||||
|
|
||||||
R.vblank_rise = false;
|
R.vblank_rise = false;
|
||||||
do_frame_fill = true;
|
do_frame_fill = true;
|
||||||
|
|
Loading…
Reference in New Issue