PCE: Fix some VPC issues
This commit is contained in:
parent
6ae8bcfcf9
commit
f2523f1cec
|
@ -425,10 +425,10 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
}
|
||||
}
|
||||
|
||||
private int FramePitch = 256;
|
||||
private int FrameWidth = 256;
|
||||
private int FramePitch = 320;
|
||||
private int FrameWidth = 320;
|
||||
private int FrameHeight = 262;
|
||||
private int[] FrameBuffer = new int[256 * 262];
|
||||
private int[] FrameBuffer = new int[320 * 262];
|
||||
|
||||
// IVideoProvider implementation
|
||||
public int[] GetVideoBuffer()
|
||||
|
|
|
@ -161,7 +161,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
FramePitch = MultiResHack == 0 ? FrameWidth : MultiResHack;
|
||||
//if (FrameBuffer.Length != FramePitch * FrameHeight)
|
||||
//FrameBuffer = new int[FramePitch * FrameHeight];
|
||||
FrameBuffer = new int[256 * 262];
|
||||
FrameBuffer = new int[320 * 262];
|
||||
break;
|
||||
case VDW: // Vertical Display Word? - update framebuffer size
|
||||
//FrameHeight = RequestedFrameHeight;
|
||||
|
@ -172,7 +172,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
FramePitch = MultiResHack;
|
||||
//if (FrameBuffer.Length != FramePitch * FrameHeight)
|
||||
//FrameBuffer = new int[FramePitch * FrameHeight];
|
||||
FrameBuffer = new int[256 * 262];
|
||||
FrameBuffer = new int[320 * 262];
|
||||
break;
|
||||
case LENR: // Initiate DMA transfer
|
||||
if (!msbComplete) break;
|
||||
|
|
|
@ -239,7 +239,8 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
|
||||
private void RenderScanLine()
|
||||
{
|
||||
if (VDC1.ActiveLine >= FrameHeight)
|
||||
//if (VDC1.ActiveLine >= FrameHeight)
|
||||
if ((VDC1.ActiveLine + VDC1.ViewStartLine) >= 262)
|
||||
return;
|
||||
|
||||
InitializeScanLine(VDC1.ActiveLine);
|
||||
|
@ -265,10 +266,9 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
{
|
||||
// Clear priority buffer
|
||||
Array.Clear(PriorityBuffer, 0, FrameWidth);
|
||||
|
||||
// Initialize scanline to background color
|
||||
for (int i = 0; i < FrameWidth; i++)
|
||||
FrameBuffer[(scanline * FrameWidth) + i] = VCE.Palette[256];
|
||||
FrameBuffer[((scanline + VDC1.ViewStartLine) * FrameWidth) + i] = VCE.Palette[256];
|
||||
}
|
||||
|
||||
private unsafe void RenderBackgroundScanline(VDC vdc, byte priority, bool show)
|
||||
|
|
Loading…
Reference in New Issue