Spell out Numerator and Denominator

This commit is contained in:
adelikat 2017-05-05 11:25:38 -05:00
parent 62a13d961d
commit 59139ab266
42 changed files with 103 additions and 103 deletions

View File

@ -53,12 +53,12 @@ namespace BizHawk.Client.Common
get { return 0; } get { return 0; }
} }
public int VsyncNum public int VsyncNumerator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }
public int VsyncDen public int VsyncDenominator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }

View File

@ -222,12 +222,12 @@ namespace BizHawk.Client.Common
public int BufferHeight { get; set; } public int BufferHeight { get; set; }
public int BackgroundColor => unchecked((int)0xff000000); public int BackgroundColor => unchecked((int)0xff000000);
public int VsyncNum public int VsyncNumerator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }
public int VsyncDen public int VsyncDenominator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }

View File

@ -112,8 +112,8 @@ namespace BizHawk.Client.EmuHawk
public int BufferWidth { get; } public int BufferWidth { get; }
public int BufferHeight { get; } public int BufferHeight { get; }
public int BackgroundColor { get; } public int BackgroundColor { get; }
public int VsyncNum { get; } public int VsyncNumerator { get; }
public int VsyncDen { get; } public int VsyncDenominator { get; }
public VideoCopy(IVideoProvider c) public VideoCopy(IVideoProvider c)
{ {
_vb = (int[])c.GetVideoBuffer().Clone(); _vb = (int[])c.GetVideoBuffer().Clone();
@ -122,8 +122,8 @@ namespace BizHawk.Client.EmuHawk
BackgroundColor = c.BackgroundColor; BackgroundColor = c.BackgroundColor;
VirtualWidth = c.VirtualWidth; VirtualWidth = c.VirtualWidth;
VirtualHeight = c.VirtualHeight; VirtualHeight = c.VirtualHeight;
VsyncNum = c.VsyncNum; VsyncNumerator = c.VsyncNumerator;
VsyncDen = c.VsyncDen; VsyncDenominator = c.VsyncDenominator;
} }
public int[] GetVideoBuffer() public int[] GetVideoBuffer()

View File

@ -50,12 +50,12 @@ namespace BizHawk.Client.EmuHawk
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNum public int VsyncNumerator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }
public int VsyncDen public int VsyncDenominator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }

View File

@ -417,12 +417,12 @@ namespace BizHawk.Client.EmuHawk
public int BufferHeight { get; set; } public int BufferHeight { get; set; }
public int BackgroundColor { get; set; } public int BackgroundColor { get; set; }
public int VsyncNum public int VsyncNumerator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }
public int VsyncDen public int VsyncDenominator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }

View File

@ -3034,7 +3034,7 @@ namespace BizHawk.Client.EmuHawk
aw = new AudioStretcher(aw); aw = new AudioStretcher(aw);
} }
aw.SetMovieParameters(Emulator.VsyncNum(), Emulator.VsyncDen()); aw.SetMovieParameters(Emulator.VsyncNumerator(), Emulator.VsyncDenominator());
if (_avwriterResizew > 0 && _avwriterResizeh > 0) if (_avwriterResizew > 0 && _avwriterResizeh > 0)
{ {
aw.SetVideoParameters(_avwriterResizew, _avwriterResizeh); aw.SetVideoParameters(_avwriterResizew, _avwriterResizeh);

View File

@ -283,12 +283,12 @@ namespace BizHawk.Client.MultiHawk
public int BufferHeight { get; set; } public int BufferHeight { get; set; }
public int BackgroundColor { get; set; } public int BackgroundColor { get; set; }
public int VsyncNum public int VsyncNumerator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }
public int VsyncDen public int VsyncDenominator
{ {
get { throw new InvalidOperationException(); } get { throw new InvalidOperationException(); }
} }

View File

@ -110,9 +110,9 @@ namespace BizHawk.Emulation.Common
public int BackgroundColor => NullVideo.DefaultBackgroundColor; public int BackgroundColor => NullVideo.DefaultBackgroundColor;
public int VsyncNum => NullVideo.DefaultVsyncNum; public int VsyncNumerator => NullVideo.DefaultVsyncNum;
public int VsyncDen => NullVideo.DefaultVsyncDen; public int VsyncDenominator => NullVideo.DefaultVsyncDen;
#endregion #endregion

View File

@ -30,8 +30,8 @@
public int BackgroundColor => DefaultBackgroundColor; public int BackgroundColor => DefaultBackgroundColor;
public int VsyncNum => DefaultVsyncNum; public int VsyncNumerator => DefaultVsyncNum;
public int VsyncDen => DefaultVsyncDen; public int VsyncDenominator => DefaultVsyncDen;
} }
} }

View File

@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
public static ISoundProvider AsSoundProviderOrDefault(this IEmulator core) public static ISoundProvider AsSoundProviderOrDefault(this IEmulator core)
{ {
return core.ServiceProvider.GetService<ISoundProvider>() return core.ServiceProvider.GetService<ISoundProvider>()
?? CachedNullSoundProviders.GetValue(core, e => new NullSound(core.VsyncNum(), core.VsyncDen())); ?? CachedNullSoundProviders.GetValue(core, e => new NullSound(core.VsyncNumerator(), core.VsyncDenominator()));
} }
public static bool HasMemoryDomains(this IEmulator core) public static bool HasMemoryDomains(this IEmulator core)
@ -342,21 +342,21 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
return core.ServiceProvider.GetService<IBoardInfo>(); return core.ServiceProvider.GetService<IBoardInfo>();
} }
public static int VsyncNum(this IEmulator core) public static int VsyncNumerator(this IEmulator core)
{ {
if (core != null && core.HasVideoProvider()) if (core != null && core.HasVideoProvider())
{ {
//return core.AsVideoProvider().VsyncNum return core.AsVideoProvider().VsyncNumerator;
} }
return 60; return 60;
} }
public static int VsyncDen(this IEmulator core) public static int VsyncDenominator(this IEmulator core)
{ {
if (core != null && core.HasVideoProvider()) if (core != null && core.HasVideoProvider())
{ {
//return core.AsVideoProvider().VsyncDen return core.AsVideoProvider().VsyncDenominator;
} }
return 1; return 1;
@ -364,7 +364,7 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
public static int VsyncRate(this IEmulator core) public static int VsyncRate(this IEmulator core)
{ {
return core.VsyncNum() / core.VsyncDen(); return core.VsyncNumerator() / core.VsyncDenominator();
} }
// TODO: a better place for these // TODO: a better place for these

View File

@ -45,14 +45,14 @@
int BufferHeight { get; } int BufferHeight { get; }
/// <summary> /// <summary>
/// Gets the vsync Numerator. Combined with the <seealso cref="VsyncDen"/> can be used to calculate a precise vsync rate. /// Gets the vsync Numerator. Combined with the <seealso cref="VsyncDenominator"/> can be used to calculate a precise vsync rate.
/// </summary> /// </summary>
int VsyncNum { get; } int VsyncNumerator { get; }
/// <summary> /// <summary>
/// Gets the vsync Denominator. Combined with the <seealso cref="VsyncDen"/> can be used to calculate a precise vsync rate. /// Gets the vsync Denominator. Combined with the <seealso cref="VsyncNumerator"/> can be used to calculate a precise vsync rate.
/// </summary> /// </summary>
int VsyncDen { get; } int VsyncDenominator { get; }
/// <summary> /// <summary>
/// Gets the default color when no other color is applied /// Gets the default color when no other color is applied

View File

@ -9,8 +9,8 @@ namespace BizHawk.Emulation.Cores.Calculators
public int BufferWidth => 96; public int BufferWidth => 96;
public int BufferHeight => 64; public int BufferHeight => 64;
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNum => NullVideo.DefaultVsyncNum; public int VsyncNumerator => NullVideo.DefaultVsyncNum;
public int VsyncDen => NullVideo.DefaultVsyncDen; public int VsyncDenominator => NullVideo.DefaultVsyncDen;
public int[] GetVideoBuffer() public int[] GetVideoBuffer()
{ {

View File

@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
public int BufferHeight => 384; public int BufferHeight => 384;
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] // TODO: precise numbers or confirm the default is okay [FeatureNotImplemented] // TODO: precise numbers or confirm the default is okay
get get
@ -28,7 +28,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] // TODO: precise numbers or confirm the default is okay [FeatureNotImplemented] // TODO: precise numbers or confirm the default is okay
get get

View File

@ -72,9 +72,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public int VirtualHeight { get; private set; } public int VirtualHeight { get; private set; }
[SaveState.DoNotSave] [SaveState.DoNotSave]
public int VsyncNum => CyclesPerFrame; public int VsyncNumerator => CyclesPerFrame;
[SaveState.DoNotSave] [SaveState.DoNotSave]
public int VsyncDen => CyclesPerSecond; public int VsyncDenominator => CyclesPerSecond;
} }
} }

View File

@ -393,9 +393,9 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public int BackgroundColor => _core.Settings.BackgroundColor.ToArgb(); public int BackgroundColor => _core.Settings.BackgroundColor.ToArgb();
public int VsyncNum => _vsyncNum; public int VsyncNumerator => _vsyncNum;
public int VsyncDen => _vsyncDen; public int VsyncDenominator => _vsyncDen;
public int[] GetVideoBuffer() public int[] GetVideoBuffer()
{ {

View File

@ -281,8 +281,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
public int BufferWidth { get; private set; } public int BufferWidth { get; private set; }
public int BufferHeight { get; private set; } public int BufferHeight { get; private set; }
public int BackgroundColor => unchecked((int)0xff000000); public int BackgroundColor => unchecked((int)0xff000000);
public int VsyncNum => _frameHz; public int VsyncNumerator => _frameHz;
public int VsyncDen => 1; public int VsyncDenominator => 1;
#region ISoundProvider #region ISoundProvider

View File

@ -24,8 +24,8 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
public int BackgroundColor => unchecked((int)0xff000000); public int BackgroundColor => unchecked((int)0xff000000);
public int VsyncNum => 16000000; // 16.00 mhz refclock public int VsyncNumerator => 16000000; // 16.00 mhz refclock
public int VsyncDen => 16 * 105 * 159; public int VsyncDenominator => 16 * 105 * 159;
} }
} }

View File

@ -465,7 +465,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
public int BufferHeight => 192; public int BufferHeight => 192;
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -474,7 +474,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -82,7 +82,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
public int BufferHeight => 208; public int BufferHeight => 208;
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -91,7 +91,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -18,9 +18,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
public int BackgroundColor => unchecked((int)0xff000000); public int BackgroundColor => unchecked((int)0xff000000);
public int VsyncNum => 262144; public int VsyncNumerator => 262144;
public int VsyncDen => 4389; public int VsyncDenominator => 4389;
private readonly int[] _videobuff = new int[240 * 160]; private readonly int[] _videobuff = new int[240 * 160];
} }

View File

@ -19,9 +19,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
return _videobuff; return _videobuff;
} }
public int VsyncNum => 262144; public int VsyncNumerator => 262144;
public int VsyncDen => 4389; public int VsyncDenominator => 4389;
private readonly int[] _videobuff = new int[240 * 160]; private readonly int[] _videobuff = new int[240 * 160];
private readonly int[] _videopalette = new int[65536]; private readonly int[] _videopalette = new int[65536];

View File

@ -22,8 +22,8 @@
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNum => 262144; public int VsyncNumerator => 262144;
public int VsyncDen => 4389; public int VsyncDenominator => 4389;
} }
} }

View File

@ -10,9 +10,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
public int BufferWidth { get { return 320; } } public int BufferWidth { get { return 320; } }
public int BufferHeight { get { return 144; } } public int BufferHeight { get { return 144; } }
public int VsyncNum => L.VsyncNum; public int VsyncNumerator => L.VsyncNumerator;
public int VsyncDen => L.VsyncDen; public int VsyncDenominator => L.VsyncDenominator;
public int BackgroundColor public int BackgroundColor
{ {

View File

@ -126,12 +126,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
switch (Region) switch (Region)
{ {
case DisplayType.NTSC: case DisplayType.NTSC:
_videoProvider.VsyncNum = 60000; _videoProvider.VsyncNumerator = 60000;
_videoProvider.VsyncDen = 1001; _videoProvider.VsyncDenominator = 1001;
break; break;
default: default:
_videoProvider.VsyncNum = 50; _videoProvider.VsyncNumerator = 50;
_videoProvider.VsyncDen = 1; _videoProvider.VsyncDenominator = 1;
break; break;
} }

View File

@ -43,8 +43,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
public int BufferWidth { get; private set; } public int BufferWidth { get; private set; }
public int BufferHeight { get; private set; } public int BufferHeight { get; private set; }
public int BackgroundColor { get { return 0; } } public int BackgroundColor { get { return 0; } }
public int VsyncNum { get; internal set; } public int VsyncNumerator { get; internal set; }
public int VsyncDen { get; internal set; } public int VsyncDenominator { get; internal set; }
/// <summary> /// <summary>
/// Fetches current frame buffer from mupen64 /// Fetches current frame buffer from mupen64

View File

@ -337,8 +337,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
} }
public int VsyncNum => emu.VsyncNum; public int VsyncNumerator => emu.VsyncNum;
public int VsyncDen => emu.VsyncDen; public int VsyncDenominator => emu.VsyncDen;
} }
MyVideoProvider videoProvider; MyVideoProvider videoProvider;

View File

@ -8,8 +8,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
public int BufferHeight { get; private set; } public int BufferHeight { get; private set; }
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum => 39375000; public int VsyncNumerator => 39375000;
public int VsyncDen => 655171; public int VsyncDenominator => 655171;
public int[] GetVideoBuffer() public int[] GetVideoBuffer()
{ {

View File

@ -19,8 +19,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
return _videoBuffer; return _videoBuffer;
} }
public int VsyncNum { get; } public int VsyncNumerator { get; }
public int VsyncDen { get; } public int VsyncDenominator { get; }
private int[] _videoBuffer = new int[256 * 224]; private int[] _videoBuffer = new int[256 * 224];
private int _videoWidth = 256; private int _videoWidth = 256;

View File

@ -156,14 +156,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
if (Api.Region == LibsnesApi.SNES_REGION.NTSC) if (Api.Region == LibsnesApi.SNES_REGION.NTSC)
{ {
// similar to what aviout reports from snes9x and seems logical from bsnes first principles. bsnes uses that numerator (ntsc master clockrate) for sure. // similar to what aviout reports from snes9x and seems logical from bsnes first principles. bsnes uses that numerator (ntsc master clockrate) for sure.
VsyncNum = 21477272; VsyncNumerator = 21477272;
VsyncDen = 4 * 341 * 262; VsyncDenominator = 4 * 341 * 262;
} }
else else
{ {
// http://forums.nesdev.com/viewtopic.php?t=5367&start=19 // http://forums.nesdev.com/viewtopic.php?t=5367&start=19
VsyncNum = 21281370; VsyncNumerator = 21281370;
VsyncDen = 4 * 341 * 312; VsyncDenominator = 4 * 341 * 312;
} }
Api.CMD_power(); Api.CMD_power();

View File

@ -66,7 +66,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
public int BufferHeight { get { return 224; } } public int BufferHeight { get { return 224; } }
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -441,7 +441,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
public int BufferHeight => FrameHeight; public int BufferHeight => FrameHeight;
public int BackgroundColor => vce.Palette[256]; public int BackgroundColor => vce.Palette[256];
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -450,7 +450,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -529,7 +529,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
public int BufferHeight => FrameHeight; public int BufferHeight => FrameHeight;
public int BackgroundColor => VCE.Palette[0]; public int BackgroundColor => VCE.Palette[0];
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -538,7 +538,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -497,8 +497,8 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
get { return Palette[BackdropColor]; } get { return Palette[BackdropColor]; }
} }
public int VsyncNum => DisplayType == DisplayType.NTSC ? 60 : 50; public int VsyncNumerator => DisplayType == DisplayType.NTSC ? 60 : 50;
public int VsyncDen => 1; public int VsyncDenominator => 1;
} }
} }

View File

@ -346,7 +346,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
public int BufferHeight { get; private set; } public int BufferHeight { get; private set; }
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -355,7 +355,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -17,9 +17,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum { get; } public int VsyncNumerator { get; }
public int VsyncDen { get; } public int VsyncDenominator { get; }
private int[] vidbuff = new int[0]; private int[] vidbuff = new int[0];
private int vwidth; private int vwidth;

View File

@ -126,9 +126,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
int fpsnum = 60; int fpsnum = 60;
int fpsden = 1; int fpsden = 1;
LibGPGX.gpgx_get_fps(ref fpsnum, ref fpsden); LibGPGX.gpgx_get_fps(ref fpsnum, ref fpsden);
VsyncNum = fpsnum; VsyncNumerator = fpsnum;
VsyncDen = fpsden; VsyncDenominator = fpsden;
Region = VsyncNum / VsyncDen > 55 ? DisplayType.NTSC : DisplayType.PAL; Region = VsyncNumerator / VsyncDenominator > 55 ? DisplayType.NTSC : DisplayType.PAL;
} }
// compute state size // compute state size

View File

@ -17,9 +17,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum { get; } public int VsyncNumerator { get; }
public int VsyncDen { get; } public int VsyncDenominator { get; }
private int[] vidbuff = new int[0]; private int[] vidbuff = new int[0];
private int vwidth; private int vwidth;

View File

@ -134,9 +134,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64
int fpsnum = 60; int fpsnum = 60;
int fpsden = 1; int fpsden = 1;
Core.gpgx_get_fps(ref fpsnum, ref fpsden); Core.gpgx_get_fps(ref fpsnum, ref fpsden);
VsyncNum = fpsnum; VsyncNumerator = fpsnum;
VsyncDen = fpsden; VsyncDenominator = fpsden;
Region = VsyncNum / VsyncDen > 55 ? DisplayType.NTSC : DisplayType.PAL; Region = VsyncNumerator / VsyncDenominator > 55 ? DisplayType.NTSC : DisplayType.PAL;
} }
// compute state size // compute state size

View File

@ -171,7 +171,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSP
public int BufferHeight { get { return screenheight; } } public int BufferHeight { get { return screenheight; } }
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum public int VsyncNumerator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get
@ -180,7 +180,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSP
} }
} }
public int VsyncDen public int VsyncDenominator
{ {
[FeatureNotImplemented] [FeatureNotImplemented]
get get

View File

@ -331,14 +331,14 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
int VidClock_d = CpuClock_d * 7; int VidClock_d = CpuClock_d * 7;
if (SystemRegion == OctoshockDll.eRegion.EU) if (SystemRegion == OctoshockDll.eRegion.EU)
{ {
VsyncNum = VidClock_n; VsyncNumerator = VidClock_n;
VsyncDen = VidClock_d * 314 * 3406; VsyncDenominator = VidClock_d * 314 * 3406;
SystemVidStandard = OctoshockDll.eVidStandard.PAL; SystemVidStandard = OctoshockDll.eVidStandard.PAL;
} }
else else
{ {
VsyncNum = VidClock_n; VsyncNumerator = VidClock_n;
VsyncDen = VidClock_d * 263 * 3413; VsyncDenominator = VidClock_d * 263 * 3413;
SystemVidStandard = OctoshockDll.eVidStandard.NTSC; SystemVidStandard = OctoshockDll.eVidStandard.NTSC;
} }
@ -868,8 +868,8 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
public int BufferWidth { get; private set; } public int BufferWidth { get; private set; }
public int BufferHeight { get; private set; } public int BufferHeight { get; private set; }
public int BackgroundColor { get { return 0; } } public int BackgroundColor { get { return 0; } }
public int VsyncNum { get; private set; } public int VsyncNumerator { get; private set; }
public int VsyncDen { get; private set; } public int VsyncDenominator { get; private set; }
public System.Drawing.Size VideoProvider_Padding { get; private set; } public System.Drawing.Size VideoProvider_Padding { get; private set; }

View File

@ -213,8 +213,8 @@ namespace BizHawk.Emulation.Cores.WonderSwan
public int BufferHeight { get; private set; } public int BufferHeight { get; private set; }
public int BackgroundColor { get { return unchecked((int)0xff000000); } } public int BackgroundColor { get { return unchecked((int)0xff000000); } }
public int VsyncNum => 3072000; // master CPU clock, also pixel clock public int VsyncNumerator => 3072000; // master CPU clock, also pixel clock
public int VsyncDen => (144 + 15) * (224 + 32); // 144 vislines, 15 vblank lines; 224 vispixels, 32 hblank pixels public int VsyncDenominator => (144 + 15) * (224 + 32); // 144 vislines, 15 vblank lines; 224 vispixels, 32 hblank pixels
#endregion #endregion
} }

View File

@ -128,8 +128,8 @@ namespace BizHawk.Emulation.Cores.Libretro
savebuff2 = new byte[savebuff.Length + 13]; savebuff2 = new byte[savebuff.Length + 13];
// TODO: more precise // TODO: more precise
VsyncNum = (int)(10000000 * api.comm->env.retro_system_av_info.timing.fps); VsyncNumerator = (int)(10000000 * api.comm->env.retro_system_av_info.timing.fps);
VsyncDen = 10000000; VsyncDenominator = 10000000;
SetupResampler(api.comm->env.retro_system_av_info.timing.fps, api.comm->env.retro_system_av_info.timing.sample_rate); SetupResampler(api.comm->env.retro_system_av_info.timing.fps, api.comm->env.retro_system_av_info.timing.sample_rate);
(ServiceProvider as BasicServiceProvider).Register<ISoundProvider>(resampler); (ServiceProvider as BasicServiceProvider).Register<ISoundProvider>(resampler);
@ -217,8 +217,8 @@ namespace BizHawk.Emulation.Cores.Libretro
int IVideoProvider.BufferWidth { get { return vidWidth; } } int IVideoProvider.BufferWidth { get { return vidWidth; } }
int IVideoProvider.BufferHeight { get { return vidHeight; } } int IVideoProvider.BufferHeight { get { return vidHeight; } }
public int VsyncNum { get; private set; } public int VsyncNumerator { get; private set; }
public int VsyncDen { get; private set; } public int VsyncDenominator { get; private set; }
#region ISoundProvider #region ISoundProvider