SPC: Added support for SPC file playback

This commit is contained in:
Sour 2019-10-19 15:23:17 -04:00
parent daf3bcce82
commit df79dc9cc1
21 changed files with 309 additions and 27 deletions

View file

@ -15,6 +15,7 @@
#include "Sdd1.h"
#include "Cx4.h"
#include "Obc1.h"
#include "SpcFileData.h"
#include "../Utilities/HexUtilities.h"
#include "../Utilities/VirtualFile.h"
#include "../Utilities/FolderUtilities.h"
@ -52,7 +53,12 @@ shared_ptr<BaseCartridge> BaseCartridge::CreateCartridge(Console* console, Virtu
cart->_prgRomSize = (uint32_t)romData.size();
cart->_prgRom = new uint8_t[cart->_prgRomSize];
memcpy(cart->_prgRom, romData.data(), cart->_prgRomSize);
cart->Init();
if(memcmp(cart->_prgRom, "SNES-SPC700 Sound File Data v0.30", 33) == 0) {
cart->LoadSpc();
} else {
cart->LoadRom();
}
return cart;
} else {
@ -115,7 +121,7 @@ int32_t BaseCartridge::GetHeaderScore(uint32_t addr)
return std::max<int32_t>(0, score);
}
void BaseCartridge::Init()
void BaseCartridge::LoadRom()
{
//Find the best potential header among lorom/hirom + headerless/headered combinations
vector<uint32_t> baseAddresses = { 0, 0x200, 0x8000, 0x8200, 0x408000, 0x408200 };
@ -409,6 +415,26 @@ bool BaseCartridge::MapSpecificCarts(MemoryMappings &mm)
return false;
}
void BaseCartridge::LoadSpc()
{
_spcData.reset(new SpcFileData(_prgRom));
//Setup a fake LOROM rom that runs STP right away to disable the main CPU
_flags = CartFlags::LoRom;
delete[] _prgRom;
_prgRom = new uint8_t[0x8000];
_prgRomSize = 0x8000;
memset(_prgRom, 0, 0x8000);
//Set reset vector to $8000
_prgRom[0x7FFC] = 0x00;
_prgRom[0x7FFD] = 0x80;
//STP instruction at $8000
_prgRom[0] = 0xDB;
}
void BaseCartridge::Serialize(Serializer &s)
{
s.StreamArray(_saveRam, _saveRamSize);
@ -457,6 +483,7 @@ string BaseCartridge::GetCartName()
void BaseCartridge::DisplayCartInfo()
{
MessageManager::Log("-----------------------------");
MessageManager::Log("File: " + VirtualFile(_romPath).GetFileName());
MessageManager::Log("Game: " + GetCartName());
string gameCode = GetGameCode();
if(!gameCode.empty()) {
@ -560,3 +587,8 @@ vector<unique_ptr<IMemoryHandler>>& BaseCartridge::GetSaveRamHandlers()
{
return _saveRamHandlers;
}
SpcFileData* BaseCartridge::GetSpcData()
{
return _spcData.get();
}

View file

@ -13,6 +13,7 @@ class Sa1;
class Gsu;
class Cx4;
class Console;
class SpcFileData;
class BaseCartridge : public ISerializable
{
@ -41,6 +42,8 @@ private:
uint32_t _prgRomSize = 0;
uint32_t _saveRamSize = 0;
uint32_t _coprocessorRamSize = 0;
shared_ptr<SpcFileData> _spcData;
void LoadBattery();
@ -52,6 +55,9 @@ private:
CoprocessorType GetDspVersion();
bool MapSpecificCarts(MemoryMappings &mm);
void LoadRom();
void LoadSpc();
void InitCoprocessor();
string GetCartName();
@ -62,7 +68,6 @@ public:
static shared_ptr<BaseCartridge> CreateCartridge(Console* console, VirtualFile &romFile, VirtualFile &patchFile);
void Init();
void Reset();
void SaveBattery();
@ -92,5 +97,7 @@ public:
vector<unique_ptr<IMemoryHandler>>& GetPrgRomHandlers();
vector<unique_ptr<IMemoryHandler>>& GetSaveRamHandlers();
SpcFileData* GetSpcData();
void Serialize(Serializer &s) override;
};

View file

@ -31,6 +31,7 @@
#include "BatteryManager.h"
#include "CheatManager.h"
#include "MovieManager.h"
#include "SpcHud.h"
#include "../Utilities/Serializer.h"
#include "../Utilities/Timer.h"
#include "../Utilities/VirtualFile.h"
@ -228,7 +229,7 @@ void Console::Stop(bool sendNotification)
_memoryManager.reset();
_dmaController.reset();
_soundMixer->StopAudio();
_soundMixer->StopAudio(true);
if(sendNotification) {
_notificationManager->SendNotification(ConsoleNotificationType::EmulationStopped);
@ -256,6 +257,13 @@ void Console::Reset()
_notificationManager->SendNotification(ConsoleNotificationType::GameReset);
ProcessEvent(EventType::Reset);
if(_cart->GetSpcData()) {
_spc->LoadSpcFile(_cart->GetSpcData());
_spcHud.reset(new SpcHud(this, _cart->GetSpcData()));
} else {
_spcHud.reset();
}
_memoryManager->IncMasterClockStartup();
Unlock();
@ -310,6 +318,13 @@ bool Console::LoadRom(VirtualFile romFile, VirtualFile patchFile, bool stopRom)
_dmaController.reset(new DmaController(_memoryManager.get()));
_spc.reset(new Spc(this));
if(_cart->GetSpcData()) {
_spc->LoadSpcFile(_cart->GetSpcData());
_spcHud.reset(new SpcHud(this, _cart->GetSpcData()));
} else {
_spcHud.reset();
}
_cpu.reset(new Cpu(this));
_memoryManager->Initialize(this);
_internalRegisters->Initialize(this);
@ -750,6 +765,10 @@ void Console::ProcessInterrupt(uint32_t originalPc, uint32_t currentPc, bool for
void Console::ProcessEvent(EventType type)
{
if(type == EventType::EndFrame && _spcHud) {
_spcHud->Draw(_ppu->GetFrameCount());
}
if(_debugger) {
_debugger->ProcessEvent(type);
}

View file

@ -26,6 +26,7 @@ class RewindManager;
class BatteryManager;
class CheatManager;
class MovieManager;
class SpcHud;
enum class MemoryOperationType;
enum class SnesMemoryType;
enum class EventType;
@ -56,6 +57,7 @@ private:
shared_ptr<RewindManager> _rewindManager;
shared_ptr<CheatManager> _cheatManager;
shared_ptr<MovieManager> _movieManager;
shared_ptr<SpcHud> _spcHud;
thread::id _emulationThreadId;

View file

@ -171,6 +171,8 @@
<ClInclude Include="Spc.h" />
<ClInclude Include="SpcDebugger.h" />
<ClInclude Include="SpcDisUtils.h" />
<ClInclude Include="SpcHud.h" />
<ClInclude Include="SpcFileData.h" />
<ClInclude Include="SpcTimer.h" />
<ClInclude Include="SpcTypes.h" />
<ClInclude Include="SPC_DSP.h" />
@ -265,6 +267,7 @@
<ClCompile Include="Spc.Instructions.cpp" />
<ClCompile Include="SpcDebugger.cpp" />
<ClCompile Include="SpcDisUtils.cpp" />
<ClCompile Include="SpcHud.cpp" />
<ClCompile Include="SPC_DSP.cpp" />
<ClCompile Include="SPC_Filter.cpp" />
<ClCompile Include="stdafx.cpp">

View file

@ -416,6 +416,12 @@
<ClInclude Include="InputHud.h">
<Filter>SNES\Input</Filter>
</ClInclude>
<ClInclude Include="SpcHud.h">
<Filter>Misc</Filter>
</ClInclude>
<ClInclude Include="SpcFileData.h">
<Filter>Misc</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp" />
@ -680,6 +686,9 @@
<ClCompile Include="Multitap.cpp">
<Filter>SNES\Input</Filter>
</ClCompile>
<ClCompile Include="SpcHud.cpp">
<Filter>Misc</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="SNES">

View file

@ -49,6 +49,10 @@ Ppu::~Ppu()
void Ppu::PowerOn()
{
//Boot up PPU in deterministic state (for now, need to randomize this)
_state = {};
_state.ForcedVblank = true;
_skipRender = false;
_regs = _console->GetInternalRegisters().get();
_settings = _console->GetSettings().get();
@ -1514,10 +1518,6 @@ void Ppu::SendFrame()
_console->GetNotificationManager()->SendNotification(ConsoleNotificationType::PpuFrameDone);
if(_skipRender) {
return;
}
bool isRewinding = _console->GetRewindManager()->IsRewinding();
#ifdef LIBRETRO
_console->GetVideoDecoder()->UpdateFrameSync(_currentBuffer, width, height, _frameCount, isRewinding);
@ -1527,7 +1527,10 @@ void Ppu::SendFrame()
} else {
_console->GetVideoDecoder()->UpdateFrame(_currentBuffer, width, height, _frameCount);
}
_frameSkipTimer.Reset();
if(!_skipRender) {
_frameSkipTimer.Reset();
}
#endif
}

View file

@ -66,6 +66,9 @@ void SoundMixer::PlayAudioBuffer(int16_t* samples, uint32_t sampleCount)
masterVolume = cfg.VolumeReduction == 100 ? 0 : masterVolume * (100 - cfg.VolumeReduction) / 100;
}
_leftSample = samples[0];
_rightSample = samples[1];
if(masterVolume < 100) {
//Apply volume if not using the default value
for(uint32_t i = 0; i < sampleCount * 2; i++) {
@ -139,4 +142,10 @@ void SoundMixer::StopRecording()
bool SoundMixer::IsRecording()
{
return _waveRecorder.get() != nullptr;
}
void SoundMixer::GetLastSamples(int16_t &left, int16_t &right)
{
left = _leftSample;
right = _rightSample;
}

View file

@ -17,6 +17,9 @@ private:
shared_ptr<WaveRecorder> _waveRecorder;
int16_t *_sampleBuffer = nullptr;
int16_t _leftSample = 0;
int16_t _rightSample = 0;
void ProcessEqualizer(int16_t *samples, uint32_t sampleCount);
public:
@ -33,4 +36,5 @@ public:
void StartRecording(string filepath);
void StopRecording();
bool IsRecording();
void GetLastSamples(int16_t &left, int16_t &right);
};

View file

@ -4,6 +4,7 @@
#include "MemoryManager.h"
#include "SoundMixer.h"
#include "EmuSettings.h"
#include "SpcFileData.h"
#include "SPC_DSP.h"
#include "../Utilities/Serializer.h"
@ -491,3 +492,36 @@ uint16_t Spc::GetDirectAddress(uint8_t offset)
{
return (CheckFlag(SpcFlags::DirectPage) ? 0x100 : 0) + offset;
}
void Spc::LoadSpcFile(SpcFileData* data)
{
memcpy(_ram, data->SpcRam, Spc::SpcRamSize);
_dsp->load(data->DspRegs);
_state.PC = data->PC;
_state.A = data->A;
_state.X = data->X;
_state.Y = data->Y;
_state.PS = data->PS;
_state.SP = data->SP;
Write(0xF1, data->ControlReg);
_state.DspReg = data->DspRegSelect;
_state.CpuRegs[0] = data->CpuRegs[0];
_state.CpuRegs[1] = data->CpuRegs[1];
_state.CpuRegs[2] = data->CpuRegs[2];
_state.CpuRegs[3] = data->CpuRegs[3];
_state.RamReg[0] = data->RamRegs[0];
_state.RamReg[1] = data->RamRegs[1];
_state.Timer0.SetTarget(data->TimerTarget[0]);
_state.Timer1.SetTarget(data->TimerTarget[1]);
_state.Timer2.SetTarget(data->TimerTarget[2]);
_state.Timer0.SetOutput(data->TimerOutput[0]);
_state.Timer1.SetOutput(data->TimerOutput[0]);
_state.Timer2.SetOutput(data->TimerOutput[0]);
}

View file

@ -13,6 +13,7 @@
class Console;
class MemoryManager;
class SpcFileData;
class SPC_DSP;
struct AddressInfo;
@ -303,6 +304,8 @@ public:
uint8_t* GetSpcRam();
uint8_t* GetSpcRom();
void LoadSpcFile(SpcFileData* spcData);
void Serialize(Serializer &s) override;
#ifdef DUMMYSPC

69
Core/SpcFileData.h Normal file
View file

@ -0,0 +1,69 @@
#pragma once
#include "stdafx.h"
class SpcFileData
{
public:
string SongTitle;
string GameTitle;
string Dumper;
string Artist;
string Comment;
uint16_t PC;
uint8_t A;
uint8_t X;
uint8_t Y;
uint8_t PS;
uint8_t SP;
uint8_t CpuRegs[4];
uint8_t ControlReg;
uint8_t RamRegs[2];
uint8_t TimerOutput[3];
uint8_t TimerTarget[3];
uint8_t DspRegSelect;
uint8_t DspRegs[128];
uint8_t SpcRam[0x10000];
SpcFileData(uint8_t* spcData)
{
SongTitle = string(spcData + 0x2E, spcData + 0x2E + 0x20);
GameTitle = string(spcData + 0x4E, spcData + 0x4E + 0x20);
Dumper = string(spcData + 0x6E, spcData + 0x6E + 0x10);
Artist = string(spcData + 0xB1, spcData + 0xB1 + 0x20);
Comment = string(spcData + 0x7E, spcData + 0x7E + 0x20);
memcpy(SpcRam, spcData + 0x100, 0xFFC0);
memcpy(SpcRam + 0xFFC0, spcData + 0x101C0, 0x40);
memcpy(DspRegs, spcData + 0x10100, 128);
PC = spcData[0x25] | (spcData[0x26] << 8);
A = spcData[0x27];
X = spcData[0x28];
Y = spcData[0x29];
PS = spcData[0x2A];
SP = spcData[0x2B];
ControlReg = spcData[0x100 + 0xF1];
DspRegSelect = spcData[0x100 + 0xF2];
CpuRegs[0] = spcData[0x100 + 0xF4];
CpuRegs[1] = spcData[0x100 + 0xF5];
CpuRegs[2] = spcData[0x100 + 0xF6];
CpuRegs[3] = spcData[0x100 + 0xF7];
RamRegs[0] = spcData[0x100 + 0xF8];
RamRegs[1] = spcData[0x100 + 0xF9];
TimerTarget[0] = spcData[0x100 + 0xFA];
TimerTarget[1] = spcData[0x100 + 0xFB];
TimerTarget[2] = spcData[0x100 + 0xFC];
TimerOutput[0] = spcData[0x100 + 0xFD];
TimerOutput[1] = spcData[0x100 + 0xFE];
TimerOutput[2] = spcData[0x100 + 0xFF];
}
};

38
Core/SpcHud.cpp Normal file
View file

@ -0,0 +1,38 @@
#include "stdafx.h"
#include "SpcHud.h"
#include "Console.h"
#include "SoundMixer.h"
#include "DebugHud.h"
#include "SpcFileData.h"
SpcHud::SpcHud(Console * console, SpcFileData* spcData)
{
_mixer = console->GetSoundMixer().get();
_hud = console->GetDebugHud().get();
_spcData = spcData;
}
void SpcHud::Draw(uint32_t frame)
{
_hud->DrawString(20, 20, "Game:", 0xBBBBBB, 0, 1, frame);
_hud->DrawString(20, 30, "Track:", 0xBBBBBB, 0, 1, frame);
_hud->DrawString(20, 40, "Artist:", 0xBBBBBB, 0, 1, frame);
_hud->DrawString(20, 50, "Comment:", 0xBBBBBB, 0, 1, frame);
_hud->DrawString(20, 60, "Dumper:", 0xBBBBBB, 0, 1, frame);
_hud->DrawString(70, 20, _spcData->GameTitle, 0xFFFFFF, 0, 1, frame);
_hud->DrawString(70, 30, _spcData->SongTitle, 0xFFFFFF, 0, 1, frame);
_hud->DrawString(70, 40, _spcData->Artist, 0xFFFFFF, 0, 1, frame);
_hud->DrawString(70, 50, _spcData->Comment, 0xFFFFFF, 0, 1, frame);
_hud->DrawString(70, 60, _spcData->Dumper, 0xFFFFFF, 0, 1, frame);
int16_t left, right;
_mixer->GetLastSamples(left, right);
_volumesL[_volPosition] = left / 128;
_volumesR[_volPosition] = right / 128;
_volPosition = (_volPosition + 1) & 0x7F;
for(int i = 1; i < 128; i++) {
_hud->DrawLine((i - 1)*2, 160 + _volumesL[(_volPosition + i - 1) & 0x7F], i*2, 160 + _volumesL[(_volPosition + i) & 0x7F], 0x30FFAAAA, 1, frame);
_hud->DrawLine((i - 1)*2, 160 + _volumesR[(_volPosition + i - 1) & 0x7F], i*2, 160 + _volumesR[(_volPosition + i) & 0x7F], 0x30AAAAFF, 1, frame);
}
}

25
Core/SpcHud.h Normal file
View file

@ -0,0 +1,25 @@
#pragma once
#include "stdafx.h"
class Console;
class SoundMixer;
class DebugHud;
class SpcFileData;
class SpcHud
{
private:
DebugHud* _hud;
SoundMixer* _mixer;
int8_t _volumesL[128] = {};
int8_t _volumesR[128] = {};
uint8_t _volPosition = 0;
SpcFileData* _spcData;
public:
SpcHud(Console* console, SpcFileData* spcData);
void Draw(uint32_t frame);
};

View file

@ -85,6 +85,12 @@ public:
return value;
}
void SetOutput(uint8_t value)
{
//Used when loading SPC files
_output = value;
}
void Serialize(Serializer &s)
{
s.Stream(_stage0, _stage1, _stage2, _output, _target, _enabled, _timersEnabled, _prevStage1);

View file

@ -97,6 +97,7 @@ SOURCES_CXX := $(LIBRETRO_DIR)/libretro.cpp \
$(CORE_DIR)/Spc.Instructions.cpp \
$(CORE_DIR)/SpcDebugger.cpp \
$(CORE_DIR)/SpcDisUtils.cpp \
$(CORE_DIR)/SpcHud.cpp \
$(CORE_DIR)/SPC_DSP.cpp \
$(CORE_DIR)/SPC_Filter.cpp \
$(CORE_DIR)/stdafx.cpp \

View file

@ -73,12 +73,13 @@ namespace Mesen.GUI.Config
}
List<string> mimeTypes = new List<string>();
CreateMimeType("x-mesen-nes", "sfc", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen-nes", "smc", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen-nes", "swc", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen-nes", "fig", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen-mss", "mss", "Mesen-S Save State", mimeTypes, cfg.AssociateMssFiles);
CreateMimeType("x-mesen-msm", "msm", "Mesen-S Movie File", mimeTypes, cfg.AssociateMsmFiles);
CreateMimeType("x-mesen_s-sfc", "sfc", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen_s-smc", "smc", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen_s-swc", "swc", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen_s-fig", "fig", "SNES Rom", mimeTypes, cfg.AssociateRomFiles);
CreateMimeType("x-mesen_s-spc", "spc", "SPC Sound File", mimeTypes, cfg.AssociateSpcFiles);
CreateMimeType("x-mesen_s-mss", "mss", "Mesen-S Save State", mimeTypes, cfg.AssociateMssFiles);
CreateMimeType("x-mesen_s-msm", "msm", "Mesen-S Movie File", mimeTypes, cfg.AssociateMsmFiles);
//Icon used for shortcuts
//TOOD

View file

@ -24,6 +24,7 @@ namespace Mesen.GUI.Config
public bool PauseOnMovieEnd = true;
public bool AssociateRomFiles = false;
public bool AssociateSpcFiles = false;
public bool AssociateMsmFiles = false;
public bool AssociateMssFiles = false;
@ -136,6 +137,7 @@ namespace Mesen.GUI.Config
FileAssociationHelper.UpdateFileAssociation("fig", this.AssociateRomFiles);
FileAssociationHelper.UpdateFileAssociation("msm", this.AssociateMsmFiles);
FileAssociationHelper.UpdateFileAssociation("mss", this.AssociateMssFiles);
FileAssociationHelper.UpdateFileAssociation("spc", this.AssociateSpcFiles);
}
frmMain.Instance.TopMost = AlwaysOnTop;

View file

@ -345,6 +345,7 @@
<Control ID="tpgFiles">Folders/Files</Control>
<Control ID="grpFileAssociations">File Associations</Control>
<Control ID="chkRomFormat">.SFC, .SMC, .SWC, .FIG (Roms)</Control>
<Control ID="chkSpcFormat">.SPC (Sound/music files)</Control>
<Control ID="chkMsmFormat">.MMO (Movie)</Control>
<Control ID="chkMssFormat">.MST (Save State)</Control>

View file

@ -71,6 +71,7 @@
this.chkMoviesOverride = new System.Windows.Forms.CheckBox();
this.grpFileAssociations = new System.Windows.Forms.GroupBox();
this.tlpFileFormat = new System.Windows.Forms.TableLayoutPanel();
this.chkSpcFormat = new System.Windows.Forms.CheckBox();
this.chkRomFormat = new System.Windows.Forms.CheckBox();
this.chkMssFormat = new System.Windows.Forms.CheckBox();
this.chkMsmFormat = new System.Windows.Forms.CheckBox();
@ -84,6 +85,7 @@
this.lblDataLocation = new System.Windows.Forms.Label();
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkDisableGameSelectionScreen = new System.Windows.Forms.CheckBox();
this.lblAdvancedMisc = new System.Windows.Forms.Label();
this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel();
this.lblRewind = new System.Windows.Forms.Label();
@ -98,7 +100,6 @@
this.chkAlwaysOnTop = new System.Windows.Forms.CheckBox();
this.chkShowFps = new System.Windows.Forms.CheckBox();
this.chkShowDebugInfo = new System.Windows.Forms.CheckBox();
this.chkDisableGameSelectionScreen = new System.Windows.Forms.CheckBox();
this.tabMain.SuspendLayout();
this.tpgGeneral.SuspendLayout();
this.tlpMain.SuspendLayout();
@ -686,6 +687,7 @@
this.tlpFileFormat.ColumnCount = 2;
this.tlpFileFormat.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFileFormat.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFileFormat.Controls.Add(this.chkSpcFormat, 0, 1);
this.tlpFileFormat.Controls.Add(this.chkRomFormat, 0, 0);
this.tlpFileFormat.Controls.Add(this.chkMssFormat, 1, 0);
this.tlpFileFormat.Controls.Add(this.chkMsmFormat, 1, 1);
@ -701,6 +703,16 @@
this.tlpFileFormat.Size = new System.Drawing.Size(522, 46);
this.tlpFileFormat.TabIndex = 0;
//
// chkSpcFormat
//
this.chkSpcFormat.AutoSize = true;
this.chkSpcFormat.Location = new System.Drawing.Point(3, 26);
this.chkSpcFormat.Name = "chkSpcFormat";
this.chkSpcFormat.Size = new System.Drawing.Size(143, 17);
this.chkSpcFormat.TabIndex = 16;
this.chkSpcFormat.Text = ".SPC (Sound/music files)";
this.chkSpcFormat.UseVisualStyleBackColor = true;
//
// chkRomFormat
//
this.chkRomFormat.AutoSize = true;
@ -889,6 +901,17 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(534, 383);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkDisableGameSelectionScreen
//
this.chkDisableGameSelectionScreen.AutoSize = true;
this.chkDisableGameSelectionScreen.Location = new System.Drawing.Point(13, 89);
this.chkDisableGameSelectionScreen.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.chkDisableGameSelectionScreen.Name = "chkDisableGameSelectionScreen";
this.chkDisableGameSelectionScreen.Size = new System.Drawing.Size(170, 17);
this.chkDisableGameSelectionScreen.TabIndex = 37;
this.chkDisableGameSelectionScreen.Text = "Disable game selection screen";
this.chkDisableGameSelectionScreen.UseVisualStyleBackColor = true;
//
// lblAdvancedMisc
//
this.lblAdvancedMisc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -1066,17 +1089,6 @@
this.chkShowDebugInfo.Text = "Show debug information";
this.chkShowDebugInfo.UseVisualStyleBackColor = true;
//
// chkDisableGameSelectionScreen
//
this.chkDisableGameSelectionScreen.AutoSize = true;
this.chkDisableGameSelectionScreen.Location = new System.Drawing.Point(13, 89);
this.chkDisableGameSelectionScreen.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.chkDisableGameSelectionScreen.Name = "chkDisableGameSelectionScreen";
this.chkDisableGameSelectionScreen.Size = new System.Drawing.Size(170, 17);
this.chkDisableGameSelectionScreen.TabIndex = 37;
this.chkDisableGameSelectionScreen.Text = "Disable game selection screen";
this.chkDisableGameSelectionScreen.UseVisualStyleBackColor = true;
//
// frmPreferences
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1198,5 +1210,6 @@
private System.Windows.Forms.Label lblPauseBackgroundSettings;
private System.Windows.Forms.CheckBox chkPauseOnMovieEnd;
private System.Windows.Forms.CheckBox chkDisableGameSelectionScreen;
private System.Windows.Forms.CheckBox chkSpcFormat;
}
}

View file

@ -42,6 +42,7 @@ namespace Mesen.GUI.Forms.Config
AddBinding(nameof(PreferencesConfig.AssociateRomFiles), chkRomFormat);
AddBinding(nameof(PreferencesConfig.AssociateMsmFiles), chkMsmFormat);
AddBinding(nameof(PreferencesConfig.AssociateMssFiles), chkMssFormat);
AddBinding(nameof(PreferencesConfig.AssociateSpcFiles), chkSpcFormat);
AddBinding(nameof(PreferencesConfig.AlwaysOnTop), chkAlwaysOnTop);
AddBinding(nameof(PreferencesConfig.AutoHideMenu), chkAutoHideMenu);