mirror of
https://github.com/SourMesen/Mesen.git
synced 2025-04-02 10:52:48 -04:00
Input: Added option to emulate NES-101/HVC-101 behavior
This commit is contained in:
parent
23fd484d06
commit
8ec8e471d5
14 changed files with 127 additions and 72 deletions
|
@ -140,7 +140,7 @@ void ControlManager::UpdateControlDevices()
|
|||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
shared_ptr<BaseControlDevice> device;
|
||||
if(fourScore || EmulationSettings::GetConsoleType() == ConsoleType::Famicom) {
|
||||
if(fourScore || (EmulationSettings::GetConsoleType() == ConsoleType::Famicom && !EmulationSettings::CheckFlag(EmulationFlags::UseNes101Hvc101Behavior))) {
|
||||
//Need to set standard controller in all slots if four score (to allow emulation to work correctly)
|
||||
device.reset(new StandardController(i));
|
||||
} else {
|
||||
|
@ -155,7 +155,9 @@ void ControlManager::UpdateControlDevices()
|
|||
ControlManager::RegisterControlDevice(device, i);
|
||||
|
||||
if(fourScore) {
|
||||
std::dynamic_pointer_cast<StandardController>(device)->AddAdditionalController(shared_ptr<StandardController>(new StandardController(i + 2)));
|
||||
if(EmulationSettings::GetControllerType(i + 2) == ControllerType::StandardController) {
|
||||
std::dynamic_pointer_cast<StandardController>(device)->AddAdditionalController(shared_ptr<StandardController>(new StandardController(i + 2)));
|
||||
}
|
||||
} else if(i == 1 || expansionDevice == ExpansionPortDevice::ArkanoidController) {
|
||||
switch(expansionDevice) {
|
||||
case ExpansionPortDevice::Zapper: std::dynamic_pointer_cast<StandardController>(device)->AddAdditionalController(shared_ptr<Zapper>(new Zapper(2))); break;
|
||||
|
@ -172,19 +174,38 @@ void ControlManager::UpdateControlDevices()
|
|||
}
|
||||
}
|
||||
|
||||
uint8_t ControlManager::GetOpenBusMask(uint8_t port)
|
||||
{
|
||||
switch(EmulationSettings::GetConsoleType()) {
|
||||
default:
|
||||
case ConsoleType::Nes:
|
||||
if(EmulationSettings::CheckFlag(EmulationFlags::UseNes101Hvc101Behavior)) {
|
||||
return port == 0 ? 0xE4 : 0xE0;
|
||||
} else {
|
||||
return 0xE0;
|
||||
}
|
||||
|
||||
case ConsoleType::Famicom:
|
||||
if(EmulationSettings::CheckFlag(EmulationFlags::UseNes101Hvc101Behavior)) {
|
||||
return port == 0 ? 0xF8 : 0xE0;
|
||||
} else {
|
||||
return port == 0 ? 0xF8 : 0xE0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t ControlManager::GetPortValue(uint8_t port)
|
||||
{
|
||||
if(_refreshState) {
|
||||
//Reload until strobe bit is set to off
|
||||
RefreshAllPorts();
|
||||
}
|
||||
|
||||
shared_ptr<BaseControlDevice> device = GetControlDevice(port);
|
||||
|
||||
//"In the NES and Famicom, the top three (or five) bits are not driven, and so retain the bits of the previous byte on the bus.
|
||||
//Usually this is the most significant byte of the address of the controller port - 0x40.
|
||||
//Paperboy relies on this behavior and requires that reads from the controller ports return exactly $40 or $41 as appropriate."
|
||||
uint8_t value = MemoryManager::GetOpenBus(0xE0);
|
||||
uint8_t value = MemoryManager::GetOpenBus(GetOpenBusMask(port));
|
||||
if(device) {
|
||||
value |= device->GetPortOutput();
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ class ControlManager : public Snapshotable, public IMemoryHandler
|
|||
bool _isLagging = false;
|
||||
bool _refreshState = false;
|
||||
|
||||
uint8_t GetOpenBusMask(uint8_t port);
|
||||
|
||||
template<typename T> shared_ptr<T> GetExpansionDevice();
|
||||
|
||||
virtual shared_ptr<BaseControlDevice> GetZapper(uint8_t port);
|
||||
|
|
|
@ -44,6 +44,8 @@ enum EmulationFlags : int64_t
|
|||
DisableOamAddrBug = 0x20000000,
|
||||
DisablePpuReset = 0x40000000,
|
||||
|
||||
UseNes101Hvc101Behavior = 0x80000000,
|
||||
|
||||
Turbo = 0x2000000000,
|
||||
InBackground = 0x4000000000,
|
||||
NsfPlayerEnabled = 0x8000000000,
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace Mesen.GUI.Config
|
|||
public bool DisablePaletteRead = false;
|
||||
public bool DisableOamAddrBug = false;
|
||||
public bool DisablePpuReset = false;
|
||||
public bool UseNes101Hvc101Behavior = false;
|
||||
|
||||
public bool UseAlternativeMmc3Irq = false;
|
||||
|
||||
|
@ -55,6 +56,7 @@ namespace Mesen.GUI.Config
|
|||
InteropEmu.SetFlag(EmulationFlags.DisablePaletteRead, emulationInfo.DisablePaletteRead);
|
||||
InteropEmu.SetFlag(EmulationFlags.DisableOamAddrBug, emulationInfo.DisableOamAddrBug);
|
||||
InteropEmu.SetFlag(EmulationFlags.DisablePpuReset, emulationInfo.DisablePpuReset);
|
||||
InteropEmu.SetFlag(EmulationFlags.UseNes101Hvc101Behavior, emulationInfo.UseNes101Hvc101Behavior);
|
||||
|
||||
InteropEmu.SetOverclockRate(emulationInfo.OverclockRate, emulationInfo.OverclockAdjustApu);
|
||||
InteropEmu.SetPpuNmiConfig(emulationInfo.PpuExtraScanlinesBeforeNmi, emulationInfo.PpuExtraScanlinesAfterNmi);
|
||||
|
|
|
@ -292,6 +292,7 @@
|
|||
<Control ID="chkDisableOamAddrBug">Disable PPU OAMADDR bug emulation</Control>
|
||||
<Control ID="chkDisablePaletteRead">Disable PPU palette reads</Control>
|
||||
<Control ID="chkDisablePpuReset">Do not reset PPU when resetting console (Famicom behavior)</Control>
|
||||
<Control ID="chkUseNes101Hvc101Behavior">Use NES/HVC-101 (Top-loader / AV Famicom) behavior</Control>
|
||||
|
||||
<Control ID="tpgOverclocking">Overclocking</Control>
|
||||
<Control ID="grpOverclocking">Overclocking de CPU</Control>
|
||||
|
|
|
@ -292,6 +292,7 @@
|
|||
<Control ID="chkDisableOamAddrBug">Désactiver l'émulation du bug de OAMADDR du PPU</Control>
|
||||
<Control ID="chkDisablePaletteRead">Empêcher la lecture de la palette du PPU</Control>
|
||||
<Control ID="chkDisablePpuReset">Ne pas faire un reset du PPU lors du reset de la console (Famicom)</Control>
|
||||
<Control ID="chkUseNes101Hvc101Behavior">Simuler le comportement du NES/HVC-101 (Top Loader / AV Famicom)</Control>
|
||||
|
||||
<Control ID="lblRamPowerOnState">État initial de la mémoire au démarrage : </Control>
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@
|
|||
<Control ID="chkDisableOamAddrBug">PPUのOAMADDRバグを無効にする</Control>
|
||||
<Control ID="chkDisablePaletteRead">PPUのパレットラムを読み込み不可能にする</Control>
|
||||
<Control ID="chkDisablePpuReset">ゲーム機をリセットする時に、PPUをリセットしない (ファミコン同様)</Control>
|
||||
<Control ID="chkUseNes101Hvc101Behavior">AV仕様ファミコン(HVC-101とNES-101)の仕様を使う</Control>
|
||||
|
||||
<Control ID="lblRamPowerOnState">起動時のメモリの状態 : </Control>
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@
|
|||
<Control ID="chkDisableOamAddrBug">Disable PPU OAMADDR bug emulation</Control>
|
||||
<Control ID="chkDisablePaletteRead">Disable PPU palette reads</Control>
|
||||
<Control ID="chkDisablePpuReset">Do not reset PPU when resetting console (Famicom behavior)</Control>
|
||||
<Control ID="chkUseNes101Hvc101Behavior">Use NES/HVC-101 (Top-loader / AV Famicom) behavior</Control>
|
||||
|
||||
<Control ID="tpgOverclocking">Overclocking</Control>
|
||||
<Control ID="grpOverclocking">Overclocking de CPU</Control>
|
||||
|
|
|
@ -293,7 +293,8 @@
|
|||
<Control ID="chkDisableOamAddrBug">Disable PPU OAMADDR bug emulation</Control>
|
||||
<Control ID="chkDisablePaletteRead">Disable PPU palette reads</Control>
|
||||
<Control ID="chkDisablePpuReset">Do not reset PPU when resetting console (Famicom behavior)</Control>
|
||||
|
||||
<Control ID="chkUseNes101Hvc101Behavior">Use NES/HVC-101 (Top-loader / AV Famicom) behavior</Control>
|
||||
|
||||
<Control ID="tpgOverclocking">Разгон</Control>
|
||||
<Control ID="grpOverclocking">Разгон CPU</Control>
|
||||
<Control ID="lblOverclockWarning">ВНИМАНИЕ: Разгон может вызвать ошибки в некоторых играх!</Control>
|
||||
|
|
|
@ -293,6 +293,7 @@
|
|||
<Control ID="chkDisableOamAddrBug">Disable PPU OAMADDR bug emulation</Control>
|
||||
<Control ID="chkDisablePaletteRead">Disable PPU palette reads</Control>
|
||||
<Control ID="chkDisablePpuReset">Do not reset PPU when resetting console (Famicom behavior)</Control>
|
||||
<Control ID="chkUseNes101Hvc101Behavior">Use NES/HVC-101 (Top-loader / AV Famicom) behavior</Control>
|
||||
|
||||
<Control ID="tpgOverclocking">Розгін</Control>
|
||||
<Control ID="grpOverclocking">Розгін CPU</Control>
|
||||
|
|
136
GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs
generated
136
GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs
generated
|
@ -44,10 +44,15 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.tpgAdvanced = new System.Windows.Forms.TabPage();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.chkUseAlternativeMmc3Irq = new System.Windows.Forms.CheckBox();
|
||||
this.chkAllowInvalidInput = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkRemoveSpriteLimit = new System.Windows.Forms.CheckBox();
|
||||
this.flowLayoutPanel8 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.lblRamPowerOnState = new System.Windows.Forms.Label();
|
||||
this.cboRamPowerOnState = new System.Windows.Forms.ComboBox();
|
||||
this.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.tpgOverclocking = new System.Windows.Forms.TabPage();
|
||||
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
|
@ -77,11 +82,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.chkShowLagCounter = new System.Windows.Forms.CheckBox();
|
||||
this.btnResetLagCounter = new System.Windows.Forms.Button();
|
||||
this.tmrUpdateClockRate = new System.Windows.Forms.Timer(this.components);
|
||||
this.chkAllowInvalidInput = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkDisablePpuReset = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkDisablePaletteRead = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkDisablePpu2004Reads = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkDisableOamAddrBug = new Mesen.GUI.Controls.ctrlRiskyOption();
|
||||
this.chkUseNes101Hvc101Behavior = new System.Windows.Forms.CheckBox();
|
||||
this.tabMain.SuspendLayout();
|
||||
this.tpgGeneral.SuspendLayout();
|
||||
this.tableLayoutPanel4.SuspendLayout();
|
||||
|
@ -258,25 +259,27 @@ namespace Mesen.GUI.Forms.Config
|
|||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkRemoveSpriteLimit, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel8, 0, 8);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkDisablePaletteRead, 0, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkDisableOamAddrBug, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpuReset, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkDisablePpu2004Reads, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkUseNes101Hvc101Behavior, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkAllowInvalidInput, 0, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.chkUseAlternativeMmc3Irq, 0, 2);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 9;
|
||||
this.tableLayoutPanel1.RowCount = 10;
|
||||
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());
|
||||
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(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(519, 267);
|
||||
|
@ -285,13 +288,24 @@ namespace Mesen.GUI.Forms.Config
|
|||
// chkUseAlternativeMmc3Irq
|
||||
//
|
||||
this.chkUseAlternativeMmc3Irq.AutoSize = true;
|
||||
this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(3, 26);
|
||||
this.chkUseAlternativeMmc3Irq.Location = new System.Drawing.Point(3, 49);
|
||||
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;
|
||||
//
|
||||
// chkAllowInvalidInput
|
||||
//
|
||||
this.chkAllowInvalidInput.AutoSize = true;
|
||||
this.chkAllowInvalidInput.Checked = false;
|
||||
this.chkAllowInvalidInput.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.chkAllowInvalidInput.Location = new System.Drawing.Point(0, 161);
|
||||
this.chkAllowInvalidInput.Name = "chkAllowInvalidInput";
|
||||
this.chkAllowInvalidInput.Size = new System.Drawing.Size(519, 23);
|
||||
this.chkAllowInvalidInput.TabIndex = 1;
|
||||
this.chkAllowInvalidInput.Text = "Allow invalid input (e.g Down + Up or Left + Right at the same time)";
|
||||
//
|
||||
// chkRemoveSpriteLimit
|
||||
//
|
||||
this.chkRemoveSpriteLimit.AutoSize = true;
|
||||
|
@ -307,7 +321,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.flowLayoutPanel8.Controls.Add(this.lblRamPowerOnState);
|
||||
this.flowLayoutPanel8.Controls.Add(this.cboRamPowerOnState);
|
||||
this.flowLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel8.Location = new System.Drawing.Point(0, 158);
|
||||
this.flowLayoutPanel8.Location = new System.Drawing.Point(0, 184);
|
||||
this.flowLayoutPanel8.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel8.Name = "flowLayoutPanel8";
|
||||
this.flowLayoutPanel8.Size = new System.Drawing.Size(519, 27);
|
||||
|
@ -332,6 +346,46 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.cboRamPowerOnState.Size = new System.Drawing.Size(176, 21);
|
||||
this.cboRamPowerOnState.TabIndex = 1;
|
||||
//
|
||||
// chkDisablePaletteRead
|
||||
//
|
||||
this.chkDisablePaletteRead.AutoSize = true;
|
||||
this.chkDisablePaletteRead.Checked = false;
|
||||
this.chkDisablePaletteRead.Location = new System.Drawing.Point(0, 138);
|
||||
this.chkDisablePaletteRead.Name = "chkDisablePaletteRead";
|
||||
this.chkDisablePaletteRead.Size = new System.Drawing.Size(248, 23);
|
||||
this.chkDisablePaletteRead.TabIndex = 6;
|
||||
this.chkDisablePaletteRead.Text = "Disable PPU palette reads";
|
||||
//
|
||||
// chkDisableOamAddrBug
|
||||
//
|
||||
this.chkDisableOamAddrBug.AutoSize = true;
|
||||
this.chkDisableOamAddrBug.Checked = false;
|
||||
this.chkDisableOamAddrBug.Location = new System.Drawing.Point(0, 115);
|
||||
this.chkDisableOamAddrBug.Name = "chkDisableOamAddrBug";
|
||||
this.chkDisableOamAddrBug.Size = new System.Drawing.Size(311, 23);
|
||||
this.chkDisableOamAddrBug.TabIndex = 5;
|
||||
this.chkDisableOamAddrBug.Text = "Disable PPU OAMADDR bug emulation";
|
||||
//
|
||||
// chkDisablePpuReset
|
||||
//
|
||||
this.chkDisablePpuReset.AutoSize = true;
|
||||
this.chkDisablePpuReset.Checked = false;
|
||||
this.chkDisablePpuReset.Location = new System.Drawing.Point(0, 69);
|
||||
this.chkDisablePpuReset.Name = "chkDisablePpuReset";
|
||||
this.chkDisablePpuReset.Size = new System.Drawing.Size(414, 23);
|
||||
this.chkDisablePpuReset.TabIndex = 7;
|
||||
this.chkDisablePpuReset.Text = "Do not reset PPU when resetting console (Famicom behavior)";
|
||||
//
|
||||
// chkDisablePpu2004Reads
|
||||
//
|
||||
this.chkDisablePpu2004Reads.AutoSize = true;
|
||||
this.chkDisablePpu2004Reads.Checked = false;
|
||||
this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(0, 92);
|
||||
this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads";
|
||||
this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(341, 23);
|
||||
this.chkDisablePpu2004Reads.TabIndex = 4;
|
||||
this.chkDisablePpu2004Reads.Text = "Disable PPU $2004 reads (Famicom behavior)";
|
||||
//
|
||||
// tpgOverclocking
|
||||
//
|
||||
this.tpgOverclocking.Controls.Add(this.tableLayoutPanel3);
|
||||
|
@ -693,56 +747,15 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.tmrUpdateClockRate.Enabled = true;
|
||||
this.tmrUpdateClockRate.Tick += new System.EventHandler(this.tmrUpdateClockRate_Tick);
|
||||
//
|
||||
// chkAllowInvalidInput
|
||||
// chkUseNes101Hvc101Behavior
|
||||
//
|
||||
this.chkAllowInvalidInput.AutoSize = true;
|
||||
this.chkAllowInvalidInput.Checked = false;
|
||||
this.chkAllowInvalidInput.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.chkAllowInvalidInput.Location = new System.Drawing.Point(0, 46);
|
||||
this.chkAllowInvalidInput.Name = "chkAllowInvalidInput";
|
||||
this.chkAllowInvalidInput.Size = new System.Drawing.Size(519, 23);
|
||||
this.chkAllowInvalidInput.TabIndex = 1;
|
||||
this.chkAllowInvalidInput.Text = "Allow invalid input (e.g Down + Up or Left + Right at the same time)";
|
||||
//
|
||||
// chkDisablePpuReset
|
||||
//
|
||||
this.chkDisablePpuReset.AutoSize = true;
|
||||
this.chkDisablePpuReset.Checked = false;
|
||||
this.chkDisablePpuReset.Location = new System.Drawing.Point(0, 69);
|
||||
this.chkDisablePpuReset.Name = "chkDisablePpuReset";
|
||||
this.chkDisablePpuReset.Size = new System.Drawing.Size(414, 23);
|
||||
this.chkDisablePpuReset.TabIndex = 7;
|
||||
this.chkDisablePpuReset.Text = "Do not reset PPU when resetting console (Famicom behavior)";
|
||||
//
|
||||
// chkDisablePaletteRead
|
||||
//
|
||||
this.chkDisablePaletteRead.AutoSize = true;
|
||||
this.chkDisablePaletteRead.Checked = false;
|
||||
this.chkDisablePaletteRead.Location = new System.Drawing.Point(0, 138);
|
||||
this.chkDisablePaletteRead.Name = "chkDisablePaletteRead";
|
||||
this.chkDisablePaletteRead.Size = new System.Drawing.Size(248, 20);
|
||||
this.chkDisablePaletteRead.TabIndex = 6;
|
||||
this.chkDisablePaletteRead.Text = "Disable PPU palette reads";
|
||||
//
|
||||
// chkDisablePpu2004Reads
|
||||
//
|
||||
this.chkDisablePpu2004Reads.AutoSize = true;
|
||||
this.chkDisablePpu2004Reads.Checked = false;
|
||||
this.chkDisablePpu2004Reads.Location = new System.Drawing.Point(0, 92);
|
||||
this.chkDisablePpu2004Reads.Name = "chkDisablePpu2004Reads";
|
||||
this.chkDisablePpu2004Reads.Size = new System.Drawing.Size(341, 23);
|
||||
this.chkDisablePpu2004Reads.TabIndex = 4;
|
||||
this.chkDisablePpu2004Reads.Text = "Disable PPU $2004 reads (Famicom behavior)";
|
||||
//
|
||||
// chkDisableOamAddrBug
|
||||
//
|
||||
this.chkDisableOamAddrBug.AutoSize = true;
|
||||
this.chkDisableOamAddrBug.Checked = false;
|
||||
this.chkDisableOamAddrBug.Location = new System.Drawing.Point(0, 115);
|
||||
this.chkDisableOamAddrBug.Name = "chkDisableOamAddrBug";
|
||||
this.chkDisableOamAddrBug.Size = new System.Drawing.Size(311, 23);
|
||||
this.chkDisableOamAddrBug.TabIndex = 5;
|
||||
this.chkDisableOamAddrBug.Text = "Disable PPU OAMADDR bug emulation";
|
||||
this.chkUseNes101Hvc101Behavior.AutoSize = true;
|
||||
this.chkUseNes101Hvc101Behavior.Location = new System.Drawing.Point(3, 26);
|
||||
this.chkUseNes101Hvc101Behavior.Name = "chkUseNes101Hvc101Behavior";
|
||||
this.chkUseNes101Hvc101Behavior.Size = new System.Drawing.Size(318, 17);
|
||||
this.chkUseNes101Hvc101Behavior.TabIndex = 8;
|
||||
this.chkUseNes101Hvc101Behavior.Text = "Use NES/HVC-101 (Top-loader / AV Famicom) behavior";
|
||||
this.chkUseNes101Hvc101Behavior.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frmEmulationConfig
|
||||
//
|
||||
|
@ -852,5 +865,6 @@ namespace Mesen.GUI.Forms.Config
|
|||
private ctrlRiskyOption chkDisableOamAddrBug;
|
||||
private ctrlRiskyOption chkDisablePaletteRead;
|
||||
private ctrlRiskyOption chkDisablePpuReset;
|
||||
private System.Windows.Forms.CheckBox chkUseNes101Hvc101Behavior;
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
AddBinding("DisablePaletteRead", chkDisablePaletteRead);
|
||||
AddBinding("DisableOamAddrBug", chkDisableOamAddrBug);
|
||||
AddBinding("DisablePpuReset", chkDisablePpuReset);
|
||||
AddBinding("UseNes101Hvc101Behavior", chkUseNes101Hvc101Behavior);
|
||||
|
||||
AddBinding("OverclockRate", nudOverclockRate);
|
||||
AddBinding("OverclockAdjustApu", chkOverclockAdjustApu);
|
||||
|
|
|
@ -56,22 +56,27 @@ namespace Mesen.GUI.Forms.Config
|
|||
bool p3and4visible = (isNes && chkFourScore.Checked) || (!isNes && ((InputInfo)Entity).ExpansionPortDevice == InteropEmu.ExpansionPortDevice.FourPlayerAdapter);
|
||||
|
||||
List<InteropEmu.ControllerType> controllerTypes = new List<InteropEmu.ControllerType>(new InteropEmu.ControllerType[] { InteropEmu.ControllerType.StandardController });
|
||||
SetAvailableControllerTypes(cboPlayer3, controllerTypes.ToArray());
|
||||
SetAvailableControllerTypes(cboPlayer4, controllerTypes.ToArray());
|
||||
SetAvailableControllerTypes(cboPlayer3, controllerTypes.ToArray(), false);
|
||||
SetAvailableControllerTypes(cboPlayer4, controllerTypes.ToArray(), false);
|
||||
|
||||
if(isNes && !chkFourScore.Checked) {
|
||||
controllerTypes.Add(InteropEmu.ControllerType.Zapper);
|
||||
controllerTypes.Add(InteropEmu.ControllerType.ArkanoidController);
|
||||
}
|
||||
SetAvailableControllerTypes(cboPlayer1, controllerTypes.ToArray());
|
||||
SetAvailableControllerTypes(cboPlayer2, controllerTypes.ToArray());
|
||||
|
||||
bool isOriginalFamicom = !isNes && !ConfigManager.Config.EmulationInfo.UseNes101Hvc101Behavior;
|
||||
|
||||
SetAvailableControllerTypes(cboPlayer1, controllerTypes.ToArray(), isOriginalFamicom);
|
||||
SetAvailableControllerTypes(cboPlayer2, controllerTypes.ToArray(), isOriginalFamicom);
|
||||
}
|
||||
|
||||
private void SetAvailableControllerTypes(ComboBox comboBox, InteropEmu.ControllerType[] controllerTypes)
|
||||
private void SetAvailableControllerTypes(ComboBox comboBox, InteropEmu.ControllerType[] controllerTypes, bool forceController)
|
||||
{
|
||||
object currentSelection = comboBox.SelectedItem;
|
||||
comboBox.Items.Clear();
|
||||
comboBox.Items.Add(ResourceHelper.GetEnumText(InteropEmu.ControllerType.None));
|
||||
if(!forceController) {
|
||||
comboBox.Items.Add(ResourceHelper.GetEnumText(InteropEmu.ControllerType.None));
|
||||
}
|
||||
foreach(InteropEmu.ControllerType type in controllerTypes) {
|
||||
comboBox.Items.Add(ResourceHelper.GetEnumText(type));
|
||||
}
|
||||
|
|
|
@ -845,6 +845,8 @@ namespace Mesen.GUI
|
|||
DisableOamAddrBug = 0x20000000,
|
||||
DisablePpuReset = 0x40000000,
|
||||
|
||||
UseNes101Hvc101Behavior = 0x80000000,
|
||||
|
||||
InBackground = 0x4000000000,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue