FDS: Added option to automatically switch disks
+Fixed bug with eject disk functionality
This commit is contained in:
parent
2cddcb31cf
commit
ce62e40d47
18 changed files with 175 additions and 53 deletions
10
Core/CPU.cpp
10
Core/CPU.cpp
|
@ -341,6 +341,16 @@ uint32_t CPU::GetClockRate(NesModel model)
|
|||
}
|
||||
}
|
||||
|
||||
uint8_t CPU::DebugReadByte(uint16_t addr)
|
||||
{
|
||||
return CPU::Instance->_memoryManager->DebugRead(addr);
|
||||
}
|
||||
|
||||
uint16_t CPU::DebugReadWord(uint16_t addr)
|
||||
{
|
||||
return CPU::Instance->_memoryManager->DebugReadWord(addr);
|
||||
}
|
||||
|
||||
void CPU::StreamState(bool saving)
|
||||
{
|
||||
uint32_t overclockRate = EmulationSettings::GetOverclockRateSetting();
|
||||
|
|
|
@ -794,6 +794,9 @@ public:
|
|||
static void StartDmcTransfer();
|
||||
static uint32_t GetClockRate(NesModel model);
|
||||
static bool IsCpuWrite() { return CPU::Instance->_cpuWrite; }
|
||||
|
||||
static uint8_t DebugReadByte(uint16_t addr);
|
||||
static uint16_t DebugReadWord(uint16_t addr);
|
||||
|
||||
//Used by debugger for "Set Next Statement"
|
||||
void SetDebugPC(uint16_t value) { SetPC(value); _state.DebugPC = value; }
|
||||
|
|
|
@ -48,6 +48,8 @@ enum EmulationFlags : uint64_t
|
|||
UseNes101Hvc101Behavior = 0x100000000,
|
||||
ShowFrameCounter = 0x200000000,
|
||||
|
||||
FdsAutoInsertDisk = 0x400000000,
|
||||
|
||||
Turbo = 0x2000000000,
|
||||
InBackground = 0x4000000000,
|
||||
NsfPlayerEnabled = 0x8000000000,
|
||||
|
|
74
Core/FDS.cpp
74
Core/FDS.cpp
|
@ -1,5 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "FDS.h"
|
||||
#include "CPU.h"
|
||||
#include "FdsAudio.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
|
@ -23,9 +24,16 @@ void FDS::InitMapper(RomData &romData)
|
|||
{
|
||||
_romFilepath = romData.Filename;
|
||||
_fdsDiskSides = romData.FdsDiskData;
|
||||
_fdsDiskHeaders = romData.FdsDiskHeaders;
|
||||
_fdsRawData = romData.RawData;
|
||||
}
|
||||
|
||||
void FDS::Reset(bool softReset)
|
||||
{
|
||||
_autoDiskEjectCounter = -1;
|
||||
_autoDiskSwitchCounter = -1;
|
||||
}
|
||||
|
||||
uint32_t FDS::GetFdsDiskSideSize(uint8_t side)
|
||||
{
|
||||
assert(side < _fdsDiskSides.size());
|
||||
|
@ -76,6 +84,33 @@ uint8_t FDS::ReadRAM(uint16_t addr)
|
|||
//The 2nd read occurs right at the end of the copyright screen
|
||||
//We can fast forward until _gameStarted == 2
|
||||
_gameStarted++;
|
||||
} else if(addr == 0xE445) {
|
||||
//Game is trying to check if a specific disk/side is inserted
|
||||
//Find the matching disk and insert it automatically
|
||||
uint16_t bufferAddr = CPU::DebugReadWord(0);
|
||||
uint8_t buffer[10];
|
||||
for(int i = 0; i < 10; i++) {
|
||||
buffer[i] = CPU::DebugReadByte(bufferAddr + i);
|
||||
}
|
||||
|
||||
for(int j = 0; j < _fdsDiskHeaders.size(); j++) {
|
||||
bool match = true;
|
||||
for(int i = 0; i < 10; i++) {
|
||||
if(buffer[i] != 0xFF && buffer[i] != _fdsDiskHeaders[j][i + 14]) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(match) {
|
||||
//Found a match, insert it
|
||||
_newDiskNumber = j;
|
||||
_diskNumber = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Prevent disk from being switched again until the disk is actually read
|
||||
_autoDiskSwitchCounter = -1;
|
||||
}
|
||||
|
||||
return BaseMapper::ReadRAM(addr);
|
||||
|
@ -83,6 +118,22 @@ uint8_t FDS::ReadRAM(uint16_t addr)
|
|||
|
||||
void FDS::ProcessCpuClock()
|
||||
{
|
||||
if(EmulationSettings::CheckFlag(EmulationFlags::FdsAutoInsertDisk)) {
|
||||
if(_autoDiskEjectCounter > 0) {
|
||||
//After reading a disk, wait until this counter reaches 0 before
|
||||
//automatically ejecting the disk the next time $4032 is read
|
||||
_autoDiskEjectCounter--;
|
||||
}
|
||||
if(_autoDiskSwitchCounter > 0) {
|
||||
//After ejecting the disk, wait a bit before we insert a new one
|
||||
_autoDiskSwitchCounter--;
|
||||
if(_autoDiskSwitchCounter == 0) {
|
||||
//Insert a disk (real disk/side will be selected when game executes $E445
|
||||
InsertDisk(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(EmulationSettings::CheckFlag(EmulationFlags::FdsFastForwardOnLoad)) {
|
||||
bool enableFastforward = (_scanningDisk || _gameStarted < 2);
|
||||
uint32_t emulationSpeed = EmulationSettings::GetEmulationSpeed(true);
|
||||
|
@ -127,6 +178,8 @@ void FDS::ProcessCpuClock()
|
|||
_delay--;
|
||||
} else {
|
||||
_scanningDisk = true;
|
||||
_autoDiskEjectCounter = -1;
|
||||
_autoDiskSwitchCounter = -1;
|
||||
|
||||
uint8_t diskData = 0;
|
||||
bool needIrq = _diskIrqEnabled;
|
||||
|
@ -187,6 +240,9 @@ void FDS::ProcessCpuClock()
|
|||
_diskPosition++;
|
||||
if(_diskPosition >= GetFdsDiskSideSize(_diskNumber)) {
|
||||
_motorOn = false;
|
||||
|
||||
//Wait a bit before ejecting the disk (better results in some games)
|
||||
_autoDiskEjectCounter = 1000000;
|
||||
} else {
|
||||
_delay = 150;
|
||||
}
|
||||
|
@ -308,8 +364,16 @@ uint8_t FDS::ReadRegister(uint16_t addr)
|
|||
|
||||
case 0x4032:
|
||||
value |= !IsDiskInserted() ? 0x01 : 0x00; //Disk not in drive
|
||||
value |= !IsDiskInserted() || !_scanningDisk ? 0x02 : 0x00; //Disk not ready
|
||||
value |= (!IsDiskInserted() || !_scanningDisk) ? 0x02 : 0x00; //Disk not ready
|
||||
value |= !IsDiskInserted() ? 0x04 : 0x00; //Disk not writable
|
||||
|
||||
if(EmulationSettings::CheckFlag(EmulationFlags::FdsAutoInsertDisk) && _autoDiskEjectCounter == 0 && _autoDiskSwitchCounter == -1) {
|
||||
//Game tried to check if a disk was inserted or not - this is usually done when the disk needs to be changed
|
||||
//Eject the current disk and insert a new one in 300k cycles (~10 frames)
|
||||
_autoDiskSwitchCounter = 300000;
|
||||
_diskNumber = NoDiskInserted;
|
||||
_newDiskNumber = NoDiskInserted;
|
||||
}
|
||||
return value;
|
||||
|
||||
case 0x4033:
|
||||
|
@ -330,6 +394,12 @@ void FDS::StreamState(bool saving)
|
|||
_readMode, _crcControl, _diskReady, _diskIrqEnabled, _extConWriteReg, _badCrc, _endOfHead, _readWriteEnabled, _readDataReg, _diskWriteProtected,
|
||||
_diskNumber, _newDiskNumber, _newDiskInsertDelay, _diskPosition, _delay, _previousCrcControlFlag, _gapEnded, _scanningDisk, _needIrq,
|
||||
_transferComplete, _isDirty, audio);
|
||||
|
||||
if(!saving) {
|
||||
//Make sure we disable fast forwarding when loading a state
|
||||
//Otherwise it's possible to get stuck in fast forward mode
|
||||
_gameStarted = 2;
|
||||
}
|
||||
}
|
||||
|
||||
FDS::FDS()
|
||||
|
@ -400,7 +470,7 @@ void FDS::EjectDisk()
|
|||
{
|
||||
if(FDS::Instance) {
|
||||
Console::Pause();
|
||||
FDS::Instance->_diskNumber = NoDiskInserted;
|
||||
FDS::Instance->_newDiskNumber = NoDiskInserted;
|
||||
FDS::Instance->_newDiskInsertDelay = 0;
|
||||
Console::Resume();
|
||||
|
||||
|
|
|
@ -37,6 +37,9 @@ private:
|
|||
bool _diskReady = false;
|
||||
bool _diskIrqEnabled = false;
|
||||
|
||||
int32_t _autoDiskEjectCounter = -1;
|
||||
int32_t _autoDiskSwitchCounter = -1;
|
||||
|
||||
uint8_t _extConWriteReg = 0;
|
||||
|
||||
//Read registers
|
||||
|
@ -64,6 +67,7 @@ private:
|
|||
|
||||
vector<uint8_t> _fdsRawData;
|
||||
vector<vector<uint8_t>> _fdsDiskSides;
|
||||
vector<vector<uint8_t>> _fdsDiskHeaders;
|
||||
string _romFilepath;
|
||||
|
||||
uint8_t _gameStarted = 0;
|
||||
|
@ -81,6 +85,7 @@ protected:
|
|||
|
||||
void InitMapper() override;
|
||||
void InitMapper(RomData &romData) override;
|
||||
void Reset(bool softReset);
|
||||
|
||||
uint32_t GetFdsDiskSideSize(uint8_t side);
|
||||
uint8_t ReadFdsDisk();
|
||||
|
|
|
@ -107,6 +107,8 @@ private:
|
|||
romData.FdsDiskData.push_back(vector<uint8_t>());
|
||||
vector<uint8_t> &fdsDiskImage = romData.FdsDiskData.back();
|
||||
|
||||
romData.FdsDiskHeaders.push_back(vector<uint8_t>(romFile.data() + fileOffset + 1, romFile.data() + fileOffset + 57));
|
||||
|
||||
AddGaps(fdsDiskImage, &romFile[fileOffset]);
|
||||
fileOffset += FdsDiskSideCapacity;
|
||||
|
||||
|
|
|
@ -316,6 +316,7 @@ struct RomData
|
|||
vector<uint8_t> ChrRom;
|
||||
vector<uint8_t> TrainerData;
|
||||
vector<vector<uint8_t>> FdsDiskData;
|
||||
vector<vector<uint8_t>> FdsDiskHeaders;
|
||||
|
||||
vector<uint8_t> RawData;
|
||||
string Sha1;
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace Mesen.GUI.Config
|
|||
|
||||
public bool FdsAutoLoadDisk = true;
|
||||
public bool FdsFastForwardOnLoad = false;
|
||||
public bool FdsAutoInsertDisk = false;
|
||||
|
||||
public bool AssociateNesFiles = false;
|
||||
public bool AssociateFdsFiles = false;
|
||||
|
@ -94,6 +95,7 @@ namespace Mesen.GUI.Config
|
|||
InteropEmu.SetFlag(EmulationFlags.RemoveSpriteLimit, preferenceInfo.RemoveSpriteLimit);
|
||||
InteropEmu.SetFlag(EmulationFlags.FdsAutoLoadDisk, preferenceInfo.FdsAutoLoadDisk);
|
||||
InteropEmu.SetFlag(EmulationFlags.FdsFastForwardOnLoad, preferenceInfo.FdsFastForwardOnLoad);
|
||||
InteropEmu.SetFlag(EmulationFlags.FdsAutoInsertDisk, preferenceInfo.FdsAutoInsertDisk);
|
||||
InteropEmu.SetFlag(EmulationFlags.PauseOnMovieEnd, preferenceInfo.PauseOnMovieEnd);
|
||||
InteropEmu.SetFlag(EmulationFlags.AllowBackgroundInput, preferenceInfo.AllowBackgroundInput);
|
||||
InteropEmu.SetFlag(EmulationFlags.PauseWhenInBackground, preferenceInfo.PauseWhenInBackground);
|
||||
|
|
|
@ -355,6 +355,8 @@
|
|||
<Control ID="chkMstFormat">.MST (Partidas guardadas de Mesen)</Control>
|
||||
<Control ID="tpgAdvanced">Avanzado</Control>
|
||||
<Control ID="chkFdsAutoLoadDisk">Insertar la cara A del disco 1 al cargar un juego FDS</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Aumentar la velocidad de la emulación de juegos de carga FDS</Control>
|
||||
<Control ID="chkFdsAutoInsertDisk">Automatically switch disks for FDS games</Control>
|
||||
<Control ID="tpgShortcuts">Atajos</Control>
|
||||
<Control ID="colAction">Acción</Control>
|
||||
<Control ID="colBinding1">Atajo #1</Control>
|
||||
|
@ -364,8 +366,7 @@
|
|||
<Control ID="chkAutoSave">Crear una copia de seguridad de cada estado</Control>
|
||||
<Control ID="lblAutoSave">minutos (Pulse F8 para cargar)</Control>
|
||||
<Control ID="chkAutoSaveNotify">Mostrar una notificación en pantalla al hacer la copia de seguridad automática</Control>
|
||||
<Control ID="grpCloudSaves">Copia de seguridad online</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Aumentar la velocidad de la emulación de juegos de carga FDS</Control>
|
||||
<Control ID="grpCloudSaves">Copia de seguridad online</Control>
|
||||
|
||||
<Control ID="lblRewind">Keep rewind data for the last</Control>
|
||||
<Control ID="lblRewindMinutes">minutes (Memory Usage ≈1MB/min)</Control>
|
||||
|
|
|
@ -359,6 +359,7 @@
|
|||
<Control ID="tpgAdvanced">Avancé</Control>
|
||||
<Control ID="chkFdsAutoLoadDisk">Insérer le côté A du disque 1 lors du chargement d'un jeu de FDS</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Augmenter la vitesse d'émulation pendant le chargement des jeux FDS</Control>
|
||||
<Control ID="chkFdsAutoInsertDisk">Insérer le disque demandé automatiquement pour les jeux de FDS</Control>
|
||||
|
||||
<Control ID="lblRewind">Permettre de rembobiner jusqu'à</Control>
|
||||
<Control ID="lblRewindMinutes">minutes (Utilise ≈1MB/min)</Control>
|
||||
|
|
|
@ -358,6 +358,7 @@
|
|||
<Control ID="tpgAdvanced">詳細設定</Control>
|
||||
<Control ID="chkFdsAutoLoadDisk">ファミコンディスクシステムのゲームをロードする時に自動的にディスク1のA面を入れる</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">ファミコンディスクシステムのゲームをディスクからロードする時に自動的に最高速度にする</Control>
|
||||
<Control ID="chkFdsAutoInsertDisk">ファミコンディスクシステムのゲーム中に自動的に該当するディスクを入れる</Control>
|
||||
|
||||
<Control ID="lblRewind">巻き戻し用データの</Control>
|
||||
<Control ID="lblRewindMinutes">分をキープする (メモリの使用量:1分に約1MB)</Control>
|
||||
|
|
|
@ -355,6 +355,8 @@
|
|||
<Control ID="chkMstFormat">.MST (Saves do Mesen)</Control>
|
||||
<Control ID="tpgAdvanced">Avançado</Control>
|
||||
<Control ID="chkFdsAutoLoadDisk">Inserir a parte A do disco 1 ao carregar um jogo FDS</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Aumentar a velocidade da emulação de jogos ao carregar no FDS</Control>
|
||||
<Control ID="chkFdsAutoInsertDisk">Automatically switch disks for FDS games</Control>
|
||||
<Control ID="tpgShortcuts">Atalhos</Control>
|
||||
<Control ID="colAction">Ação</Control>
|
||||
<Control ID="colBinding1">Atalho #1</Control>
|
||||
|
@ -364,8 +366,7 @@
|
|||
<Control ID="chkAutoSave">Criar uma cópia de segurança de cada state</Control>
|
||||
<Control ID="lblAutoSave">minutos (Aperte F8 para carregar)</Control>
|
||||
<Control ID="chkAutoSaveNotify">Mostrar uma notificação na tela ao fazer a cópia de segurança automática</Control>
|
||||
<Control ID="grpCloudSaves">Cópia de segurança online</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Aumentar a velocidade da emulação de jogos ao carregar no FDS</Control>
|
||||
<Control ID="grpCloudSaves">Cópia de segurança online</Control>
|
||||
|
||||
<Control ID="lblRewind">Keep rewind data for the last</Control>
|
||||
<Control ID="lblRewindMinutes">minutes (Memory Usage ≈1MB/min)</Control>
|
||||
|
|
|
@ -358,7 +358,8 @@
|
|||
<Control ID="tpgAdvanced">Расширенные</Control>
|
||||
<Control ID="chkFdsAutoLoadDisk">Автоматически вставлять диск 1 стороной А при загрузке FDS</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Использовать быструю загрузку FDS</Control>
|
||||
|
||||
<Control ID="chkFdsAutoInsertDisk">Automatically switch disks for FDS games</Control>
|
||||
|
||||
<Control ID="lblRewind">Keep rewind data for the last</Control>
|
||||
<Control ID="lblRewindMinutes">minutes (Memory Usage ≈1MB/min)</Control>
|
||||
|
||||
|
|
|
@ -358,6 +358,7 @@
|
|||
<Control ID="tpgAdvanced">Розширені</Control>
|
||||
<Control ID="chkFdsAutoLoadDisk">Автоматично вставляти диск 1 стороною А при завантаженні FDS</Control>
|
||||
<Control ID="chkFdsFastForwardOnLoad">Використовувати швидке завантаження FDS</Control>
|
||||
<Control ID="chkFdsAutoInsertDisk">Automatically switch disks for FDS games</Control>
|
||||
|
||||
<Control ID="lblRewind">Keep rewind data for the last</Control>
|
||||
<Control ID="lblRewindMinutes">minutes (Memory Usage ≈1MB/min)</Control>
|
||||
|
|
106
GUI.NET/Forms/Config/frmPreferences.Designer.cs
generated
106
GUI.NET/Forms/Config/frmPreferences.Designer.cs
generated
|
@ -98,14 +98,15 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.tpgAdvanced = new System.Windows.Forms.TabPage();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.chkDisableGameDatabase = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox();
|
||||
this.chkFdsFastForwardOnLoad = new System.Windows.Forms.CheckBox();
|
||||
this.chkDisplayTitleBarInfo = new System.Windows.Forms.CheckBox();
|
||||
this.tmrSyncDateTime = new System.Windows.Forms.Timer(this.components);
|
||||
this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.lblRewind = new System.Windows.Forms.Label();
|
||||
this.nudRewindBufferSize = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblRewindMinutes = new System.Windows.Forms.Label();
|
||||
this.lblRewind = new System.Windows.Forms.Label();
|
||||
this.tmrSyncDateTime = new System.Windows.Forms.Timer(this.components);
|
||||
this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox();
|
||||
this.chkFdsFastForwardOnLoad = new System.Windows.Forms.CheckBox();
|
||||
this.chkFdsAutoInsertDisk = new System.Windows.Forms.CheckBox();
|
||||
this.tlpMain.SuspendLayout();
|
||||
this.flowLayoutPanel2.SuspendLayout();
|
||||
this.tabMain.SuspendLayout();
|
||||
|
@ -957,12 +958,14 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.tableLayoutPanel1.Controls.Add(this.chkDisableGameDatabase, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkFdsAutoLoadDisk, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkFdsFastForwardOnLoad, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkDisplayTitleBarInfo, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel6, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkDisplayTitleBarInfo, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel6, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkFdsAutoInsertDisk, 0, 3);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 6;
|
||||
this.tableLayoutPanel1.RowCount = 7;
|
||||
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());
|
||||
|
@ -982,53 +985,38 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.chkDisableGameDatabase.TabIndex = 6;
|
||||
this.chkDisableGameDatabase.Text = "Disable built-in game database";
|
||||
//
|
||||
// chkFdsAutoLoadDisk
|
||||
//
|
||||
this.chkFdsAutoLoadDisk.AutoSize = true;
|
||||
this.chkFdsAutoLoadDisk.Location = new System.Drawing.Point(3, 26);
|
||||
this.chkFdsAutoLoadDisk.Name = "chkFdsAutoLoadDisk";
|
||||
this.chkFdsAutoLoadDisk.Size = new System.Drawing.Size(303, 17);
|
||||
this.chkFdsAutoLoadDisk.TabIndex = 3;
|
||||
this.chkFdsAutoLoadDisk.Text = "Automatically insert disk 1 side A when starting FDS games";
|
||||
this.chkFdsAutoLoadDisk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkFdsFastForwardOnLoad
|
||||
//
|
||||
this.chkFdsFastForwardOnLoad.AutoSize = true;
|
||||
this.chkFdsFastForwardOnLoad.Location = new System.Drawing.Point(3, 49);
|
||||
this.chkFdsFastForwardOnLoad.Name = "chkFdsFastForwardOnLoad";
|
||||
this.chkFdsFastForwardOnLoad.Size = new System.Drawing.Size(342, 17);
|
||||
this.chkFdsFastForwardOnLoad.TabIndex = 4;
|
||||
this.chkFdsFastForwardOnLoad.Text = "Automatically fast forward FDS games when disk or BIOS is loading";
|
||||
this.chkFdsFastForwardOnLoad.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkDisplayTitleBarInfo
|
||||
//
|
||||
this.chkDisplayTitleBarInfo.AutoSize = true;
|
||||
this.chkDisplayTitleBarInfo.Location = new System.Drawing.Point(3, 72);
|
||||
this.chkDisplayTitleBarInfo.Location = new System.Drawing.Point(3, 95);
|
||||
this.chkDisplayTitleBarInfo.Name = "chkDisplayTitleBarInfo";
|
||||
this.chkDisplayTitleBarInfo.Size = new System.Drawing.Size(210, 17);
|
||||
this.chkDisplayTitleBarInfo.TabIndex = 8;
|
||||
this.chkDisplayTitleBarInfo.Text = "Display additional information in title bar";
|
||||
this.chkDisplayTitleBarInfo.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tmrSyncDateTime
|
||||
//
|
||||
this.tmrSyncDateTime.Enabled = true;
|
||||
this.tmrSyncDateTime.Tick += new System.EventHandler(this.tmrSyncDateTime_Tick);
|
||||
//
|
||||
// flowLayoutPanel6
|
||||
//
|
||||
this.flowLayoutPanel6.Controls.Add(this.lblRewind);
|
||||
this.flowLayoutPanel6.Controls.Add(this.nudRewindBufferSize);
|
||||
this.flowLayoutPanel6.Controls.Add(this.lblRewindMinutes);
|
||||
this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 92);
|
||||
this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 115);
|
||||
this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel6.Name = "flowLayoutPanel6";
|
||||
this.flowLayoutPanel6.Size = new System.Drawing.Size(473, 23);
|
||||
this.flowLayoutPanel6.TabIndex = 9;
|
||||
//
|
||||
// lblRewind
|
||||
//
|
||||
this.lblRewind.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblRewind.AutoSize = true;
|
||||
this.lblRewind.Location = new System.Drawing.Point(3, 6);
|
||||
this.lblRewind.Name = "lblRewind";
|
||||
this.lblRewind.Size = new System.Drawing.Size(142, 13);
|
||||
this.lblRewind.TabIndex = 3;
|
||||
this.lblRewind.Text = "Keep rewind data for the last";
|
||||
//
|
||||
// nudRewindBufferSize
|
||||
//
|
||||
this.nudRewindBufferSize.Location = new System.Drawing.Point(151, 3);
|
||||
|
@ -1052,19 +1040,44 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.lblRewindMinutes.AutoSize = true;
|
||||
this.lblRewindMinutes.Location = new System.Drawing.Point(199, 6);
|
||||
this.lblRewindMinutes.Name = "lblRewindMinutes";
|
||||
this.lblRewindMinutes.Size = new System.Drawing.Size(173, 13);
|
||||
this.lblRewindMinutes.Size = new System.Drawing.Size(175, 13);
|
||||
this.lblRewindMinutes.TabIndex = 2;
|
||||
this.lblRewindMinutes.Text = "minutes (Memory Usage ≈1MB/min)";
|
||||
//
|
||||
// lblRewind
|
||||
// tmrSyncDateTime
|
||||
//
|
||||
this.lblRewind.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblRewind.AutoSize = true;
|
||||
this.lblRewind.Location = new System.Drawing.Point(3, 6);
|
||||
this.lblRewind.Name = "lblRewind";
|
||||
this.lblRewind.Size = new System.Drawing.Size(142, 13);
|
||||
this.lblRewind.TabIndex = 3;
|
||||
this.lblRewind.Text = "Keep rewind data for the last";
|
||||
this.tmrSyncDateTime.Enabled = true;
|
||||
this.tmrSyncDateTime.Tick += new System.EventHandler(this.tmrSyncDateTime_Tick);
|
||||
//
|
||||
// chkFdsAutoLoadDisk
|
||||
//
|
||||
this.chkFdsAutoLoadDisk.AutoSize = true;
|
||||
this.chkFdsAutoLoadDisk.Location = new System.Drawing.Point(3, 26);
|
||||
this.chkFdsAutoLoadDisk.Name = "chkFdsAutoLoadDisk";
|
||||
this.chkFdsAutoLoadDisk.Size = new System.Drawing.Size(303, 17);
|
||||
this.chkFdsAutoLoadDisk.TabIndex = 3;
|
||||
this.chkFdsAutoLoadDisk.Text = "Automatically insert disk 1 side A when starting FDS games";
|
||||
this.chkFdsAutoLoadDisk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkFdsFastForwardOnLoad
|
||||
//
|
||||
this.chkFdsFastForwardOnLoad.AutoSize = true;
|
||||
this.chkFdsFastForwardOnLoad.Location = new System.Drawing.Point(3, 49);
|
||||
this.chkFdsFastForwardOnLoad.Name = "chkFdsFastForwardOnLoad";
|
||||
this.chkFdsFastForwardOnLoad.Size = new System.Drawing.Size(342, 17);
|
||||
this.chkFdsFastForwardOnLoad.TabIndex = 4;
|
||||
this.chkFdsFastForwardOnLoad.Text = "Automatically fast forward FDS games when disk or BIOS is loading";
|
||||
this.chkFdsFastForwardOnLoad.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkFdsAutoInsertDisk
|
||||
//
|
||||
this.chkFdsAutoInsertDisk.AutoSize = true;
|
||||
this.chkFdsAutoInsertDisk.Location = new System.Drawing.Point(3, 72);
|
||||
this.chkFdsAutoInsertDisk.Name = "chkFdsAutoInsertDisk";
|
||||
this.chkFdsAutoInsertDisk.Size = new System.Drawing.Size(221, 17);
|
||||
this.chkFdsAutoInsertDisk.TabIndex = 10;
|
||||
this.chkFdsAutoInsertDisk.Text = "Automatically switch disks for FDS games";
|
||||
this.chkFdsAutoInsertDisk.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frmPreferences
|
||||
//
|
||||
|
@ -1169,10 +1182,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
private System.Windows.Forms.CheckBox chkNsfeFormat;
|
||||
private System.Windows.Forms.CheckBox chkNsfFormat;
|
||||
private System.Windows.Forms.TabPage tpgAdvanced;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.TabPage tpgNsf;
|
||||
private System.Windows.Forms.CheckBox chkFdsFastForwardOnLoad;
|
||||
private System.Windows.Forms.CheckBox chkFdsAutoLoadDisk;
|
||||
private ctrlRiskyOption chkDisableGameDatabase;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5;
|
||||
|
@ -1206,5 +1216,9 @@ namespace Mesen.GUI.Forms.Config
|
|||
private System.Windows.Forms.Label lblRewind;
|
||||
private System.Windows.Forms.NumericUpDown nudRewindBufferSize;
|
||||
private System.Windows.Forms.Label lblRewindMinutes;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.CheckBox chkFdsAutoLoadDisk;
|
||||
private System.Windows.Forms.CheckBox chkFdsFastForwardOnLoad;
|
||||
private System.Windows.Forms.CheckBox chkFdsAutoInsertDisk;
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
|
||||
AddBinding("FdsAutoLoadDisk", chkFdsAutoLoadDisk);
|
||||
AddBinding("FdsFastForwardOnLoad", chkFdsFastForwardOnLoad);
|
||||
AddBinding("FdsAutoInsertDisk", chkFdsAutoInsertDisk);
|
||||
|
||||
AddBinding("PauseWhenInBackground", chkPauseWhenInBackground);
|
||||
AddBinding("AllowBackgroundInput", chkAllowBackgroundInput);
|
||||
|
|
|
@ -1478,6 +1478,10 @@ namespace Mesen.GUI.Forms
|
|||
mnuSelectDisk.Visible = true;
|
||||
mnuEjectDisk.Visible = true;
|
||||
mnuSwitchDiskSide.Visible = sideCount > 1;
|
||||
|
||||
mnuSelectDisk.Enabled = !ConfigManager.Config.PreferenceInfo.FdsAutoInsertDisk;
|
||||
mnuEjectDisk.Enabled = !ConfigManager.Config.PreferenceInfo.FdsAutoInsertDisk;
|
||||
mnuSwitchDiskSide.Enabled = !ConfigManager.Config.PreferenceInfo.FdsAutoInsertDisk;
|
||||
} else {
|
||||
sepFdsDisk.Visible = false;
|
||||
mnuSelectDisk.Visible = false;
|
||||
|
|
|
@ -986,6 +986,8 @@ namespace Mesen.GUI
|
|||
UseNes101Hvc101Behavior = 0x100000000,
|
||||
ShowFrameCounter = 0x200000000,
|
||||
|
||||
FdsAutoInsertDisk = 0x400000000,
|
||||
|
||||
Turbo = 0x2000000000,
|
||||
InBackground = 0x4000000000,
|
||||
NsfPlayerEnabled = 0x8000000000,
|
||||
|
|
Loading…
Add table
Reference in a new issue