From 59139ab266e76cdf63f28ec8fa0f7858c133474b Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 5 May 2017 11:25:38 -0500 Subject: [PATCH] Spell out Numerator and Denominator --- BizHawk.Client.Common/BitmapBufferVideoProvider.cs | 4 ++-- BizHawk.Client.Common/QuickBmpFile.cs | 4 ++-- BizHawk.Client.EmuHawk/AVOut/AviWriter.cs | 8 ++++---- BizHawk.Client.EmuHawk/AVOut/BmpVideoProvder.cs | 4 ++-- .../DisplayManager/DisplayManager.cs | 4 ++-- BizHawk.Client.EmuHawk/MainForm.cs | 2 +- .../DisplayManager/DisplayManager.cs | 4 ++-- .../Base Implementations/NullEmulator.cs | 4 ++-- .../Base Implementations/NullVideo.cs | 4 ++-- BizHawk.Emulation.Common/Extensions.cs | 12 ++++++------ .../Interfaces/Services/IVideoProvider.cs | 8 ++++---- .../Calculator/TI83.IVideoProvider.cs | 4 ++-- .../Computers/AppleII/AppleII.IVideoProvider.cs | 4 ++-- .../Computers/Commodore64/MOS/Vic.VideoProvider.cs | 4 ++-- .../Consoles/Atari/2600/Tia/TIA.cs | 4 ++-- .../Consoles/Atari/7800/Atari7800.cs | 4 ++-- .../Consoles/Atari/lynx/Lynx.IVideoProvider.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs | 4 ++-- .../Consoles/Intellivision/STIC.cs | 4 ++-- .../Consoles/Nintendo/GBA/MGBAHawk.IVideoProvider.cs | 4 ++-- .../Consoles/Nintendo/GBA/VBANext.IVideoProvider.cs | 4 ++-- .../Nintendo/Gameboy/Gambatte.IVideoProvider.cs | 4 ++-- .../Nintendo/Gameboy/GambatteLink.IVideoProvider.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs | 8 ++++---- .../Consoles/Nintendo/N64/N64VideoProvider.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs | 4 ++-- .../Nintendo/QuickNES/QuickNES.IVideoProvider.cs | 4 ++-- .../Nintendo/SNES/LibsnesCore.IVideoProvider.cs | 4 ++-- .../Consoles/Nintendo/SNES/LibsnesCore.cs | 8 ++++---- .../Consoles/Nintendo/SNES9X/Snes9x.cs | 4 ++-- .../Consoles/PC Engine/VDC.Render.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs | 4 ++-- .../Consoles/Sega/Saturn/Yabause.cs | 4 ++-- .../Consoles/Sega/gpgx/GPGX.IVideoProvider.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs | 6 +++--- .../Consoles/Sega/gpgx64/GPGX.IVideoProvider.cs | 4 ++-- BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs | 6 +++--- BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs | 4 ++-- .../Consoles/Sony/PSX/Octoshock.cs | 12 ++++++------ .../Consoles/WonderSwan/WonderSwan.cs | 4 ++-- BizHawk.Emulation.Cores/Libretro/LibretroCore.cs | 8 ++++---- 42 files changed, 103 insertions(+), 103 deletions(-) diff --git a/BizHawk.Client.Common/BitmapBufferVideoProvider.cs b/BizHawk.Client.Common/BitmapBufferVideoProvider.cs index 9e95a036a1..2f8bc1ae79 100644 --- a/BizHawk.Client.Common/BitmapBufferVideoProvider.cs +++ b/BizHawk.Client.Common/BitmapBufferVideoProvider.cs @@ -53,12 +53,12 @@ namespace BizHawk.Client.Common get { return 0; } } - public int VsyncNum + public int VsyncNumerator { get { throw new InvalidOperationException(); } } - public int VsyncDen + public int VsyncDenominator { get { throw new InvalidOperationException(); } } diff --git a/BizHawk.Client.Common/QuickBmpFile.cs b/BizHawk.Client.Common/QuickBmpFile.cs index 9b81e8db96..d6e602a669 100644 --- a/BizHawk.Client.Common/QuickBmpFile.cs +++ b/BizHawk.Client.Common/QuickBmpFile.cs @@ -222,12 +222,12 @@ namespace BizHawk.Client.Common public int BufferHeight { get; set; } public int BackgroundColor => unchecked((int)0xff000000); - public int VsyncNum + public int VsyncNumerator { get { throw new InvalidOperationException(); } } - public int VsyncDen + public int VsyncDenominator { get { throw new InvalidOperationException(); } } diff --git a/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs b/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs index c66fd39da2..a74765fa87 100644 --- a/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs +++ b/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs @@ -112,8 +112,8 @@ namespace BizHawk.Client.EmuHawk public int BufferWidth { get; } public int BufferHeight { get; } public int BackgroundColor { get; } - public int VsyncNum { get; } - public int VsyncDen { get; } + public int VsyncNumerator { get; } + public int VsyncDenominator { get; } public VideoCopy(IVideoProvider c) { _vb = (int[])c.GetVideoBuffer().Clone(); @@ -122,8 +122,8 @@ namespace BizHawk.Client.EmuHawk BackgroundColor = c.BackgroundColor; VirtualWidth = c.VirtualWidth; VirtualHeight = c.VirtualHeight; - VsyncNum = c.VsyncNum; - VsyncDen = c.VsyncDen; + VsyncNumerator = c.VsyncNumerator; + VsyncDenominator = c.VsyncDenominator; } public int[] GetVideoBuffer() diff --git a/BizHawk.Client.EmuHawk/AVOut/BmpVideoProvder.cs b/BizHawk.Client.EmuHawk/AVOut/BmpVideoProvder.cs index 16f73f0517..fe641166ea 100644 --- a/BizHawk.Client.EmuHawk/AVOut/BmpVideoProvder.cs +++ b/BizHawk.Client.EmuHawk/AVOut/BmpVideoProvder.cs @@ -50,12 +50,12 @@ namespace BizHawk.Client.EmuHawk public int BackgroundColor => 0; - public int VsyncNum + public int VsyncNumerator { get { throw new InvalidOperationException(); } } - public int VsyncDen + public int VsyncDenominator { get { throw new InvalidOperationException(); } } diff --git a/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs b/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs index 6d853022b3..8ac5604829 100644 --- a/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs +++ b/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs @@ -417,12 +417,12 @@ namespace BizHawk.Client.EmuHawk public int BufferHeight { get; set; } public int BackgroundColor { get; set; } - public int VsyncNum + public int VsyncNumerator { get { throw new InvalidOperationException(); } } - public int VsyncDen + public int VsyncDenominator { get { throw new InvalidOperationException(); } } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 28d5c4ea4e..60f9f86c93 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3034,7 +3034,7 @@ namespace BizHawk.Client.EmuHawk aw = new AudioStretcher(aw); } - aw.SetMovieParameters(Emulator.VsyncNum(), Emulator.VsyncDen()); + aw.SetMovieParameters(Emulator.VsyncNumerator(), Emulator.VsyncDenominator()); if (_avwriterResizew > 0 && _avwriterResizeh > 0) { aw.SetVideoParameters(_avwriterResizew, _avwriterResizeh); diff --git a/BizHawk.Client.MultiHawk/DisplayManager/DisplayManager.cs b/BizHawk.Client.MultiHawk/DisplayManager/DisplayManager.cs index 14e59ba360..ceb67d81e7 100644 --- a/BizHawk.Client.MultiHawk/DisplayManager/DisplayManager.cs +++ b/BizHawk.Client.MultiHawk/DisplayManager/DisplayManager.cs @@ -283,12 +283,12 @@ namespace BizHawk.Client.MultiHawk public int BufferHeight { get; set; } public int BackgroundColor { get; set; } - public int VsyncNum + public int VsyncNumerator { get { throw new InvalidOperationException(); } } - public int VsyncDen + public int VsyncDenominator { get { throw new InvalidOperationException(); } } diff --git a/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs b/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs index dc8a50e9c1..db456ef6b3 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs @@ -110,9 +110,9 @@ namespace BizHawk.Emulation.Common 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 diff --git a/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs b/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs index 65e04f1ce6..c18054c9ef 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs @@ -30,8 +30,8 @@ public int BackgroundColor => DefaultBackgroundColor; - public int VsyncNum => DefaultVsyncNum; + public int VsyncNumerator => DefaultVsyncNum; - public int VsyncDen => DefaultVsyncDen; + public int VsyncDenominator => DefaultVsyncDen; } } diff --git a/BizHawk.Emulation.Common/Extensions.cs b/BizHawk.Emulation.Common/Extensions.cs index 91fc0deba8..d29c85f4cf 100644 --- a/BizHawk.Emulation.Common/Extensions.cs +++ b/BizHawk.Emulation.Common/Extensions.cs @@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions public static ISoundProvider AsSoundProviderOrDefault(this IEmulator core) { return core.ServiceProvider.GetService() - ?? 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) @@ -342,21 +342,21 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions return core.ServiceProvider.GetService(); } - public static int VsyncNum(this IEmulator core) + public static int VsyncNumerator(this IEmulator core) { if (core != null && core.HasVideoProvider()) { - //return core.AsVideoProvider().VsyncNum + return core.AsVideoProvider().VsyncNumerator; } return 60; } - public static int VsyncDen(this IEmulator core) + public static int VsyncDenominator(this IEmulator core) { if (core != null && core.HasVideoProvider()) { - //return core.AsVideoProvider().VsyncDen + return core.AsVideoProvider().VsyncDenominator; } return 1; @@ -364,7 +364,7 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions public static int VsyncRate(this IEmulator core) { - return core.VsyncNum() / core.VsyncDen(); + return core.VsyncNumerator() / core.VsyncDenominator(); } // TODO: a better place for these diff --git a/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs b/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs index fb343daa7d..fa25a414f9 100644 --- a/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs +++ b/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs @@ -45,14 +45,14 @@ int BufferHeight { get; } /// - /// Gets the vsync Numerator. Combined with the can be used to calculate a precise vsync rate. + /// Gets the vsync Numerator. Combined with the can be used to calculate a precise vsync rate. /// - int VsyncNum { get; } + int VsyncNumerator { get; } /// - /// Gets the vsync Denominator. Combined with the can be used to calculate a precise vsync rate. + /// Gets the vsync Denominator. Combined with the can be used to calculate a precise vsync rate. /// - int VsyncDen { get; } + int VsyncDenominator { get; } /// /// Gets the default color when no other color is applied diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.IVideoProvider.cs b/BizHawk.Emulation.Cores/Calculator/TI83.IVideoProvider.cs index e47b3a3247..ea4c4f85b6 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.IVideoProvider.cs @@ -9,8 +9,8 @@ namespace BizHawk.Emulation.Cores.Calculators public int BufferWidth => 96; public int BufferHeight => 64; public int BackgroundColor => 0; - public int VsyncNum => NullVideo.DefaultVsyncNum; - public int VsyncDen => NullVideo.DefaultVsyncDen; + public int VsyncNumerator => NullVideo.DefaultVsyncNum; + public int VsyncDenominator => NullVideo.DefaultVsyncDen; public int[] GetVideoBuffer() { diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IVideoProvider.cs b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IVideoProvider.cs index 064f506a39..29e17983af 100644 --- a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IVideoProvider.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII public int BufferHeight => 384; public int BackgroundColor => 0; - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] // TODO: precise numbers or confirm the default is okay 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 get diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.VideoProvider.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.VideoProvider.cs index d233789c20..9f3b00f9c8 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.VideoProvider.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.VideoProvider.cs @@ -72,9 +72,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS public int VirtualHeight { get; private set; } [SaveState.DoNotSave] - public int VsyncNum => CyclesPerFrame; + public int VsyncNumerator => CyclesPerFrame; [SaveState.DoNotSave] - public int VsyncDen => CyclesPerSecond; + public int VsyncDenominator => CyclesPerSecond; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs index 30baeb9d3f..fd5d559e27 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs @@ -393,9 +393,9 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 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() { diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs index be71bb7d64..75580c62aa 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs @@ -281,8 +281,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800 public int BufferWidth { get; private set; } public int BufferHeight { get; private set; } public int BackgroundColor => unchecked((int)0xff000000); - public int VsyncNum => _frameHz; - public int VsyncDen => 1; + public int VsyncNumerator => _frameHz; + public int VsyncDenominator => 1; #region ISoundProvider diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IVideoProvider.cs index 1af66a5d16..2ee563fc5a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IVideoProvider.cs @@ -24,8 +24,8 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx 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; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs index 9bdf08c777..1e5abd1445 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs @@ -465,7 +465,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision public int BufferHeight => 192; public int BackgroundColor => 0; - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -474,7 +474,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs index e6659057f5..3f5b94b041 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs @@ -82,7 +82,7 @@ namespace BizHawk.Emulation.Cores.Intellivision public int BufferHeight => 208; public int BackgroundColor => 0; - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -91,7 +91,7 @@ namespace BizHawk.Emulation.Cores.Intellivision } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IVideoProvider.cs index 6abf919447..deba7dad7a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.IVideoProvider.cs @@ -18,9 +18,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA 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]; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IVideoProvider.cs index 704c382e61..049cb587ec 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IVideoProvider.cs @@ -19,9 +19,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA 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[] _videopalette = new int[65536]; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IVideoProvider.cs index 8ea0389617..93e24191d5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IVideoProvider.cs @@ -22,8 +22,8 @@ public int BackgroundColor => 0; - public int VsyncNum => 262144; + public int VsyncNumerator => 262144; - public int VsyncDen => 4389; + public int VsyncDenominator => 4389; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IVideoProvider.cs index dcefcc8ef2..b00cb6a4fa 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IVideoProvider.cs @@ -10,9 +10,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy public int BufferWidth { get { return 320; } } 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 { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs index 1efa8f8405..a63703fa09 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs @@ -126,12 +126,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 switch (Region) { case DisplayType.NTSC: - _videoProvider.VsyncNum = 60000; - _videoProvider.VsyncDen = 1001; + _videoProvider.VsyncNumerator = 60000; + _videoProvider.VsyncDenominator = 1001; break; default: - _videoProvider.VsyncNum = 50; - _videoProvider.VsyncDen = 1; + _videoProvider.VsyncNumerator = 50; + _videoProvider.VsyncDenominator = 1; break; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64VideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64VideoProvider.cs index b99baaf793..85a8644175 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64VideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64VideoProvider.cs @@ -43,8 +43,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 public int BufferWidth { get; private set; } public int BufferHeight { get; private set; } public int BackgroundColor { get { return 0; } } - public int VsyncNum { get; internal set; } - public int VsyncDen { get; internal set; } + public int VsyncNumerator { get; internal set; } + public int VsyncDenominator { get; internal set; } /// /// Fetches current frame buffer from mupen64 diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index 8b9a7f8474..c8076ac370 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -337,8 +337,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } } - public int VsyncNum => emu.VsyncNum; - public int VsyncDen => emu.VsyncDen; + public int VsyncNumerator => emu.VsyncNum; + public int VsyncDenominator => emu.VsyncDen; } MyVideoProvider videoProvider; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IVideoProvider.cs index 9d12143e57..5f5b1d02eb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.IVideoProvider.cs @@ -8,8 +8,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES public int BufferHeight { get; private set; } public int BackgroundColor { get { return unchecked((int)0xff000000); } } - public int VsyncNum => 39375000; - public int VsyncDen => 655171; + public int VsyncNumerator => 39375000; + public int VsyncDenominator => 655171; public int[] GetVideoBuffer() { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IVideoProvider.cs index 0adaa19f1f..1d426410b5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IVideoProvider.cs @@ -19,8 +19,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES return _videoBuffer; } - public int VsyncNum { get; } - public int VsyncDen { get; } + public int VsyncNumerator { get; } + public int VsyncDenominator { get; } private int[] _videoBuffer = new int[256 * 224]; private int _videoWidth = 256; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index 0c4ce275bf..d317b7e2b3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -156,14 +156,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES 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. - VsyncNum = 21477272; - VsyncDen = 4 * 341 * 262; + VsyncNumerator = 21477272; + VsyncDenominator = 4 * 341 * 262; } else { // http://forums.nesdev.com/viewtopic.php?t=5367&start=19 - VsyncNum = 21281370; - VsyncDen = 4 * 341 * 312; + VsyncNumerator = 21281370; + VsyncDenominator = 4 * 341 * 312; } Api.CMD_power(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs index 5cf5f88dbe..5e7d4c274b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs @@ -66,7 +66,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X public int BufferHeight { get { return 224; } } public int BackgroundColor { get { return unchecked((int)0xff000000); } } - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.Render.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.Render.cs index 37b6f4de9f..43164ab43c 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.Render.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.Render.cs @@ -441,7 +441,7 @@ namespace BizHawk.Emulation.Cores.PCEngine public int BufferHeight => FrameHeight; public int BackgroundColor => vce.Palette[256]; - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -450,7 +450,7 @@ namespace BizHawk.Emulation.Cores.PCEngine } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs index 6eaadf9ae9..a24910a44e 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs @@ -529,7 +529,7 @@ namespace BizHawk.Emulation.Cores.PCEngine public int BufferHeight => FrameHeight; public int BackgroundColor => VCE.Palette[0]; - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -538,7 +538,7 @@ namespace BizHawk.Emulation.Cores.PCEngine } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs index b5a3215fe9..75d6d33625 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs @@ -497,8 +497,8 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem 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; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs index 048bcd42be..bc47c954fe 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs @@ -346,7 +346,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn public int BufferHeight { get; private set; } public int BackgroundColor { get { return unchecked((int)0xff000000); } } - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -355,7 +355,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IVideoProvider.cs index 9c66e9aed0..65e60d1dfe 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IVideoProvider.cs @@ -17,9 +17,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx 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 vwidth; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index 4eb5c8042a..1ed1f0746a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -126,9 +126,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx int fpsnum = 60; int fpsden = 1; LibGPGX.gpgx_get_fps(ref fpsnum, ref fpsden); - VsyncNum = fpsnum; - VsyncDen = fpsden; - Region = VsyncNum / VsyncDen > 55 ? DisplayType.NTSC : DisplayType.PAL; + VsyncNumerator = fpsnum; + VsyncDenominator = fpsden; + Region = VsyncNumerator / VsyncDenominator > 55 ? DisplayType.NTSC : DisplayType.PAL; } // compute state size diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IVideoProvider.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IVideoProvider.cs index 02fb6b3c64..58465b07a2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IVideoProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IVideoProvider.cs @@ -17,9 +17,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64 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 vwidth; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs index 176677a21e..b206ccc090 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs @@ -134,9 +134,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64 int fpsnum = 60; int fpsden = 1; Core.gpgx_get_fps(ref fpsnum, ref fpsden); - VsyncNum = fpsnum; - VsyncDen = fpsden; - Region = VsyncNum / VsyncDen > 55 ? DisplayType.NTSC : DisplayType.PAL; + VsyncNumerator = fpsnum; + VsyncDenominator = fpsden; + Region = VsyncNumerator / VsyncDenominator > 55 ? DisplayType.NTSC : DisplayType.PAL; } // compute state size diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs index 8e8dffc8a9..40fc93ae97 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs @@ -171,7 +171,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSP public int BufferHeight { get { return screenheight; } } public int BackgroundColor { get { return unchecked((int)0xff000000); } } - public int VsyncNum + public int VsyncNumerator { [FeatureNotImplemented] get @@ -180,7 +180,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSP } } - public int VsyncDen + public int VsyncDenominator { [FeatureNotImplemented] get diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index 56f570ff37..ea5bcbbd53 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -331,14 +331,14 @@ namespace BizHawk.Emulation.Cores.Sony.PSX int VidClock_d = CpuClock_d * 7; if (SystemRegion == OctoshockDll.eRegion.EU) { - VsyncNum = VidClock_n; - VsyncDen = VidClock_d * 314 * 3406; + VsyncNumerator = VidClock_n; + VsyncDenominator = VidClock_d * 314 * 3406; SystemVidStandard = OctoshockDll.eVidStandard.PAL; } else { - VsyncNum = VidClock_n; - VsyncDen = VidClock_d * 263 * 3413; + VsyncNumerator = VidClock_n; + VsyncDenominator = VidClock_d * 263 * 3413; SystemVidStandard = OctoshockDll.eVidStandard.NTSC; } @@ -868,8 +868,8 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public int BufferWidth { get; private set; } public int BufferHeight { get; private set; } public int BackgroundColor { get { return 0; } } - public int VsyncNum { get; private set; } - public int VsyncDen { get; private set; } + public int VsyncNumerator { get; private set; } + public int VsyncDenominator { get; private set; } public System.Drawing.Size VideoProvider_Padding { get; private set; } diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index 9f7b4e8423..b4969d110e 100644 --- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -213,8 +213,8 @@ namespace BizHawk.Emulation.Cores.WonderSwan public int BufferHeight { get; private set; } public int BackgroundColor { get { return unchecked((int)0xff000000); } } - public int VsyncNum => 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 VsyncNumerator => 3072000; // master CPU clock, also pixel clock + public int VsyncDenominator => (144 + 15) * (224 + 32); // 144 vislines, 15 vblank lines; 224 vispixels, 32 hblank pixels #endregion } diff --git a/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs b/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs index 93351a0b46..952812e641 100644 --- a/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs +++ b/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs @@ -128,8 +128,8 @@ namespace BizHawk.Emulation.Cores.Libretro savebuff2 = new byte[savebuff.Length + 13]; // TODO: more precise - VsyncNum = (int)(10000000 * api.comm->env.retro_system_av_info.timing.fps); - VsyncDen = 10000000; + VsyncNumerator = (int)(10000000 * api.comm->env.retro_system_av_info.timing.fps); + VsyncDenominator = 10000000; SetupResampler(api.comm->env.retro_system_av_info.timing.fps, api.comm->env.retro_system_av_info.timing.sample_rate); (ServiceProvider as BasicServiceProvider).Register(resampler); @@ -217,8 +217,8 @@ namespace BizHawk.Emulation.Cores.Libretro int IVideoProvider.BufferWidth { get { return vidWidth; } } int IVideoProvider.BufferHeight { get { return vidHeight; } } - public int VsyncNum { get; private set; } - public int VsyncDen { get; private set; } + public int VsyncNumerator { get; private set; } + public int VsyncDenominator { get; private set; } #region ISoundProvider