PCEHawk: add 240p test suite to game DB and properly resize buffer, fixes #3018 to at least not crash

This commit is contained in:
alyosha-tas 2021-12-17 20:08:36 -05:00
parent 3bdbe1aeda
commit 22fe9a1b7b
4 changed files with 12 additions and 2 deletions

View File

@ -125,4 +125,7 @@ FB571B290600A18B90E1BBF1D18FC8AA World Heroes II PCE NeedSuperSysCard;ArcadeCa
BA451E33D76FD6C644F46309708BABF2 Ys Book I & II (U) PCE
725BF9524040917AC8D5DD1765483527 Ys III - Wanderers from Ys (U) PCE
844E0E4D40BE2EBD5550429AE53EAFB2 Ys IV - The Dawn of Ys PCE NeedSuperSysCard
1F91B1245003DB964C35AFE6A165964E Zero Wing PCE EqualizeVolumes
1F91B1245003DB964C35AFE6A165964E Zero Wing PCE EqualizeVolumes
6D29B5083499ADEBA12305560FEBBBA6 240pSuite (CD) PCE MultiResHack=512;
EEF09E30451EFAE18CEE49DE25728B0C 240pSuite (Super CD) PCE NeedSuperSysCard;MultiResHack=512;

View File

@ -1601,3 +1601,4 @@ D3A12A001E22EFB1436EC509D453A10F V Super CD-ROM2 System V3.00 (J) [o4] PCE BRAM
2E1ACCEC7CDEBEDEE1F699684549507A Games Express CD Card 1993 (J) [o2] PCE BRAM;BIOS
6D2CB14FC3E1F65CEB135633D1694122 Games Express CD Card 1993 (J) PCE BRAM;BIOS
6A700DFF41DD303801042E7F05CE9130 240pSuite PCE MultiResHack=512;

View File

@ -309,6 +309,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
if (game["MultiResHack"])
{
VDC1.MultiResHack = game.GetIntValue("MultiResHack");
VDC1.Resize_Frame_Buffer_MultiResHack();
}
Cpu.ResetPC();

View File

@ -428,7 +428,12 @@ namespace BizHawk.Emulation.Cores.PCEngine
private int FramePitch = 320;
private int FrameWidth = 320;
private readonly int[] FrameBuffer = new int[320 * 262];
private int[] FrameBuffer = new int[320 * 262];
public void Resize_Frame_Buffer_MultiResHack()
{
FrameBuffer = new int[MultiResHack * 262];
}
// IVideoProvider implementation
public int[] GetVideoBuffer() => FrameBuffer;