PicoDrive: Add core query whether 32X hardware is currently active. Remove code that assumed that the emulator would always activate 32X hardware when _32xPreinit was true, or that it would never activate 32X hardware when _32xPreinit was false. Both assumptions are false.
This commit is contained in:
parent
a7766fc4ee
commit
dd7389f848
|
@ -331,11 +331,6 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
movie.HeaderEntries.Add("IsSegaCDMode", "1");
|
||||
}
|
||||
|
||||
if (Global.Emulator is PicoDrive && (Global.Emulator as PicoDrive).Is32X)
|
||||
{
|
||||
movie.HeaderEntries.Add("Is32X", "1");
|
||||
}
|
||||
|
||||
movie.Core = ((CoreAttributes)Attribute
|
||||
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttributes)))
|
||||
.CoreName;
|
||||
|
|
|
@ -35,5 +35,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
|
|||
|
||||
[BizImport(CC)]
|
||||
public abstract bool IsPal();
|
||||
|
||||
[BizImport(CC)]
|
||||
public abstract bool Is32xActive();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,13 +110,12 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
|
|||
DeterministicEmulation = deterministic;
|
||||
_core.SetCDReadCallback(_cdcallback);
|
||||
|
||||
Is32X = game["32X"];
|
||||
_isPal = _core.IsPal();
|
||||
VsyncNumerator = _isPal ? 53203424 : 53693175;
|
||||
VsyncDenominator = _isPal ? 3420 * 313 : 3420 * 262;
|
||||
}
|
||||
|
||||
public bool Is32X { get; }
|
||||
public bool Is32xActive => _core.Is32xActive();
|
||||
|
||||
public static readonly ControllerDefinition PicoDriveController = new ControllerDefinition
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -284,6 +284,10 @@ ECL_EXPORT int IsPal(void)
|
|||
{
|
||||
return Pico.m.pal;
|
||||
}
|
||||
ECL_EXPORT int Is32xActive(void)
|
||||
{
|
||||
return !!(PicoAHW & PAHW_32X);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue