diff --git a/Core/Console.cpp b/Core/Console.cpp index 60fb5d2e..a4b45a2c 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -720,6 +720,17 @@ void Console::RunSlaveCpu() } } +void Console::RunFrame() +{ + uint32_t frameCount = _ppu->GetFrameCount(); + while(_ppu->GetFrameCount() == frameCount) { + _cpu->Exec(); + if(_slave) { + RunSlaveCpu(); + } + } +} + void Console::Run() { Timer clockTimer; @@ -729,7 +740,6 @@ void Console::Run() double targetTime; double lastFrameMin = 9999; double lastFrameMax = 0; - uint32_t lastFrameNumber = -1; double lastDelay = GetFrameDelay(); _runLock.Acquire(); @@ -753,131 +763,135 @@ void Console::Run() bool crashed = false; try { while(true) { - _cpu->Exec(); - - if(_slave) { - RunSlaveCpu(); + stringstream runAheadState; + bool useRunAhead = _settings->GetRunAheadFrames() > 0 && !_debugger && !_rewindManager->IsRewinding(); + if(useRunAhead) { + RunFrameWithRunAhead(runAheadState); + } else { + RunFrame(); } - if(_ppu->GetFrameCount() != lastFrameNumber) { - _soundMixer->ProcessEndOfFrame(); - if(_slave) { - _slave->_soundMixer->ProcessEndOfFrame(); - } + _soundMixer->ProcessEndOfFrame(); + if(_slave) { + _slave->_soundMixer->ProcessEndOfFrame(); + } - if(_historyViewer) { - _historyViewer->ProcessEndOfFrame(); - } - _rewindManager->ProcessEndOfFrame(); - _settings->DisableOverclocking(_disableOcNextFrame || IsNsf()); - _disableOcNextFrame = false; + if(_historyViewer) { + _historyViewer->ProcessEndOfFrame(); + } + _rewindManager->ProcessEndOfFrame(); + _settings->DisableOverclocking(_disableOcNextFrame || IsNsf()); + _disableOcNextFrame = false; - //Update model (ntsc/pal) and get delay for next frame - UpdateNesModel(true); - double delay = GetFrameDelay(); + //Update model (ntsc/pal) and get delay for next frame + UpdateNesModel(true); + double delay = GetFrameDelay(); - if(_resetRunTimers || delay != lastDelay || (clockTimer.GetElapsedMS() - targetTime) > 300) { - //Reset the timers, this can happen in 3 scenarios: - //1) Target frame rate changed - //2) The console was reset/power cycled or the emulation was paused (with or without the debugger) - //3) As a satefy net, if we overshoot our target by over 300 milliseconds, the timer is reset, too. - // This can happen when something slows the emulator down severely (or when breaking execution in VS when debugging Mesen itself, etc.) - clockTimer.Reset(); - targetTime = 0; + if(_resetRunTimers || delay != lastDelay || (clockTimer.GetElapsedMS() - targetTime) > 300) { + //Reset the timers, this can happen in 3 scenarios: + //1) Target frame rate changed + //2) The console was reset/power cycled or the emulation was paused (with or without the debugger) + //3) As a satefy net, if we overshoot our target by over 300 milliseconds, the timer is reset, too. + // This can happen when something slows the emulator down severely (or when breaking execution in VS when debugging Mesen itself, etc.) + clockTimer.Reset(); + targetTime = 0; - _resetRunTimers = false; - lastDelay = delay; - } + _resetRunTimers = false; + lastDelay = delay; + } - targetTime += delay; + targetTime += delay; - bool displayDebugInfo = _settings->CheckFlag(EmulationFlags::DisplayDebugInfo); - if(displayDebugInfo) { - double lastFrameTime = lastFrameTimer.GetElapsedMS(); - lastFrameTimer.Reset(); - frameDurations[frameDurationIndex] = lastFrameTime; - frameDurationIndex = (frameDurationIndex + 1) % 60; + bool displayDebugInfo = _settings->CheckFlag(EmulationFlags::DisplayDebugInfo); + if(displayDebugInfo) { + double lastFrameTime = lastFrameTimer.GetElapsedMS(); + lastFrameTimer.Reset(); + frameDurations[frameDurationIndex] = lastFrameTime; + frameDurationIndex = (frameDurationIndex + 1) % 60; - DisplayDebugInformation(lastFrameTime, lastFrameMin, lastFrameMax, frameDurations); - if(_slave) { - _slave->DisplayDebugInformation(lastFrameTime, lastFrameMin, lastFrameMax, frameDurations); - } + DisplayDebugInformation(lastFrameTime, lastFrameMin, lastFrameMax, frameDurations); + if(_slave) { + _slave->DisplayDebugInformation(lastFrameTime, lastFrameMin, lastFrameMax, frameDurations); } + } - //When sleeping for a long time (e.g <= 25% speed), sleep in small chunks and check to see if we need to stop sleeping between each sleep call - while(targetTime - clockTimer.GetElapsedMS() > 50) { - clockTimer.WaitUntil(clockTimer.GetElapsedMS() + 40); - if(delay != GetFrameDelay() || _stop || _settings->NeedsPause() || _pauseCounter > 0) { - targetTime = 0; - break; - } - } - - //Sleep until we're ready to start the next frame - clockTimer.WaitUntil(targetTime); - - if(_pauseCounter > 0) { - //Need to temporarely pause the emu (to save/load a state, etc.) - _runLock.Release(); - - //Spin wait until we are allowed to start again - while(_pauseCounter > 0) { } - - _runLock.Acquire(); - } - - if(_pauseOnNextFrameRequested) { - //Used by "Run Single Frame" option - _settings->SetFlags(EmulationFlags::Paused); - _pauseOnNextFrameRequested = false; - } - - bool pausedRequired = _settings->NeedsPause(); - if(pausedRequired && !_stop && !_settings->CheckFlag(EmulationFlags::DebuggerWindowEnabled)) { - _notificationManager->SendNotification(ConsoleNotificationType::GamePaused); - - //Prevent audio from looping endlessly while game is paused - _soundMixer->StopAudio(); - if(_slave) { - _slave->_soundMixer->StopAudio(); - } - - _runLock.Release(); - - PlatformUtilities::EnableScreensaver(); - PlatformUtilities::RestoreTimerResolution(); - while(pausedRequired && !_stop && !_settings->CheckFlag(EmulationFlags::DebuggerWindowEnabled)) { - //Sleep until emulation is resumed - std::this_thread::sleep_for(std::chrono::duration(30)); - pausedRequired = _settings->NeedsPause(); - _paused = true; - } - _paused = false; - - PlatformUtilities::DisableScreensaver(); - _runLock.Acquire(); - _notificationManager->SendNotification(ConsoleNotificationType::GameResumed); - lastFrameTimer.Reset(); - - //Reset the timer to avoid speed up after a pause - _resetRunTimers = true; - } - - if(_settings->CheckFlag(EmulationFlags::UseHighResolutionTimer)) { - PlatformUtilities::EnableHighResolutionTimer(); - } else { - PlatformUtilities::RestoreTimerResolution(); - } - - _systemActionManager->ProcessSystemActions(); - - lastFrameNumber = _ppu->GetFrameCount(); - - if(_stop) { - _stop = false; + //When sleeping for a long time (e.g <= 25% speed), sleep in small chunks and check to see if we need to stop sleeping between each sleep call + while(targetTime - clockTimer.GetElapsedMS() > 50) { + clockTimer.WaitUntil(clockTimer.GetElapsedMS() + 40); + if(delay != GetFrameDelay() || _stop || _settings->NeedsPause() || _pauseCounter > 0) { + targetTime = 0; break; } } + + //Sleep until we're ready to start the next frame + clockTimer.WaitUntil(targetTime); + + if(useRunAhead) { + _settings->SetRunAheadFrameFlag(true); + LoadState(runAheadState); + _settings->SetRunAheadFrameFlag(false); + } + + if(_pauseCounter > 0) { + //Need to temporarely pause the emu (to save/load a state, etc.) + _runLock.Release(); + + //Spin wait until we are allowed to start again + while(_pauseCounter > 0) { } + + _runLock.Acquire(); + } + + if(_pauseOnNextFrameRequested) { + //Used by "Run Single Frame" option + _settings->SetFlags(EmulationFlags::Paused); + _pauseOnNextFrameRequested = false; + } + + bool pausedRequired = _settings->NeedsPause(); + if(pausedRequired && !_stop && !_settings->CheckFlag(EmulationFlags::DebuggerWindowEnabled)) { + _notificationManager->SendNotification(ConsoleNotificationType::GamePaused); + + //Prevent audio from looping endlessly while game is paused + _soundMixer->StopAudio(); + if(_slave) { + _slave->_soundMixer->StopAudio(); + } + + _runLock.Release(); + + PlatformUtilities::EnableScreensaver(); + PlatformUtilities::RestoreTimerResolution(); + while(pausedRequired && !_stop && !_settings->CheckFlag(EmulationFlags::DebuggerWindowEnabled)) { + //Sleep until emulation is resumed + std::this_thread::sleep_for(std::chrono::duration(30)); + pausedRequired = _settings->NeedsPause(); + _paused = true; + } + _paused = false; + + PlatformUtilities::DisableScreensaver(); + _runLock.Acquire(); + _notificationManager->SendNotification(ConsoleNotificationType::GameResumed); + lastFrameTimer.Reset(); + + //Reset the timer to avoid speed up after a pause + _resetRunTimers = true; + } + + if(_settings->CheckFlag(EmulationFlags::UseHighResolutionTimer)) { + PlatformUtilities::EnableHighResolutionTimer(); + } else { + PlatformUtilities::RestoreTimerResolution(); + } + + _systemActionManager->ProcessSystemActions(); + + if(_stop) { + _stop = false; + break; + } } } catch(const std::runtime_error &ex) { crashed = true; @@ -926,6 +940,26 @@ void Console::Run() _notificationManager->SendNotification(ConsoleNotificationType::EmulationStopped); } +void Console::RunFrameWithRunAhead(std::stringstream& runAheadState) +{ + uint32_t runAheadFrames = _settings->GetRunAheadFrames(); + _settings->SetRunAheadFrameFlag(true); + //Run a single frame and save the state (no audio/video) + RunFrame(); + SaveState(runAheadState); + while(runAheadFrames > 1) { + //Run extra frames if the requested run ahead frame count is higher than 1 + runAheadFrames--; + RunFrame(); + } + _apu->EndFrame(); + _settings->SetRunAheadFrameFlag(false); + + //Run one frame normally (with audio/video output) + RunFrame(); + _apu->EndFrame(); +} + void Console::ResetRunTimers() { _resetRunTimers = true; @@ -1023,6 +1057,9 @@ double Console::GetFrameDelay() void Console::SaveState(ostream &saveStream) { if(_initialized) { + //Send any unprocessed sound to the SoundMixer - needed for rewind + _apu->EndFrame(); + _cpu->SaveSnapshot(&saveStream); _ppu->SaveSnapshot(&saveStream); _memoryManager->SaveSnapshot(&saveStream); @@ -1050,6 +1087,9 @@ void Console::LoadState(istream &loadStream) void Console::LoadState(istream &loadStream, uint32_t stateVersion) { if(_initialized) { + //Send any unprocessed sound to the SoundMixer - needed for rewind + _apu->EndFrame(); + _cpu->LoadSnapshot(&loadStream, stateVersion); _ppu->LoadSnapshot(&loadStream, stateVersion); _memoryManager->LoadSnapshot(&loadStream, stateVersion); @@ -1080,9 +1120,6 @@ void Console::LoadState(istream &loadStream, uint32_t stateVersion) void Console::LoadState(uint8_t *buffer, uint32_t bufferSize) { - //Send any unprocessed sound to the SoundMixer - needed for rewind - _apu->EndFrame(); - stringstream stream; stream.write((char*)buffer, bufferSize); stream.seekg(0, ios::beg); diff --git a/Core/Console.h b/Core/Console.h index e886b345..fafe945c 100644 --- a/Core/Console.h +++ b/Core/Console.h @@ -100,6 +100,8 @@ private: bool _initialized = false; std::thread::id _emulationThreadId; + void RunFrameWithRunAhead(std::stringstream& runAheadState); + void LoadHdPack(VirtualFile &romFile, VirtualFile &patchFile); void UpdateNesModel(bool sendNotification); @@ -156,6 +158,7 @@ public: void RunSingleFrame(); void RunSlaveCpu(); + void RunFrame(); bool UpdateHdPackMode(); shared_ptr GetSystemActionManager(); diff --git a/Core/ControlManager.cpp b/Core/ControlManager.cpp index 42e2bf02..d3f3d7fd 100644 --- a/Core/ControlManager.cpp +++ b/Core/ControlManager.cpp @@ -293,8 +293,10 @@ void ControlManager::UpdateInputState() debugger->ProcessEvent(EventType::InputPolled); } - for(IInputRecorder* recorder : _inputRecorders) { - recorder->RecordInput(_controlDevices); + if(!_console->GetSettings()->IsRunAheadFrame()) { + for(IInputRecorder* recorder : _inputRecorders) { + recorder->RecordInput(_controlDevices); + } } //Used by VS System games diff --git a/Core/EmulationSettings.h b/Core/EmulationSettings.h index 5d6862d1..6f0907a5 100644 --- a/Core/EmulationSettings.h +++ b/Core/EmulationSettings.h @@ -654,7 +654,10 @@ private: double _volumeReduction = 0.75; uint32_t _sampleRate = 48000; AudioFilterSettings _audioFilterSettings; - + + uint32_t _runAheadFrames = 0; + bool _isRunAheadFrame = false; + NesModel _model = NesModel::Auto; PpuModel _ppuModel = PpuModel::Ppu2C02; @@ -991,7 +994,27 @@ public: } return value; } - + + void SetRunAheadFrames(uint32_t frameCount) + { + _runAheadFrames = frameCount; + } + + uint32_t GetRunAheadFrames() + { + return _runAheadFrames; + } + + void SetRunAheadFrameFlag(bool disabled) + { + _isRunAheadFrame = disabled; + } + + bool IsRunAheadFrame() + { + return _isRunAheadFrame; + } + //0: No limit, Number: % of default speed (50/60fps) void SetEmulationSpeed(uint32_t emulationSpeed, bool displaySpeed = false) { diff --git a/Core/RewindManager.cpp b/Core/RewindManager.cpp index 55af2c4c..01e1b0c2 100644 --- a/Core/RewindManager.cpp +++ b/Core/RewindManager.cpp @@ -48,6 +48,10 @@ void RewindManager::ClearBuffer() void RewindManager::ProcessNotification(ConsoleNotificationType type, void * parameter) { + if(_settings->IsRunAheadFrame()) { + return; + } + if(type == ConsoleNotificationType::PpuFrameDone) { _hasHistory = _history.size() >= 2; if(_settings->GetRewindBufferSize() > 0) { diff --git a/Core/SoundMixer.cpp b/Core/SoundMixer.cpp index c323fc90..ea6b3f65 100644 --- a/Core/SoundMixer.cpp +++ b/Core/SoundMixer.cpp @@ -164,7 +164,7 @@ void SoundMixer::PlayAudioBuffer(uint32_t time) _crossFeedFilter.ApplyFilter(_outputBuffer, sampleCount, filterSettings.CrossFadeRatio); } - if(rewindManager && rewindManager->SendAudio(_outputBuffer, (uint32_t)sampleCount, _sampleRate)) { + if(!_settings->IsRunAheadFrame() && rewindManager && rewindManager->SendAudio(_outputBuffer, (uint32_t)sampleCount, _sampleRate)) { bool isRecording = _waveRecorder || _console->GetVideoRenderer()->IsRecording(); if(isRecording) { shared_ptr recorder = _waveRecorder; diff --git a/Core/SystemActionManager.h b/Core/SystemActionManager.h index 12f53c06..96b15e18 100644 --- a/Core/SystemActionManager.h +++ b/Core/SystemActionManager.h @@ -41,11 +41,9 @@ public: { if(_needReset) { SetBit(SystemActionManager::Buttons::ResetButton); - _needReset = false; } if(_needPowerCycle) { SetBit(SystemActionManager::Buttons::PowerButton); - _needPowerCycle = false; } } @@ -72,6 +70,7 @@ public: shared_ptr console = _console; if(console) { if(IsPressed(SystemActionManager::Buttons::ResetButton)) { + _needReset = false; console->ResetComponents(true); console->GetControlManager()->UpdateInputState(); } diff --git a/Core/VideoDecoder.cpp b/Core/VideoDecoder.cpp index 7422f132..350cb56d 100644 --- a/Core/VideoDecoder.cpp +++ b/Core/VideoDecoder.cpp @@ -21,6 +21,7 @@ VideoDecoder::VideoDecoder(shared_ptr console) { _console = console; + _settings = _console->GetSettings(); _frameChanged = false; _stopFlag = false; UpdateVideoFilter(); @@ -158,6 +159,10 @@ uint32_t VideoDecoder::GetFrameCount() void VideoDecoder::UpdateFrameSync(void *ppuOutputBuffer, HdScreenInfo *hdScreenInfo) { + if(_settings->IsRunAheadFrame()) { + return; + } + _frameNumber = _console->GetFrameCount(); _hdScreenInfo = hdScreenInfo; _ppuOutputBuffer = (uint16_t*)ppuOutputBuffer; @@ -167,6 +172,10 @@ void VideoDecoder::UpdateFrameSync(void *ppuOutputBuffer, HdScreenInfo *hdScreen void VideoDecoder::UpdateFrame(void *ppuOutputBuffer, HdScreenInfo *hdScreenInfo) { + if(_settings->IsRunAheadFrame()) { + return; + } + if(_frameChanged) { //Last frame isn't done decoding yet - sometimes Signal() introduces a 25-30ms delay while(_frameChanged) { diff --git a/Core/VideoDecoder.h b/Core/VideoDecoder.h index 1730fc76..4badae2d 100644 --- a/Core/VideoDecoder.h +++ b/Core/VideoDecoder.h @@ -27,7 +27,7 @@ class VideoDecoder { private: shared_ptr _console; - + EmulationSettings* _settings; uint16_t *_ppuOutputBuffer = nullptr; HdScreenInfo *_hdScreenInfo = nullptr; bool _hdFilterEnabled = false; diff --git a/GUI.NET/Config/EmulationInfo.cs b/GUI.NET/Config/EmulationInfo.cs index 2aedbf45..7433e7cb 100644 --- a/GUI.NET/Config/EmulationInfo.cs +++ b/GUI.NET/Config/EmulationInfo.cs @@ -38,6 +38,7 @@ namespace Mesen.GUI.Config [MinMax(0, 5000)] public UInt32 EmulationSpeed = 100; [MinMax(0, 5000)] public UInt32 TurboSpeed = 300; [MinMax(0, 5000)] public UInt32 RewindSpeed = 100; + [MinMax(0, 10)] public UInt32 RunAheadFrames = 0; public EmulationInfo() { @@ -49,6 +50,7 @@ namespace Mesen.GUI.Config InteropEmu.SetEmulationSpeed(emulationInfo.EmulationSpeed); InteropEmu.SetTurboRewindSpeed(emulationInfo.TurboSpeed, emulationInfo.RewindSpeed); + InteropEmu.SetRunAheadFrames(emulationInfo.RunAheadFrames); InteropEmu.SetFlag(EmulationFlags.Mmc3IrqAltBehavior, emulationInfo.UseAlternativeMmc3Irq); InteropEmu.SetFlag(EmulationFlags.AllowInvalidInput, emulationInfo.AllowInvalidInput); diff --git a/GUI.NET/Dependencies/resources.ca.xml b/GUI.NET/Dependencies/resources.ca.xml index 8c48b5dc..1c965134 100644 --- a/GUI.NET/Dependencies/resources.ca.xml +++ b/GUI.NET/Dependencies/resources.ca.xml @@ -308,6 +308,8 @@ Velocitat d'emulació: % (0 = Velocitat màxima) Velocitat del rebobinat: + Run Ahead: + frames (reduces input lag, increases CPU usage) Avançat Recommended settings for developers (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.en.xml b/GUI.NET/Dependencies/resources.en.xml index 02b62cc0..1387ba16 100644 --- a/GUI.NET/Dependencies/resources.en.xml +++ b/GUI.NET/Dependencies/resources.en.xml @@ -308,6 +308,8 @@ Fast Forward Speed: % (0 = Maximum speed) Rewind Speed: + Run Ahead: + frames (reduces input lag, increases CPU usage) Advanced Recommended settings for developers (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.es.xml b/GUI.NET/Dependencies/resources.es.xml index 4bd51de2..27e8f437 100644 --- a/GUI.NET/Dependencies/resources.es.xml +++ b/GUI.NET/Dependencies/resources.es.xml @@ -307,6 +307,8 @@ Velocidad de emulación: % (0 = Velocidad máxima) Velocidad de rebobinado: + Run Ahead: + frames (reduces input lag, increases CPU usage) Avanzado Configuración recomendada para desarrolladores (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.fr.xml b/GUI.NET/Dependencies/resources.fr.xml index 70f54c77..841f9447 100644 --- a/GUI.NET/Dependencies/resources.fr.xml +++ b/GUI.NET/Dependencies/resources.fr.xml @@ -308,6 +308,8 @@ Vitesse d'avance rapide : % (0 = Vitesse maximale) Vitesse du rembobinage : + Run Ahead: + images (réduit l'input lag, au coût de la performance) Avancé Options recommandées pour les développeurs (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.it.xml b/GUI.NET/Dependencies/resources.it.xml index 378c4f1c..62e8c278 100644 --- a/GUI.NET/Dependencies/resources.it.xml +++ b/GUI.NET/Dependencies/resources.it.xml @@ -308,6 +308,8 @@ Velocità avanti veloce: % (0 = Velocità massima) Velocità Riavvolgimento: + Run Ahead: + frames (reduces input lag, increases CPU usage) Avanzato Opzioni raccomandate per sviluppatori (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.ja.xml b/GUI.NET/Dependencies/resources.ja.xml index aba1a6ad..52aa9c9b 100644 --- a/GUI.NET/Dependencies/resources.ja.xml +++ b/GUI.NET/Dependencies/resources.ja.xml @@ -307,6 +307,8 @@ 早送りの速度: % (0 = 最高速度) 巻き戻しの速度: + Run Ahead: + フレーム (入力遅延低下) 詳細設定 開発者向け設定 (自作ソフト / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.pt.xml b/GUI.NET/Dependencies/resources.pt.xml index 31df5511..521d7f47 100644 --- a/GUI.NET/Dependencies/resources.pt.xml +++ b/GUI.NET/Dependencies/resources.pt.xml @@ -308,6 +308,8 @@ Velocidade de avanço rápido: % (0 = Velocidade máxima) Velocidade de rebobinamento: + Run Ahead: + frames (reduces input lag, increases CPU usage) Avançado Configurações recomendadas para programadores (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.ru.xml b/GUI.NET/Dependencies/resources.ru.xml index b1ac67c4..0f5da6d8 100644 --- a/GUI.NET/Dependencies/resources.ru.xml +++ b/GUI.NET/Dependencies/resources.ru.xml @@ -307,6 +307,8 @@ Перемотка: % (0 = Максимальная скорость) Скорость перемотки: + Run Ahead: + frames (reduces input lag, increases CPU usage) Расширенные Рекомендованные настройки для разработчиков (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.uk.xml b/GUI.NET/Dependencies/resources.uk.xml index dad6c307..8624fe54 100644 --- a/GUI.NET/Dependencies/resources.uk.xml +++ b/GUI.NET/Dependencies/resources.uk.xml @@ -307,6 +307,8 @@ Перемотка: % (0 = Максимальна швидкiсть) Швидкість перемотування: + Run Ahead: + frames (reduces input lag, increases CPU usage) Розширені Recommended settings for developers (homebrew / ROM hacking) diff --git a/GUI.NET/Dependencies/resources.zh.xml b/GUI.NET/Dependencies/resources.zh.xml index 2d259a40..5c0a80b5 100644 --- a/GUI.NET/Dependencies/resources.zh.xml +++ b/GUI.NET/Dependencies/resources.zh.xml @@ -334,6 +334,8 @@ 快进速度: % (0 = 最快) 快退速度: + Run Ahead: + frames (reduces input lag, increases CPU usage) 高级 开发者推荐设置 (自作/修改 ROM) diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs index 2b157c4d..3df23160 100644 --- a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs @@ -29,926 +29,998 @@ namespace Mesen.GUI.Forms.Config /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmEmulationConfig)); - this.tabMain = new System.Windows.Forms.TabControl(); - this.tpgGeneral = new System.Windows.Forms.TabPage(); - this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); - this.flowLayoutPanel9 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudTurboSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); - this.lblTurboSpeedHint = new System.Windows.Forms.Label(); - this.lblTurboSpeed = new System.Windows.Forms.Label(); - this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudEmulationSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); - 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 Mesen.GUI.Controls.MesenNumericUpDown(); - this.lblRewindSpeedHint = new System.Windows.Forms.Label(); - this.tpgAdvanced = new System.Windows.Forms.TabPage(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.chkEnablePpu2000ScrollGlitch = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkEnablePpu2006ScrollGlitch = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkRandomizeCpuPpuAlignment = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.lblMiscSettings = new System.Windows.Forms.Label(); - this.chkMapperRandomPowerOnState = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkEnableOamDecay = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.flowLayoutPanel8 = new System.Windows.Forms.FlowLayoutPanel(); - this.lblRamPowerOnState = new System.Windows.Forms.Label(); - this.cboRamPowerOnState = new System.Windows.Forms.ComboBox(); - this.chkDisablePaletteRead = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkDisableOamAddrBug = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkDisablePpuReset = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkDisablePpu2004Reads = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkUseNes101Hvc101Behavior = new System.Windows.Forms.CheckBox(); - this.chkAllowInvalidInput = new Mesen.GUI.Controls.ctrlRiskyOption(); - this.chkUseAlternativeMmc3Irq = new System.Windows.Forms.CheckBox(); - this.lblDeveloperSettings = new System.Windows.Forms.Label(); - this.tpgOverclocking = new System.Windows.Forms.TabPage(); - this.picHint = new System.Windows.Forms.PictureBox(); - this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); - this.lblOverclockHint = new Mesen.GUI.Controls.ctrlAutoGrowLabel(); - this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); - this.lblEffectiveClockRateDendy = new System.Windows.Forms.Label(); - this.lblEffectiveClockRateValueDendy = new System.Windows.Forms.Label(); - this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); - this.lblEffectiveClockRatePal = new System.Windows.Forms.Label(); - this.lblEffectiveClockRateValuePal = new System.Windows.Forms.Label(); - this.grpPpuTiming = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); - this.nudExtraScanlinesAfterNmi = new Mesen.GUI.Controls.MesenNumericUpDown(); - this.nudExtraScanlinesBeforeNmi = new Mesen.GUI.Controls.MesenNumericUpDown(); - this.lblExtraScanlinesBeforeNmi = new System.Windows.Forms.Label(); - this.lblExtraScanlinesAfterNmi = new System.Windows.Forms.Label(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.lblEffectiveClockRate = new System.Windows.Forms.Label(); - this.lblEffectiveClockRateValue = new System.Windows.Forms.Label(); - this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel(); - this.chkShowLagCounter = new System.Windows.Forms.CheckBox(); - this.btnResetLagCounter = new System.Windows.Forms.Button(); - this.tmrUpdateClockRate = new System.Windows.Forms.Timer(this.components); - this.tabMain.SuspendLayout(); - this.tpgGeneral.SuspendLayout(); - this.tableLayoutPanel4.SuspendLayout(); - this.flowLayoutPanel9.SuspendLayout(); - this.flowLayoutPanel6.SuspendLayout(); - this.flowLayoutPanel10.SuspendLayout(); - this.tpgAdvanced.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - this.flowLayoutPanel8.SuspendLayout(); - this.tpgOverclocking.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picHint)).BeginInit(); - this.tableLayoutPanel3.SuspendLayout(); - this.flowLayoutPanel4.SuspendLayout(); - this.flowLayoutPanel3.SuspendLayout(); - this.grpPpuTiming.SuspendLayout(); - this.tableLayoutPanel5.SuspendLayout(); - this.flowLayoutPanel2.SuspendLayout(); - this.flowLayoutPanel7.SuspendLayout(); - this.SuspendLayout(); - // - // baseConfigPanel - // - this.baseConfigPanel.Location = new System.Drawing.Point(0, 386); - this.baseConfigPanel.Size = new System.Drawing.Size(533, 29); - // - // tabMain - // - this.tabMain.Controls.Add(this.tpgGeneral); - this.tabMain.Controls.Add(this.tpgAdvanced); - this.tabMain.Controls.Add(this.tpgOverclocking); - this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabMain.Location = new System.Drawing.Point(0, 0); - this.tabMain.Name = "tabMain"; - this.tabMain.SelectedIndex = 0; - this.tabMain.Size = new System.Drawing.Size(533, 386); - this.tabMain.TabIndex = 2; - // - // tpgGeneral - // - this.tpgGeneral.Controls.Add(this.tableLayoutPanel4); - 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(525, 360); - this.tpgGeneral.TabIndex = 0; - this.tpgGeneral.Text = "General"; - this.tpgGeneral.UseVisualStyleBackColor = true; - // - // tableLayoutPanel4 - // - this.tableLayoutPanel4.AutoSize = true; - this.tableLayoutPanel4.ColumnCount = 2; - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel9, 1, 1); - this.tableLayoutPanel4.Controls.Add(this.lblTurboSpeed, 0, 1); - this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel6, 1, 0); - this.tableLayoutPanel4.Controls.Add(this.lblEmulationSpeed, 0, 0); - this.tableLayoutPanel4.Controls.Add(this.lblRewindSpeed, 0, 2); - this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel10, 1, 2); - this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 3); - this.tableLayoutPanel4.Name = "tableLayoutPanel4"; - this.tableLayoutPanel4.RowCount = 4; - 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()); - this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(519, 354); - this.tableLayoutPanel4.TabIndex = 0; - // - // flowLayoutPanel9 - // - this.flowLayoutPanel9.AutoSize = true; - this.flowLayoutPanel9.Controls.Add(this.nudTurboSpeed); - this.flowLayoutPanel9.Controls.Add(this.lblTurboSpeedHint); - this.flowLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel9.Location = new System.Drawing.Point(111, 27); - this.flowLayoutPanel9.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel9.Name = "flowLayoutPanel9"; - this.flowLayoutPanel9.Size = new System.Drawing.Size(408, 27); - this.flowLayoutPanel9.TabIndex = 14; - // - // nudTurboSpeed - // - this.nudTurboSpeed.DecimalPlaces = 0; - this.nudTurboSpeed.Increment = new decimal(new int[] { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmEmulationConfig)); + this.tabMain = new System.Windows.Forms.TabControl(); + this.tpgGeneral = new System.Windows.Forms.TabPage(); + this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); + this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); + this.nudRunAheadFrames = new Mesen.GUI.Controls.MesenNumericUpDown(); + this.lblRunAheadFrames = new System.Windows.Forms.Label(); + this.lblRunAhead = new System.Windows.Forms.Label(); + this.flowLayoutPanel9 = new System.Windows.Forms.FlowLayoutPanel(); + this.nudTurboSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); + this.lblTurboSpeedHint = new System.Windows.Forms.Label(); + this.lblTurboSpeed = new System.Windows.Forms.Label(); + this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); + this.nudEmulationSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); + 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 Mesen.GUI.Controls.MesenNumericUpDown(); + this.lblRewindSpeedHint = new System.Windows.Forms.Label(); + this.tpgAdvanced = new System.Windows.Forms.TabPage(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.chkEnablePpu2000ScrollGlitch = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkEnablePpu2006ScrollGlitch = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkRandomizeCpuPpuAlignment = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.lblMiscSettings = new System.Windows.Forms.Label(); + this.chkMapperRandomPowerOnState = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkEnableOamDecay = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.flowLayoutPanel8 = new System.Windows.Forms.FlowLayoutPanel(); + this.lblRamPowerOnState = new System.Windows.Forms.Label(); + this.cboRamPowerOnState = new System.Windows.Forms.ComboBox(); + this.chkDisablePaletteRead = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkDisableOamAddrBug = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkDisablePpuReset = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkDisablePpu2004Reads = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkUseNes101Hvc101Behavior = new System.Windows.Forms.CheckBox(); + this.chkAllowInvalidInput = new Mesen.GUI.Controls.ctrlRiskyOption(); + this.chkUseAlternativeMmc3Irq = new System.Windows.Forms.CheckBox(); + this.lblDeveloperSettings = new System.Windows.Forms.Label(); + this.tpgOverclocking = new System.Windows.Forms.TabPage(); + this.picHint = new System.Windows.Forms.PictureBox(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.lblOverclockHint = new Mesen.GUI.Controls.ctrlAutoGrowLabel(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.lblEffectiveClockRateDendy = new System.Windows.Forms.Label(); + this.lblEffectiveClockRateValueDendy = new System.Windows.Forms.Label(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); + this.lblEffectiveClockRatePal = new System.Windows.Forms.Label(); + this.lblEffectiveClockRateValuePal = new System.Windows.Forms.Label(); + this.grpPpuTiming = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); + this.nudExtraScanlinesAfterNmi = new Mesen.GUI.Controls.MesenNumericUpDown(); + this.nudExtraScanlinesBeforeNmi = new Mesen.GUI.Controls.MesenNumericUpDown(); + this.lblExtraScanlinesBeforeNmi = new System.Windows.Forms.Label(); + this.lblExtraScanlinesAfterNmi = new System.Windows.Forms.Label(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.lblEffectiveClockRate = new System.Windows.Forms.Label(); + this.lblEffectiveClockRateValue = new System.Windows.Forms.Label(); + this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel(); + this.chkShowLagCounter = new System.Windows.Forms.CheckBox(); + this.btnResetLagCounter = new System.Windows.Forms.Button(); + this.tmrUpdateClockRate = new System.Windows.Forms.Timer(this.components); + this.tabMain.SuspendLayout(); + this.tpgGeneral.SuspendLayout(); + this.tableLayoutPanel4.SuspendLayout(); + this.flowLayoutPanel5.SuspendLayout(); + this.flowLayoutPanel9.SuspendLayout(); + this.flowLayoutPanel6.SuspendLayout(); + this.flowLayoutPanel10.SuspendLayout(); + this.tpgAdvanced.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel8.SuspendLayout(); + this.tpgOverclocking.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picHint)).BeginInit(); + this.tableLayoutPanel3.SuspendLayout(); + this.flowLayoutPanel4.SuspendLayout(); + this.flowLayoutPanel3.SuspendLayout(); + this.grpPpuTiming.SuspendLayout(); + this.tableLayoutPanel5.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + this.flowLayoutPanel7.SuspendLayout(); + this.SuspendLayout(); + // + // baseConfigPanel + // + this.baseConfigPanel.Location = new System.Drawing.Point(0, 386); + this.baseConfigPanel.Size = new System.Drawing.Size(533, 29); + // + // tabMain + // + this.tabMain.Controls.Add(this.tpgGeneral); + this.tabMain.Controls.Add(this.tpgAdvanced); + this.tabMain.Controls.Add(this.tpgOverclocking); + this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabMain.Location = new System.Drawing.Point(0, 0); + this.tabMain.Name = "tabMain"; + this.tabMain.SelectedIndex = 0; + this.tabMain.Size = new System.Drawing.Size(533, 386); + this.tabMain.TabIndex = 2; + // + // tpgGeneral + // + this.tpgGeneral.Controls.Add(this.tableLayoutPanel4); + 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(525, 360); + this.tpgGeneral.TabIndex = 0; + this.tpgGeneral.Text = "General"; + this.tpgGeneral.UseVisualStyleBackColor = true; + // + // tableLayoutPanel4 + // + this.tableLayoutPanel4.AutoSize = true; + this.tableLayoutPanel4.ColumnCount = 2; + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel5, 1, 3); + this.tableLayoutPanel4.Controls.Add(this.lblRunAhead, 0, 3); + this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel9, 1, 1); + this.tableLayoutPanel4.Controls.Add(this.lblTurboSpeed, 0, 1); + this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel6, 1, 0); + this.tableLayoutPanel4.Controls.Add(this.lblEmulationSpeed, 0, 0); + this.tableLayoutPanel4.Controls.Add(this.lblRewindSpeed, 0, 2); + this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel10, 1, 2); + this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel4.Name = "tableLayoutPanel4"; + this.tableLayoutPanel4.RowCount = 5; + 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()); + 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(519, 354); + this.tableLayoutPanel4.TabIndex = 0; + // + // flowLayoutPanel5 + // + this.flowLayoutPanel5.AutoSize = true; + this.flowLayoutPanel5.Controls.Add(this.nudRunAheadFrames); + this.flowLayoutPanel5.Controls.Add(this.lblRunAheadFrames); + this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel5.Location = new System.Drawing.Point(111, 81); + this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel5.Name = "flowLayoutPanel5"; + this.flowLayoutPanel5.Size = new System.Drawing.Size(408, 27); + this.flowLayoutPanel5.TabIndex = 18; + // + // nudRunAheadFrames + // + this.nudRunAheadFrames.DecimalPlaces = 0; + this.nudRunAheadFrames.Increment = new decimal(new int[] { 1, 0, 0, 0}); - this.nudTurboSpeed.Location = new System.Drawing.Point(3, 3); - this.nudTurboSpeed.Maximum = new decimal(new int[] { + this.nudRunAheadFrames.Location = new System.Drawing.Point(3, 3); + this.nudRunAheadFrames.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.nudRunAheadFrames.MaximumSize = new System.Drawing.Size(10000, 20); + this.nudRunAheadFrames.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudRunAheadFrames.MinimumSize = new System.Drawing.Size(0, 21); + this.nudRunAheadFrames.Name = "nudRunAheadFrames"; + this.nudRunAheadFrames.Size = new System.Drawing.Size(48, 21); + this.nudRunAheadFrames.TabIndex = 1; + this.nudRunAheadFrames.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // lblRunAheadFrames + // + this.lblRunAheadFrames.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblRunAheadFrames.AutoSize = true; + this.lblRunAheadFrames.Location = new System.Drawing.Point(57, 7); + this.lblRunAheadFrames.Name = "lblRunAheadFrames"; + this.lblRunAheadFrames.Size = new System.Drawing.Size(277, 13); + this.lblRunAheadFrames.TabIndex = 2; + this.lblRunAheadFrames.Text = "frames (reduces input lag, increases system requirements)"; + // + // lblRunAhead + // + this.lblRunAhead.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblRunAhead.AutoSize = true; + this.lblRunAhead.Location = new System.Drawing.Point(3, 88); + this.lblRunAhead.Name = "lblRunAhead"; + this.lblRunAhead.Size = new System.Drawing.Size(64, 13); + this.lblRunAhead.TabIndex = 17; + this.lblRunAhead.Text = "Run Ahead:"; + // + // flowLayoutPanel9 + // + this.flowLayoutPanel9.AutoSize = true; + this.flowLayoutPanel9.Controls.Add(this.nudTurboSpeed); + this.flowLayoutPanel9.Controls.Add(this.lblTurboSpeedHint); + this.flowLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel9.Location = new System.Drawing.Point(111, 27); + this.flowLayoutPanel9.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel9.Name = "flowLayoutPanel9"; + this.flowLayoutPanel9.Size = new System.Drawing.Size(408, 27); + this.flowLayoutPanel9.TabIndex = 14; + // + // nudTurboSpeed + // + this.nudTurboSpeed.DecimalPlaces = 0; + this.nudTurboSpeed.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudTurboSpeed.Location = new System.Drawing.Point(3, 3); + this.nudTurboSpeed.Maximum = new decimal(new int[] { 5000, 0, 0, 0}); - this.nudTurboSpeed.MaximumSize = new System.Drawing.Size(10000, 20); - this.nudTurboSpeed.Minimum = new decimal(new int[] { + this.nudTurboSpeed.MaximumSize = new System.Drawing.Size(10000, 20); + this.nudTurboSpeed.Minimum = new decimal(new int[] { 0, 0, 0, 0}); - this.nudTurboSpeed.MinimumSize = new System.Drawing.Size(0, 21); - this.nudTurboSpeed.Name = "nudTurboSpeed"; - this.nudTurboSpeed.Size = new System.Drawing.Size(48, 21); - this.nudTurboSpeed.TabIndex = 1; - this.nudTurboSpeed.Value = new decimal(new int[] { + this.nudTurboSpeed.MinimumSize = new System.Drawing.Size(0, 21); + this.nudTurboSpeed.Name = "nudTurboSpeed"; + this.nudTurboSpeed.Size = new System.Drawing.Size(48, 21); + this.nudTurboSpeed.TabIndex = 1; + this.nudTurboSpeed.Value = new decimal(new int[] { 0, 0, 0, 0}); - // - // lblTurboSpeedHint - // - this.lblTurboSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblTurboSpeedHint.AutoSize = true; - this.lblTurboSpeedHint.Location = new System.Drawing.Point(57, 7); - this.lblTurboSpeedHint.Name = "lblTurboSpeedHint"; - this.lblTurboSpeedHint.Size = new System.Drawing.Size(121, 13); - this.lblTurboSpeedHint.TabIndex = 2; - this.lblTurboSpeedHint.Text = "% (0 = Maximum speed)"; - // - // lblTurboSpeed - // - this.lblTurboSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblTurboSpeed.AutoSize = true; - this.lblTurboSpeed.Location = new System.Drawing.Point(3, 34); - this.lblTurboSpeed.Name = "lblTurboSpeed"; - this.lblTurboSpeed.Size = new System.Drawing.Size(105, 13); - this.lblTurboSpeed.TabIndex = 13; - this.lblTurboSpeed.Text = "Fast Forward Speed:"; - // - // flowLayoutPanel6 - // - this.flowLayoutPanel6.AutoSize = true; - this.flowLayoutPanel6.Controls.Add(this.nudEmulationSpeed); - this.flowLayoutPanel6.Controls.Add(this.lblEmuSpeedHint); - this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - 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(408, 27); - this.flowLayoutPanel6.TabIndex = 11; - // - // nudEmulationSpeed - // - this.nudEmulationSpeed.DecimalPlaces = 0; - this.nudEmulationSpeed.Increment = new decimal(new int[] { + // + // lblTurboSpeedHint + // + this.lblTurboSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblTurboSpeedHint.AutoSize = true; + this.lblTurboSpeedHint.Location = new System.Drawing.Point(57, 7); + this.lblTurboSpeedHint.Name = "lblTurboSpeedHint"; + this.lblTurboSpeedHint.Size = new System.Drawing.Size(121, 13); + this.lblTurboSpeedHint.TabIndex = 2; + this.lblTurboSpeedHint.Text = "% (0 = Maximum speed)"; + // + // lblTurboSpeed + // + this.lblTurboSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblTurboSpeed.AutoSize = true; + this.lblTurboSpeed.Location = new System.Drawing.Point(3, 34); + this.lblTurboSpeed.Name = "lblTurboSpeed"; + this.lblTurboSpeed.Size = new System.Drawing.Size(105, 13); + this.lblTurboSpeed.TabIndex = 13; + this.lblTurboSpeed.Text = "Fast Forward Speed:"; + // + // flowLayoutPanel6 + // + this.flowLayoutPanel6.AutoSize = true; + this.flowLayoutPanel6.Controls.Add(this.nudEmulationSpeed); + this.flowLayoutPanel6.Controls.Add(this.lblEmuSpeedHint); + this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + 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(408, 27); + this.flowLayoutPanel6.TabIndex = 11; + // + // nudEmulationSpeed + // + this.nudEmulationSpeed.DecimalPlaces = 0; + this.nudEmulationSpeed.Increment = new decimal(new int[] { 1, 0, 0, 0}); - this.nudEmulationSpeed.Location = new System.Drawing.Point(3, 3); - this.nudEmulationSpeed.Maximum = new decimal(new int[] { + this.nudEmulationSpeed.Location = new System.Drawing.Point(3, 3); + this.nudEmulationSpeed.Maximum = new decimal(new int[] { 5000, 0, 0, 0}); - this.nudEmulationSpeed.MaximumSize = new System.Drawing.Size(10000, 20); - this.nudEmulationSpeed.Minimum = new decimal(new int[] { + this.nudEmulationSpeed.MaximumSize = new System.Drawing.Size(10000, 20); + this.nudEmulationSpeed.Minimum = new decimal(new int[] { 0, 0, 0, 0}); - this.nudEmulationSpeed.MinimumSize = new System.Drawing.Size(0, 21); - this.nudEmulationSpeed.Name = "nudEmulationSpeed"; - this.nudEmulationSpeed.Size = new System.Drawing.Size(48, 21); - this.nudEmulationSpeed.TabIndex = 1; - this.nudEmulationSpeed.Value = new decimal(new int[] { + this.nudEmulationSpeed.MinimumSize = new System.Drawing.Size(0, 21); + this.nudEmulationSpeed.Name = "nudEmulationSpeed"; + this.nudEmulationSpeed.Size = new System.Drawing.Size(48, 21); + this.nudEmulationSpeed.TabIndex = 1; + this.nudEmulationSpeed.Value = new decimal(new int[] { 0, 0, 0, 0}); - // - // lblEmuSpeedHint - // - this.lblEmuSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblEmuSpeedHint.AutoSize = true; - this.lblEmuSpeedHint.Location = new System.Drawing.Point(57, 7); - this.lblEmuSpeedHint.Name = "lblEmuSpeedHint"; - this.lblEmuSpeedHint.Size = new System.Drawing.Size(121, 13); - this.lblEmuSpeedHint.TabIndex = 2; - this.lblEmuSpeedHint.Text = "% (0 = Maximum speed)"; - // - // lblEmulationSpeed - // - this.lblEmulationSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblEmulationSpeed.AutoSize = true; - this.lblEmulationSpeed.Location = new System.Drawing.Point(3, 7); - this.lblEmulationSpeed.Name = "lblEmulationSpeed"; - this.lblEmulationSpeed.Size = new System.Drawing.Size(90, 13); - 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, 61); - 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, 54); - this.flowLayoutPanel10.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel10.Name = "flowLayoutPanel10"; - this.flowLayoutPanel10.Size = new System.Drawing.Size(408, 27); - this.flowLayoutPanel10.TabIndex = 16; - // - // nudRewindSpeed - // - this.nudRewindSpeed.DecimalPlaces = 0; - this.nudRewindSpeed.Increment = new decimal(new int[] { + // + // lblEmuSpeedHint + // + this.lblEmuSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblEmuSpeedHint.AutoSize = true; + this.lblEmuSpeedHint.Location = new System.Drawing.Point(57, 7); + this.lblEmuSpeedHint.Name = "lblEmuSpeedHint"; + this.lblEmuSpeedHint.Size = new System.Drawing.Size(121, 13); + this.lblEmuSpeedHint.TabIndex = 2; + this.lblEmuSpeedHint.Text = "% (0 = Maximum speed)"; + // + // lblEmulationSpeed + // + this.lblEmulationSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblEmulationSpeed.AutoSize = true; + this.lblEmulationSpeed.Location = new System.Drawing.Point(3, 7); + this.lblEmulationSpeed.Name = "lblEmulationSpeed"; + this.lblEmulationSpeed.Size = new System.Drawing.Size(90, 13); + 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, 61); + 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, 54); + this.flowLayoutPanel10.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel10.Name = "flowLayoutPanel10"; + this.flowLayoutPanel10.Size = new System.Drawing.Size(408, 27); + this.flowLayoutPanel10.TabIndex = 16; + // + // nudRewindSpeed + // + this.nudRewindSpeed.DecimalPlaces = 0; + this.nudRewindSpeed.Increment = new decimal(new int[] { 1, 0, 0, 0}); - this.nudRewindSpeed.Location = new System.Drawing.Point(3, 3); - this.nudRewindSpeed.Maximum = new decimal(new int[] { + this.nudRewindSpeed.Location = new System.Drawing.Point(3, 3); + this.nudRewindSpeed.Maximum = new decimal(new int[] { 5000, 0, 0, 0}); - this.nudRewindSpeed.MaximumSize = new System.Drawing.Size(10000, 20); - this.nudRewindSpeed.Minimum = new decimal(new int[] { + this.nudRewindSpeed.MaximumSize = new System.Drawing.Size(10000, 20); + this.nudRewindSpeed.Minimum = new decimal(new int[] { 0, 0, 0, 0}); - this.nudRewindSpeed.MinimumSize = new System.Drawing.Size(0, 21); - this.nudRewindSpeed.Name = "nudRewindSpeed"; - this.nudRewindSpeed.Size = new System.Drawing.Size(48, 21); - this.nudRewindSpeed.TabIndex = 1; - this.nudRewindSpeed.Value = new decimal(new int[] { + this.nudRewindSpeed.MinimumSize = new System.Drawing.Size(0, 21); + this.nudRewindSpeed.Name = "nudRewindSpeed"; + this.nudRewindSpeed.Size = new System.Drawing.Size(48, 21); + this.nudRewindSpeed.TabIndex = 1; + this.nudRewindSpeed.Value = new decimal(new int[] { 0, 0, 0, 0}); - // - // lblRewindSpeedHint - // - this.lblRewindSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblRewindSpeedHint.AutoSize = true; - this.lblRewindSpeedHint.Location = new System.Drawing.Point(57, 7); - 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); - 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(525, 360); - this.tpgAdvanced.TabIndex = 1; - this.tpgAdvanced.Text = "Advanced"; - this.tpgAdvanced.UseVisualStyleBackColor = true; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 1; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.chkEnablePpu2000ScrollGlitch, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.chkEnablePpu2006ScrollGlitch, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.chkRandomizeCpuPpuAlignment, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.lblMiscSettings, 0, 7); - this.tableLayoutPanel1.Controls.Add(this.chkMapperRandomPowerOnState, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.chkEnableOamDecay, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 6); - this.tableLayoutPanel1.Controls.Add(this.chkDisablePaletteRead, 0, 13); - this.tableLayoutPanel1.Controls.Add(this.chkDisableOamAddrBug, 0, 11); - this.tableLayoutPanel1.Controls.Add(this.chkDisablePpuReset, 0, 10); - this.tableLayoutPanel1.Controls.Add(this.chkDisablePpu2004Reads, 0, 12); - this.tableLayoutPanel1.Controls.Add(this.chkUseNes101Hvc101Behavior, 0, 9); - this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 14); - this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 8); - this.tableLayoutPanel1.Controls.Add(this.lblDeveloperSettings, 0, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 16; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - 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.Absolute, 20F)); - 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(519, 354); - this.tableLayoutPanel1.TabIndex = 0; - // - // chkEnablePpu2000ScrollGlitch - // - this.chkEnablePpu2000ScrollGlitch.AutoSize = true; - this.chkEnablePpu2000ScrollGlitch.Checked = false; - this.chkEnablePpu2000ScrollGlitch.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkEnablePpu2000ScrollGlitch.Location = new System.Drawing.Point(10, 112); - this.chkEnablePpu2000ScrollGlitch.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkEnablePpu2000ScrollGlitch.MinimumSize = new System.Drawing.Size(0, 23); - this.chkEnablePpu2000ScrollGlitch.Name = "chkEnablePpu2000ScrollGlitch"; - this.chkEnablePpu2000ScrollGlitch.Size = new System.Drawing.Size(509, 23); - this.chkEnablePpu2000ScrollGlitch.TabIndex = 38; - this.chkEnablePpu2000ScrollGlitch.Text = "Enable PPU $2000/$2005/$2006 first-write scroll glitch emulation"; - // - // chkEnablePpu2006ScrollGlitch - // - this.chkEnablePpu2006ScrollGlitch.AutoSize = true; - this.chkEnablePpu2006ScrollGlitch.Checked = false; - this.chkEnablePpu2006ScrollGlitch.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkEnablePpu2006ScrollGlitch.Location = new System.Drawing.Point(10, 89); - this.chkEnablePpu2006ScrollGlitch.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkEnablePpu2006ScrollGlitch.MinimumSize = new System.Drawing.Size(0, 23); - this.chkEnablePpu2006ScrollGlitch.Name = "chkEnablePpu2006ScrollGlitch"; - this.chkEnablePpu2006ScrollGlitch.Size = new System.Drawing.Size(509, 23); - this.chkEnablePpu2006ScrollGlitch.TabIndex = 37; - this.chkEnablePpu2006ScrollGlitch.Text = "Enable PPU $2006 write scroll glitch emulation"; - // - // chkRandomizeCpuPpuAlignment - // - this.chkRandomizeCpuPpuAlignment.AutoSize = true; - this.chkRandomizeCpuPpuAlignment.Checked = false; - this.chkRandomizeCpuPpuAlignment.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkRandomizeCpuPpuAlignment.Location = new System.Drawing.Point(10, 66); - this.chkRandomizeCpuPpuAlignment.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkRandomizeCpuPpuAlignment.MinimumSize = new System.Drawing.Size(0, 23); - this.chkRandomizeCpuPpuAlignment.Name = "chkRandomizeCpuPpuAlignment"; - this.chkRandomizeCpuPpuAlignment.Size = new System.Drawing.Size(509, 23); - this.chkRandomizeCpuPpuAlignment.TabIndex = 36; - this.chkRandomizeCpuPpuAlignment.Text = "Randomize power-on/reset CPU/PPU alignment"; - // - // lblMiscSettings - // - this.lblMiscSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblMiscSettings.AutoSize = true; - this.lblMiscSettings.ForeColor = System.Drawing.SystemColors.GrayText; - this.lblMiscSettings.Location = new System.Drawing.Point(0, 167); - this.lblMiscSettings.Margin = new System.Windows.Forms.Padding(0, 0, 3, 2); - this.lblMiscSettings.Name = "lblMiscSettings"; - this.lblMiscSettings.Size = new System.Drawing.Size(115, 13); - this.lblMiscSettings.TabIndex = 35; - this.lblMiscSettings.Text = "Miscellaneous Settings"; - // - // chkMapperRandomPowerOnState - // - this.chkMapperRandomPowerOnState.AutoSize = true; - this.chkMapperRandomPowerOnState.Checked = false; - this.chkMapperRandomPowerOnState.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkMapperRandomPowerOnState.Location = new System.Drawing.Point(10, 43); - this.chkMapperRandomPowerOnState.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkMapperRandomPowerOnState.MinimumSize = new System.Drawing.Size(0, 23); - this.chkMapperRandomPowerOnState.Name = "chkMapperRandomPowerOnState"; - this.chkMapperRandomPowerOnState.Size = new System.Drawing.Size(509, 23); - this.chkMapperRandomPowerOnState.TabIndex = 11; - this.chkMapperRandomPowerOnState.Text = "Randomize power-on state for mappers"; - // - // chkEnableOamDecay - // - this.chkEnableOamDecay.Checked = false; - this.chkEnableOamDecay.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkEnableOamDecay.Location = new System.Drawing.Point(10, 20); - this.chkEnableOamDecay.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkEnableOamDecay.MinimumSize = new System.Drawing.Size(0, 21); - this.chkEnableOamDecay.Name = "chkEnableOamDecay"; - this.chkEnableOamDecay.Size = new System.Drawing.Size(509, 23); - this.chkEnableOamDecay.TabIndex = 9; - this.chkEnableOamDecay.Text = "Enable OAM RAM decay"; - // - // flowLayoutPanel8 - // - 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(7, 135); - this.flowLayoutPanel8.Margin = new System.Windows.Forms.Padding(7, 0, 0, 0); - this.flowLayoutPanel8.Name = "flowLayoutPanel8"; - this.flowLayoutPanel8.Size = new System.Drawing.Size(512, 27); - this.flowLayoutPanel8.TabIndex = 3; - // - // lblRamPowerOnState - // - this.lblRamPowerOnState.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblRamPowerOnState.AutoSize = true; - this.lblRamPowerOnState.Location = new System.Drawing.Point(3, 7); - this.lblRamPowerOnState.Name = "lblRamPowerOnState"; - this.lblRamPowerOnState.Size = new System.Drawing.Size(159, 13); - this.lblRamPowerOnState.TabIndex = 0; - this.lblRamPowerOnState.Text = "Default power on state for RAM:"; - // - // cboRamPowerOnState - // - this.cboRamPowerOnState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboRamPowerOnState.FormattingEnabled = true; - this.cboRamPowerOnState.Location = new System.Drawing.Point(168, 3); - this.cboRamPowerOnState.Name = "cboRamPowerOnState"; - this.cboRamPowerOnState.Size = new System.Drawing.Size(306, 21); - this.cboRamPowerOnState.TabIndex = 1; - // - // chkDisablePaletteRead - // - this.chkDisablePaletteRead.Checked = false; - this.chkDisablePaletteRead.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkDisablePaletteRead.Location = new System.Drawing.Point(10, 297); - this.chkDisablePaletteRead.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkDisablePaletteRead.MinimumSize = new System.Drawing.Size(0, 21); - this.chkDisablePaletteRead.Name = "chkDisablePaletteRead"; - this.chkDisablePaletteRead.Size = new System.Drawing.Size(509, 23); - this.chkDisablePaletteRead.TabIndex = 6; - this.chkDisablePaletteRead.Text = "Disable PPU palette reads"; - // - // chkDisableOamAddrBug - // - this.chkDisableOamAddrBug.Checked = false; - this.chkDisableOamAddrBug.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkDisableOamAddrBug.Location = new System.Drawing.Point(10, 251); - this.chkDisableOamAddrBug.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkDisableOamAddrBug.MinimumSize = new System.Drawing.Size(0, 21); - this.chkDisableOamAddrBug.Name = "chkDisableOamAddrBug"; - this.chkDisableOamAddrBug.Size = new System.Drawing.Size(509, 23); - this.chkDisableOamAddrBug.TabIndex = 5; - this.chkDisableOamAddrBug.Text = "Disable PPU OAMADDR bug emulation"; - // - // chkDisablePpuReset - // - this.chkDisablePpuReset.Checked = false; - this.chkDisablePpuReset.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkDisablePpuReset.Location = new System.Drawing.Point(10, 228); - this.chkDisablePpuReset.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkDisablePpuReset.MinimumSize = new System.Drawing.Size(0, 21); - this.chkDisablePpuReset.Name = "chkDisablePpuReset"; - this.chkDisablePpuReset.Size = new System.Drawing.Size(509, 23); - this.chkDisablePpuReset.TabIndex = 7; - this.chkDisablePpuReset.Text = "Do not reset PPU when resetting console (Famicom behavior)"; - // - // chkDisablePpu2004Reads - // - this.chkDisablePpu2004Reads.Checked = false; - this.chkDisablePpu2004Reads.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(10, 274); - this.chkDisablePpu2004Reads.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkDisablePpu2004Reads.MinimumSize = new System.Drawing.Size(0, 21); - this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads"; - this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(509, 23); - this.chkDisablePpu2004Reads.TabIndex = 4; - this.chkDisablePpu2004Reads.Text = "Disable PPU $2004 reads (Famicom behavior)"; - // - // chkUseNes101Hvc101Behavior - // - this.chkUseNes101Hvc101Behavior.AutoSize = true; - this.chkUseNes101Hvc101Behavior.Location = new System.Drawing.Point(13, 208); - this.chkUseNes101Hvc101Behavior.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3); - this.chkUseNes101Hvc101Behavior.Name = "chkUseNes101Hvc101Behavior"; - this.chkUseNes101Hvc101Behavior.Size = new System.Drawing.Size(292, 17); - this.chkUseNes101Hvc101Behavior.TabIndex = 8; - this.chkUseNes101Hvc101Behavior.Text = "Use NES/HVC-101 (Top-loader / AV Famicom) behavior"; - this.chkUseNes101Hvc101Behavior.UseVisualStyleBackColor = true; - // - // chkAllowInvalidInput - // - this.chkAllowInvalidInput.AutoSize = true; - this.chkAllowInvalidInput.Checked = false; - this.chkAllowInvalidInput.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkAllowInvalidInput.Location = new System.Drawing.Point(10, 320); - this.chkAllowInvalidInput.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.chkAllowInvalidInput.MinimumSize = new System.Drawing.Size(0, 23); - this.chkAllowInvalidInput.Name = "chkAllowInvalidInput"; - this.chkAllowInvalidInput.Size = new System.Drawing.Size(509, 23); - this.chkAllowInvalidInput.TabIndex = 1; - this.chkAllowInvalidInput.Text = "Allow invalid input (e.g Down + Up or Left + Right at the same time)"; - // - // chkUseAlternativeMmc3Irq - // - this.chkUseAlternativeMmc3Irq.AutoSize = true; - this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(13, 185); - this.chkUseAlternativeMmc3Irq.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3); - this.chkUseAlternativeMmc3Irq.Name = "chkUseAlternativeMmc3Irq"; - this.chkUseAlternativeMmc3Irq.Size = new System.Drawing.Size(197, 17); - this.chkUseAlternativeMmc3Irq.TabIndex = 0; - this.chkUseAlternativeMmc3Irq.Text = "Use alternative MMC3 IRQ behavior"; - this.chkUseAlternativeMmc3Irq.UseVisualStyleBackColor = true; - // - // lblDeveloperSettings - // - this.lblDeveloperSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblDeveloperSettings.AutoSize = true; - this.lblDeveloperSettings.ForeColor = System.Drawing.SystemColors.GrayText; - this.lblDeveloperSettings.Location = new System.Drawing.Point(0, 5); - this.lblDeveloperSettings.Margin = new System.Windows.Forms.Padding(0, 0, 3, 2); - this.lblDeveloperSettings.Name = "lblDeveloperSettings"; - this.lblDeveloperSettings.Size = new System.Drawing.Size(284, 13); - this.lblDeveloperSettings.TabIndex = 33; - this.lblDeveloperSettings.Text = "Recommended for developers (homebrew / ROM hacking)"; - // - // tpgOverclocking - // - this.tpgOverclocking.Controls.Add(this.picHint); - 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(525, 360); - this.tpgOverclocking.TabIndex = 2; - this.tpgOverclocking.Text = "Overclocking"; - this.tpgOverclocking.UseVisualStyleBackColor = true; - // - // picHint - // - this.picHint.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.picHint.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; - this.picHint.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.picHint.Location = new System.Drawing.Point(12, 16); - this.picHint.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); - this.picHint.Name = "picHint"; - this.picHint.Size = new System.Drawing.Size(16, 16); - this.picHint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.picHint.TabIndex = 0; - this.picHint.TabStop = false; - // - // tableLayoutPanel3 - // - this.tableLayoutPanel3.ColumnCount = 1; - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel3.Controls.Add(this.lblOverclockHint, 0, 0); - this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel4, 0, 5); - this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel3, 0, 4); - this.tableLayoutPanel3.Controls.Add(this.grpPpuTiming, 0, 1); - this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel2, 0, 3); - this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel7, 0, 7); - this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3); - this.tableLayoutPanel3.Name = "tableLayoutPanel3"; - this.tableLayoutPanel3.RowCount = 8; - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - 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(519, 354); - this.tableLayoutPanel3.TabIndex = 0; - // - // lblOverclockHint - // - this.lblOverclockHint.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lblOverclockHint.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblOverclockHint.Location = new System.Drawing.Point(3, 0); - this.lblOverclockHint.Name = "lblOverclockHint"; - this.lblOverclockHint.Padding = new System.Windows.Forms.Padding(25, 0, 0, 0); - this.lblOverclockHint.Size = new System.Drawing.Size(517, 41); - this.lblOverclockHint.TabIndex = 1; - this.lblOverclockHint.Text = resources.GetString("lblOverclockHint.Text"); - // - // flowLayoutPanel4 - // - this.flowLayoutPanel4.Controls.Add(this.lblEffectiveClockRateDendy); - this.flowLayoutPanel4.Controls.Add(this.lblEffectiveClockRateValueDendy); - this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 152); - this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(519, 20); - this.flowLayoutPanel4.TabIndex = 11; - // - // lblEffectiveClockRateDendy - // - this.lblEffectiveClockRateDendy.AutoSize = true; - this.lblEffectiveClockRateDendy.Location = new System.Drawing.Point(3, 0); - this.lblEffectiveClockRateDendy.Name = "lblEffectiveClockRateDendy"; - this.lblEffectiveClockRateDendy.Size = new System.Drawing.Size(148, 13); - this.lblEffectiveClockRateDendy.TabIndex = 0; - this.lblEffectiveClockRateDendy.Text = "Effective Clock Rate (Dendy):"; - // - // lblEffectiveClockRateValueDendy - // - this.lblEffectiveClockRateValueDendy.AutoSize = true; - this.lblEffectiveClockRateValueDendy.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblEffectiveClockRateValueDendy.Location = new System.Drawing.Point(157, 0); - this.lblEffectiveClockRateValueDendy.Name = "lblEffectiveClockRateValueDendy"; - this.lblEffectiveClockRateValueDendy.Size = new System.Drawing.Size(37, 13); - this.lblEffectiveClockRateValueDendy.TabIndex = 1; - this.lblEffectiveClockRateValueDendy.Text = "100%"; - // - // flowLayoutPanel3 - // - this.flowLayoutPanel3.Controls.Add(this.lblEffectiveClockRatePal); - this.flowLayoutPanel3.Controls.Add(this.lblEffectiveClockRateValuePal); - this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 135); - this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(519, 17); - this.flowLayoutPanel3.TabIndex = 9; - // - // lblEffectiveClockRatePal - // - this.lblEffectiveClockRatePal.AutoSize = true; - this.lblEffectiveClockRatePal.Location = new System.Drawing.Point(3, 0); - this.lblEffectiveClockRatePal.Name = "lblEffectiveClockRatePal"; - this.lblEffectiveClockRatePal.Size = new System.Drawing.Size(137, 13); - this.lblEffectiveClockRatePal.TabIndex = 0; - this.lblEffectiveClockRatePal.Text = "Effective Clock Rate (PAL):"; - // - // lblEffectiveClockRateValuePal - // - this.lblEffectiveClockRateValuePal.AutoSize = true; - this.lblEffectiveClockRateValuePal.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblEffectiveClockRateValuePal.Location = new System.Drawing.Point(146, 0); - this.lblEffectiveClockRateValuePal.Name = "lblEffectiveClockRateValuePal"; - this.lblEffectiveClockRateValuePal.Size = new System.Drawing.Size(37, 13); - this.lblEffectiveClockRateValuePal.TabIndex = 1; - this.lblEffectiveClockRateValuePal.Text = "100%"; - // - // grpPpuTiming - // - this.grpPpuTiming.Controls.Add(this.tableLayoutPanel5); - this.grpPpuTiming.Dock = System.Windows.Forms.DockStyle.Fill; - this.grpPpuTiming.Location = new System.Drawing.Point(3, 44); - this.grpPpuTiming.Name = "grpPpuTiming"; - this.grpPpuTiming.Size = new System.Drawing.Size(513, 71); - this.grpPpuTiming.TabIndex = 7; - this.grpPpuTiming.TabStop = false; - this.grpPpuTiming.Text = "PPU Vertical Blank Configuration"; - // - // tableLayoutPanel5 - // - this.tableLayoutPanel5.ColumnCount = 2; - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel5.Controls.Add(this.nudExtraScanlinesAfterNmi, 1, 1); - this.tableLayoutPanel5.Controls.Add(this.nudExtraScanlinesBeforeNmi, 1, 0); - this.tableLayoutPanel5.Controls.Add(this.lblExtraScanlinesBeforeNmi, 0, 0); - this.tableLayoutPanel5.Controls.Add(this.lblExtraScanlinesAfterNmi, 0, 1); - this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 16); - this.tableLayoutPanel5.Name = "tableLayoutPanel5"; - this.tableLayoutPanel5.RowCount = 3; - 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(507, 52); - this.tableLayoutPanel5.TabIndex = 0; - // - // nudExtraScanlinesAfterNmi - // - this.nudExtraScanlinesAfterNmi.DecimalPlaces = 0; - this.nudExtraScanlinesAfterNmi.Increment = new decimal(new int[] { + // + // lblRewindSpeedHint + // + this.lblRewindSpeedHint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblRewindSpeedHint.AutoSize = true; + this.lblRewindSpeedHint.Location = new System.Drawing.Point(57, 7); + 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); + 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(525, 360); + this.tpgAdvanced.TabIndex = 1; + this.tpgAdvanced.Text = "Advanced"; + this.tpgAdvanced.UseVisualStyleBackColor = true; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.chkEnablePpu2000ScrollGlitch, 0, 5); + this.tableLayoutPanel1.Controls.Add(this.chkEnablePpu2006ScrollGlitch, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.chkRandomizeCpuPpuAlignment, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.lblMiscSettings, 0, 7); + this.tableLayoutPanel1.Controls.Add(this.chkMapperRandomPowerOnState, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.chkEnableOamDecay, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 6); + this.tableLayoutPanel1.Controls.Add(this.chkDisablePaletteRead, 0, 13); + this.tableLayoutPanel1.Controls.Add(this.chkDisableOamAddrBug, 0, 11); + this.tableLayoutPanel1.Controls.Add(this.chkDisablePpuReset, 0, 10); + this.tableLayoutPanel1.Controls.Add(this.chkDisablePpu2004Reads, 0, 12); + this.tableLayoutPanel1.Controls.Add(this.chkUseNes101Hvc101Behavior, 0, 9); + this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 14); + this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 8); + this.tableLayoutPanel1.Controls.Add(this.lblDeveloperSettings, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 16; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + 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.Absolute, 20F)); + 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(519, 354); + this.tableLayoutPanel1.TabIndex = 0; + // + // chkEnablePpu2000ScrollGlitch + // + this.chkEnablePpu2000ScrollGlitch.AutoSize = true; + this.chkEnablePpu2000ScrollGlitch.Checked = false; + this.chkEnablePpu2000ScrollGlitch.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkEnablePpu2000ScrollGlitch.Location = new System.Drawing.Point(10, 112); + this.chkEnablePpu2000ScrollGlitch.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkEnablePpu2000ScrollGlitch.MinimumSize = new System.Drawing.Size(0, 23); + this.chkEnablePpu2000ScrollGlitch.Name = "chkEnablePpu2000ScrollGlitch"; + this.chkEnablePpu2000ScrollGlitch.Size = new System.Drawing.Size(509, 23); + this.chkEnablePpu2000ScrollGlitch.TabIndex = 38; + this.chkEnablePpu2000ScrollGlitch.Text = "Enable PPU $2000/$2005/$2006 first-write scroll glitch emulation"; + // + // chkEnablePpu2006ScrollGlitch + // + this.chkEnablePpu2006ScrollGlitch.AutoSize = true; + this.chkEnablePpu2006ScrollGlitch.Checked = false; + this.chkEnablePpu2006ScrollGlitch.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkEnablePpu2006ScrollGlitch.Location = new System.Drawing.Point(10, 89); + this.chkEnablePpu2006ScrollGlitch.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkEnablePpu2006ScrollGlitch.MinimumSize = new System.Drawing.Size(0, 23); + this.chkEnablePpu2006ScrollGlitch.Name = "chkEnablePpu2006ScrollGlitch"; + this.chkEnablePpu2006ScrollGlitch.Size = new System.Drawing.Size(509, 23); + this.chkEnablePpu2006ScrollGlitch.TabIndex = 37; + this.chkEnablePpu2006ScrollGlitch.Text = "Enable PPU $2006 write scroll glitch emulation"; + // + // chkRandomizeCpuPpuAlignment + // + this.chkRandomizeCpuPpuAlignment.AutoSize = true; + this.chkRandomizeCpuPpuAlignment.Checked = false; + this.chkRandomizeCpuPpuAlignment.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkRandomizeCpuPpuAlignment.Location = new System.Drawing.Point(10, 66); + this.chkRandomizeCpuPpuAlignment.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkRandomizeCpuPpuAlignment.MinimumSize = new System.Drawing.Size(0, 23); + this.chkRandomizeCpuPpuAlignment.Name = "chkRandomizeCpuPpuAlignment"; + this.chkRandomizeCpuPpuAlignment.Size = new System.Drawing.Size(509, 23); + this.chkRandomizeCpuPpuAlignment.TabIndex = 36; + this.chkRandomizeCpuPpuAlignment.Text = "Randomize power-on/reset CPU/PPU alignment"; + // + // lblMiscSettings + // + this.lblMiscSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblMiscSettings.AutoSize = true; + this.lblMiscSettings.ForeColor = System.Drawing.SystemColors.GrayText; + this.lblMiscSettings.Location = new System.Drawing.Point(0, 167); + this.lblMiscSettings.Margin = new System.Windows.Forms.Padding(0, 0, 3, 2); + this.lblMiscSettings.Name = "lblMiscSettings"; + this.lblMiscSettings.Size = new System.Drawing.Size(115, 13); + this.lblMiscSettings.TabIndex = 35; + this.lblMiscSettings.Text = "Miscellaneous Settings"; + // + // chkMapperRandomPowerOnState + // + this.chkMapperRandomPowerOnState.AutoSize = true; + this.chkMapperRandomPowerOnState.Checked = false; + this.chkMapperRandomPowerOnState.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkMapperRandomPowerOnState.Location = new System.Drawing.Point(10, 43); + this.chkMapperRandomPowerOnState.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkMapperRandomPowerOnState.MinimumSize = new System.Drawing.Size(0, 23); + this.chkMapperRandomPowerOnState.Name = "chkMapperRandomPowerOnState"; + this.chkMapperRandomPowerOnState.Size = new System.Drawing.Size(509, 23); + this.chkMapperRandomPowerOnState.TabIndex = 11; + this.chkMapperRandomPowerOnState.Text = "Randomize power-on state for mappers"; + // + // chkEnableOamDecay + // + this.chkEnableOamDecay.Checked = false; + this.chkEnableOamDecay.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkEnableOamDecay.Location = new System.Drawing.Point(10, 20); + this.chkEnableOamDecay.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkEnableOamDecay.MinimumSize = new System.Drawing.Size(0, 21); + this.chkEnableOamDecay.Name = "chkEnableOamDecay"; + this.chkEnableOamDecay.Size = new System.Drawing.Size(509, 23); + this.chkEnableOamDecay.TabIndex = 9; + this.chkEnableOamDecay.Text = "Enable OAM RAM decay"; + // + // flowLayoutPanel8 + // + 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(7, 135); + this.flowLayoutPanel8.Margin = new System.Windows.Forms.Padding(7, 0, 0, 0); + this.flowLayoutPanel8.Name = "flowLayoutPanel8"; + this.flowLayoutPanel8.Size = new System.Drawing.Size(512, 27); + this.flowLayoutPanel8.TabIndex = 3; + // + // lblRamPowerOnState + // + this.lblRamPowerOnState.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblRamPowerOnState.AutoSize = true; + this.lblRamPowerOnState.Location = new System.Drawing.Point(3, 7); + this.lblRamPowerOnState.Name = "lblRamPowerOnState"; + this.lblRamPowerOnState.Size = new System.Drawing.Size(159, 13); + this.lblRamPowerOnState.TabIndex = 0; + this.lblRamPowerOnState.Text = "Default power on state for RAM:"; + // + // cboRamPowerOnState + // + this.cboRamPowerOnState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboRamPowerOnState.FormattingEnabled = true; + this.cboRamPowerOnState.Location = new System.Drawing.Point(168, 3); + this.cboRamPowerOnState.Name = "cboRamPowerOnState"; + this.cboRamPowerOnState.Size = new System.Drawing.Size(306, 21); + this.cboRamPowerOnState.TabIndex = 1; + // + // chkDisablePaletteRead + // + this.chkDisablePaletteRead.Checked = false; + this.chkDisablePaletteRead.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkDisablePaletteRead.Location = new System.Drawing.Point(10, 297); + this.chkDisablePaletteRead.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkDisablePaletteRead.MinimumSize = new System.Drawing.Size(0, 21); + this.chkDisablePaletteRead.Name = "chkDisablePaletteRead"; + this.chkDisablePaletteRead.Size = new System.Drawing.Size(509, 23); + this.chkDisablePaletteRead.TabIndex = 6; + this.chkDisablePaletteRead.Text = "Disable PPU palette reads"; + // + // chkDisableOamAddrBug + // + this.chkDisableOamAddrBug.Checked = false; + this.chkDisableOamAddrBug.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkDisableOamAddrBug.Location = new System.Drawing.Point(10, 251); + this.chkDisableOamAddrBug.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkDisableOamAddrBug.MinimumSize = new System.Drawing.Size(0, 21); + this.chkDisableOamAddrBug.Name = "chkDisableOamAddrBug"; + this.chkDisableOamAddrBug.Size = new System.Drawing.Size(509, 23); + this.chkDisableOamAddrBug.TabIndex = 5; + this.chkDisableOamAddrBug.Text = "Disable PPU OAMADDR bug emulation"; + // + // chkDisablePpuReset + // + this.chkDisablePpuReset.Checked = false; + this.chkDisablePpuReset.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkDisablePpuReset.Location = new System.Drawing.Point(10, 228); + this.chkDisablePpuReset.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkDisablePpuReset.MinimumSize = new System.Drawing.Size(0, 21); + this.chkDisablePpuReset.Name = "chkDisablePpuReset"; + this.chkDisablePpuReset.Size = new System.Drawing.Size(509, 23); + this.chkDisablePpuReset.TabIndex = 7; + this.chkDisablePpuReset.Text = "Do not reset PPU when resetting console (Famicom behavior)"; + // + // chkDisablePpu2004Reads + // + this.chkDisablePpu2004Reads.Checked = false; + this.chkDisablePpu2004Reads.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(10, 274); + this.chkDisablePpu2004Reads.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkDisablePpu2004Reads.MinimumSize = new System.Drawing.Size(0, 21); + this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads"; + this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(509, 23); + this.chkDisablePpu2004Reads.TabIndex = 4; + this.chkDisablePpu2004Reads.Text = "Disable PPU $2004 reads (Famicom behavior)"; + // + // chkUseNes101Hvc101Behavior + // + this.chkUseNes101Hvc101Behavior.AutoSize = true; + this.chkUseNes101Hvc101Behavior.Location = new System.Drawing.Point(13, 208); + this.chkUseNes101Hvc101Behavior.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3); + this.chkUseNes101Hvc101Behavior.Name = "chkUseNes101Hvc101Behavior"; + this.chkUseNes101Hvc101Behavior.Size = new System.Drawing.Size(292, 17); + this.chkUseNes101Hvc101Behavior.TabIndex = 8; + this.chkUseNes101Hvc101Behavior.Text = "Use NES/HVC-101 (Top-loader / AV Famicom) behavior"; + this.chkUseNes101Hvc101Behavior.UseVisualStyleBackColor = true; + // + // chkAllowInvalidInput + // + this.chkAllowInvalidInput.AutoSize = true; + this.chkAllowInvalidInput.Checked = false; + this.chkAllowInvalidInput.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkAllowInvalidInput.Location = new System.Drawing.Point(10, 320); + this.chkAllowInvalidInput.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.chkAllowInvalidInput.MinimumSize = new System.Drawing.Size(0, 23); + this.chkAllowInvalidInput.Name = "chkAllowInvalidInput"; + this.chkAllowInvalidInput.Size = new System.Drawing.Size(509, 23); + this.chkAllowInvalidInput.TabIndex = 1; + this.chkAllowInvalidInput.Text = "Allow invalid input (e.g Down + Up or Left + Right at the same time)"; + // + // chkUseAlternativeMmc3Irq + // + this.chkUseAlternativeMmc3Irq.AutoSize = true; + this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(13, 185); + this.chkUseAlternativeMmc3Irq.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3); + this.chkUseAlternativeMmc3Irq.Name = "chkUseAlternativeMmc3Irq"; + this.chkUseAlternativeMmc3Irq.Size = new System.Drawing.Size(197, 17); + this.chkUseAlternativeMmc3Irq.TabIndex = 0; + this.chkUseAlternativeMmc3Irq.Text = "Use alternative MMC3 IRQ behavior"; + this.chkUseAlternativeMmc3Irq.UseVisualStyleBackColor = true; + // + // lblDeveloperSettings + // + this.lblDeveloperSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblDeveloperSettings.AutoSize = true; + this.lblDeveloperSettings.ForeColor = System.Drawing.SystemColors.GrayText; + this.lblDeveloperSettings.Location = new System.Drawing.Point(0, 5); + this.lblDeveloperSettings.Margin = new System.Windows.Forms.Padding(0, 0, 3, 2); + this.lblDeveloperSettings.Name = "lblDeveloperSettings"; + this.lblDeveloperSettings.Size = new System.Drawing.Size(284, 13); + this.lblDeveloperSettings.TabIndex = 33; + this.lblDeveloperSettings.Text = "Recommended for developers (homebrew / ROM hacking)"; + // + // tpgOverclocking + // + this.tpgOverclocking.Controls.Add(this.picHint); + 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(525, 360); + this.tpgOverclocking.TabIndex = 2; + this.tpgOverclocking.Text = "Overclocking"; + this.tpgOverclocking.UseVisualStyleBackColor = true; + // + // picHint + // + this.picHint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picHint.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picHint.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picHint.Location = new System.Drawing.Point(12, 16); + this.picHint.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); + this.picHint.Name = "picHint"; + this.picHint.Size = new System.Drawing.Size(16, 16); + this.picHint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.picHint.TabIndex = 0; + this.picHint.TabStop = false; + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 1; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel3.Controls.Add(this.lblOverclockHint, 0, 0); + this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel4, 0, 5); + this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel3, 0, 4); + this.tableLayoutPanel3.Controls.Add(this.grpPpuTiming, 0, 1); + this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel2, 0, 3); + this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel7, 0, 7); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 8; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + 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(519, 354); + this.tableLayoutPanel3.TabIndex = 0; + // + // lblOverclockHint + // + this.lblOverclockHint.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lblOverclockHint.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblOverclockHint.Location = new System.Drawing.Point(3, 0); + this.lblOverclockHint.Name = "lblOverclockHint"; + this.lblOverclockHint.Padding = new System.Windows.Forms.Padding(25, 0, 0, 0); + this.lblOverclockHint.Size = new System.Drawing.Size(517, 41); + this.lblOverclockHint.TabIndex = 1; + this.lblOverclockHint.Text = resources.GetString("lblOverclockHint.Text"); + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.Controls.Add(this.lblEffectiveClockRateDendy); + this.flowLayoutPanel4.Controls.Add(this.lblEffectiveClockRateValueDendy); + this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 152); + this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(519, 20); + this.flowLayoutPanel4.TabIndex = 11; + // + // lblEffectiveClockRateDendy + // + this.lblEffectiveClockRateDendy.AutoSize = true; + this.lblEffectiveClockRateDendy.Location = new System.Drawing.Point(3, 0); + this.lblEffectiveClockRateDendy.Name = "lblEffectiveClockRateDendy"; + this.lblEffectiveClockRateDendy.Size = new System.Drawing.Size(148, 13); + this.lblEffectiveClockRateDendy.TabIndex = 0; + this.lblEffectiveClockRateDendy.Text = "Effective Clock Rate (Dendy):"; + // + // lblEffectiveClockRateValueDendy + // + this.lblEffectiveClockRateValueDendy.AutoSize = true; + this.lblEffectiveClockRateValueDendy.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblEffectiveClockRateValueDendy.Location = new System.Drawing.Point(157, 0); + this.lblEffectiveClockRateValueDendy.Name = "lblEffectiveClockRateValueDendy"; + this.lblEffectiveClockRateValueDendy.Size = new System.Drawing.Size(37, 13); + this.lblEffectiveClockRateValueDendy.TabIndex = 1; + this.lblEffectiveClockRateValueDendy.Text = "100%"; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.Controls.Add(this.lblEffectiveClockRatePal); + this.flowLayoutPanel3.Controls.Add(this.lblEffectiveClockRateValuePal); + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 135); + this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(519, 17); + this.flowLayoutPanel3.TabIndex = 9; + // + // lblEffectiveClockRatePal + // + this.lblEffectiveClockRatePal.AutoSize = true; + this.lblEffectiveClockRatePal.Location = new System.Drawing.Point(3, 0); + this.lblEffectiveClockRatePal.Name = "lblEffectiveClockRatePal"; + this.lblEffectiveClockRatePal.Size = new System.Drawing.Size(137, 13); + this.lblEffectiveClockRatePal.TabIndex = 0; + this.lblEffectiveClockRatePal.Text = "Effective Clock Rate (PAL):"; + // + // lblEffectiveClockRateValuePal + // + this.lblEffectiveClockRateValuePal.AutoSize = true; + this.lblEffectiveClockRateValuePal.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblEffectiveClockRateValuePal.Location = new System.Drawing.Point(146, 0); + this.lblEffectiveClockRateValuePal.Name = "lblEffectiveClockRateValuePal"; + this.lblEffectiveClockRateValuePal.Size = new System.Drawing.Size(37, 13); + this.lblEffectiveClockRateValuePal.TabIndex = 1; + this.lblEffectiveClockRateValuePal.Text = "100%"; + // + // grpPpuTiming + // + this.grpPpuTiming.Controls.Add(this.tableLayoutPanel5); + this.grpPpuTiming.Dock = System.Windows.Forms.DockStyle.Fill; + this.grpPpuTiming.Location = new System.Drawing.Point(3, 44); + this.grpPpuTiming.Name = "grpPpuTiming"; + this.grpPpuTiming.Size = new System.Drawing.Size(513, 71); + this.grpPpuTiming.TabIndex = 7; + this.grpPpuTiming.TabStop = false; + this.grpPpuTiming.Text = "PPU Vertical Blank Configuration"; + // + // tableLayoutPanel5 + // + this.tableLayoutPanel5.ColumnCount = 2; + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel5.Controls.Add(this.nudExtraScanlinesAfterNmi, 1, 1); + this.tableLayoutPanel5.Controls.Add(this.nudExtraScanlinesBeforeNmi, 1, 0); + this.tableLayoutPanel5.Controls.Add(this.lblExtraScanlinesBeforeNmi, 0, 0); + this.tableLayoutPanel5.Controls.Add(this.lblExtraScanlinesAfterNmi, 0, 1); + this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 16); + this.tableLayoutPanel5.Name = "tableLayoutPanel5"; + this.tableLayoutPanel5.RowCount = 3; + 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(507, 52); + this.tableLayoutPanel5.TabIndex = 0; + // + // nudExtraScanlinesAfterNmi + // + this.nudExtraScanlinesAfterNmi.DecimalPlaces = 0; + this.nudExtraScanlinesAfterNmi.Increment = new decimal(new int[] { 1, 0, 0, 0}); - this.nudExtraScanlinesAfterNmi.Location = new System.Drawing.Point(165, 30); - this.nudExtraScanlinesAfterNmi.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.nudExtraScanlinesAfterNmi.Maximum = new decimal(new int[] { + this.nudExtraScanlinesAfterNmi.Location = new System.Drawing.Point(165, 30); + this.nudExtraScanlinesAfterNmi.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.nudExtraScanlinesAfterNmi.Maximum = new decimal(new int[] { 1000, 0, 0, 0}); - this.nudExtraScanlinesAfterNmi.MaximumSize = new System.Drawing.Size(10000, 20); - this.nudExtraScanlinesAfterNmi.Minimum = new decimal(new int[] { + this.nudExtraScanlinesAfterNmi.MaximumSize = new System.Drawing.Size(10000, 20); + this.nudExtraScanlinesAfterNmi.Minimum = new decimal(new int[] { 0, 0, 0, 0}); - this.nudExtraScanlinesAfterNmi.MinimumSize = new System.Drawing.Size(0, 21); - this.nudExtraScanlinesAfterNmi.Name = "nudExtraScanlinesAfterNmi"; - this.nudExtraScanlinesAfterNmi.Size = new System.Drawing.Size(46, 21); - this.nudExtraScanlinesAfterNmi.TabIndex = 3; - this.nudExtraScanlinesAfterNmi.Value = new decimal(new int[] { + this.nudExtraScanlinesAfterNmi.MinimumSize = new System.Drawing.Size(0, 21); + this.nudExtraScanlinesAfterNmi.Name = "nudExtraScanlinesAfterNmi"; + this.nudExtraScanlinesAfterNmi.Size = new System.Drawing.Size(46, 21); + this.nudExtraScanlinesAfterNmi.TabIndex = 3; + this.nudExtraScanlinesAfterNmi.Value = new decimal(new int[] { 100, 0, 0, 0}); - // - // nudExtraScanlinesBeforeNmi - // - this.nudExtraScanlinesBeforeNmi.DecimalPlaces = 0; - this.nudExtraScanlinesBeforeNmi.Increment = new decimal(new int[] { + // + // nudExtraScanlinesBeforeNmi + // + this.nudExtraScanlinesBeforeNmi.DecimalPlaces = 0; + this.nudExtraScanlinesBeforeNmi.Increment = new decimal(new int[] { 1, 0, 0, 0}); - this.nudExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(165, 3); - this.nudExtraScanlinesBeforeNmi.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.nudExtraScanlinesBeforeNmi.Maximum = new decimal(new int[] { + this.nudExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(165, 3); + this.nudExtraScanlinesBeforeNmi.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.nudExtraScanlinesBeforeNmi.Maximum = new decimal(new int[] { 1000, 0, 0, 0}); - this.nudExtraScanlinesBeforeNmi.MaximumSize = new System.Drawing.Size(10000, 20); - this.nudExtraScanlinesBeforeNmi.Minimum = new decimal(new int[] { + this.nudExtraScanlinesBeforeNmi.MaximumSize = new System.Drawing.Size(10000, 20); + this.nudExtraScanlinesBeforeNmi.Minimum = new decimal(new int[] { 0, 0, 0, 0}); - this.nudExtraScanlinesBeforeNmi.MinimumSize = new System.Drawing.Size(0, 21); - this.nudExtraScanlinesBeforeNmi.Name = "nudExtraScanlinesBeforeNmi"; - this.nudExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(46, 21); - this.nudExtraScanlinesBeforeNmi.TabIndex = 2; - this.nudExtraScanlinesBeforeNmi.Value = new decimal(new int[] { + this.nudExtraScanlinesBeforeNmi.MinimumSize = new System.Drawing.Size(0, 21); + this.nudExtraScanlinesBeforeNmi.Name = "nudExtraScanlinesBeforeNmi"; + this.nudExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(46, 21); + this.nudExtraScanlinesBeforeNmi.TabIndex = 2; + this.nudExtraScanlinesBeforeNmi.Value = new decimal(new int[] { 100, 0, 0, 0}); - // - // lblExtraScanlinesBeforeNmi - // - this.lblExtraScanlinesBeforeNmi.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblExtraScanlinesBeforeNmi.AutoSize = true; - this.lblExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(3, 7); - this.lblExtraScanlinesBeforeNmi.Name = "lblExtraScanlinesBeforeNmi"; - this.lblExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(159, 13); - this.lblExtraScanlinesBeforeNmi.TabIndex = 0; - this.lblExtraScanlinesBeforeNmi.Text = "Additional scanlines before NMI:"; - // - // lblExtraScanlinesAfterNmi - // - this.lblExtraScanlinesAfterNmi.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblExtraScanlinesAfterNmi.AutoSize = true; - this.lblExtraScanlinesAfterNmi.Location = new System.Drawing.Point(3, 34); - this.lblExtraScanlinesAfterNmi.Name = "lblExtraScanlinesAfterNmi"; - this.lblExtraScanlinesAfterNmi.Size = new System.Drawing.Size(150, 13); - this.lblExtraScanlinesAfterNmi.TabIndex = 1; - this.lblExtraScanlinesAfterNmi.Text = "Additional scanlines after NMI:"; - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Controls.Add(this.lblEffectiveClockRate); - this.flowLayoutPanel2.Controls.Add(this.lblEffectiveClockRateValue); - this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 118); - this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(519, 17); - this.flowLayoutPanel2.TabIndex = 8; - // - // lblEffectiveClockRate - // - this.lblEffectiveClockRate.AutoSize = true; - this.lblEffectiveClockRate.Location = new System.Drawing.Point(3, 0); - this.lblEffectiveClockRate.Name = "lblEffectiveClockRate"; - this.lblEffectiveClockRate.Size = new System.Drawing.Size(146, 13); - this.lblEffectiveClockRate.TabIndex = 0; - this.lblEffectiveClockRate.Text = "Effective Clock Rate (NTSC):"; - // - // lblEffectiveClockRateValue - // - this.lblEffectiveClockRateValue.AutoSize = true; - this.lblEffectiveClockRateValue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblEffectiveClockRateValue.Location = new System.Drawing.Point(155, 0); - this.lblEffectiveClockRateValue.Name = "lblEffectiveClockRateValue"; - this.lblEffectiveClockRateValue.Size = new System.Drawing.Size(37, 13); - this.lblEffectiveClockRateValue.TabIndex = 1; - this.lblEffectiveClockRateValue.Text = "100%"; - // - // flowLayoutPanel7 - // - this.flowLayoutPanel7.Controls.Add(this.chkShowLagCounter); - this.flowLayoutPanel7.Controls.Add(this.btnResetLagCounter); - this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 172); - this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel7.Name = "flowLayoutPanel7"; - this.flowLayoutPanel7.Size = new System.Drawing.Size(519, 182); - this.flowLayoutPanel7.TabIndex = 12; - // - // chkShowLagCounter - // - this.chkShowLagCounter.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.chkShowLagCounter.AutoSize = true; - this.chkShowLagCounter.Location = new System.Drawing.Point(3, 6); - this.chkShowLagCounter.Name = "chkShowLagCounter"; - this.chkShowLagCounter.Size = new System.Drawing.Size(114, 17); - this.chkShowLagCounter.TabIndex = 13; - this.chkShowLagCounter.Text = "Show Lag Counter"; - this.chkShowLagCounter.UseVisualStyleBackColor = true; - // - // btnResetLagCounter - // - this.btnResetLagCounter.AutoSize = true; - this.btnResetLagCounter.Location = new System.Drawing.Point(123, 3); - this.btnResetLagCounter.Name = "btnResetLagCounter"; - this.btnResetLagCounter.Size = new System.Drawing.Size(85, 23); - this.btnResetLagCounter.TabIndex = 14; - this.btnResetLagCounter.Text = "Reset Counter"; - this.btnResetLagCounter.UseVisualStyleBackColor = true; - this.btnResetLagCounter.Click += new System.EventHandler(this.btnResetLagCounter_Click); - // - // tmrUpdateClockRate - // - this.tmrUpdateClockRate.Enabled = true; - this.tmrUpdateClockRate.Tick += new System.EventHandler(this.tmrUpdateClockRate_Tick); - // - // frmEmulationConfig - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(533, 415); - this.Controls.Add(this.tabMain); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(503, 367); - this.Name = "frmEmulationConfig"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Emulation Settings"; - this.Controls.SetChildIndex(this.baseConfigPanel, 0); - this.Controls.SetChildIndex(this.tabMain, 0); - this.tabMain.ResumeLayout(false); - this.tpgGeneral.ResumeLayout(false); - this.tpgGeneral.PerformLayout(); - this.tableLayoutPanel4.ResumeLayout(false); - this.tableLayoutPanel4.PerformLayout(); - this.flowLayoutPanel9.ResumeLayout(false); - this.flowLayoutPanel9.PerformLayout(); - this.flowLayoutPanel6.ResumeLayout(false); - this.flowLayoutPanel6.PerformLayout(); - this.flowLayoutPanel10.ResumeLayout(false); - this.flowLayoutPanel10.PerformLayout(); - this.tpgAdvanced.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.flowLayoutPanel8.ResumeLayout(false); - this.flowLayoutPanel8.PerformLayout(); - this.tpgOverclocking.ResumeLayout(false); - this.tpgOverclocking.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picHint)).EndInit(); - this.tableLayoutPanel3.ResumeLayout(false); - this.flowLayoutPanel4.ResumeLayout(false); - this.flowLayoutPanel4.PerformLayout(); - this.flowLayoutPanel3.ResumeLayout(false); - this.flowLayoutPanel3.PerformLayout(); - this.grpPpuTiming.ResumeLayout(false); - this.tableLayoutPanel5.ResumeLayout(false); - this.tableLayoutPanel5.PerformLayout(); - this.flowLayoutPanel2.ResumeLayout(false); - this.flowLayoutPanel2.PerformLayout(); - this.flowLayoutPanel7.ResumeLayout(false); - this.flowLayoutPanel7.PerformLayout(); - this.ResumeLayout(false); + // + // lblExtraScanlinesBeforeNmi + // + this.lblExtraScanlinesBeforeNmi.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblExtraScanlinesBeforeNmi.AutoSize = true; + this.lblExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(3, 7); + this.lblExtraScanlinesBeforeNmi.Name = "lblExtraScanlinesBeforeNmi"; + this.lblExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(159, 13); + this.lblExtraScanlinesBeforeNmi.TabIndex = 0; + this.lblExtraScanlinesBeforeNmi.Text = "Additional scanlines before NMI:"; + // + // lblExtraScanlinesAfterNmi + // + this.lblExtraScanlinesAfterNmi.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblExtraScanlinesAfterNmi.AutoSize = true; + this.lblExtraScanlinesAfterNmi.Location = new System.Drawing.Point(3, 34); + this.lblExtraScanlinesAfterNmi.Name = "lblExtraScanlinesAfterNmi"; + this.lblExtraScanlinesAfterNmi.Size = new System.Drawing.Size(150, 13); + this.lblExtraScanlinesAfterNmi.TabIndex = 1; + this.lblExtraScanlinesAfterNmi.Text = "Additional scanlines after NMI:"; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.lblEffectiveClockRate); + this.flowLayoutPanel2.Controls.Add(this.lblEffectiveClockRateValue); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 118); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(519, 17); + this.flowLayoutPanel2.TabIndex = 8; + // + // lblEffectiveClockRate + // + this.lblEffectiveClockRate.AutoSize = true; + this.lblEffectiveClockRate.Location = new System.Drawing.Point(3, 0); + this.lblEffectiveClockRate.Name = "lblEffectiveClockRate"; + this.lblEffectiveClockRate.Size = new System.Drawing.Size(146, 13); + this.lblEffectiveClockRate.TabIndex = 0; + this.lblEffectiveClockRate.Text = "Effective Clock Rate (NTSC):"; + // + // lblEffectiveClockRateValue + // + this.lblEffectiveClockRateValue.AutoSize = true; + this.lblEffectiveClockRateValue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblEffectiveClockRateValue.Location = new System.Drawing.Point(155, 0); + this.lblEffectiveClockRateValue.Name = "lblEffectiveClockRateValue"; + this.lblEffectiveClockRateValue.Size = new System.Drawing.Size(37, 13); + this.lblEffectiveClockRateValue.TabIndex = 1; + this.lblEffectiveClockRateValue.Text = "100%"; + // + // flowLayoutPanel7 + // + this.flowLayoutPanel7.Controls.Add(this.chkShowLagCounter); + this.flowLayoutPanel7.Controls.Add(this.btnResetLagCounter); + this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 172); + this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel7.Name = "flowLayoutPanel7"; + this.flowLayoutPanel7.Size = new System.Drawing.Size(519, 182); + this.flowLayoutPanel7.TabIndex = 12; + // + // chkShowLagCounter + // + this.chkShowLagCounter.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.chkShowLagCounter.AutoSize = true; + this.chkShowLagCounter.Location = new System.Drawing.Point(3, 6); + this.chkShowLagCounter.Name = "chkShowLagCounter"; + this.chkShowLagCounter.Size = new System.Drawing.Size(114, 17); + this.chkShowLagCounter.TabIndex = 13; + this.chkShowLagCounter.Text = "Show Lag Counter"; + this.chkShowLagCounter.UseVisualStyleBackColor = true; + // + // btnResetLagCounter + // + this.btnResetLagCounter.AutoSize = true; + this.btnResetLagCounter.Location = new System.Drawing.Point(123, 3); + this.btnResetLagCounter.Name = "btnResetLagCounter"; + this.btnResetLagCounter.Size = new System.Drawing.Size(85, 23); + this.btnResetLagCounter.TabIndex = 14; + this.btnResetLagCounter.Text = "Reset Counter"; + this.btnResetLagCounter.UseVisualStyleBackColor = true; + this.btnResetLagCounter.Click += new System.EventHandler(this.btnResetLagCounter_Click); + // + // tmrUpdateClockRate + // + this.tmrUpdateClockRate.Enabled = true; + this.tmrUpdateClockRate.Tick += new System.EventHandler(this.tmrUpdateClockRate_Tick); + // + // frmEmulationConfig + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.ClientSize = new System.Drawing.Size(533, 415); + this.Controls.Add(this.tabMain); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(503, 367); + this.Name = "frmEmulationConfig"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Emulation Settings"; + this.Controls.SetChildIndex(this.baseConfigPanel, 0); + this.Controls.SetChildIndex(this.tabMain, 0); + this.tabMain.ResumeLayout(false); + this.tpgGeneral.ResumeLayout(false); + this.tpgGeneral.PerformLayout(); + this.tableLayoutPanel4.ResumeLayout(false); + this.tableLayoutPanel4.PerformLayout(); + this.flowLayoutPanel5.ResumeLayout(false); + this.flowLayoutPanel5.PerformLayout(); + this.flowLayoutPanel9.ResumeLayout(false); + this.flowLayoutPanel9.PerformLayout(); + this.flowLayoutPanel6.ResumeLayout(false); + this.flowLayoutPanel6.PerformLayout(); + this.flowLayoutPanel10.ResumeLayout(false); + this.flowLayoutPanel10.PerformLayout(); + this.tpgAdvanced.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.flowLayoutPanel8.ResumeLayout(false); + this.flowLayoutPanel8.PerformLayout(); + this.tpgOverclocking.ResumeLayout(false); + this.tpgOverclocking.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picHint)).EndInit(); + this.tableLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); + this.flowLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel3.PerformLayout(); + this.grpPpuTiming.ResumeLayout(false); + this.tableLayoutPanel5.ResumeLayout(false); + this.tableLayoutPanel5.PerformLayout(); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + this.flowLayoutPanel7.ResumeLayout(false); + this.flowLayoutPanel7.PerformLayout(); + this.ResumeLayout(false); } @@ -1010,5 +1082,9 @@ namespace Mesen.GUI.Forms.Config private ctrlRiskyOption chkRandomizeCpuPpuAlignment; private ctrlRiskyOption chkEnablePpu2000ScrollGlitch; private ctrlRiskyOption chkEnablePpu2006ScrollGlitch; - } + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; + private MesenNumericUpDown nudRunAheadFrames; + private System.Windows.Forms.Label lblRunAheadFrames; + private System.Windows.Forms.Label lblRunAhead; + } } \ No newline at end of file diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.cs b/GUI.NET/Forms/Config/frmEmulationConfig.cs index 360ba626..87401eb5 100644 --- a/GUI.NET/Forms/Config/frmEmulationConfig.cs +++ b/GUI.NET/Forms/Config/frmEmulationConfig.cs @@ -27,6 +27,7 @@ namespace Mesen.GUI.Forms.Config AddBinding("EmulationSpeed", nudEmulationSpeed); AddBinding("TurboSpeed", nudTurboSpeed); AddBinding("RewindSpeed", nudRewindSpeed); + AddBinding("RunAheadFrames", nudRunAheadFrames); AddBinding("UseAlternativeMmc3Irq", chkUseAlternativeMmc3Irq); AddBinding("AllowInvalidInput", chkAllowInvalidInput); diff --git a/GUI.NET/InteropEmu.cs b/GUI.NET/InteropEmu.cs index 33b66664..e5daaf42 100644 --- a/GUI.NET/InteropEmu.cs +++ b/GUI.NET/InteropEmu.cs @@ -31,6 +31,7 @@ namespace Mesen.GUI [DllImport(DLLPath)] public static extern void HistoryViewerRelease(); [DllImport(DLLPath)] public static extern void HistoryViewerRun(); [DllImport(DLLPath)] public static extern void HistoryViewerStop(); + [DllImport(DLLPath)] public static extern UInt32 HistoryViewerGetHistoryLength(); [DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool HistoryViewerSaveMovie([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string movieFile, UInt32 startPosition, UInt32 endPosition); [DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool HistoryViewerCreateSaveState([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string outfileFile, UInt32 position); @@ -192,6 +193,7 @@ namespace Mesen.GUI [DllImport(DLLPath)] public static extern void SetSampleRate(UInt32 sampleRate); [DllImport(DLLPath)] public static extern void SetAudioLatency(UInt32 msLatency); [DllImport(DLLPath)] public static extern void SetAudioFilterSettings(AudioFilterSettings settings); + [DllImport(DLLPath)] public static extern void SetRunAheadFrames(UInt32 frameCount); [DllImport(DLLPath)] public static extern NesModel GetNesModel(); [DllImport(DLLPath)] public static extern void SetNesModel(NesModel model); diff --git a/InteropDLL/ConsoleWrapper.cpp b/InteropDLL/ConsoleWrapper.cpp index 0b796c4f..3efdd2d7 100644 --- a/InteropDLL/ConsoleWrapper.cpp +++ b/InteropDLL/ConsoleWrapper.cpp @@ -627,6 +627,7 @@ namespace InteropEmu { DllExport void __stdcall SetSampleRate(uint32_t sampleRate) { _settings->SetSampleRate(sampleRate); } DllExport void __stdcall SetAudioLatency(uint32_t msLatency) { _settings->SetAudioLatency(msLatency); } DllExport void __stdcall SetAudioFilterSettings(AudioFilterSettings settings) { _settings->SetAudioFilterSettings(settings); } + DllExport void __stdcall SetRunAheadFrames(uint32_t frameCount) { _settings->SetRunAheadFrames(frameCount); } DllExport NesModel __stdcall GetNesModel() { return _console->GetModel(); } DllExport void __stdcall SetNesModel(uint32_t model) { _settings->SetNesModel((NesModel)model); }