attempt to fix GPGX aspect ratio
see #4042, not sure if this is fully correct yet
This commit is contained in:
parent
a3a051346b
commit
5acf324fdf
|
@ -30,6 +30,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
var widthHasOverscan = (_syncSettings.Overscan & LibGPGX.InitSettings.OverscanType.Horizontal) != 0;
|
||||
var heightHasOverscan = (_syncSettings.Overscan & LibGPGX.InitSettings.OverscanType.Vertical) != 0;
|
||||
var isPal = Region == DisplayType.PAL;
|
||||
bool isVdpPal = _syncSettings.ForceVDP switch
|
||||
{
|
||||
LibGPGX.ForceVDP.NTSC => false,
|
||||
LibGPGX.ForceVDP.PAL => true,
|
||||
_ => isPal
|
||||
};
|
||||
double videoSampleRate = isVdpPal ? 14750000.0 : 135000000.0 / 11.0;
|
||||
int clockRate = isPal ? 53203424 : 53693175;
|
||||
|
||||
if (SystemId == VSystemID.Raw.GEN)
|
||||
{
|
||||
|
@ -37,6 +45,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
VirtualHeight = 224;
|
||||
VirtualWidth += widthHasOverscan ? 28 : 0;
|
||||
VirtualHeight += heightHasOverscan ? (isPal ? 48 : 0) + 16 : 0;
|
||||
|
||||
VirtualWidth = (int)(VirtualWidth * 4.0 * videoSampleRate / clockRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -53,6 +63,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
VirtualWidth += widthHasOverscan ? 28 : 0;
|
||||
VirtualHeight += heightHasOverscan ? (isPal ? 96 : 48) : 0;
|
||||
}
|
||||
|
||||
VirtualWidth = (int)(VirtualWidth * 5.0 * videoSampleRate / clockRate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue