diff --git a/Core/EmulationSettings.cpp b/Core/EmulationSettings.cpp
index f48e9c40..9a61a33e 100644
--- a/Core/EmulationSettings.cpp
+++ b/Core/EmulationSettings.cpp
@@ -9,7 +9,7 @@ uint8_t EmulationSettings::_versionRevision = 1;
Language EmulationSettings::_displayLanguage = Language::English;
-uint32_t EmulationSettings::_flags = 0;
+uint64_t EmulationSettings::_flags = 0;
uint32_t EmulationSettings::_audioLatency = 20000;
double EmulationSettings::_channelVolume[11] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
diff --git a/Core/EmulationSettings.h b/Core/EmulationSettings.h
index 71e6a6ba..00181cca 100644
--- a/Core/EmulationSettings.h
+++ b/Core/EmulationSettings.h
@@ -4,7 +4,7 @@
#include "MessageManager.h"
#include "GameClient.h"
-enum EmulationFlags
+enum EmulationFlags : int64_t
{
Paused = 0x01,
ShowFPS = 0x02,
@@ -40,10 +40,12 @@ enum EmulationFlags
ForceSpritesFirstColumn = 0x2000000,
DisablePpu2004Reads = 0x4000000,
DisableNoiseModeFlag = 0x8000000,
+ DisablePaletteRead = 0x10000000,
+ DisableOamAddrBug = 0x20000000,
- Turbo = 0x20000000,
- InBackground = 0x40000000,
- NsfPlayerEnabled = 0x80000000,
+ Turbo = 0x2000000000,
+ InBackground = 0x4000000000,
+ NsfPlayerEnabled = 0x8000000000,
};
enum class AudioChannel
@@ -307,7 +309,7 @@ private:
static uint32_t _ppuPaletteArgb[11][64];
static uint32_t _defaultPpuPalette[64];
- static uint32_t _flags;
+ static uint64_t _flags;
static Language _displayLanguage;
@@ -392,7 +394,7 @@ public:
_flags &= ~flags;
}
- static bool CheckFlag(uint32_t flag)
+ static bool CheckFlag(EmulationFlags flag)
{
return (_flags & flag) == flag;
}
diff --git a/Core/PPU.cpp b/Core/PPU.cpp
index 8422c69d..54729b83 100644
--- a/Core/PPU.cpp
+++ b/Core/PPU.cpp
@@ -236,7 +236,7 @@ uint8_t PPU::ReadRAM(uint16_t addr)
returnValue = _memoryReadBuffer;
_memoryReadBuffer = _memoryManager->ReadVRAM(_state.VideoRamAddr, MemoryOperationType::Read);
- if((_state.VideoRamAddr & 0x3FFF) >= 0x3F00) {
+ if((_state.VideoRamAddr & 0x3FFF) >= 0x3F00 && !EmulationSettings::CheckFlag(EmulationFlags::DisablePaletteRead)) {
returnValue = ReadPaletteRAM(_state.VideoRamAddr) | (_openBus & 0xC0);
openBusMask = 0xC0;
} else {
@@ -738,12 +738,6 @@ void PPU::ProcessPrerenderScanline()
{
ProcessPreVBlankScanline();
- if(IsRenderingEnabled() && _cycle == 0 && _state.SpriteRamAddr >= 0x08) {
- //This should only be done if rendering is enabled (otherwise oam_stress test fails immediately)
- //"If OAMADDR is not less than eight when rendering starts, the eight bytes starting at OAMADDR & 0xF8 are copied to the first eight bytes of OAM"
- memcpy(_spriteRAM, _spriteRAM + (_state.SpriteRamAddr & 0xF8), 8);
- }
-
if(_cycle == 0) {
_statusFlags.SpriteOverflow = false;
_statusFlags.Sprite0Hit = false;
@@ -786,9 +780,7 @@ void PPU::ProcessVisibleScanline()
DrawPixel();
ShiftTileRegisters();
- if(IsRenderingEnabled()) {
- CopyOAMData();
- }
+ CopyOAMData();
} else if(_cycle >= 321 && _cycle <= 336) {
LoadTileInfo();
} else if(_cycle == 337 || _cycle == 339) {
@@ -802,88 +794,96 @@ void PPU::ProcessVisibleScanline()
void PPU::CopyOAMData()
{
- if(_cycle < 65) {
- //Clear secondary OAM at between cycle 1 and 64
- _oamCopybuffer = 0xFF;
- _secondarySpriteRAM[(_cycle - 1) >> 1] = 0xFF;
- } else {
- if(_cycle == 65) {
- _sprite0Added = false;
- _spriteInRange = false;
- _secondaryOAMAddr = 0;
- _overflowSpriteAddr = 0;
+ if(_nesModel == NesModel::NTSC && IsRenderingEnabled() || _nesModel == NesModel::PAL && (_scanline < 240 || _scanline > 260)) {
+ if(_cycle < 65) {
+ if(_cycle < 9 && _state.SpriteRamAddr >= 0x08 && _scanline == -1 && !EmulationSettings::CheckFlag(EmulationFlags::DisableOamAddrBug)) {
+ //This should only be done if rendering is enabled (otherwise oam_stress test fails immediately)
+ //"If OAMADDR is not less than eight when rendering starts, the eight bytes starting at OAMADDR & 0xF8 are copied to the first eight bytes of OAM"
+ _spriteRAM[_cycle - 1] = _spriteRAM[((_state.SpriteRamAddr & 0xF8) + _cycle - 1) & 0xFF];
+ }
- _oamCopyDone = false;
- _spriteAddrH = (_state.SpriteRamAddr >> 2) & 0x3F;
- _spriteAddrL = _state.SpriteRamAddr & 0x03;
- } else if(_cycle == 256) {
- _sprite0Visible = _sprite0Added;
- _spriteCount = (_secondaryOAMAddr >> 2);
- }
-
- if(_cycle & 0x01) {
- //Read a byte from the primary OAM on odd cycles
- _oamCopybuffer = _spriteRAM[(_spriteAddrH << 2) + _spriteAddrL];
+ //Clear secondary OAM at between cycle 1 and 64
+ _oamCopybuffer = 0xFF;
+ _secondarySpriteRAM[(_cycle - 1) >> 1] = 0xFF;
} else {
- if(_oamCopyDone) {
- _spriteAddrH = (_spriteAddrH + 1) & 0x3F;
+ if(_cycle == 65) {
+ _sprite0Added = false;
+ _spriteInRange = false;
+ _secondaryOAMAddr = 0;
+ _overflowSpriteAddr = 0;
+
+ _oamCopyDone = false;
+ _spriteAddrH = (_state.SpriteRamAddr >> 2) & 0x3F;
+ _spriteAddrL = _state.SpriteRamAddr & 0x03;
+ } else if(_cycle == 256) {
+ _sprite0Visible = _sprite0Added;
+ _spriteCount = (_secondaryOAMAddr >> 2);
+ }
+
+ if(_cycle & 0x01) {
+ //Read a byte from the primary OAM on odd cycles
+ _oamCopybuffer = _spriteRAM[(_spriteAddrH << 2) + _spriteAddrL];
} else {
- if(!_spriteInRange && _scanline >= _oamCopybuffer && _scanline < _oamCopybuffer + (_flags.LargeSprites ? 16 : 8)) {
- _spriteInRange = true;
- }
+ if(_oamCopyDone) {
+ _spriteAddrH = (_spriteAddrH + 1) & 0x3F;
+ } else {
+ if(!_spriteInRange && _scanline >= _oamCopybuffer && _scanline < _oamCopybuffer + (_flags.LargeSprites ? 16 : 8)) {
+ _spriteInRange = true;
+ }
- if(_secondaryOAMAddr < 0x20) {
- //Copy 1 byte to secondary OAM
- _secondarySpriteRAM[_secondaryOAMAddr] = _oamCopybuffer;
+ if(_secondaryOAMAddr < 0x20) {
+ //Copy 1 byte to secondary OAM
+ _secondarySpriteRAM[_secondaryOAMAddr] = _oamCopybuffer;
- if(_spriteInRange) {
- _spriteAddrL++;
- _secondaryOAMAddr++;
+ if(_spriteInRange) {
+ _spriteAddrL++;
+ _secondaryOAMAddr++;
- if(_spriteAddrH == 0) {
- _sprite0Added = true;
- }
+ if(_spriteAddrH == 0) {
+ _sprite0Added = true;
+ }
- if(_spriteAddrL == 4) {
- //Done copying all 4 bytes
- _spriteInRange = false;
- _spriteAddrL = 0;
+ if(_spriteAddrL == 4) {
+ //Done copying all 4 bytes
+ _spriteInRange = false;
+ _spriteAddrL = 0;
+ _spriteAddrH = (_spriteAddrH + 1) & 0x3F;
+ if(_spriteAddrH == 0) {
+ _oamCopyDone = true;
+ }
+ }
+ } else {
+ //Nothing to copy, skip to next sprite
_spriteAddrH = (_spriteAddrH + 1) & 0x3F;
if(_spriteAddrH == 0) {
_oamCopyDone = true;
}
}
} else {
- //Nothing to copy, skip to next sprite
- _spriteAddrH = (_spriteAddrH + 1) & 0x3F;
- if(_spriteAddrH == 0) {
- _oamCopyDone = true;
+ //8 sprites have been found, check next sprite for overflow + emulate PPU bug
+ if(_overflowSpriteAddr == 0) {
+ //Used to remove sprite limit
+ _overflowSpriteAddr = _spriteAddrH * 4;
}
- }
- } else {
- //8 sprites have been found, check next sprite for overflow + emulate PPU bug
- if(_overflowSpriteAddr == 0) {
- //Used to remove sprite limit
- _overflowSpriteAddr = _spriteAddrH * 4;
- }
- if(_spriteInRange) {
- //Sprite is visible, consider this to be an overflow
- _statusFlags.SpriteOverflow = true;
- _spriteAddrL = (_spriteAddrL + 1) & 0x03;
- if(_spriteAddrL == 4) {
- _spriteInRange = false;
+ if(_spriteInRange) {
+ //Sprite is visible, consider this to be an overflow
+ _statusFlags.SpriteOverflow = true;
+ _spriteAddrL = (_spriteAddrL + 1) & 0x03;
+ if(_spriteAddrL == 4) {
+ _spriteInRange = false;
+ _spriteAddrH = (_spriteAddrH + 1) & 0x3F;
+ _oamCopyDone = true;
+ _spriteAddrL = 0;
+ }
+ } else {
+ //Sprite isn't on this scanline, trigger sprite evaluation bug - increment both H & L at the same time
_spriteAddrH = (_spriteAddrH + 1) & 0x3F;
- _oamCopyDone = true;
- _spriteAddrL = 0;
- }
- } else {
- //Sprite isn't on this scanline, trigger sprite evaluation bug - increment both H & L at the same time
- _spriteAddrH = (_spriteAddrH + 1) & 0x3F;
- _spriteAddrL = (_spriteAddrL + 1) & 0x03;
+ _spriteAddrL = (_spriteAddrL + 1) & 0x03;
- if(_spriteAddrH == 0) {
- _oamCopyDone = true;
+ if(_spriteAddrH == 0) {
+ _oamCopyDone = true;
+ }
}
}
}
@@ -949,6 +949,16 @@ void PPU::Exec()
ProcessPrerenderScanline();
} else if(_scanline == _nmiScanline) {
BeginVBlank();
+ } else if(_nesModel == NesModel::PAL && _scanline > _nmiScanline + 20) {
+ //"On a PAL machine, because of its extended vertical blank, the PPU begins refreshing OAM roughly 21 scanlines after NMI[2], to prevent it
+ //from decaying during the longer hiatus of rendering. Additionally, it will continue to refresh during the visible portion of the screen
+ //even if rendering is disabled. Because of this, OAM DMA must be done near the beginning of vertical blank on PAL, and everywhere else
+ //it is liable to conflict with the refresh. Since the refresh can't be disabled like on the NTSC hardware, OAM decay does not occur at all on the PAL NES."
+ if(_cycle > 0 && _cycle <= 256) {
+ CopyOAMData();
+ } else if(_cycle >= 257 && _cycle < 320) {
+ _state.SpriteRamAddr = 0;
+ }
}
} else {
//Used by NSF player to speed things up
diff --git a/GUI.NET/Config/EmulationInfo.cs b/GUI.NET/Config/EmulationInfo.cs
index 08374b53..fb2a8a57 100644
--- a/GUI.NET/Config/EmulationInfo.cs
+++ b/GUI.NET/Config/EmulationInfo.cs
@@ -17,6 +17,8 @@ namespace Mesen.GUI.Config
public bool AllowInvalidInput = false;
public bool RemoveSpriteLimit = false;
public bool DisablePpu2004Reads = false;
+ public bool DisablePaletteRead = false;
+ public bool DisableOamAddrBug = false;
public bool UseAlternativeMmc3Irq = false;
@@ -49,6 +51,8 @@ namespace Mesen.GUI.Config
InteropEmu.SetFlag(EmulationFlags.RemoveSpriteLimit, emulationInfo.RemoveSpriteLimit);
InteropEmu.SetFlag(EmulationFlags.ShowLagCounter, emulationInfo.ShowLagCounter);
InteropEmu.SetFlag(EmulationFlags.DisablePpu2004Reads, emulationInfo.DisablePpu2004Reads);
+ InteropEmu.SetFlag(EmulationFlags.DisablePaletteRead, emulationInfo.DisablePaletteRead);
+ InteropEmu.SetFlag(EmulationFlags.DisableOamAddrBug, emulationInfo.DisableOamAddrBug);
InteropEmu.SetOverclockRate(emulationInfo.OverclockRate, emulationInfo.OverclockAdjustApu);
InteropEmu.SetPpuNmiConfig(emulationInfo.PpuExtraScanlinesBeforeNmi, emulationInfo.PpuExtraScanlinesAfterNmi);
diff --git a/GUI.NET/Controls/ctrlRiskyOption.Designer.cs b/GUI.NET/Controls/ctrlRiskyOption.Designer.cs
new file mode 100644
index 00000000..6ac89f22
--- /dev/null
+++ b/GUI.NET/Controls/ctrlRiskyOption.Designer.cs
@@ -0,0 +1,93 @@
+namespace Mesen.GUI.Controls
+{
+ partial class ctrlRiskyOption
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if(disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
+ this.chkOption = new System.Windows.Forms.CheckBox();
+ this.lblNotRecommended = new System.Windows.Forms.Label();
+ this.flowLayoutPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // flowLayoutPanel1
+ //
+ this.flowLayoutPanel1.AutoSize = true;
+ this.flowLayoutPanel1.Controls.Add(this.chkOption);
+ this.flowLayoutPanel1.Controls.Add(this.lblNotRecommended);
+ this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
+ this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
+ this.flowLayoutPanel1.Name = "flowLayoutPanel1";
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(197, 23);
+ this.flowLayoutPanel1.TabIndex = 0;
+ //
+ // chkOption
+ //
+ this.chkOption.AutoSize = true;
+ this.chkOption.Location = new System.Drawing.Point(3, 3);
+ this.chkOption.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3);
+ this.chkOption.Name = "chkOption";
+ this.chkOption.Size = new System.Drawing.Size(86, 17);
+ this.chkOption.TabIndex = 0;
+ this.chkOption.Text = "Option name";
+ this.chkOption.UseVisualStyleBackColor = true;
+ this.chkOption.CheckedChanged += new System.EventHandler(this.chkOption_CheckedChanged);
+ //
+ // lblNotRecommended
+ //
+ this.lblNotRecommended.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblNotRecommended.AutoSize = true;
+ this.lblNotRecommended.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblNotRecommended.Location = new System.Drawing.Point(89, 5);
+ this.lblNotRecommended.Margin = new System.Windows.Forms.Padding(0);
+ this.lblNotRecommended.Name = "lblNotRecommended";
+ this.lblNotRecommended.Size = new System.Drawing.Size(98, 13);
+ this.lblNotRecommended.TabIndex = 1;
+ this.lblNotRecommended.Text = "(not recommended)";
+ //
+ // ctrlRiskyOption
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoSize = true;
+ this.Controls.Add(this.flowLayoutPanel1);
+ this.Name = "ctrlRiskyOption";
+ this.Size = new System.Drawing.Size(197, 23);
+ this.flowLayoutPanel1.ResumeLayout(false);
+ this.flowLayoutPanel1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
+ private System.Windows.Forms.CheckBox chkOption;
+ private System.Windows.Forms.Label lblNotRecommended;
+ }
+}
diff --git a/GUI.NET/Controls/ctrlRiskyOption.cs b/GUI.NET/Controls/ctrlRiskyOption.cs
new file mode 100644
index 00000000..a86bf038
--- /dev/null
+++ b/GUI.NET/Controls/ctrlRiskyOption.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Mesen.GUI.Forms;
+using System.IO;
+
+namespace Mesen.GUI.Controls
+{
+ public partial class ctrlRiskyOption : UserControl
+ {
+ public ctrlRiskyOption()
+ {
+ InitializeComponent();
+ this.lblNotRecommended.Text = ResourceHelper.GetMessage("RiskyOptionHint");
+ this.lblNotRecommended.ForeColor = SystemColors.ControlDark;
+ }
+
+ private void chkOption_CheckedChanged(object sender, EventArgs e)
+ {
+ this.lblNotRecommended.ForeColor = this.chkOption.Checked ? Color.Red : SystemColors.ControlDark;
+ }
+
+ [Bindable(true)]
+ [Browsable(true)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
+ [EditorBrowsable(EditorBrowsableState.Always)]
+ public override string Text
+ {
+ get { return chkOption.Text; }
+ set { chkOption.Text = value; }
+ }
+
+ public bool Checked
+ {
+ get { return chkOption.Checked; }
+ set { chkOption.Checked = value; }
+ }
+
+ protected override Padding DefaultMargin { get { return new Padding(0); } }
+ }
+}
diff --git a/GUI.NET/Controls/ctrlRiskyOption.resx b/GUI.NET/Controls/ctrlRiskyOption.resx
new file mode 100644
index 00000000..1af7de15
--- /dev/null
+++ b/GUI.NET/Controls/ctrlRiskyOption.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/GUI.NET/Dependencies/resources.en.xml b/GUI.NET/Dependencies/resources.en.xml
index 714af5f7..5f3eca60 100644
--- a/GUI.NET/Dependencies/resources.en.xml
+++ b/GUI.NET/Dependencies/resources.en.xml
@@ -21,6 +21,8 @@
{0} roms found
+ (not recommended)
+
Mesen could not find any games to load.
{0} games and {1} cheats in database
diff --git a/GUI.NET/Dependencies/resources.es.xml b/GUI.NET/Dependencies/resources.es.xml
index 53bdb0c7..3d25662d 100644
--- a/GUI.NET/Dependencies/resources.es.xml
+++ b/GUI.NET/Dependencies/resources.es.xml
@@ -289,6 +289,8 @@
Estado inicial de la memoria durante el inicio:
Eliminar el límite de sprites (Reduce el parpadeo en algunos juegos)
Disable PPU $2004 reads
+ Disable PPU OAMADDR bug emulation
+ Disable PPU palette reads
Overclocking
Overclocking de CPU
@@ -518,6 +520,8 @@
{0} roms encontradas
+ (not recommended)
+
Mesen no puede encontrar ningún juego para cargar.
Pista siguiente (Espera para jugar más rápido)
diff --git a/GUI.NET/Dependencies/resources.fr.xml b/GUI.NET/Dependencies/resources.fr.xml
index 5ceaaa09..92700d8b 100644
--- a/GUI.NET/Dependencies/resources.fr.xml
+++ b/GUI.NET/Dependencies/resources.fr.xml
@@ -289,6 +289,9 @@
Permettre les entrées invalides (Bas+Haut ou Gauche+Droite en même temps)
Éliminer la limite de sprites (Réduit le clignotement dans certains jeux)
Empêcher la lecture du registre $2004 du PPU
+ Désactiver l'émulation du bug de OAMADDR du PPU
+ Empêcher la lecture de la palette du PPU
+
État initial de la mémoire au démarrage :
Overclocking
@@ -527,6 +530,8 @@
Joueur {0}
{0} roms trouvés
+
+ (déconseillé)
Mesen n'a pas trouvé de jeu sur votre disque.
diff --git a/GUI.NET/Dependencies/resources.ja.xml b/GUI.NET/Dependencies/resources.ja.xml
index 723d91a9..6a22c321 100644
--- a/GUI.NET/Dependencies/resources.ja.xml
+++ b/GUI.NET/Dependencies/resources.ja.xml
@@ -289,6 +289,9 @@
コントローラでは不可能インプットを可能にする (同時に上と下や右と左)
スプライトの制限を解除 (点滅を軽減する)
PPUの$2004を読み込み不可能にする
+ PPUのOAMADDRバグを無効にする
+ PPUのパレットラムを読み込み不可能にする
+
起動時のメモリの状態 :
オーバークロック
@@ -510,6 +513,8 @@
{0}個
+ (推奨されません)
+
Mesenはゲームファイルを見つかりませんでした。
ゲーム{0}個とチートコード{1}個を見つけました
diff --git a/GUI.NET/Dependencies/resources.pt.xml b/GUI.NET/Dependencies/resources.pt.xml
index ff4f1290..aa72d86d 100644
--- a/GUI.NET/Dependencies/resources.pt.xml
+++ b/GUI.NET/Dependencies/resources.pt.xml
@@ -289,6 +289,8 @@
Estado inicial da memória durante o início:
Eliminar o limite de sprites (Reduz os "flashes" em alguns jogos)
Disable PPU $2004 reads
+ Disable PPU OAMADDR bug emulation
+ Disable PPU palette reads
Overclocking
Overclocking de CPU
@@ -518,6 +520,8 @@
{0} roms encontradas
+ (not recommended)
+
Mesen não encontrou nenhum jogo para carregar.
Track seguinte (Esperar para jogar mais rápido)
diff --git a/GUI.NET/Dependencies/resources.ru.xml b/GUI.NET/Dependencies/resources.ru.xml
index eed4cb9c..cf90f214 100644
--- a/GUI.NET/Dependencies/resources.ru.xml
+++ b/GUI.NET/Dependencies/resources.ru.xml
@@ -287,10 +287,12 @@
Расширенные
Использовать альтернативный IRQ MMC3
Разрешить недопустимые комбинации (Вниз+Вверх и Влево+Вправо)
+ Содержимое ОЗУ при включении :
Отключить лимит спрайтов (уменьшает мерцание)
Disable PPU $2004 reads
- Содержимое ОЗУ при включении :
-
+ Disable PPU OAMADDR bug emulation
+ Disable PPU palette reads
+
Разгон
Разгон CPU
ВНИМАНИЕ: Разгон может вызвать ошибки в некоторых играх!
@@ -519,6 +521,8 @@
{0} Найденные ROM файлы
+ (not recommended)
+
Mesen could not find any games to load.
игр {0}, читов {1}
diff --git a/GUI.NET/Dependencies/resources.uk.xml b/GUI.NET/Dependencies/resources.uk.xml
index 2df62d55..60d00d31 100644
--- a/GUI.NET/Dependencies/resources.uk.xml
+++ b/GUI.NET/Dependencies/resources.uk.xml
@@ -287,9 +287,11 @@
Розширені
Використовувати альтернативний IRQ MMC3
Дозволити неприпустимі комбінації (Вниз+Вгору і Ліворуч+Вправо)
+ Вміст ОЗУ при включенні :
Відключити ліміт спрайтів (зменшує мерехтіння)
Disable PPU $2004 reads
- Вміст ОЗУ при включенні :
+ Disable PPU OAMADDR bug emulation
+ Disable PPU palette reads
Розгін
Розгін CPU
@@ -518,6 +520,8 @@
{0} Знайдені ROM файли
+ (not recommended)
+
Mesen could not find any games to load.
iгр {0}, читiв {1}
diff --git a/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs b/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs
index 4a83954d..f4ddfa79 100644
--- a/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs
+++ b/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs
@@ -1,4 +1,6 @@
-namespace Mesen.GUI.Forms.Config
+using Mesen.GUI.Controls;
+
+namespace Mesen.GUI.Forms.Config
{
partial class frmAudioConfig
{
@@ -98,9 +100,9 @@
this.lblCrossFeedRatio = new System.Windows.Forms.Label();
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
- this.chkDisableNoiseModeFlag = new System.Windows.Forms.CheckBox();
+ this.chkDisableNoiseModeFlag = new Mesen.GUI.Controls.ctrlRiskyOption();
this.chkSilenceTriangleHighFreq = new System.Windows.Forms.CheckBox();
- this.chkSwapDutyCycles = new System.Windows.Forms.CheckBox();
+ this.chkSwapDutyCycles = new Mesen.GUI.Controls.ctrlRiskyOption();
this.chkReduceDmcPopping = new System.Windows.Forms.CheckBox();
this.baseConfigPanel.SuspendLayout();
this.grpVolume.SuspendLayout();
@@ -1094,9 +1096,9 @@
this.tableLayoutPanel3.ColumnCount = 1;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Controls.Add(this.chkDisableNoiseModeFlag, 0, 3);
- this.tableLayoutPanel3.Controls.Add(this.chkSilenceTriangleHighFreq, 0, 1);
- this.tableLayoutPanel3.Controls.Add(this.chkSwapDutyCycles, 0, 0);
- this.tableLayoutPanel3.Controls.Add(this.chkReduceDmcPopping, 0, 2);
+ this.tableLayoutPanel3.Controls.Add(this.chkSilenceTriangleHighFreq, 0, 0);
+ this.tableLayoutPanel3.Controls.Add(this.chkSwapDutyCycles, 0, 2);
+ this.tableLayoutPanel3.Controls.Add(this.chkReduceDmcPopping, 0, 1);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
@@ -1112,42 +1114,37 @@
// chkDisableNoiseModeFlag
//
this.chkDisableNoiseModeFlag.AutoSize = true;
- this.chkDisableNoiseModeFlag.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
- this.chkDisableNoiseModeFlag.Location = new System.Drawing.Point(3, 72);
+ this.chkDisableNoiseModeFlag.Checked = false;
+ this.chkDisableNoiseModeFlag.Location = new System.Drawing.Point(0, 69);
this.chkDisableNoiseModeFlag.Name = "chkDisableNoiseModeFlag";
- this.chkDisableNoiseModeFlag.Size = new System.Drawing.Size(179, 17);
+ this.chkDisableNoiseModeFlag.Size = new System.Drawing.Size(277, 23);
this.chkDisableNoiseModeFlag.TabIndex = 3;
this.chkDisableNoiseModeFlag.Text = "Disable noise channel mode flag";
- this.chkDisableNoiseModeFlag.TextAlign = System.Drawing.ContentAlignment.TopLeft;
- this.chkDisableNoiseModeFlag.UseVisualStyleBackColor = true;
//
// chkSilenceTriangleHighFreq
//
this.chkSilenceTriangleHighFreq.AutoSize = true;
- this.chkSilenceTriangleHighFreq.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
- this.chkSilenceTriangleHighFreq.Location = new System.Drawing.Point(3, 26);
+ this.chkSilenceTriangleHighFreq.Location = new System.Drawing.Point(3, 3);
this.chkSilenceTriangleHighFreq.Name = "chkSilenceTriangleHighFreq";
this.chkSilenceTriangleHighFreq.Size = new System.Drawing.Size(337, 17);
this.chkSilenceTriangleHighFreq.TabIndex = 1;
this.chkSilenceTriangleHighFreq.Text = "Mute ultrasonic frequencies on triangle channel (reduces popping)";
- this.chkSilenceTriangleHighFreq.TextAlign = System.Drawing.ContentAlignment.TopLeft;
- this.chkSilenceTriangleHighFreq.UseVisualStyleBackColor = true;
//
// chkSwapDutyCycles
//
this.chkSwapDutyCycles.AutoSize = true;
- this.chkSwapDutyCycles.Location = new System.Drawing.Point(3, 3);
+ this.chkSwapDutyCycles.Checked = false;
+ this.chkSwapDutyCycles.Location = new System.Drawing.Point(0, 46);
this.chkSwapDutyCycles.Name = "chkSwapDutyCycles";
- this.chkSwapDutyCycles.Size = new System.Drawing.Size(282, 17);
+ this.chkSwapDutyCycles.Size = new System.Drawing.Size(380, 23);
this.chkSwapDutyCycles.TabIndex = 0;
this.chkSwapDutyCycles.Text = "Swap square channels duty cycles (Mimics old clones)";
- this.chkSwapDutyCycles.UseVisualStyleBackColor = true;
//
// chkReduceDmcPopping
//
this.chkReduceDmcPopping.AutoSize = true;
this.chkReduceDmcPopping.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
- this.chkReduceDmcPopping.Location = new System.Drawing.Point(3, 49);
+ this.chkReduceDmcPopping.Location = new System.Drawing.Point(3, 26);
this.chkReduceDmcPopping.Name = "chkReduceDmcPopping";
this.chkReduceDmcPopping.Size = new System.Drawing.Size(243, 17);
this.chkReduceDmcPopping.TabIndex = 2;
@@ -1244,7 +1241,7 @@
private System.Windows.Forms.CheckBox chkReduceSoundInBackground;
private System.Windows.Forms.TabPage tpgAdvanced;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
- private System.Windows.Forms.CheckBox chkSwapDutyCycles;
+ private ctrlRiskyOption chkSwapDutyCycles;
private System.Windows.Forms.TabPage tpgEffects;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.GroupBox grpStereo;
@@ -1286,6 +1283,6 @@
private System.Windows.Forms.NumericUpDown nudCrossFeedRatio;
private System.Windows.Forms.Label lblCrossFeedRatio;
private Controls.ctrlHorizontalTrackbar trkTrianglePan;
- private System.Windows.Forms.CheckBox chkDisableNoiseModeFlag;
+ private ctrlRiskyOption chkDisableNoiseModeFlag;
}
}
\ No newline at end of file
diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs
index b6bbb0f6..d3365818 100644
--- a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs
+++ b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs
@@ -1,4 +1,6 @@
-namespace Mesen.GUI.Forms.Config
+using Mesen.GUI.Controls;
+
+namespace Mesen.GUI.Forms.Config
{
partial class frmEmulationConfig
{
@@ -42,11 +44,14 @@
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkUseAlternativeMmc3Irq = new System.Windows.Forms.CheckBox();
- this.chkAllowInvalidInput = new System.Windows.Forms.CheckBox();
+ this.chkAllowInvalidInput = new Mesen.GUI.Controls.ctrlRiskyOption();
this.chkRemoveSpriteLimit = new System.Windows.Forms.CheckBox();
this.flowLayoutPanel8 = new System.Windows.Forms.FlowLayoutPanel();
this.lblRamPowerOnState = new System.Windows.Forms.Label();
this.cboRamPowerOnState = new System.Windows.Forms.ComboBox();
+ this.chkDisableOamAddrBug = new Mesen.GUI.Controls.ctrlRiskyOption();
+ this.chkDisablePaletteRead = new Mesen.GUI.Controls.ctrlRiskyOption();
+ this.chkDisablePpu2004Reads = new Mesen.GUI.Controls.ctrlRiskyOption();
this.tpgOverclocking = new System.Windows.Forms.TabPage();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
@@ -76,7 +81,6 @@
this.chkShowLagCounter = new System.Windows.Forms.CheckBox();
this.btnResetLagCounter = new System.Windows.Forms.Button();
this.tmrUpdateClockRate = new System.Windows.Forms.Timer(this.components);
- this.chkDisablePpu2004Reads = new System.Windows.Forms.CheckBox();
this.tabMain.SuspendLayout();
this.tpgGeneral.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
@@ -106,7 +110,7 @@
// baseConfigPanel
//
this.baseConfigPanel.Location = new System.Drawing.Point(0, 299);
- this.baseConfigPanel.Size = new System.Drawing.Size(487, 29);
+ this.baseConfigPanel.Size = new System.Drawing.Size(533, 29);
//
// tabMain
//
@@ -117,7 +121,7 @@
this.tabMain.Location = new System.Drawing.Point(0, 0);
this.tabMain.Name = "tabMain";
this.tabMain.SelectedIndex = 0;
- this.tabMain.Size = new System.Drawing.Size(487, 299);
+ this.tabMain.Size = new System.Drawing.Size(533, 299);
this.tabMain.TabIndex = 2;
//
// tpgGeneral
@@ -126,7 +130,7 @@
this.tpgGeneral.Location = new System.Drawing.Point(4, 22);
this.tpgGeneral.Name = "tpgGeneral";
this.tpgGeneral.Padding = new System.Windows.Forms.Padding(3);
- this.tpgGeneral.Size = new System.Drawing.Size(479, 273);
+ this.tpgGeneral.Size = new System.Drawing.Size(525, 273);
this.tpgGeneral.TabIndex = 0;
this.tpgGeneral.Text = "General";
this.tpgGeneral.UseVisualStyleBackColor = true;
@@ -147,7 +151,7 @@
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel4.Size = new System.Drawing.Size(473, 267);
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(519, 267);
this.tableLayoutPanel4.TabIndex = 0;
//
// flowLayoutPanel9
@@ -159,7 +163,7 @@
this.flowLayoutPanel9.Location = new System.Drawing.Point(111, 26);
this.flowLayoutPanel9.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel9.Name = "flowLayoutPanel9";
- this.flowLayoutPanel9.Size = new System.Drawing.Size(362, 26);
+ this.flowLayoutPanel9.Size = new System.Drawing.Size(408, 26);
this.flowLayoutPanel9.TabIndex = 14;
//
// nudTurboSpeed
@@ -203,7 +207,7 @@
this.flowLayoutPanel6.Location = new System.Drawing.Point(111, 0);
this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel6.Name = "flowLayoutPanel6";
- this.flowLayoutPanel6.Size = new System.Drawing.Size(362, 26);
+ this.flowLayoutPanel6.Size = new System.Drawing.Size(408, 26);
this.flowLayoutPanel6.TabIndex = 11;
//
// nudEmulationSpeed
@@ -244,7 +248,7 @@
this.tpgAdvanced.Location = new System.Drawing.Point(4, 22);
this.tpgAdvanced.Name = "tpgAdvanced";
this.tpgAdvanced.Padding = new System.Windows.Forms.Padding(3);
- this.tpgAdvanced.Size = new System.Drawing.Size(479, 273);
+ this.tpgAdvanced.Size = new System.Drawing.Size(525, 273);
this.tpgAdvanced.TabIndex = 1;
this.tpgAdvanced.Text = "Advanced";
this.tpgAdvanced.UseVisualStyleBackColor = true;
@@ -253,28 +257,32 @@
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 2);
- this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.chkRemoveSpriteLimit, 0, 0);
- this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 4);
+ this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 6);
+ this.tableLayoutPanel1.Controls.Add(this.chkDisableOamAddrBug, 0, 5);
+ this.tableLayoutPanel1.Controls.Add(this.chkDisablePaletteRead, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpu2004Reads, 0, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
- this.tableLayoutPanel1.RowCount = 6;
+ this.tableLayoutPanel1.RowCount = 8;
+ 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());
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(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(473, 267);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(519, 267);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkUseAlternativeMmc3Irq
//
this.chkUseAlternativeMmc3Irq.AutoSize = true;
- this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(3, 49);
+ this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(3, 26);
this.chkUseAlternativeMmc3Irq.Name = "chkUseAlternativeMmc3Irq";
this.chkUseAlternativeMmc3Irq.Size = new System.Drawing.Size(197, 17);
this.chkUseAlternativeMmc3Irq.TabIndex = 0;
@@ -284,12 +292,13 @@
// chkAllowInvalidInput
//
this.chkAllowInvalidInput.AutoSize = true;
- this.chkAllowInvalidInput.Location = new System.Drawing.Point(3, 26);
+ this.chkAllowInvalidInput.Checked = false;
+ this.chkAllowInvalidInput.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.chkAllowInvalidInput.Location = new System.Drawing.Point(0, 46);
this.chkAllowInvalidInput.Name = "chkAllowInvalidInput";
- this.chkAllowInvalidInput.Size = new System.Drawing.Size(341, 17);
+ this.chkAllowInvalidInput.Size = new System.Drawing.Size(519, 23);
this.chkAllowInvalidInput.TabIndex = 1;
this.chkAllowInvalidInput.Text = "Allow invalid input (e.g Down + Up or Left + Right at the same time)";
- this.chkAllowInvalidInput.UseVisualStyleBackColor = true;
//
// chkRemoveSpriteLimit
//
@@ -306,10 +315,10 @@
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, 92);
+ this.flowLayoutPanel8.Location = new System.Drawing.Point(0, 138);
this.flowLayoutPanel8.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel8.Name = "flowLayoutPanel8";
- this.flowLayoutPanel8.Size = new System.Drawing.Size(473, 27);
+ this.flowLayoutPanel8.Size = new System.Drawing.Size(519, 27);
this.flowLayoutPanel8.TabIndex = 3;
//
// lblRamPowerOnState
@@ -331,13 +340,43 @@
this.cboRamPowerOnState.Size = new System.Drawing.Size(176, 21);
this.cboRamPowerOnState.TabIndex = 1;
//
+ // chkDisableOamAddrBug
+ //
+ this.chkDisableOamAddrBug.AutoSize = true;
+ this.chkDisableOamAddrBug.Checked = false;
+ this.chkDisableOamAddrBug.Location = new System.Drawing.Point(0, 115);
+ this.chkDisableOamAddrBug.Name = "chkDisableOamAddrBug";
+ this.chkDisableOamAddrBug.Size = new System.Drawing.Size(311, 23);
+ this.chkDisableOamAddrBug.TabIndex = 5;
+ this.chkDisableOamAddrBug.Text = "Disable PPU OAMADDR bug emulation";
+ //
+ // chkDisablePaletteRead
+ //
+ this.chkDisablePaletteRead.AutoSize = true;
+ this.chkDisablePaletteRead.Checked = false;
+ this.chkDisablePaletteRead.Location = new System.Drawing.Point(0, 92);
+ this.chkDisablePaletteRead.Name = "chkDisablePaletteRead";
+ this.chkDisablePaletteRead.Size = new System.Drawing.Size(248, 23);
+ this.chkDisablePaletteRead.TabIndex = 6;
+ this.chkDisablePaletteRead.Text = "Disable PPU palette reads";
+ //
+ // chkDisablePpu2004Reads
+ //
+ this.chkDisablePpu2004Reads.AutoSize = true;
+ this.chkDisablePpu2004Reads.Checked = false;
+ this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(0, 69);
+ this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads";
+ this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(246, 23);
+ this.chkDisablePpu2004Reads.TabIndex = 4;
+ this.chkDisablePpu2004Reads.Text = "Disable PPU $2004 reads";
+ //
// tpgOverclocking
//
this.tpgOverclocking.Controls.Add(this.tableLayoutPanel3);
this.tpgOverclocking.Location = new System.Drawing.Point(4, 22);
this.tpgOverclocking.Name = "tpgOverclocking";
this.tpgOverclocking.Padding = new System.Windows.Forms.Padding(3);
- this.tpgOverclocking.Size = new System.Drawing.Size(479, 273);
+ this.tpgOverclocking.Size = new System.Drawing.Size(525, 273);
this.tpgOverclocking.TabIndex = 2;
this.tpgOverclocking.Text = "Overclocking";
this.tpgOverclocking.UseVisualStyleBackColor = true;
@@ -366,7 +405,7 @@
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel3.Size = new System.Drawing.Size(473, 267);
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(519, 267);
this.tableLayoutPanel3.TabIndex = 0;
//
// flowLayoutPanel4
@@ -377,7 +416,7 @@
this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 189);
this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel4.Name = "flowLayoutPanel4";
- this.flowLayoutPanel4.Size = new System.Drawing.Size(473, 20);
+ this.flowLayoutPanel4.Size = new System.Drawing.Size(519, 20);
this.flowLayoutPanel4.TabIndex = 11;
//
// lblEffectiveClockRateDendy
@@ -428,7 +467,7 @@
this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 172);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
- this.flowLayoutPanel3.Size = new System.Drawing.Size(473, 17);
+ this.flowLayoutPanel3.Size = new System.Drawing.Size(519, 17);
this.flowLayoutPanel3.TabIndex = 9;
//
// lblEffectiveClockRatePal
@@ -456,7 +495,7 @@
this.grpOverclocking.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpOverclocking.Location = new System.Drawing.Point(3, 26);
this.grpOverclocking.Name = "grpOverclocking";
- this.grpOverclocking.Size = new System.Drawing.Size(467, 45);
+ this.grpOverclocking.Size = new System.Drawing.Size(513, 45);
this.grpOverclocking.TabIndex = 6;
this.grpOverclocking.TabStop = false;
this.grpOverclocking.Text = "Overclocking";
@@ -475,7 +514,7 @@
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.tableLayoutPanel2.Size = new System.Drawing.Size(461, 26);
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(507, 26);
this.tableLayoutPanel2.TabIndex = 0;
//
// flowLayoutPanel5
@@ -487,7 +526,7 @@
this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel5.Name = "flowLayoutPanel5";
- this.flowLayoutPanel5.Size = new System.Drawing.Size(461, 25);
+ this.flowLayoutPanel5.Size = new System.Drawing.Size(507, 25);
this.flowLayoutPanel5.TabIndex = 1;
//
// lblClockRate
@@ -542,7 +581,7 @@
this.grpPpuTiming.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpPpuTiming.Location = new System.Drawing.Point(3, 77);
this.grpPpuTiming.Name = "grpPpuTiming";
- this.grpPpuTiming.Size = new System.Drawing.Size(467, 75);
+ this.grpPpuTiming.Size = new System.Drawing.Size(513, 75);
this.grpPpuTiming.TabIndex = 7;
this.grpPpuTiming.TabStop = false;
this.grpPpuTiming.Text = "PPU Vertical Blank Configuration";
@@ -563,7 +602,7 @@
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel5.Size = new System.Drawing.Size(461, 56);
+ this.tableLayoutPanel5.Size = new System.Drawing.Size(507, 56);
this.tableLayoutPanel5.TabIndex = 0;
//
// nudExtraScanlinesAfterNmi
@@ -632,7 +671,7 @@
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 155);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
- this.flowLayoutPanel2.Size = new System.Drawing.Size(473, 17);
+ this.flowLayoutPanel2.Size = new System.Drawing.Size(519, 17);
this.flowLayoutPanel2.TabIndex = 8;
//
// lblEffectiveClockRate
@@ -662,7 +701,7 @@
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 232);
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
- this.flowLayoutPanel7.Size = new System.Drawing.Size(473, 35);
+ this.flowLayoutPanel7.Size = new System.Drawing.Size(519, 35);
this.flowLayoutPanel7.TabIndex = 12;
//
// chkShowLagCounter
@@ -692,21 +731,11 @@
this.tmrUpdateClockRate.Enabled = true;
this.tmrUpdateClockRate.Tick += new System.EventHandler(this.tmrUpdateClockRate_Tick);
//
- // chkDisablePpu2004Reads
- //
- this.chkDisablePpu2004Reads.AutoSize = true;
- this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(3, 72);
- this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads";
- this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(148, 17);
- this.chkDisablePpu2004Reads.TabIndex = 4;
- this.chkDisablePpu2004Reads.Text = "Disable PPU $2004 reads";
- this.chkDisablePpu2004Reads.UseVisualStyleBackColor = true;
- //
// frmEmulationConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(487, 328);
+ this.ClientSize = new System.Drawing.Size(533, 328);
this.Controls.Add(this.tabMain);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
@@ -763,7 +792,7 @@
private System.Windows.Forms.TabPage tpgAdvanced;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.CheckBox chkUseAlternativeMmc3Irq;
- private System.Windows.Forms.CheckBox chkAllowInvalidInput;
+ private ctrlRiskyOption chkAllowInvalidInput;
private System.Windows.Forms.CheckBox chkRemoveSpriteLimit;
private System.Windows.Forms.TabPage tpgOverclocking;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
@@ -806,6 +835,8 @@
private System.Windows.Forms.NumericUpDown nudTurboSpeed;
private System.Windows.Forms.Label lblTurboSpeed;
private System.Windows.Forms.Label lblTurboSpeedHint;
- private System.Windows.Forms.CheckBox chkDisablePpu2004Reads;
+ private ctrlRiskyOption chkDisablePpu2004Reads;
+ private ctrlRiskyOption chkDisableOamAddrBug;
+ private ctrlRiskyOption chkDisablePaletteRead;
}
}
\ No newline at end of file
diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.cs b/GUI.NET/Forms/Config/frmEmulationConfig.cs
index 5a22c548..6b471054 100644
--- a/GUI.NET/Forms/Config/frmEmulationConfig.cs
+++ b/GUI.NET/Forms/Config/frmEmulationConfig.cs
@@ -28,6 +28,8 @@ namespace Mesen.GUI.Forms.Config
AddBinding("AllowInvalidInput", chkAllowInvalidInput);
AddBinding("RemoveSpriteLimit", chkRemoveSpriteLimit);
AddBinding("DisablePpu2004Reads", chkDisablePpu2004Reads);
+ AddBinding("DisablePaletteRead", chkDisablePaletteRead);
+ AddBinding("DisableOamAddrBug", chkDisableOamAddrBug);
AddBinding("OverclockRate", nudOverclockRate);
AddBinding("OverclockAdjustApu", chkOverclockAdjustApu);
diff --git a/GUI.NET/Forms/Config/frmPreferences.Designer.cs b/GUI.NET/Forms/Config/frmPreferences.Designer.cs
index 234d11ac..5fa397fe 100644
--- a/GUI.NET/Forms/Config/frmPreferences.Designer.cs
+++ b/GUI.NET/Forms/Config/frmPreferences.Designer.cs
@@ -1,4 +1,6 @@
-namespace Mesen.GUI.Forms.Config
+using Mesen.GUI.Controls;
+
+namespace Mesen.GUI.Forms.Config
{
partial class frmPreferences
{
@@ -89,7 +91,7 @@
this.chkUnfFormat = new System.Windows.Forms.CheckBox();
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- this.chkDisableGameDatabase = new System.Windows.Forms.CheckBox();
+ this.chkDisableGameDatabase = new ctrlRiskyOption();
this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox();
this.chkFdsFastForwardOnLoad = new System.Windows.Forms.CheckBox();
this.tmrSyncDateTime = new System.Windows.Forms.Timer(this.components);
@@ -886,7 +888,6 @@
this.chkDisableGameDatabase.Size = new System.Drawing.Size(170, 17);
this.chkDisableGameDatabase.TabIndex = 6;
this.chkDisableGameDatabase.Text = "Disable built-in game database";
- this.chkDisableGameDatabase.UseVisualStyleBackColor = true;
//
// chkFdsAutoLoadDisk
//
@@ -1037,7 +1038,7 @@
private System.Windows.Forms.TabPage tpgNsf;
private System.Windows.Forms.CheckBox chkFdsFastForwardOnLoad;
private System.Windows.Forms.CheckBox chkFdsAutoLoadDisk;
- private System.Windows.Forms.CheckBox chkDisableGameDatabase;
+ private ctrlRiskyOption chkDisableGameDatabase;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5;
private System.Windows.Forms.CheckBox chkNsfMoveToNextTrackAfterTime;
diff --git a/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs b/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs
index 23153a53..8ac005be 100644
--- a/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs
+++ b/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs
@@ -1,4 +1,6 @@
-namespace Mesen.GUI.Forms.Config
+using Mesen.GUI.Controls;
+
+namespace Mesen.GUI.Forms.Config
{
partial class frmVideoConfig
{
@@ -96,10 +98,10 @@
this.btnLoadPalFile = new System.Windows.Forms.Button();
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel();
- this.chkDisableBackground = new System.Windows.Forms.CheckBox();
- this.chkDisableSprites = new System.Windows.Forms.CheckBox();
- this.chkForceBackgroundFirstColumn = new System.Windows.Forms.CheckBox();
- this.chkForceSpritesFirstColumn = new System.Windows.Forms.CheckBox();
+ this.chkDisableBackground = new ctrlRiskyOption();
+ this.chkDisableSprites = new ctrlRiskyOption();
+ this.chkForceBackgroundFirstColumn = new ctrlRiskyOption();
+ this.chkForceSpritesFirstColumn = new ctrlRiskyOption();
this.contextPicturePresets = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnuPresetComposite = new System.Windows.Forms.ToolStripMenuItem();
this.mnuPresetSVideo = new System.Windows.Forms.ToolStripMenuItem();
@@ -1091,7 +1093,6 @@
this.chkDisableBackground.Size = new System.Drawing.Size(121, 17);
this.chkDisableBackground.TabIndex = 0;
this.chkDisableBackground.Text = "Disable background";
- this.chkDisableBackground.UseVisualStyleBackColor = true;
//
// chkDisableSprites
//
@@ -1101,7 +1102,6 @@
this.chkDisableSprites.Size = new System.Drawing.Size(94, 17);
this.chkDisableSprites.TabIndex = 1;
this.chkDisableSprites.Text = "Disable sprites";
- this.chkDisableSprites.UseVisualStyleBackColor = true;
//
// chkForceBackgroundFirstColumn
//
@@ -1111,7 +1111,6 @@
this.chkForceBackgroundFirstColumn.Size = new System.Drawing.Size(215, 17);
this.chkForceBackgroundFirstColumn.TabIndex = 2;
this.chkForceBackgroundFirstColumn.Text = "Force background display in first column";
- this.chkForceBackgroundFirstColumn.UseVisualStyleBackColor = true;
//
// chkForceSpritesFirstColumn
//
@@ -1121,7 +1120,6 @@
this.chkForceSpritesFirstColumn.Size = new System.Drawing.Size(183, 17);
this.chkForceSpritesFirstColumn.TabIndex = 3;
this.chkForceSpritesFirstColumn.Text = "Force sprite display in first column";
- this.chkForceSpritesFirstColumn.UseVisualStyleBackColor = true;
//
// contextPicturePresets
//
@@ -1428,10 +1426,10 @@
private System.Windows.Forms.ComboBox cboFilter;
private System.Windows.Forms.TabPage tpgAdvanced;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel9;
- private System.Windows.Forms.CheckBox chkDisableBackground;
- private System.Windows.Forms.CheckBox chkDisableSprites;
- private System.Windows.Forms.CheckBox chkForceBackgroundFirstColumn;
- private System.Windows.Forms.CheckBox chkForceSpritesFirstColumn;
+ private ctrlRiskyOption chkDisableBackground;
+ private ctrlRiskyOption chkDisableSprites;
+ private ctrlRiskyOption chkForceBackgroundFirstColumn;
+ private ctrlRiskyOption chkForceSpritesFirstColumn;
private System.Windows.Forms.ToolStripMenuItem mnuPaletteNostalgia;
private System.Windows.Forms.ToolStripMenuItem mnuPaletteNesClassic;
private System.Windows.Forms.TableLayoutPanel tlpNtscFilter2;
diff --git a/GUI.NET/Forms/EntityBinder.cs b/GUI.NET/Forms/EntityBinder.cs
index 405791c4..13f2bb72 100644
--- a/GUI.NET/Forms/EntityBinder.cs
+++ b/GUI.NET/Forms/EntityBinder.cs
@@ -73,6 +73,8 @@ namespace Mesen.GUI.Forms
}
} else if(kvp.Value is CheckBox) {
((CheckBox)kvp.Value).Checked = Convert.ToBoolean(value);
+ } else if(kvp.Value is ctrlRiskyOption) {
+ ((ctrlRiskyOption)kvp.Value).Checked = Convert.ToBoolean(value);
} else if(kvp.Value is RadioButton) {
((RadioButton)kvp.Value).Checked = (bool)value;
} else if(kvp.Value is Panel) {
@@ -160,6 +162,12 @@ namespace Mesen.GUI.Forms
} else if(field.FieldType == typeof(byte)) {
field.SetValue(Entity, ((CheckBox)kvp.Value).Checked ? (byte)1 : (byte)0);
}
+ } else if(kvp.Value is ctrlRiskyOption) {
+ if(field.FieldType == typeof(bool)) {
+ field.SetValue(Entity, ((ctrlRiskyOption)kvp.Value).Checked);
+ } else if(field.FieldType == typeof(byte)) {
+ field.SetValue(Entity, ((ctrlRiskyOption)kvp.Value).Checked ? (byte)1 : (byte)0);
+ }
} else if(kvp.Value is RadioButton) {
field.SetValue(Entity, ((RadioButton)kvp.Value).Checked);
} else if(kvp.Value is Panel) {
diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj
index 7ccaad72..c86ffe48 100644
--- a/GUI.NET/GUI.NET.csproj
+++ b/GUI.NET/GUI.NET.csproj
@@ -243,6 +243,12 @@
ctrlNsfPlayer.cs
+
+ UserControl
+
+
+ ctrlRiskyOption.cs
+
Component
@@ -626,6 +632,9 @@
ctrlNsfPlayer.cs
+
+ ctrlRiskyOption.cs
+
ctrlTrackbar.cs
diff --git a/GUI.NET/InteropEmu.cs b/GUI.NET/InteropEmu.cs
index 5b5b5c2b..f1b04c9e 100644
--- a/GUI.NET/InteropEmu.cs
+++ b/GUI.NET/InteropEmu.cs
@@ -805,7 +805,7 @@ namespace Mesen.GUI
}
[Flags]
- public enum EmulationFlags
+ public enum EmulationFlags : UInt64
{
Paused = 0x01,
ShowFPS = 0x02,
@@ -841,8 +841,10 @@ namespace Mesen.GUI
ForceSpritesFirstColumn = 0x2000000,
DisablePpu2004Reads = 0x4000000,
DisableNoiseModeFlag = 0x8000000,
+ DisablePaletteRead = 0x10000000,
+ DisableOamAddrBug = 0x20000000,
- InBackground = 0x40000000,
+ InBackground = 0x4000000000,
}
[Flags]