Video: Added frame counter option

This commit is contained in:
Souryo 2017-04-30 19:28:35 -04:00
parent 4e6a063c65
commit 3d2e4cbb69
17 changed files with 143 additions and 75 deletions

View file

@ -46,6 +46,7 @@ enum EmulationFlags : uint64_t
EnableOamDecay = 0x80000000,
UseNes101Hvc101Behavior = 0x100000000,
ShowFrameCounter = 0x200000000,
Turbo = 0x2000000000,
InBackground = 0x4000000000,

View file

@ -36,6 +36,7 @@ std::unordered_map<string, string> MessageManager::_enResources = {
{ "CouldNotLoadFile", u8"Could not load file: %1" },
{ "EmulationMaximumSpeed", u8"Maximum speed" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"Frame" },
{ "GameCrash", u8"Game has crashed (%1)" },
{ "Lag", u8"Lag" },
{ "Mapper", u8"Mapper: %1, SubMapper: %2" },
@ -104,6 +105,7 @@ std::unordered_map<string, string> MessageManager::_frResources = {
{ "CouldNotLoadFile", u8"Impossible de charger le fichier : %1" },
{ "EmulationMaximumSpeed", u8"Vitesse maximale" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"Image" },
{ "GameCrash", u8"Le jeu a planté (%1)" },
{ "Lag", u8"Lag" },
{ "Mapper", u8"Mapper : %1, SubMapper : %2" },
@ -172,6 +174,7 @@ std::unordered_map<string, string> MessageManager::_jaResources = {
{ "CouldNotLoadFile", u8"ファイルをロードできませんでした: %1" },
{ "EmulationMaximumSpeed", u8"最高速度" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"フレーム" },
{ "GameCrash", u8"ゲームは停止しました (%1)" },
{ "Lag", u8"ラグ" },
{ "Mapper", u8"Mapper: %1, SubMapper: %2" },
@ -240,6 +243,7 @@ std::unordered_map<string, string> MessageManager::_ruResources = {
{ "CouldNotLoadFile", u8"Не удалось загрузить файл: %1" },
{ "EmulationMaximumSpeed", u8"Максимальная скорость" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"Frame" },
{ "GameCrash", u8"Игра была аварийно завершена (%1)" },
{ "Lag", u8"Лаг" },
{ "Mapper", u8"Mapper: %1, SubMapper: %2" },
@ -308,6 +312,7 @@ std::unordered_map<string, string> MessageManager::_esResources = {
{ "CouldNotLoadFile", u8"No se puede cargar el archivo: %1" },
{ "EmulationMaximumSpeed", u8"Velocidad Máxima" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"Frame" },
{ "GameCrash", u8"El juego se ha colgado (%1)" },
{ "Lag", u8"Lag" },
{ "Mapper", u8"Mapeado: %1, SubMapeado: %2" },
@ -377,6 +382,7 @@ std::unordered_map<string, string> MessageManager::_ukResources = {
{ "CouldNotLoadFile", u8"Не вдалося завантажити файл: %1" },
{ "EmulationMaximumSpeed", u8"Максимальна швидкiсть" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"Frame" },
{ "GameCrash", u8"Гра була аварійно завершена (%1)" },
{ "Lag", u8"Лаг" },
{ "Mapper", u8"Mapper: %1, SubMapper: %2" },
@ -445,6 +451,7 @@ std::unordered_map<string, string> MessageManager::_ptResources = {
{ "CouldNotLoadFile", u8"Não foi possível carregar o arquivo: %1" },
{ "EmulationMaximumSpeed", u8"Velocidade Máxima" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "Frame", u8"Frame" },
{ "GameCrash", u8"O jogo crashou (%1)" },
{ "Lag", u8"Lag" },
{ "Mapper", u8"Mapeado: %1, SubMapeado: %2" },

View file

@ -34,6 +34,7 @@ namespace Mesen.GUI.Config
public RamPowerOnState RamPowerOnState;
public bool ShowLagCounter = false;
public bool ShowFrameCounter = false;
[MinMax(0, 500)] public UInt32 EmulationSpeed = 100;
[MinMax(0, 500)] public UInt32 TurboSpeed = 300;
@ -54,6 +55,7 @@ namespace Mesen.GUI.Config
InteropEmu.SetFlag(EmulationFlags.AllowInvalidInput, emulationInfo.AllowInvalidInput);
InteropEmu.SetFlag(EmulationFlags.RemoveSpriteLimit, emulationInfo.RemoveSpriteLimit);
InteropEmu.SetFlag(EmulationFlags.ShowLagCounter, emulationInfo.ShowLagCounter);
InteropEmu.SetFlag(EmulationFlags.ShowFrameCounter, emulationInfo.ShowFrameCounter);
InteropEmu.SetFlag(EmulationFlags.DisablePpu2004Reads, emulationInfo.DisablePpu2004Reads);
InteropEmu.SetFlag(EmulationFlags.DisablePaletteRead, emulationInfo.DisablePaletteRead);
InteropEmu.SetFlag(EmulationFlags.DisableOamAddrBug, emulationInfo.DisableOamAddrBug);

View file

@ -293,6 +293,7 @@
<Control ID="lblRewindSpeed">Rewind Speed:</Control>
<Control ID="tpgAdvanced">Avanzado</Control>
<Control ID="chkShowFrameCounter">Show Frame Counter</Control>
<Control ID="chkUseAlternativeMmc3Irq">Utilizar la versión alternativa de componentes de IRQs de MMC3</Control>
<Control ID="chkAllowInvalidInput">Permitir las entradas inválidas (Arriba+Abajo e Izquierda+Derecha al mismo tiempo)</Control>
<Control ID="lblRamPowerOnState">Estado inicial de la memoria durante el inicio:</Control>

View file

@ -294,6 +294,7 @@
<Control ID="lblRewindSpeed">Vitesse du rembobinage :</Control>
<Control ID="tpgAdvanced">Avancé</Control>
<Control ID="chkShowFrameCounter">Afficher le compteur d'images</Control>
<Control ID="chkUseAlternativeMmc3Irq">Utiliser la version alternative du comportement des IRQs du MMC3</Control>
<Control ID="chkAllowInvalidInput">Permettre les entrées invalides (Bas+Haut ou Gauche+Droite en même temps)</Control>
<Control ID="chkRemoveSpriteLimit">Éliminer la limite de sprites (Réduit le clignotement dans certains jeux)</Control>

View file

@ -294,6 +294,7 @@
<Control ID="lblRewindSpeed">巻き戻しの速度:</Control>
<Control ID="tpgAdvanced">詳細設定</Control>
<Control ID="chkShowFrameCounter">フレームカウンタを表示する</Control>
<Control ID="chkUseAlternativeMmc3Irq">MMC3AのIRQ仕様を使う</Control>
<Control ID="chkAllowInvalidInput">コントローラでは不可能インプットを可能にする (同時に上と下や右と左)</Control>
<Control ID="chkRemoveSpriteLimit">スプライトの制限を解除 (点滅を軽減する)</Control>

View file

@ -293,6 +293,7 @@
<Control ID="lblRewindSpeed">Rewind Speed:</Control>
<Control ID="tpgAdvanced">Avançado</Control>
<Control ID="chkShowFrameCounter">Show Frame Counter</Control>
<Control ID="chkUseAlternativeMmc3Irq">Utilizar a versão alternativa de componentes de IRQs de MMC3</Control>
<Control ID="chkAllowInvalidInput">Permitir as entradas inválidas (Cima+Baixo e Esquerda+Direita ao mesmo tempo)</Control>
<Control ID="lblRamPowerOnState">Estado inicial da memória durante o início:</Control>

View file

@ -294,6 +294,7 @@
<Control ID="lblRewindSpeed">Rewind Speed:</Control>
<Control ID="tpgAdvanced">Расширенные</Control>
<Control ID="chkShowFrameCounter">Show Frame Counter</Control>
<Control ID="chkUseAlternativeMmc3Irq">Использовать альтернативный IRQ MMC3</Control>
<Control ID="chkAllowInvalidInput">Разрешить недопустимые комбинации (Вниз+Вверх и Влево+Вправо)</Control>
<Control ID="lblRamPowerOnState">Содержимое ОЗУ при включении : </Control>

View file

@ -294,6 +294,7 @@
<Control ID="lblRewindSpeed">Rewind Speed:</Control>
<Control ID="tpgAdvanced">Розширені</Control>
<Control ID="chkShowFrameCounter">Show Frame Counter</Control>
<Control ID="chkUseAlternativeMmc3Irq">Використовувати альтернативний IRQ MMC3</Control>
<Control ID="chkAllowInvalidInput">Дозволити неприпустимі комбінації (Вниз+Вгору і Ліворуч+Вправо)</Control>
<Control ID="lblRamPowerOnState">Вміст ОЗУ при включенні : </Control>

View file

@ -41,6 +41,10 @@ namespace Mesen.GUI.Forms.Config
this.nudEmulationSpeed = new System.Windows.Forms.NumericUpDown();
this.lblEmuSpeedHint = new System.Windows.Forms.Label();
this.lblEmulationSpeed = new System.Windows.Forms.Label();
this.lblRewindSpeed = new System.Windows.Forms.Label();
this.flowLayoutPanel10 = new System.Windows.Forms.FlowLayoutPanel();
this.nudRewindSpeed = new System.Windows.Forms.NumericUpDown();
this.lblRewindSpeedHint = new System.Windows.Forms.Label();
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkEnableOamDecay = new Mesen.GUI.Controls.ctrlRiskyOption();
@ -84,10 +88,7 @@ namespace Mesen.GUI.Forms.Config
this.chkShowLagCounter = new System.Windows.Forms.CheckBox();
this.btnResetLagCounter = new System.Windows.Forms.Button();
this.tmrUpdateClockRate = new System.Windows.Forms.Timer(this.components);
this.lblRewindSpeed = new System.Windows.Forms.Label();
this.flowLayoutPanel10 = new System.Windows.Forms.FlowLayoutPanel();
this.nudRewindSpeed = new System.Windows.Forms.NumericUpDown();
this.lblRewindSpeedHint = new System.Windows.Forms.Label();
this.chkShowFrameCounter = new System.Windows.Forms.CheckBox();
this.tabMain.SuspendLayout();
this.tpgGeneral.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
@ -95,6 +96,8 @@ namespace Mesen.GUI.Forms.Config
((System.ComponentModel.ISupportInitialize)(this.nudTurboSpeed)).BeginInit();
this.flowLayoutPanel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmulationSpeed)).BeginInit();
this.flowLayoutPanel10.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudRewindSpeed)).BeginInit();
this.tpgAdvanced.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel8.SuspendLayout();
@ -112,8 +115,6 @@ namespace Mesen.GUI.Forms.Config
((System.ComponentModel.ISupportInitialize)(this.nudExtraScanlinesBeforeNmi)).BeginInit();
this.flowLayoutPanel2.SuspendLayout();
this.flowLayoutPanel7.SuspendLayout();
this.flowLayoutPanel10.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudRewindSpeed)).BeginInit();
this.SuspendLayout();
//
// baseConfigPanel
@ -254,6 +255,50 @@ namespace Mesen.GUI.Forms.Config
this.lblEmulationSpeed.TabIndex = 12;
this.lblEmulationSpeed.Text = "Emulation Speed:";
//
// lblRewindSpeed
//
this.lblRewindSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblRewindSpeed.AutoSize = true;
this.lblRewindSpeed.Location = new System.Drawing.Point(3, 58);
this.lblRewindSpeed.Name = "lblRewindSpeed";
this.lblRewindSpeed.Size = new System.Drawing.Size(80, 13);
this.lblRewindSpeed.TabIndex = 15;
this.lblRewindSpeed.Text = "Rewind Speed:";
//
// flowLayoutPanel10
//
this.flowLayoutPanel10.AutoSize = true;
this.flowLayoutPanel10.Controls.Add(this.nudRewindSpeed);
this.flowLayoutPanel10.Controls.Add(this.lblRewindSpeedHint);
this.flowLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel10.Location = new System.Drawing.Point(111, 52);
this.flowLayoutPanel10.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel10.Name = "flowLayoutPanel10";
this.flowLayoutPanel10.Size = new System.Drawing.Size(408, 26);
this.flowLayoutPanel10.TabIndex = 16;
//
// nudRewindSpeed
//
this.nudRewindSpeed.Location = new System.Drawing.Point(3, 3);
this.nudRewindSpeed.Maximum = new decimal(new int[] {
500,
0,
0,
0});
this.nudRewindSpeed.Name = "nudRewindSpeed";
this.nudRewindSpeed.Size = new System.Drawing.Size(48, 20);
this.nudRewindSpeed.TabIndex = 1;
//
// lblRewindSpeedHint
//
this.lblRewindSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblRewindSpeedHint.AutoSize = true;
this.lblRewindSpeedHint.Location = new System.Drawing.Point(57, 6);
this.lblRewindSpeedHint.Name = "lblRewindSpeedHint";
this.lblRewindSpeedHint.Size = new System.Drawing.Size(121, 13);
this.lblRewindSpeedHint.TabIndex = 2;
this.lblRewindSpeedHint.Text = "% (0 = Maximum speed)";
//
// tpgAdvanced
//
this.tpgAdvanced.Controls.Add(this.tableLayoutPanel1);
@ -269,20 +314,22 @@ namespace Mesen.GUI.Forms.Config
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.chkEnableOamDecay, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.chkEnableOamDecay, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.chkRemoveSpriteLimit, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 9);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePaletteRead, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.chkDisableOamAddrBug, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpuReset, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpu2004Reads, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.chkUseNes101Hvc101Behavior, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 10);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePaletteRead, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.chkDisableOamAddrBug, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpuReset, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpu2004Reads, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.chkUseNes101Hvc101Behavior, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 9);
this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.chkShowFrameCounter, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 11;
this.tableLayoutPanel1.RowCount = 12;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
@ -301,7 +348,7 @@ namespace Mesen.GUI.Forms.Config
//
this.chkEnableOamDecay.AutoSize = true;
this.chkEnableOamDecay.Checked = false;
this.chkEnableOamDecay.Location = new System.Drawing.Point(0, 69);
this.chkEnableOamDecay.Location = new System.Drawing.Point(0, 92);
this.chkEnableOamDecay.Name = "chkEnableOamDecay";
this.chkEnableOamDecay.Size = new System.Drawing.Size(243, 23);
this.chkEnableOamDecay.TabIndex = 9;
@ -322,7 +369,7 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel8.Controls.Add(this.lblRamPowerOnState);
this.flowLayoutPanel8.Controls.Add(this.cboRamPowerOnState);
this.flowLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel8.Location = new System.Drawing.Point(0, 207);
this.flowLayoutPanel8.Location = new System.Drawing.Point(0, 230);
this.flowLayoutPanel8.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel8.Name = "flowLayoutPanel8";
this.flowLayoutPanel8.Size = new System.Drawing.Size(519, 27);
@ -351,7 +398,7 @@ namespace Mesen.GUI.Forms.Config
//
this.chkDisablePaletteRead.AutoSize = true;
this.chkDisablePaletteRead.Checked = false;
this.chkDisablePaletteRead.Location = new System.Drawing.Point(0, 161);
this.chkDisablePaletteRead.Location = new System.Drawing.Point(0, 184);
this.chkDisablePaletteRead.Name = "chkDisablePaletteRead";
this.chkDisablePaletteRead.Size = new System.Drawing.Size(248, 23);
this.chkDisablePaletteRead.TabIndex = 6;
@ -361,7 +408,7 @@ namespace Mesen.GUI.Forms.Config
//
this.chkDisableOamAddrBug.AutoSize = true;
this.chkDisableOamAddrBug.Checked = false;
this.chkDisableOamAddrBug.Location = new System.Drawing.Point(0, 138);
this.chkDisableOamAddrBug.Location = new System.Drawing.Point(0, 161);
this.chkDisableOamAddrBug.Name = "chkDisableOamAddrBug";
this.chkDisableOamAddrBug.Size = new System.Drawing.Size(311, 23);
this.chkDisableOamAddrBug.TabIndex = 5;
@ -371,7 +418,7 @@ namespace Mesen.GUI.Forms.Config
//
this.chkDisablePpuReset.AutoSize = true;
this.chkDisablePpuReset.Checked = false;
this.chkDisablePpuReset.Location = new System.Drawing.Point(0, 92);
this.chkDisablePpuReset.Location = new System.Drawing.Point(0, 115);
this.chkDisablePpuReset.Name = "chkDisablePpuReset";
this.chkDisablePpuReset.Size = new System.Drawing.Size(414, 23);
this.chkDisablePpuReset.TabIndex = 7;
@ -381,7 +428,7 @@ namespace Mesen.GUI.Forms.Config
//
this.chkDisablePpu2004Reads.AutoSize = true;
this.chkDisablePpu2004Reads.Checked = false;
this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(0, 115);
this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(0, 138);
this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads";
this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(341, 23);
this.chkDisablePpu2004Reads.TabIndex = 4;
@ -390,7 +437,7 @@ namespace Mesen.GUI.Forms.Config
// chkUseNes101Hvc101Behavior
//
this.chkUseNes101Hvc101Behavior.AutoSize = true;
this.chkUseNes101Hvc101Behavior.Location = new System.Drawing.Point(3, 26);
this.chkUseNes101Hvc101Behavior.Location = new System.Drawing.Point(3, 49);
this.chkUseNes101Hvc101Behavior.Name = "chkUseNes101Hvc101Behavior";
this.chkUseNes101Hvc101Behavior.Size = new System.Drawing.Size(292, 17);
this.chkUseNes101Hvc101Behavior.TabIndex = 8;
@ -402,7 +449,7 @@ namespace Mesen.GUI.Forms.Config
this.chkAllowInvalidInput.AutoSize = true;
this.chkAllowInvalidInput.Checked = false;
this.chkAllowInvalidInput.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkAllowInvalidInput.Location = new System.Drawing.Point(0, 184);
this.chkAllowInvalidInput.Location = new System.Drawing.Point(0, 207);
this.chkAllowInvalidInput.Name = "chkAllowInvalidInput";
this.chkAllowInvalidInput.Size = new System.Drawing.Size(519, 23);
this.chkAllowInvalidInput.TabIndex = 1;
@ -411,7 +458,7 @@ namespace Mesen.GUI.Forms.Config
// chkUseAlternativeMmc3Irq
//
this.chkUseAlternativeMmc3Irq.AutoSize = true;
this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(3, 49);
this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(3, 72);
this.chkUseAlternativeMmc3Irq.Name = "chkUseAlternativeMmc3Irq";
this.chkUseAlternativeMmc3Irq.Size = new System.Drawing.Size(197, 17);
this.chkUseAlternativeMmc3Irq.TabIndex = 0;
@ -779,49 +826,15 @@ namespace Mesen.GUI.Forms.Config
this.tmrUpdateClockRate.Enabled = true;
this.tmrUpdateClockRate.Tick += new System.EventHandler(this.tmrUpdateClockRate_Tick);
//
// lblRewindSpeed
// chkShowFrameCounter
//
this.lblRewindSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblRewindSpeed.AutoSize = true;
this.lblRewindSpeed.Location = new System.Drawing.Point(3, 58);
this.lblRewindSpeed.Name = "lblRewindSpeed";
this.lblRewindSpeed.Size = new System.Drawing.Size(80, 13);
this.lblRewindSpeed.TabIndex = 15;
this.lblRewindSpeed.Text = "Rewind Speed:";
//
// flowLayoutPanel10
//
this.flowLayoutPanel10.AutoSize = true;
this.flowLayoutPanel10.Controls.Add(this.nudRewindSpeed);
this.flowLayoutPanel10.Controls.Add(this.lblRewindSpeedHint);
this.flowLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel10.Location = new System.Drawing.Point(111, 52);
this.flowLayoutPanel10.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel10.Name = "flowLayoutPanel10";
this.flowLayoutPanel10.Size = new System.Drawing.Size(408, 26);
this.flowLayoutPanel10.TabIndex = 16;
//
// nudRewindSpeed
//
this.nudRewindSpeed.Location = new System.Drawing.Point(3, 3);
this.nudRewindSpeed.Maximum = new decimal(new int[] {
500,
0,
0,
0});
this.nudRewindSpeed.Name = "nudRewindSpeed";
this.nudRewindSpeed.Size = new System.Drawing.Size(48, 20);
this.nudRewindSpeed.TabIndex = 1;
//
// lblRewindSpeedHint
//
this.lblRewindSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblRewindSpeedHint.AutoSize = true;
this.lblRewindSpeedHint.Location = new System.Drawing.Point(57, 6);
this.lblRewindSpeedHint.Name = "lblRewindSpeedHint";
this.lblRewindSpeedHint.Size = new System.Drawing.Size(121, 13);
this.lblRewindSpeedHint.TabIndex = 2;
this.lblRewindSpeedHint.Text = "% (0 = Maximum speed)";
this.chkShowFrameCounter.AutoSize = true;
this.chkShowFrameCounter.Location = new System.Drawing.Point(3, 26);
this.chkShowFrameCounter.Name = "chkShowFrameCounter";
this.chkShowFrameCounter.Size = new System.Drawing.Size(125, 17);
this.chkShowFrameCounter.TabIndex = 10;
this.chkShowFrameCounter.Text = "Show Frame Counter";
this.chkShowFrameCounter.UseVisualStyleBackColor = true;
//
// frmEmulationConfig
//
@ -848,6 +861,9 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel6.ResumeLayout(false);
this.flowLayoutPanel6.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmulationSpeed)).EndInit();
this.flowLayoutPanel10.ResumeLayout(false);
this.flowLayoutPanel10.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudRewindSpeed)).EndInit();
this.tpgAdvanced.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
@ -874,9 +890,6 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel2.PerformLayout();
this.flowLayoutPanel7.ResumeLayout(false);
this.flowLayoutPanel7.PerformLayout();
this.flowLayoutPanel10.ResumeLayout(false);
this.flowLayoutPanel10.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudRewindSpeed)).EndInit();
this.ResumeLayout(false);
}
@ -940,5 +953,6 @@ namespace Mesen.GUI.Forms.Config
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel10;
private System.Windows.Forms.NumericUpDown nudRewindSpeed;
private System.Windows.Forms.Label lblRewindSpeedHint;
private System.Windows.Forms.CheckBox chkShowFrameCounter;
}
}

View file

@ -25,6 +25,7 @@ namespace Mesen.GUI.Forms.Config
AddBinding("TurboSpeed", nudTurboSpeed);
AddBinding("RewindSpeed", nudRewindSpeed);
AddBinding("ShowFrameCounter", chkShowFrameCounter);
AddBinding("UseAlternativeMmc3Irq", chkUseAlternativeMmc3Irq);
AddBinding("AllowInvalidInput", chkAllowInvalidInput);
AddBinding("RemoveSpriteLimit", chkRemoveSpriteLimit);

View file

@ -983,6 +983,7 @@ namespace Mesen.GUI
EnableOamDecay = 0x80000000,
UseNes101Hvc101Behavior = 0x100000000,
ShowFrameCounter = 0x200000000,
Turbo = 0x2000000000,
InBackground = 0x4000000000,

View file

@ -122,14 +122,27 @@ void BaseRenderer::ShowFpsCounter()
}
string fpsString = string("FPS: ") + std::to_string(_currentFPS) + " / " + std::to_string(_currentRenderedFPS);
DrawString(fpsString, (float)(_screenWidth - 120), 13, 250, 235, 215);
DrawString(fpsString, (float)(_screenWidth - 125), 13, 250, 235, 215);
}
void BaseRenderer::ShowLagCounter()
{
float yPos = EmulationSettings::CheckFlag(EmulationFlags::ShowFPS) ? 37.0f : 13.0f;
string lagCounter = MessageManager::Localize("Lag") + ": " + std::to_string(Console::GetLagCounter());
DrawString(lagCounter, (float)(_screenWidth - 120), yPos, 250, 235, 215);
DrawString(lagCounter, (float)(_screenWidth - 123), yPos, 250, 235, 215);
}
void BaseRenderer::ShowFrameCounter()
{
float yPos = 13.0f;
if(EmulationSettings::CheckFlag(EmulationFlags::ShowFPS)) {
yPos += 24.0f;
}
if(EmulationSettings::CheckFlag(EmulationFlags::ShowLagCounter)) {
yPos += 24.0f;
}
string lagCounter = MessageManager::Localize("Frame") + ": " + std::to_string(PPU::GetFrameCount());
DrawString(lagCounter, (float)(_screenWidth - 146), yPos, 250, 235, 215);
}
bool BaseRenderer::IsMessageShown()

View file

@ -33,5 +33,6 @@ protected:
virtual void DrawString(std::wstring message, int x, int y, uint8_t r = 255, uint8_t g = 255, uint8_t b = 255) = 0;
void ShowFpsCounter();
void ShowLagCounter();
void ShowLagCounter();
void ShowFrameCounter();
};

View file

@ -133,6 +133,9 @@ void SdlRenderer::Render()
if(EmulationSettings::CheckFlag(EmulationFlags::ShowLagCounter)) {
ShowLagCounter();
}
if(EmulationSettings::CheckFlag(EmulationFlags::ShowFrameCounter)) {
ShowFrameCounter();
}
}
DrawToasts();

View file

@ -2,6 +2,8 @@
#include "Renderer.h"
#include "DirectXTK/SpriteBatch.h"
#include "DirectXTK/SpriteFont.h"
#include "../Core/Console.h"
#include "../Core/PPU.h"
#include "../Core/VideoRenderer.h"
#include "../Core/VideoDecoder.h"
#include "../Core/EmulationSettings.h"
@ -483,14 +485,27 @@ namespace NES
}
string fpsString = string("FPS: ") + std::to_string(_currentFPS) + " / " + std::to_string(_currentRenderedFPS);
DrawString(fpsString, (float)(_screenWidth - 120), 13, Colors::AntiqueWhite, 1.0f);
DrawString(fpsString, (float)(_screenWidth - 125), 13, Colors::AntiqueWhite, 1.0f);
}
void Renderer::ShowLagCounter()
{
float yPos = EmulationSettings::CheckFlag(EmulationFlags::ShowFPS) ? 37.0f : 13.0f;
string lagCounter = MessageManager::Localize("Lag") + ": " + std::to_string(Console::GetLagCounter());
DrawString(lagCounter, (float)(_screenWidth - 120), yPos, Colors::AntiqueWhite, 1.0f);
DrawString(lagCounter, (float)(_screenWidth - 123), yPos, Colors::AntiqueWhite, 1.0f);
}
void Renderer::ShowFrameCounter()
{
float yPos = 13.0f;
if(EmulationSettings::CheckFlag(EmulationFlags::ShowFPS)) {
yPos += 24.0f;
}
if(EmulationSettings::CheckFlag(EmulationFlags::ShowLagCounter)) {
yPos += 24.0f;
}
string lagCounter = MessageManager::Localize("Frame") + ": " + std::to_string(PPU::GetFrameCount());
DrawString(lagCounter, (float)(_screenWidth - 146), yPos, Colors::AntiqueWhite, 1.0f);
}
void Renderer::Render()
@ -518,6 +533,9 @@ namespace NES
if(EmulationSettings::CheckFlag(EmulationFlags::ShowLagCounter)) {
ShowLagCounter();
}
if(EmulationSettings::CheckFlag(EmulationFlags::ShowFrameCounter)) {
ShowFrameCounter();
}
}
DrawToasts();

View file

@ -89,6 +89,7 @@ namespace NES {
void ShowFpsCounter();
void ShowLagCounter();
void ShowFrameCounter();
public:
Renderer(HWND hWnd);