Remove most of Octoshock's managed source and callsites

This commit is contained in:
YoshiRulz 2025-01-10 23:20:51 +10:00
parent f97f29b234
commit 160a2de04d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
22 changed files with 6 additions and 3636 deletions

View File

@ -15,7 +15,6 @@ using BizHawk.Common.PathExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Nintendo.N3DS;
using BizHawk.Emulation.Cores.Consoles.Nintendo.NDS;
using BizHawk.Emulation.Cores.Sony.PSX;
namespace BizHawk.Client.Common
{
@ -222,16 +221,6 @@ namespace BizHawk.Client.Common
padding.Bottom += GameExtraPadding.Bottom;
}
// an experimental feature
if (source && GlobalEmulator is Octoshock psx)
{
var corePadding = psx.VideoProvider_Padding;
padding.Left += corePadding.Width / 2;
padding.Right += corePadding.Width - corePadding.Width / 2;
padding.Top += corePadding.Height / 2;
padding.Bottom += corePadding.Height - corePadding.Height / 2;
}
// apply user's crop selections as a negative padding (believe it or not, this largely works)
// is there an issue with the aspect ratio? I don't know--but if there is, there would be with the padding too
padding.Left -= GlobalConfig.DispCropLeft;

View File

@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using BizHawk.Common;
@ -11,7 +10,6 @@ using BizHawk.Emulation.Cores;
using BizHawk.Emulation.Cores.Libretro;
using BizHawk.Emulation.Cores.Nintendo.Sameboy;
using BizHawk.Emulation.Cores.Nintendo.SNES;
using BizHawk.Emulation.Cores.Sony.PSX;
using BizHawk.Emulation.Cores.Arcades.MAME;
using BizHawk.Emulation.DiscSystem;
@ -618,27 +616,6 @@ namespace BizHawk.Client.Common
out game);
}
private void LoadPSF(string path, CoreComm nextComm, HawkFile file, out IEmulator nextEmulator, out RomGame rom, out GameInfo game)
{
// TODO: Why does the PSF loader need CbDeflater provided? Surely this is a matter internal to it.
static byte[] CbDeflater(Stream instream, int size)
{
return new GZipStream(instream, CompressionMode.Decompress).ReadAllBytes();
}
var psf = new PSF();
psf.Load(path, CbDeflater);
nextEmulator = new Octoshock(
nextComm,
psf,
GetCoreSettings<Octoshock, Octoshock.Settings>(),
GetCoreSyncSettings<Octoshock, Octoshock.SyncSettings>()
);
// total garbage, this
rom = new RomGame(file);
game = rom.GameInfo;
}
// HACK due to MAME wanting CHDs as hard drives / handling it on its own (bad design, I know!)
// only matters for XML, as CHDs are never the "main" rom for MAME
// (in general, this is kind of bad as CHD hard drives might be useful for other future cores?)
@ -858,10 +835,12 @@ namespace BizHawk.Client.Common
if (!LoadXML(path, nextComm, file, forcedCoreName, out nextEmulator, out rom, out game))
return false;
break;
#if false // was only wired up for Octoshock
case ".psf":
case ".minipsf":
LoadPSF(path, nextComm, file, out nextEmulator, out rom, out game);
break;
#endif
case ".zip" when forcedCoreName is null:
case ".7z" when forcedCoreName is null:
LoadMAME(path: path, nextComm, file, ext: ext, out nextEmulator, out rom, out game, out cancel);

View File

@ -44,8 +44,6 @@ namespace BizHawk.Client.Common
[ CoreNames.QuickNes, CoreNames.NesHawk, CoreNames.SubNesHawk ]),
([ VSystemID.Raw.PCE, VSystemID.Raw.PCECD, VSystemID.Raw.SGX, VSystemID.Raw.SGXCD ],
[ CoreNames.TurboNyma, CoreNames.HyperNyma, CoreNames.PceHawk ]),
([ VSystemID.Raw.PSX ],
[ CoreNames.Nymashock, CoreNames.Octoshock ]),
([ VSystemID.Raw.SMS, VSystemID.Raw.GG, VSystemID.Raw.SG ],
[ CoreNames.Gpgx, CoreNames.SMSHawk ]),
([ VSystemID.Raw.SNES ],

View File

@ -245,11 +245,6 @@ namespace BizHawk.Client.EmuHawk
this.toolStripSeparator28 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
this.GBGPUViewerMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.GBPrinterViewerMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.PSXSubMenu = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.PSXControllerSettingsMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.PSXOptionsMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.PSXDiscControlsMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.PSXHashDiscsToolStripMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.SNESSubMenu = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.SNESControllerConfigurationMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.toolStripSeparator18 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
@ -393,7 +388,6 @@ namespace BizHawk.Client.EmuHawk
this.TI83SubMenu,
this.A7800SubMenu,
this.GBSubMenu,
this.PSXSubMenu,
this.SNESSubMenu,
this.ColecoSubMenu,
this.N64SubMenu,
@ -1625,36 +1619,6 @@ namespace BizHawk.Client.EmuHawk
this.GBPrinterViewerMenuItem.Text = "&Printer Viewer";
this.GBPrinterViewerMenuItem.Click += new System.EventHandler(this.GbPrinterViewerMenuItem_Click);
//
// PSXSubMenu
//
this.PSXSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.PSXControllerSettingsMenuItem,
this.PSXOptionsMenuItem,
this.PSXDiscControlsMenuItem,
this.PSXHashDiscsToolStripMenuItem});
this.PSXSubMenu.Text = "PSX";
this.PSXSubMenu.DropDownOpened += new System.EventHandler(this.PsxSubMenu_DropDownOpened);
//
// PSXControllerSettingsMenuItem
//
this.PSXControllerSettingsMenuItem.Text = "Controller / Memcard Settings";
this.PSXControllerSettingsMenuItem.Click += new System.EventHandler(this.PsxControllerSettingsMenuItem_Click);
//
// PSXOptionsMenuItem
//
this.PSXOptionsMenuItem.Text = "&Options";
this.PSXOptionsMenuItem.Click += new System.EventHandler(this.PsxOptionsMenuItem_Click);
//
// PSXDiscControlsMenuItem
//
this.PSXDiscControlsMenuItem.Text = "&Disc Controls";
this.PSXDiscControlsMenuItem.Click += new System.EventHandler(this.PsxDiscControlsMenuItem_Click);
//
// PSXHashDiscsToolStripMenuItem
//
this.PSXHashDiscsToolStripMenuItem.Text = "&Hash Discs";
this.PSXHashDiscsToolStripMenuItem.Click += new System.EventHandler(this.PsxHashDiscsMenuItem_Click);
//
// SNESSubMenu
//
this.SNESSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -2698,13 +2662,9 @@ namespace BizHawk.Client.EmuHawk
private BizHawk.WinForms.Controls.ToolStripMenuItemEx BarcodeReaderMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx FeaturesMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx DebuggerMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx PSXSubMenu;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx PSXOptionsMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx SaveRAMSubMenu;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx FlushSaveRAMMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx PSXDiscControlsMenuItem;
private BizHawk.WinForms.Controls.StatusLabelEx UpdateNotification;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx PSXControllerSettingsMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx MacroToolMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx AppleSubMenu;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx AppleDisksSubMenu;
@ -2713,7 +2673,6 @@ namespace BizHawk.Client.EmuHawk
private BizHawk.WinForms.Controls.ToolStripMenuItemEx MusicRipperMenuItem;
private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator35;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx settingsToolStripMenuItem1;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx PSXHashDiscsToolStripMenuItem;
private System.Windows.Forms.Timer timerMouseIdle;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx miUnthrottled;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx toolStripMenuItem17;

View File

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
@ -693,47 +692,6 @@ namespace BizHawk.Client.EmuHawk
private DialogResult OpenOctoshockGamepadSettingsDialog(ISettingsAdapter settable)
{
using PSXControllerConfig form = new(settable);
return this.ShowDialogWithTempMute(form);
}
private void PsxControllerSettingsMenuItem_Click(object sender, EventArgs e)
=> _ = Emulator switch
{
Octoshock => OpenOctoshockGamepadSettingsDialog(GetSettingsAdapterForLoadedCore<Octoshock>()),
_ => DialogResult.None
};
private DialogResult OpenOctoshockSettingsDialog(ISettingsAdapter settable, OctoshockDll.eVidStandard vidStandard, Size vidSize)
=> PSXOptions.DoSettingsDialog(Config, this, settable, vidStandard, vidSize);
private void PsxOptionsMenuItem_Click(object sender, EventArgs e)
{
var result = Emulator switch
{
Octoshock octoshock => OpenOctoshockSettingsDialog(GetSettingsAdapterForLoadedCore<Octoshock>(), octoshock.SystemVidStandard, octoshock.CurrentVideoSize),
_ => DialogResult.None
};
if (result.IsOk()) FrameBufferResized();
}
private void PsxDiscControlsMenuItem_Click(object sender, EventArgs e)
=> Tools.Load<VirtualpadTool>().ScrollToPadSchema("Console");
private void PsxHashDiscsMenuItem_Click(object sender, EventArgs e)
{
if (Emulator is not IRedumpDiscChecksumInfo psx) return;
using PSXHashDiscs form = new() { _psx = psx };
this.ShowDialogWithTempMute(form);
}
private void PsxSubMenu_DropDownOpened(object sender, EventArgs e)
=> PSXControllerSettingsMenuItem.Enabled = MovieSession.Movie.NotActive();
private DialogResult OpenOldBSNESGamepadSettingsDialog(ISettingsAdapter settable)
{
using SNESControllerSettings form = new(settable);
@ -1310,22 +1268,6 @@ namespace BizHawk.Client.EmuHawk
// O2Hawk
items.Add(CreateCoreSubmenu(VSystemCategory.Consoles, CoreNames.O2Hawk, CreateGenericCoreConfigItem<O2Hawk>(CoreNames.O2Hawk)));
// Octoshock
var octoshockGamepadSettingsItem = CreateSettingsItem("Controller / Memcard Settings...", (_, _) => OpenOctoshockGamepadSettingsDialog(GetSettingsAdapterFor<Octoshock>()));
var octoshockSettingsItem = CreateSettingsItem("Options...", PsxOptionsMenuItem_Click);
// using init buffer sizes here (in practice, they don't matter here, but might as well)
var octoshockNTSCSettingsItem = CreateSettingsItem("Options (as NTSC)...", (_, _) => OpenOctoshockSettingsDialog(GetSettingsAdapterFor<Octoshock>(), OctoshockDll.eVidStandard.NTSC, new(280, 240)));
var octoshockPALSettingsItem = CreateSettingsItem("Options (as PAL)...", (_, _) => OpenOctoshockSettingsDialog(GetSettingsAdapterFor<Octoshock>(), OctoshockDll.eVidStandard.PAL, new(280, 288)));
var octoshockSubmenu = CreateCoreSubmenu(VSystemCategory.Consoles, CoreNames.Octoshock, octoshockGamepadSettingsItem, octoshockSettingsItem, octoshockNTSCSettingsItem, octoshockPALSettingsItem);
octoshockSubmenu.DropDownOpened += (_, _) =>
{
var loadedCoreIsOctoshock = Emulator is Octoshock;
octoshockGamepadSettingsItem.Enabled = !loadedCoreIsOctoshock || MovieSession.Movie.NotActive();
octoshockSettingsItem.Visible = loadedCoreIsOctoshock;
octoshockNTSCSettingsItem.Visible = octoshockPALSettingsItem.Visible = !loadedCoreIsOctoshock;
};
items.Add(octoshockSubmenu);
// PCEHawk
items.Add(CreateCoreSubmenu(VSystemCategory.Consoles, CoreNames.PceHawk, CreateGenericCoreConfigItem<PCEngine>(CoreNames.PceHawk)));
@ -1438,7 +1380,6 @@ namespace BizHawk.Client.EmuHawk
GBSubMenu.Visible = false;
A7800SubMenu.Visible = false;
SNESSubMenu.Visible = false;
PSXSubMenu.Visible = false;
ColecoSubMenu.Visible = false;
N64SubMenu.Visible = false;
Ares64SubMenu.Visible = false;
@ -1481,9 +1422,6 @@ namespace BizHawk.Client.EmuHawk
case VSystemID.Raw.NES:
NESSubMenu.Visible = true;
break;
case VSystemID.Raw.PSX when Emulator is Octoshock:
PSXSubMenu.Visible = true;
break;
case VSystemID.Raw.TI83:
TI83SubMenu.Visible = true;
LoadTIFileMenuItem.Visible = Emulator is TI83;

View File

@ -333,7 +333,6 @@ namespace BizHawk.Client.EmuHawk
NESSoundChannelsMenuItem.Image = Properties.Resources.Audio;
(KeypadMenuItem.Image, /*KeypadMenuItem.Text*/_) = ToolManager.IconAndNameCache[typeof(TI83KeyPad)]
= (/*TI83KeyPad.ToolIcon.ToBitmap()*/Properties.Resources.Calculator, "TI-83 Virtual KeyPad");
PSXControllerSettingsMenuItem.Image = Properties.Resources.GameController;
SNESControllerConfigurationMenuItem.Image = Properties.Resources.GameController;
(SnesGfxDebuggerMenuItem.Image, /*SnesGfxDebuggerMenuItem.Text*/_) = ToolManager.IconAndNameCache[typeof(SNESGraphicsDebugger)]
= (/*SNESGraphicsDebugger.ToolIcon.ToBitmap()*/Properties.Resources.Bug, "Graphics Debugger");

View File

@ -1,431 +0,0 @@
namespace BizHawk.Client.EmuHawk
{
partial class PSXControllerConfig
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cbMultitap_1 = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lbl_p_1_4 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_p_1_3 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_p_1_2 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_p_1_1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_1_4 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_1_3 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_1_2 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_1_1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.combo_1_4 = new System.Windows.Forms.ComboBox();
this.combo_1_3 = new System.Windows.Forms.ComboBox();
this.combo_1_2 = new System.Windows.Forms.ComboBox();
this.combo_1_1 = new System.Windows.Forms.ComboBox();
this.cbMemcard_1 = new System.Windows.Forms.CheckBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lbl_p_2_4 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_p_2_3 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_p_2_2 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_p_2_1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_2_4 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_2_3 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_2_2 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lbl_2_1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.combo_2_4 = new System.Windows.Forms.ComboBox();
this.combo_2_3 = new System.Windows.Forms.ComboBox();
this.combo_2_2 = new System.Windows.Forms.ComboBox();
this.combo_2_1 = new System.Windows.Forms.ComboBox();
this.cbMemcard_2 = new System.Windows.Forms.CheckBox();
this.cbMultitap_2 = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// cbMultitap_1
//
this.cbMultitap_1.AutoSize = true;
this.cbMultitap_1.Location = new System.Drawing.Point(18, 43);
this.cbMultitap_1.Name = "cbMultitap_1";
this.cbMultitap_1.Size = new System.Drawing.Size(63, 17);
this.cbMultitap_1.TabIndex = 0;
this.cbMultitap_1.Text = "Multitap";
this.cbMultitap_1.UseVisualStyleBackColor = true;
this.cbMultitap_1.CheckedChanged += new System.EventHandler(this.Cb_Changed);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lbl_p_1_4);
this.groupBox1.Controls.Add(this.lbl_p_1_3);
this.groupBox1.Controls.Add(this.lbl_p_1_2);
this.groupBox1.Controls.Add(this.lbl_p_1_1);
this.groupBox1.Controls.Add(this.lbl_1_4);
this.groupBox1.Controls.Add(this.lbl_1_3);
this.groupBox1.Controls.Add(this.lbl_1_2);
this.groupBox1.Controls.Add(this.lbl_1_1);
this.groupBox1.Controls.Add(this.combo_1_4);
this.groupBox1.Controls.Add(this.combo_1_3);
this.groupBox1.Controls.Add(this.combo_1_2);
this.groupBox1.Controls.Add(this.combo_1_1);
this.groupBox1.Controls.Add(this.cbMemcard_1);
this.groupBox1.Controls.Add(this.cbMultitap_1);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(273, 136);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Port 1";
//
// lbl_p_1_4
//
this.lbl_p_1_4.Location = new System.Drawing.Point(241, 105);
this.lbl_p_1_4.Name = "lbl_p_1_4";
this.lbl_p_1_4.Text = "P1";
this.lbl_p_1_4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_p_1_3
//
this.lbl_p_1_3.Location = new System.Drawing.Point(241, 78);
this.lbl_p_1_3.Name = "lbl_p_1_3";
this.lbl_p_1_3.Text = "P1";
this.lbl_p_1_3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_p_1_2
//
this.lbl_p_1_2.Location = new System.Drawing.Point(241, 50);
this.lbl_p_1_2.Name = "lbl_p_1_2";
this.lbl_p_1_2.Text = "P1";
this.lbl_p_1_2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_p_1_1
//
this.lbl_p_1_1.Location = new System.Drawing.Point(241, 24);
this.lbl_p_1_1.Name = "lbl_p_1_1";
this.lbl_p_1_1.Text = "P1";
this.lbl_p_1_1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_1_4
//
this.lbl_1_4.Location = new System.Drawing.Point(94, 105);
this.lbl_1_4.Name = "lbl_1_4";
this.lbl_1_4.Text = "D";
this.lbl_1_4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_1_3
//
this.lbl_1_3.Location = new System.Drawing.Point(94, 78);
this.lbl_1_3.Name = "lbl_1_3";
this.lbl_1_3.Text = "C";
this.lbl_1_3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_1_2
//
this.lbl_1_2.Location = new System.Drawing.Point(94, 51);
this.lbl_1_2.Name = "lbl_1_2";
this.lbl_1_2.Text = "B";
this.lbl_1_2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_1_1
//
this.lbl_1_1.Location = new System.Drawing.Point(94, 24);
this.lbl_1_1.Name = "lbl_1_1";
this.lbl_1_1.Text = "A";
this.lbl_1_1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// combo_1_4
//
this.combo_1_4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_1_4.FormattingEnabled = true;
this.combo_1_4.Location = new System.Drawing.Point(114, 102);
this.combo_1_4.Name = "combo_1_4";
this.combo_1_4.Size = new System.Drawing.Size(121, 21);
this.combo_1_4.TabIndex = 5;
this.combo_1_4.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// combo_1_3
//
this.combo_1_3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_1_3.FormattingEnabled = true;
this.combo_1_3.Location = new System.Drawing.Point(114, 75);
this.combo_1_3.Name = "combo_1_3";
this.combo_1_3.Size = new System.Drawing.Size(121, 21);
this.combo_1_3.TabIndex = 4;
this.combo_1_3.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// combo_1_2
//
this.combo_1_2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_1_2.FormattingEnabled = true;
this.combo_1_2.Location = new System.Drawing.Point(114, 48);
this.combo_1_2.Name = "combo_1_2";
this.combo_1_2.Size = new System.Drawing.Size(121, 21);
this.combo_1_2.TabIndex = 3;
this.combo_1_2.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// combo_1_1
//
this.combo_1_1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_1_1.FormattingEnabled = true;
this.combo_1_1.Location = new System.Drawing.Point(114, 21);
this.combo_1_1.Name = "combo_1_1";
this.combo_1_1.Size = new System.Drawing.Size(121, 21);
this.combo_1_1.TabIndex = 2;
this.combo_1_1.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// cbMemcard_1
//
this.cbMemcard_1.AutoSize = true;
this.cbMemcard_1.Location = new System.Drawing.Point(18, 21);
this.cbMemcard_1.Name = "cbMemcard_1";
this.cbMemcard_1.Size = new System.Drawing.Size(70, 17);
this.cbMemcard_1.TabIndex = 1;
this.cbMemcard_1.Text = "Memcard";
this.cbMemcard_1.UseVisualStyleBackColor = true;
this.cbMemcard_1.CheckedChanged += new System.EventHandler(this.Cb_Changed);
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(408, 163);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 2;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.BtnOk_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(489, 163);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.lbl_p_2_4);
this.groupBox2.Controls.Add(this.lbl_p_2_3);
this.groupBox2.Controls.Add(this.lbl_p_2_2);
this.groupBox2.Controls.Add(this.lbl_p_2_1);
this.groupBox2.Controls.Add(this.lbl_2_4);
this.groupBox2.Controls.Add(this.lbl_2_3);
this.groupBox2.Controls.Add(this.lbl_2_2);
this.groupBox2.Controls.Add(this.lbl_2_1);
this.groupBox2.Controls.Add(this.combo_2_4);
this.groupBox2.Controls.Add(this.combo_2_3);
this.groupBox2.Controls.Add(this.combo_2_2);
this.groupBox2.Controls.Add(this.combo_2_1);
this.groupBox2.Controls.Add(this.cbMemcard_2);
this.groupBox2.Controls.Add(this.cbMultitap_2);
this.groupBox2.Location = new System.Drawing.Point(291, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(273, 136);
this.groupBox2.TabIndex = 13;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Port 2";
//
// lbl_p_2_4
//
this.lbl_p_2_4.Location = new System.Drawing.Point(241, 105);
this.lbl_p_2_4.Name = "lbl_p_2_4";
this.lbl_p_2_4.Text = "P1";
this.lbl_p_2_4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_p_2_3
//
this.lbl_p_2_3.Location = new System.Drawing.Point(241, 78);
this.lbl_p_2_3.Name = "lbl_p_2_3";
this.lbl_p_2_3.Text = "P1";
this.lbl_p_2_3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_p_2_2
//
this.lbl_p_2_2.Location = new System.Drawing.Point(241, 50);
this.lbl_p_2_2.Name = "lbl_p_2_2";
this.lbl_p_2_2.Text = "P1";
this.lbl_p_2_2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_p_2_1
//
this.lbl_p_2_1.Location = new System.Drawing.Point(241, 24);
this.lbl_p_2_1.Name = "lbl_p_2_1";
this.lbl_p_2_1.Text = "P1";
this.lbl_p_2_1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_2_4
//
this.lbl_2_4.Location = new System.Drawing.Point(94, 105);
this.lbl_2_4.Name = "lbl_2_4";
this.lbl_2_4.Text = "D";
this.lbl_2_4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_2_3
//
this.lbl_2_3.Location = new System.Drawing.Point(94, 78);
this.lbl_2_3.Name = "lbl_2_3";
this.lbl_2_3.Text = "C";
this.lbl_2_3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_2_2
//
this.lbl_2_2.Location = new System.Drawing.Point(94, 51);
this.lbl_2_2.Name = "lbl_2_2";
this.lbl_2_2.Text = "B";
this.lbl_2_2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lbl_2_1
//
this.lbl_2_1.Location = new System.Drawing.Point(94, 24);
this.lbl_2_1.Name = "lbl_2_1";
this.lbl_2_1.Text = "A";
this.lbl_2_1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// combo_2_4
//
this.combo_2_4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_2_4.FormattingEnabled = true;
this.combo_2_4.Location = new System.Drawing.Point(114, 102);
this.combo_2_4.Name = "combo_2_4";
this.combo_2_4.Size = new System.Drawing.Size(121, 21);
this.combo_2_4.TabIndex = 5;
this.combo_2_4.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// combo_2_3
//
this.combo_2_3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_2_3.FormattingEnabled = true;
this.combo_2_3.Location = new System.Drawing.Point(114, 75);
this.combo_2_3.Name = "combo_2_3";
this.combo_2_3.Size = new System.Drawing.Size(121, 21);
this.combo_2_3.TabIndex = 4;
this.combo_2_3.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// combo_2_2
//
this.combo_2_2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_2_2.FormattingEnabled = true;
this.combo_2_2.Location = new System.Drawing.Point(114, 48);
this.combo_2_2.Name = "combo_2_2";
this.combo_2_2.Size = new System.Drawing.Size(121, 21);
this.combo_2_2.TabIndex = 3;
this.combo_2_2.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// combo_2_1
//
this.combo_2_1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combo_2_1.FormattingEnabled = true;
this.combo_2_1.Location = new System.Drawing.Point(114, 21);
this.combo_2_1.Name = "combo_2_1";
this.combo_2_1.Size = new System.Drawing.Size(121, 21);
this.combo_2_1.TabIndex = 2;
this.combo_2_1.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
//
// cbMemcard_2
//
this.cbMemcard_2.AutoSize = true;
this.cbMemcard_2.Location = new System.Drawing.Point(18, 21);
this.cbMemcard_2.Name = "cbMemcard_2";
this.cbMemcard_2.Size = new System.Drawing.Size(70, 17);
this.cbMemcard_2.TabIndex = 1;
this.cbMemcard_2.Text = "Memcard";
this.cbMemcard_2.UseVisualStyleBackColor = true;
this.cbMemcard_2.CheckedChanged += new System.EventHandler(this.Cb_Changed);
//
// cbMultitap_2
//
this.cbMultitap_2.AutoSize = true;
this.cbMultitap_2.Location = new System.Drawing.Point(18, 43);
this.cbMultitap_2.Name = "cbMultitap_2";
this.cbMultitap_2.Size = new System.Drawing.Size(63, 17);
this.cbMultitap_2.TabIndex = 0;
this.cbMultitap_2.Text = "Multitap";
this.cbMultitap_2.UseVisualStyleBackColor = true;
this.cbMultitap_2.CheckedChanged += new System.EventHandler(this.Cb_Changed);
//
// PSXControllerConfigNew
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(586, 201);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PSXControllerConfig";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Controller / Memcard Configuration";
this.Load += new System.EventHandler(this.PSXControllerConfigNew_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.CheckBox cbMultitap_1;
private System.Windows.Forms.GroupBox groupBox1;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_1_4;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_1_3;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_1_2;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_1_1;
private BizHawk.WinForms.Controls.LocLabelEx lbl_1_4;
private BizHawk.WinForms.Controls.LocLabelEx lbl_1_3;
private BizHawk.WinForms.Controls.LocLabelEx lbl_1_2;
private BizHawk.WinForms.Controls.LocLabelEx lbl_1_1;
private System.Windows.Forms.ComboBox combo_1_4;
private System.Windows.Forms.ComboBox combo_1_3;
private System.Windows.Forms.ComboBox combo_1_2;
private System.Windows.Forms.ComboBox combo_1_1;
private System.Windows.Forms.CheckBox cbMemcard_1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.GroupBox groupBox2;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_2_4;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_2_3;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_2_2;
private BizHawk.WinForms.Controls.LocLabelEx lbl_p_2_1;
private BizHawk.WinForms.Controls.LocLabelEx lbl_2_4;
private BizHawk.WinForms.Controls.LocLabelEx lbl_2_3;
private BizHawk.WinForms.Controls.LocLabelEx lbl_2_2;
private BizHawk.WinForms.Controls.LocLabelEx lbl_2_1;
private System.Windows.Forms.ComboBox combo_2_4;
private System.Windows.Forms.ComboBox combo_2_3;
private System.Windows.Forms.ComboBox combo_2_2;
private System.Windows.Forms.ComboBox combo_2_1;
private System.Windows.Forms.CheckBox cbMemcard_2;
private System.Windows.Forms.CheckBox cbMultitap_2;
}
}

View File

@ -1,149 +0,0 @@
using System.Windows.Forms;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Sony.PSX;
namespace BizHawk.Client.EmuHawk
{
public partial class PSXControllerConfig : Form
{
private readonly ISettingsAdapter _settable;
private readonly Octoshock.SyncSettings _syncSettings;
public PSXControllerConfig(ISettingsAdapter settable)
{
_settable = settable;
_syncSettings = (Octoshock.SyncSettings) _settable.GetSyncSettings();
InitializeComponent();
Icon = Properties.Resources.GameControllerIcon;
}
private void PSXControllerConfigNew_Load(object sender, EventArgs e)
{
// populate combo boxes
foreach (var combo in new[] { combo_1_1, combo_1_2, combo_1_3, combo_1_4, combo_2_1, combo_2_2, combo_2_3, combo_2_4 })
{
combo.Items.Add("-Nothing-");
combo.Items.Add("Gamepad");
combo.Items.Add("Dual Shock");
combo.Items.Add("Dual Analog");
combo.Items.Add("neGcon");
combo.SelectedIndex = 0;
}
GuiFromUserConfig(_syncSettings.FIOConfig);
RefreshLabels();
}
private void GuiFromUserConfig(OctoshockFIOConfigUser user)
{
cbMemcard_1.Checked = user.Memcards[0];
cbMemcard_2.Checked = user.Memcards[1];
cbMultitap_1.Checked = user.Multitaps[0];
cbMultitap_2.Checked = user.Multitaps[1];
var combos = new[] { combo_1_1, combo_1_2, combo_1_3, combo_1_4, combo_2_1, combo_2_2, combo_2_3, combo_2_4 };
for (int i = 0; i < 8; i++)
{
var combo = combos[i];
if (user.Devices8[i] == OctoshockDll.ePeripheralType.None) combo.SelectedIndex = 0;
if (user.Devices8[i] == OctoshockDll.ePeripheralType.Pad) combo.SelectedIndex = 1;
if (user.Devices8[i] == OctoshockDll.ePeripheralType.DualShock) combo.SelectedIndex = 2;
if (user.Devices8[i] == OctoshockDll.ePeripheralType.DualAnalog) combo.SelectedIndex = 3;
if (user.Devices8[i] == OctoshockDll.ePeripheralType.NegCon) combo.SelectedIndex = 4;
}
}
private OctoshockFIOConfigUser UserConfigFromGui()
{
var uc = new OctoshockFIOConfigUser
{
Memcards = { [0] = cbMemcard_1.Checked, [1] = cbMemcard_2.Checked },
Multitaps = { [0] = cbMultitap_1.Checked, [1] = cbMultitap_2.Checked }
};
var combos = new[] { combo_1_1, combo_1_2, combo_1_3, combo_1_4, combo_2_1, combo_2_2, combo_2_3, combo_2_4 };
for (int i = 0; i < 8; i++)
{
var combo = combos[i];
uc.Devices8[i] = combo.SelectedIndex switch
{
0 => OctoshockDll.ePeripheralType.None,
1 => OctoshockDll.ePeripheralType.Pad,
2 => OctoshockDll.ePeripheralType.DualShock,
3 => OctoshockDll.ePeripheralType.DualAnalog,
4 => OctoshockDll.ePeripheralType.NegCon,
_ => uc.Devices8[i]
};
}
return uc;
}
private void RefreshLabels()
{
var uc = UserConfigFromGui();
bool b1 = uc.Multitaps[0];
lbl_1_1.Visible = b1;
lbl_1_2.Visible = b1;
lbl_1_3.Visible = b1;
lbl_1_4.Visible = b1;
combo_1_2.Enabled = b1;
combo_1_3.Enabled = b1;
combo_1_4.Enabled = b1;
lbl_p_1_2.Visible = b1;
lbl_p_1_3.Visible = b1;
lbl_p_1_4.Visible = b1;
bool b2 = uc.Multitaps[1];
lbl_2_1.Visible = b2;
lbl_2_2.Visible = b2;
lbl_2_3.Visible = b2;
lbl_2_4.Visible = b2;
combo_2_2.Enabled = b2;
combo_2_3.Enabled = b2;
combo_2_4.Enabled = b2;
lbl_p_2_2.Visible = b2;
lbl_p_2_3.Visible = b2;
lbl_p_2_4.Visible = b2;
var lc = uc.ToLogical();
var pLabels = new[] { lbl_p_1_1, lbl_p_1_2, lbl_p_1_3, lbl_p_1_4, lbl_p_2_1, lbl_p_2_2, lbl_p_2_3, lbl_p_2_4 };
for (int i = 0; i < 8; i++)
{
var lbl = pLabels[i];
if (lc.PlayerAssignments[i] == -1)
{
lbl.Visible = false;
}
else
{
lbl.Text = $"P{lc.PlayerAssignments[i]}";
lbl.Visible = true;
}
}
}
private void Cb_Changed(object sender, EventArgs e)
{
RefreshLabels();
}
private void Combo_SelectedIndexChanged(object sender, EventArgs e)
{
RefreshLabels();
}
private void BtnOk_Click(object sender, EventArgs e)
{
_syncSettings.FIOConfig = UserConfigFromGui();
_settable.PutCoreSyncSettings(_syncSettings);
DialogResult = DialogResult.OK;
Close();
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,555 +0,0 @@
namespace BizHawk.Client.EmuHawk
{
partial class PSXOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PSXOptions));
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.lblTweakedMednafen = new BizHawk.WinForms.Controls.LocLabelEx();
this.rbTweakedMednafenMode = new System.Windows.Forms.RadioButton();
this.label3 = new BizHawk.WinForms.Controls.LocLabelEx();
this.rbDebugMode = new System.Windows.Forms.RadioButton();
this.btnNiceDisplayConfig = new System.Windows.Forms.Button();
this.lblMednafen = new BizHawk.WinForms.Controls.LocLabelEx();
this.rbMednafenMode = new System.Windows.Forms.RadioButton();
this.lblPixelPro = new BizHawk.WinForms.Controls.LocLabelEx();
this.rbPixelPro = new System.Windows.Forms.RadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.rbClipNone = new System.Windows.Forms.RadioButton();
this.rbClipToFramebuffer = new System.Windows.Forms.RadioButton();
this.rbClipBasic = new System.Windows.Forms.RadioButton();
this.lblPAL = new BizHawk.WinForms.Controls.LocLabelEx();
this.PAL_LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.PAL_FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.lblNTSC = new BizHawk.WinForms.Controls.LocLabelEx();
this.btnAreaFull = new System.Windows.Forms.Button();
this.label4 = new BizHawk.WinForms.Controls.LocLabelEx();
this.label1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.NTSC_LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.NTSC_FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.rbWeave = new System.Windows.Forms.RadioButton();
this.rbBobOffset = new System.Windows.Forms.RadioButton();
this.rbBob = new System.Windows.Forms.RadioButton();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.cbLEC = new System.Windows.Forms.CheckBox();
this.cbGpuLag = new System.Windows.Forms.CheckBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).BeginInit();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(622, 370);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// btnOk
//
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.Location = new System.Drawing.Point(541, 370);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "OK";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.BtnOk_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.linkLabel1);
this.groupBox1.Controls.Add(this.lblTweakedMednafen);
this.groupBox1.Controls.Add(this.rbTweakedMednafenMode);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.rbDebugMode);
this.groupBox1.Controls.Add(this.btnNiceDisplayConfig);
this.groupBox1.Controls.Add(this.lblMednafen);
this.groupBox1.Controls.Add(this.rbMednafenMode);
this.groupBox1.Controls.Add(this.lblPixelPro);
this.groupBox1.Controls.Add(this.rbPixelPro);
this.groupBox1.Location = new System.Drawing.Point(12, 7);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(474, 293);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Resolution Management";
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(326, 254);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(53, 13);
this.linkLabel1.TabIndex = 29;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "About Me";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel1_LinkClicked);
//
// lblTweakedMednafen
//
this.lblTweakedMednafen.Location = new System.Drawing.Point(249, 134);
this.lblTweakedMednafen.Name = "lblTweakedMednafen";
this.lblTweakedMednafen.Text = resources.GetString("lblTweakedMednafen.Text");
//
// rbTweakedMednafenMode
//
this.rbTweakedMednafenMode.AutoSize = true;
this.rbTweakedMednafenMode.Location = new System.Drawing.Point(246, 118);
this.rbTweakedMednafenMode.Name = "rbTweakedMednafenMode";
this.rbTweakedMednafenMode.Size = new System.Drawing.Size(193, 17);
this.rbTweakedMednafenMode.TabIndex = 27;
this.rbTweakedMednafenMode.TabStop = true;
this.rbTweakedMednafenMode.Text = "Tweaked Mednafen Mode (4:3 AR)";
this.rbTweakedMednafenMode.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.Location = new System.Drawing.Point(249, 35);
this.label3.Name = "label3";
this.label3.Text = "Displays all content unmodified\r\n • Window size will constantly change\r\n • Aspect" +
" ratio is usually wrong\r\n • Recommended for hacking\r\n • Ideal for segmented AV d" +
"umping\r\n • Ideal for screen shots\r\n\r\n";
//
// rbDebugMode
//
this.rbDebugMode.AutoSize = true;
this.rbDebugMode.Location = new System.Drawing.Point(246, 19);
this.rbDebugMode.Name = "rbDebugMode";
this.rbDebugMode.Size = new System.Drawing.Size(134, 17);
this.rbDebugMode.TabIndex = 25;
this.rbDebugMode.TabStop = true;
this.rbDebugMode.Text = "Hardcore Debug Mode";
this.rbDebugMode.UseVisualStyleBackColor = true;
//
// btnNiceDisplayConfig
//
this.btnNiceDisplayConfig.AutoSize = true;
this.btnNiceDisplayConfig.Location = new System.Drawing.Point(145, 244);
this.btnNiceDisplayConfig.Name = "btnNiceDisplayConfig";
this.btnNiceDisplayConfig.Size = new System.Drawing.Size(173, 23);
this.btnNiceDisplayConfig.TabIndex = 24;
this.btnNiceDisplayConfig.Text = "Change My Display Options";
this.btnNiceDisplayConfig.UseVisualStyleBackColor = true;
this.btnNiceDisplayConfig.Click += new System.EventHandler(this.BtnNiceDisplayConfig_Click);
//
// lblMednafen
//
this.lblMednafen.Location = new System.Drawing.Point(6, 134);
this.lblMednafen.Name = "lblMednafen";
this.lblMednafen.Text = resources.GetString("lblMednafen.Text");
//
// rbMednafenMode
//
this.rbMednafenMode.AutoSize = true;
this.rbMednafenMode.Location = new System.Drawing.Point(6, 118);
this.rbMednafenMode.Name = "rbMednafenMode";
this.rbMednafenMode.Size = new System.Drawing.Size(145, 17);
this.rbMednafenMode.TabIndex = 22;
this.rbMednafenMode.TabStop = true;
this.rbMednafenMode.Text = "Mednafen Mode (4:3 AR)";
this.rbMednafenMode.UseVisualStyleBackColor = true;
//
// lblPixelPro
//
this.lblPixelPro.Location = new System.Drawing.Point(6, 35);
this.lblPixelPro.Name = "lblPixelPro";
this.lblPixelPro.Text = resources.GetString("lblPixelPro.Text");
//
// rbPixelPro
//
this.rbPixelPro.AutoSize = true;
this.rbPixelPro.Location = new System.Drawing.Point(6, 19);
this.rbPixelPro.Name = "rbPixelPro";
this.rbPixelPro.Size = new System.Drawing.Size(96, 17);
this.rbPixelPro.TabIndex = 0;
this.rbPixelPro.TabStop = true;
this.rbPixelPro.Text = "Pixel Pro Mode";
this.rbPixelPro.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.groupBox3);
this.groupBox2.Controls.Add(this.lblPAL);
this.groupBox2.Controls.Add(this.PAL_LastLineNumeric);
this.groupBox2.Controls.Add(this.PAL_FirstLineNumeric);
this.groupBox2.Controls.Add(this.lblNTSC);
this.groupBox2.Controls.Add(this.btnAreaFull);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.NTSC_LastLineNumeric);
this.groupBox2.Controls.Add(this.NTSC_FirstLineNumeric);
this.groupBox2.Location = new System.Drawing.Point(492, 7);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(212, 239);
this.groupBox2.TabIndex = 31;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Drawing Area";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.rbClipNone);
this.groupBox3.Controls.Add(this.rbClipToFramebuffer);
this.groupBox3.Controls.Add(this.rbClipBasic);
this.groupBox3.Location = new System.Drawing.Point(7, 131);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(197, 88);
this.groupBox3.TabIndex = 46;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Horizontal Overscan Clipping";
//
// rbClipNone
//
this.rbClipNone.AutoSize = true;
this.rbClipNone.Location = new System.Drawing.Point(6, 19);
this.rbClipNone.Name = "rbClipNone";
this.rbClipNone.Size = new System.Drawing.Size(51, 17);
this.rbClipNone.TabIndex = 48;
this.rbClipNone.TabStop = true;
this.rbClipNone.Text = "None";
this.toolTip1.SetToolTip(this.rbClipNone, resources.GetString("rbClipNone.ToolTip"));
this.rbClipNone.UseVisualStyleBackColor = true;
this.rbClipNone.CheckedChanged += new System.EventHandler(this.RbClipNone_CheckedChanged);
//
// rbClipToFramebuffer
//
this.rbClipToFramebuffer.AutoSize = true;
this.rbClipToFramebuffer.Location = new System.Drawing.Point(6, 65);
this.rbClipToFramebuffer.Name = "rbClipToFramebuffer";
this.rbClipToFramebuffer.Size = new System.Drawing.Size(117, 17);
this.rbClipToFramebuffer.TabIndex = 47;
this.rbClipToFramebuffer.TabStop = true;
this.rbClipToFramebuffer.Text = "Clip To Framebuffer";
this.toolTip1.SetToolTip(this.rbClipToFramebuffer, "Subverts mednafen\'s internal video display field emulation to show only the game\'" +
"s framebuffer.\r\nHorizontal letterbox bars may be re-added in Mednafen-style reso" +
"lution modes to maintain correct AR.");
this.rbClipToFramebuffer.UseVisualStyleBackColor = true;
this.rbClipToFramebuffer.CheckedChanged += new System.EventHandler(this.RbClipToFramebuffer_CheckedChanged);
//
// rbClipBasic
//
this.rbClipBasic.AutoSize = true;
this.rbClipBasic.Location = new System.Drawing.Point(6, 42);
this.rbClipBasic.Name = "rbClipBasic";
this.rbClipBasic.Size = new System.Drawing.Size(91, 17);
this.rbClipBasic.TabIndex = 46;
this.rbClipBasic.TabStop = true;
this.rbClipBasic.Text = "Basic Clipping";
this.toolTip1.SetToolTip(this.rbClipBasic, "A mednafen option -- appears to be 5.5% horizontally");
this.rbClipBasic.UseVisualStyleBackColor = true;
this.rbClipBasic.CheckedChanged += new System.EventHandler(this.RbClipHorizontal_CheckedChanged);
//
// lblPAL
//
this.lblPAL.Location = new System.Drawing.Point(131, 17);
this.lblPAL.Name = "lblPAL";
this.lblPAL.Text = "PAL";
//
// PAL_LastLineNumeric
//
this.PAL_LastLineNumeric.Location = new System.Drawing.Point(124, 62);
this.PAL_LastLineNumeric.Maximum = new decimal(new int[] {
287,
0,
0,
0});
this.PAL_LastLineNumeric.Name = "PAL_LastLineNumeric";
this.PAL_LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.PAL_LastLineNumeric.TabIndex = 43;
this.PAL_LastLineNumeric.Value = new decimal(new int[] {
128,
0,
0,
0});
this.PAL_LastLineNumeric.ValueChanged += new System.EventHandler(this.DrawingArea_ValueChanged);
//
// PAL_FirstLineNumeric
//
this.PAL_FirstLineNumeric.Location = new System.Drawing.Point(124, 36);
this.PAL_FirstLineNumeric.Maximum = new decimal(new int[] {
287,
0,
0,
0});
this.PAL_FirstLineNumeric.Name = "PAL_FirstLineNumeric";
this.PAL_FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.PAL_FirstLineNumeric.TabIndex = 42;
this.PAL_FirstLineNumeric.ValueChanged += new System.EventHandler(this.DrawingArea_ValueChanged);
//
// lblNTSC
//
this.lblNTSC.Location = new System.Drawing.Point(62, 17);
this.lblNTSC.Name = "lblNTSC";
this.lblNTSC.Text = "NTSC";
//
// btnAreaFull
//
this.btnAreaFull.Location = new System.Drawing.Point(8, 94);
this.btnAreaFull.Name = "btnAreaFull";
this.btnAreaFull.Size = new System.Drawing.Size(163, 23);
this.btnAreaFull.TabIndex = 40;
this.btnAreaFull.Text = "Full [0,239] and [0,287]";
this.btnAreaFull.UseVisualStyleBackColor = true;
this.btnAreaFull.Click += new System.EventHandler(this.BtnAreaFull_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(4, 64);
this.label4.Name = "label4";
this.label4.Text = "Last line:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(5, 38);
this.label1.Name = "label1";
this.label1.Text = "First line:";
//
// NTSC_LastLineNumeric
//
this.NTSC_LastLineNumeric.Location = new System.Drawing.Point(59, 62);
this.NTSC_LastLineNumeric.Maximum = new decimal(new int[] {
239,
0,
0,
0});
this.NTSC_LastLineNumeric.Name = "NTSC_LastLineNumeric";
this.NTSC_LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.NTSC_LastLineNumeric.TabIndex = 28;
this.NTSC_LastLineNumeric.Value = new decimal(new int[] {
239,
0,
0,
0});
this.NTSC_LastLineNumeric.ValueChanged += new System.EventHandler(this.DrawingArea_ValueChanged);
//
// NTSC_FirstLineNumeric
//
this.NTSC_FirstLineNumeric.Location = new System.Drawing.Point(59, 36);
this.NTSC_FirstLineNumeric.Maximum = new decimal(new int[] {
239,
0,
0,
0});
this.NTSC_FirstLineNumeric.Name = "NTSC_FirstLineNumeric";
this.NTSC_FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.NTSC_FirstLineNumeric.TabIndex = 21;
this.NTSC_FirstLineNumeric.ValueChanged += new System.EventHandler(this.DrawingArea_ValueChanged);
//
// rbWeave
//
this.rbWeave.AutoSize = true;
this.rbWeave.Location = new System.Drawing.Point(6, 19);
this.rbWeave.Name = "rbWeave";
this.rbWeave.Size = new System.Drawing.Size(60, 17);
this.rbWeave.TabIndex = 48;
this.rbWeave.TabStop = true;
this.rbWeave.Text = "Weave";
this.toolTip1.SetToolTip(this.rbWeave, "Good for low-motion video");
this.rbWeave.UseVisualStyleBackColor = true;
//
// rbBobOffset
//
this.rbBobOffset.AutoSize = true;
this.rbBobOffset.Location = new System.Drawing.Point(122, 19);
this.rbBobOffset.Name = "rbBobOffset";
this.rbBobOffset.Size = new System.Drawing.Size(75, 17);
this.rbBobOffset.TabIndex = 47;
this.rbBobOffset.TabStop = true;
this.rbBobOffset.Text = "Bob Offset";
this.toolTip1.SetToolTip(this.rbBobOffset, "Good for high-motion video, but is a bit flickery; reduces the subjective vertica" +
"l resolution.");
this.rbBobOffset.UseVisualStyleBackColor = true;
//
// rbBob
//
this.rbBob.AutoSize = true;
this.rbBob.Location = new System.Drawing.Point(72, 19);
this.rbBob.Name = "rbBob";
this.rbBob.Size = new System.Drawing.Size(44, 17);
this.rbBob.TabIndex = 46;
this.rbBob.TabStop = true;
this.rbBob.Text = "Bob";
this.toolTip1.SetToolTip(this.rbBob, "Good for causing a headache. All glory to Bob.");
this.rbBob.UseVisualStyleBackColor = true;
//
// groupBox4
//
this.groupBox4.Controls.Add(this.rbWeave);
this.groupBox4.Controls.Add(this.rbBobOffset);
this.groupBox4.Controls.Add(this.rbBob);
this.groupBox4.Location = new System.Drawing.Point(492, 251);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(212, 49);
this.groupBox4.TabIndex = 50;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Deinterlacing";
//
// groupBox5
//
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.cbLEC);
this.groupBox5.Location = new System.Drawing.Point(12, 306);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(238, 85);
this.groupBox5.TabIndex = 47;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Emulation Sync Settings";
//
// cbLEC
//
this.cbLEC.AutoSize = true;
this.cbLEC.Location = new System.Drawing.Point(9, 19);
this.cbLEC.Name = "cbLEC";
this.cbLEC.Size = new System.Drawing.Size(222, 30);
this.cbLEC.TabIndex = 0;
this.cbLEC.Text = "Emulate Sector Error Correction\r\n(usually unneeded; breaks some patches)";
this.cbLEC.UseVisualStyleBackColor = true;
//
// cbGpuLag
//
this.cbGpuLag.AutoSize = true;
this.cbGpuLag.Location = new System.Drawing.Point(16, 19);
this.cbGpuLag.Name = "cbGpuLag";
this.cbGpuLag.Size = new System.Drawing.Size(181, 17);
this.cbGpuLag.TabIndex = 1;
this.cbGpuLag.Text = "Determine Lag from GPU Frames";
this.cbGpuLag.UseVisualStyleBackColor = true;
//
// groupBox6
//
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.cbGpuLag);
this.groupBox6.Location = new System.Drawing.Point(264, 308);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(238, 85);
this.groupBox6.TabIndex = 48;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Emulation User Settings";
//
// PSXOptions
//
this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(713, 405);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOk);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PSXOptions";
this.Text = "PSX Options";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).EndInit();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton rbPixelPro;
private System.Windows.Forms.Button btnNiceDisplayConfig;
private BizHawk.WinForms.Controls.LocLabelEx lblMednafen;
private System.Windows.Forms.RadioButton rbMednafenMode;
private BizHawk.WinForms.Controls.LocLabelEx lblPixelPro;
private BizHawk.WinForms.Controls.LocLabelEx label3;
private System.Windows.Forms.RadioButton rbDebugMode;
private BizHawk.WinForms.Controls.LocLabelEx lblTweakedMednafen;
private System.Windows.Forms.RadioButton rbTweakedMednafenMode;
private System.Windows.Forms.GroupBox groupBox2;
private BizHawk.WinForms.Controls.LocLabelEx lblPAL;
private System.Windows.Forms.NumericUpDown PAL_LastLineNumeric;
private System.Windows.Forms.NumericUpDown PAL_FirstLineNumeric;
private BizHawk.WinForms.Controls.LocLabelEx lblNTSC;
private System.Windows.Forms.Button btnAreaFull;
private BizHawk.WinForms.Controls.LocLabelEx label4;
private BizHawk.WinForms.Controls.LocLabelEx label1;
private System.Windows.Forms.NumericUpDown NTSC_LastLineNumeric;
private System.Windows.Forms.NumericUpDown NTSC_FirstLineNumeric;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.RadioButton rbClipNone;
private System.Windows.Forms.RadioButton rbClipToFramebuffer;
private System.Windows.Forms.RadioButton rbClipBasic;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.RadioButton rbWeave;
private System.Windows.Forms.RadioButton rbBobOffset;
private System.Windows.Forms.RadioButton rbBob;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.CheckBox cbLEC;
private System.Windows.Forms.CheckBox cbGpuLag;
private System.Windows.Forms.GroupBox groupBox6;
}
}

View File

@ -1,214 +0,0 @@
using System.Drawing;
using System.Windows.Forms;
using BizHawk.Emulation.Cores.Sony.PSX;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class PSXOptions : Form, IDialogParent
{
// backups of the labels for string replacing
private readonly string _lblPixelProText, _lblMednafenText, _lblTweakedMednafenText;
private readonly ISettingsAdapter _settable;
public IDialogController DialogController { get; }
private PSXOptions(
Config config,
IDialogController dialogController,
ISettingsAdapter settable,
Octoshock.Settings settings,
Octoshock.SyncSettings syncSettings,
OctoshockDll.eVidStandard vidStandard,
Size currentVideoSize)
{
InitializeComponent();
_config = config;
_settable = settable;
_settings = settings;
_syncSettings = syncSettings;
_previewVideoStandard = vidStandard;
_previewVideoSize = currentVideoSize;
DialogController = dialogController;
if (_previewVideoStandard == OctoshockDll.eVidStandard.NTSC)
{
lblNTSC.Font = new Font(lblNTSC.Font, FontStyle.Bold);
}
else
{
lblPAL.Font = new Font(lblPAL.Font, FontStyle.Bold);
}
_lblPixelProText = lblPixelPro.Text;
_lblMednafenText = lblMednafen.Text;
_lblTweakedMednafenText = lblTweakedMednafen.Text;
rbPixelPro.Checked = _settings.ResolutionMode == Octoshock.eResolutionMode.PixelPro;
rbDebugMode.Checked = _settings.ResolutionMode == Octoshock.eResolutionMode.Debug;
rbMednafenMode.Checked = _settings.ResolutionMode == Octoshock.eResolutionMode.Mednafen;
rbTweakedMednafenMode.Checked = _settings.ResolutionMode == Octoshock.eResolutionMode.TweakedMednafen;
rbClipNone.Checked = _settings.HorizontalClipping == Octoshock.eHorizontalClipping.None;
rbClipBasic.Checked = _settings.HorizontalClipping == Octoshock.eHorizontalClipping.Basic;
rbClipToFramebuffer.Checked = _settings.HorizontalClipping == Octoshock.eHorizontalClipping.Framebuffer;
cbLEC.Checked = _syncSettings.EnableLEC;
cbGpuLag.Checked = _settings.GPULag;
rbWeave.Checked = _settings.DeinterlaceMode == Octoshock.eDeinterlaceMode.Weave;
rbBob.Checked = _settings.DeinterlaceMode == Octoshock.eDeinterlaceMode.Bob;
rbBobOffset.Checked = _settings.DeinterlaceMode == Octoshock.eDeinterlaceMode.BobOffset;
NTSC_FirstLineNumeric.Value = _settings.ScanlineStart_NTSC;
NTSC_LastLineNumeric.Value = _settings.ScanlineEnd_NTSC;
PAL_FirstLineNumeric.Value = _settings.ScanlineStart_PAL;
PAL_LastLineNumeric.Value = _settings.ScanlineEnd_PAL;
}
private Size _previewVideoSize;
private readonly Config _config;
private readonly OctoshockDll.eVidStandard _previewVideoStandard;
private readonly Octoshock.Settings _settings;
private readonly Octoshock.SyncSettings _syncSettings;
private bool _dispSettingsSet;
private void BtnNiceDisplayConfig_Click(object sender, EventArgs e)
{
_dispSettingsSet = true;
DialogController.ShowMessageBox("Finetuned Display Options will take effect if you OK from PSX Options");
}
public static DialogResult DoSettingsDialog(
Config config,
IDialogParent dialogParent,
ISettingsAdapter settable,
OctoshockDll.eVidStandard vidStandard,
Size vidSize)
{
using PSXOptions dlg = new(
config,
dialogParent.DialogController,
settable,
(Octoshock.Settings) settable.GetSettings(),
(Octoshock.SyncSettings) settable.GetSyncSettings(),
vidStandard,
vidSize);
return dialogParent.ShowDialogAsChild(dlg);
}
private void SyncSettingsFromGui(Octoshock.Settings settings, Octoshock.SyncSettings syncSettings)
{
if (rbPixelPro.Checked) settings.ResolutionMode = Octoshock.eResolutionMode.PixelPro;
if (rbDebugMode.Checked) settings.ResolutionMode = Octoshock.eResolutionMode.Debug;
if (rbMednafenMode.Checked) settings.ResolutionMode = Octoshock.eResolutionMode.Mednafen;
if (rbTweakedMednafenMode.Checked) settings.ResolutionMode = Octoshock.eResolutionMode.TweakedMednafen;
if (rbClipNone.Checked) settings.HorizontalClipping = Octoshock.eHorizontalClipping.None;
if (rbClipBasic.Checked) settings.HorizontalClipping = Octoshock.eHorizontalClipping.Basic;
if (rbClipToFramebuffer.Checked) settings.HorizontalClipping = Octoshock.eHorizontalClipping.Framebuffer;
if (rbWeave.Checked) _settings.DeinterlaceMode = Octoshock.eDeinterlaceMode.Weave;
if (rbBob.Checked) _settings.DeinterlaceMode = Octoshock.eDeinterlaceMode.Bob;
if (rbBobOffset.Checked) _settings.DeinterlaceMode = Octoshock.eDeinterlaceMode.BobOffset;
settings.ScanlineStart_NTSC = (int)NTSC_FirstLineNumeric.Value;
settings.ScanlineEnd_NTSC = (int)NTSC_LastLineNumeric.Value;
settings.ScanlineStart_PAL = (int)PAL_FirstLineNumeric.Value;
settings.ScanlineEnd_PAL = (int)PAL_LastLineNumeric.Value;
settings.GPULag = cbGpuLag.Checked;
syncSettings.EnableLEC = cbLEC.Checked;
}
private void BtnOk_Click(object sender, EventArgs e)
{
if (_dispSettingsSet)
{
_config.DispManagerAR = EDispManagerAR.System;
_config.DispFixAspectRatio = true;
_config.DispFixScaleInteger = false;
_config.DispFinalFilter = 1; // bilinear, I hope
}
SyncSettingsFromGui(_settings, _syncSettings);
_settings.Validate();
_settable.PutCoreSettings(_settings);
_settable.PutCoreSyncSettings(_syncSettings);
DialogResult = DialogResult.OK;
Close();
}
private void BtnAreaFull_Click(object sender, EventArgs e)
{
NTSC_FirstLineNumeric.Value = 0;
NTSC_LastLineNumeric.Value = 239;
PAL_FirstLineNumeric.Value = 0;
PAL_LastLineNumeric.Value = 287;
SyncLabels();
}
private void SyncLabels()
{
var temp = _settings.Clone();
var syncTemp = _syncSettings.Clone();
SyncSettingsFromGui(temp, syncTemp);
_settings.Validate();
// actually, I think this is irrelevant. But it's nice in case we want to do some kind of a more detailed simulation later
int w = _previewVideoSize.Width;
int h = _previewVideoSize.Height;
temp.ResolutionMode = Octoshock.eResolutionMode.PixelPro;
var ri = Octoshock.CalculateResolution(_previewVideoStandard, temp, w, h);
lblPixelPro.Text = _lblPixelProText.Replace("800x480", $"{ri.Resolution.Width}x{ri.Resolution.Height}");
temp.ResolutionMode = Octoshock.eResolutionMode.Mednafen;
ri = Octoshock.CalculateResolution(_previewVideoStandard, temp, w, h);
lblMednafen.Text = _lblMednafenText.Replace("320x240", $"{ri.Resolution.Width}x{ri.Resolution.Height}");
temp.ResolutionMode = Octoshock.eResolutionMode.TweakedMednafen;
ri = Octoshock.CalculateResolution(_previewVideoStandard, temp, w, h);
lblTweakedMednafen.Text = _lblTweakedMednafenText.Replace("400x300", $"{ri.Resolution.Width}x{ri.Resolution.Height}");
}
private void DrawingArea_ValueChanged(object sender, EventArgs e)
{
SyncLabels();
}
private void RbClipHorizontal_CheckedChanged(object sender, EventArgs e)
{
SyncLabels();
}
private void RbClipToFramebuffer_CheckedChanged(object sender, EventArgs e)
{
SyncLabels();
}
private void RbClipNone_CheckedChanged(object sender, EventArgs e)
{
SyncLabels();
}
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
DialogController.ShowMessageBox($@"These options control BizHawk's Display Options to make it act quite a lot like Mednafen:
{nameof(_config.DispManagerAR)} = System (Use emulator-recommended AR)
{nameof(_config.DispFixAspectRatio)} = true (Maintain aspect ratio [letterbox main window as needed])
{nameof(_config.DispFinalFilter)} = bilinear (Like Mednafen)
{nameof(_config.DispFixScaleInteger)} = false (Generally unwanted with bilinear filtering)
This is a good place to write that Mednafen's default behaviour is fantastic for gaming!
But: 1. we think we improved on it a tiny bit with the tweaked mode
And: 2. It's not suitable for detailed scrutinizing of graphics
");
}
}
}

View File

@ -1,154 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblTweakedMednafen.Text" xml:space="preserve">
<value>Displays all content at a multiple of 400x300.
• Correct aspect ratio
• Generally enjoyable game presentation
• Detail loss at 1x in fewer cases
• Recommended for gaming
• Requires certain display configuration:
</value>
</data>
<data name="lblMednafen.Text" xml:space="preserve">
<value>Displays all content at a multiple of 320x240
• Correct aspect ratio
• Generally enjoyable game presentation
• At 1x window size, detail can be lost
• Recommended for comparisons
• Requires certain display configuration:
</value>
</data>
<data name="lblPixelPro.Text" xml:space="preserve">
<value>Converts content with nearest neighbor to
fit gracefully in a 800x480 window.
• Content is pixel perfect
• Aspect ratio is usually wrong
• Recommended for study
• Game may seen to have scale varying by mode</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="rbClipNone.ToolTip" xml:space="preserve">
<value>Mednafen adds quite a bit overscan to closely emulate minor quirks of the psx's display output.
Using this option may result in objectionable levels of black bars, but will fix some rare quirks in games.
</value>
</data>
</root>

View File

@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Sony.PSX;
namespace BizHawk.Client.EmuHawk
{
@ -27,88 +26,18 @@ namespace BizHawk.Client.EmuHawk
_discSelectName = buttonNames[2];
// these need to follow InitializeComponent call
UpdateCoreAssociation();
UpdateValues();
}
private readonly string _discSelectName;
private readonly object _ownerEmulator;
private void UpdateCoreAssociation()
{
if (_ownerEmulator is not Octoshock psx)
{
return;
}
var buttons = new List<string> { "- NONE -" };
buttons.AddRange(psx.HackyDiscButtons);
lvDiscs.Items.Clear();
int idx = 0;
foreach (var button in buttons)
{
var lvi = new ListViewItem { Text = idx.ToString() };
lvi.SubItems.Add(button);
lvDiscs.Items.Add(lvi);
idx++;
}
}
public void Clear()
{
}
public void UpdateValues()
{
if (_ownerEmulator is Octoshock psx)
{
bool eject = psx.CurrentTrayOpen;
bool enableDiscs = eject;
bool refreshDiscs = true;
//special logic: if this is frame 0, we can begin in any state
if (psx.Frame == 0)
{
lblTimeZero.Visible = true;
btnOpen.Enabled = true;
btnClose.Enabled = true;
// if neither button is picked, start with 'closed' selected
// (kind of a hack for the initial update)
if (!btnClose.Checked && !btnOpen.Checked)
{
btnClose.Checked = true;
}
else
{
// while we're here, make sure this only happens the first time
refreshDiscs = false;
}
enableDiscs = btnOpen.Checked;
}
else
{
lblTimeZero.Visible = false;
btnOpen.Enabled = !eject;
btnClose.Enabled = eject;
if (!btnOpen.Enabled) btnOpen.Checked = false;
if (!btnClose.Enabled) btnClose.Checked = false;
}
//if we're not ejected, then the disc is frozen in the current configuration
lvDiscs.Enabled = enableDiscs;
if (!eject && refreshDiscs)
{
lvDiscs.SelectedIndices.Clear();
lvDiscs.SelectedIndices.Add(psx.CurrentDiscIndexMounted);
}
}
// make sure we try to keep something selected here, for clarity.
// but maybe later we'll just make it so that unselecting means no disc and don't display the disc 0
if (lvDiscs.SelectedIndices.Count == 0)

View File

@ -72,8 +72,6 @@
<Compile Update="Consoles/Sega/GGHawkLink/GGHawkLink.*.cs" DependentUpon="GGHawkLink.cs" />
<Compile Update="Consoles/Sega/gpgx64/GPGX.*.cs" DependentUpon="GPGX.cs" />
<Compile Update="Consoles/Sega/SMS/SMS.*.cs" DependentUpon="SMS.cs" />
<Compile Update="Consoles/Sony/PSX/Octoshock.cs" SubType="Code" />
<Compile Update="Consoles/Sony/PSX/Octoshock.*.cs" DependentUpon="Octoshock.cs" />
<Compile Update="Consoles/WonderSwan/WonderSwan.*.cs" DependentUpon="WonderSwan.cs" />
</ItemGroup>
</Project>

View File

@ -1,159 +0,0 @@
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Sony.PSX
{
public unsafe partial class Octoshock : IDebuggable
{
// TODO: don't cast to int, and are any of these not 32 bit?
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
{
Dictionary<string, RegisterValue> ret = new Dictionary<string, RegisterValue>();
var regs = new OctoshockDll.ShockRegisters_CPU();
OctoshockDll.shock_GetRegisters_CPU(psx, ref regs);
//ret[ "r1"] = (int)regs.GPR[ 1]; ret[ "r2"] = (int)regs.GPR[ 2]; ret[ "r3"] = (int)regs.GPR[ 3];
//ret[ "r4"] = (int)regs.GPR[ 4]; ret[ "r5"] = (int)regs.GPR[ 5]; ret[ "r6"] = (int)regs.GPR[ 6]; ret[ "r7"] = (int)regs.GPR[ 7];
//ret[ "r8"] = (int)regs.GPR[ 8]; ret[ "r9"] = (int)regs.GPR[ 9]; ret["r10"] = (int)regs.GPR[10]; ret["r11"] = (int)regs.GPR[11];
//ret["r12"] = (int)regs.GPR[12]; ret["r13"] = (int)regs.GPR[13]; ret["r14"] = (int)regs.GPR[14]; ret["r15"] = (int)regs.GPR[15];
//ret["r16"] = (int)regs.GPR[16]; ret["r17"] = (int)regs.GPR[17]; ret["r18"] = (int)regs.GPR[18]; ret["r19"] = (int)regs.GPR[19];
//ret["r20"] = (int)regs.GPR[20]; ret["r21"] = (int)regs.GPR[21]; ret["r22"] = (int)regs.GPR[22]; ret["r23"] = (int)regs.GPR[23];
//ret["r24"] = (int)regs.GPR[24]; ret["r25"] = (int)regs.GPR[25]; ret["r26"] = (int)regs.GPR[26]; ret["r27"] = (int)regs.GPR[27];
//ret["r28"] = (int)regs.GPR[28]; ret["r29"] = (int)regs.GPR[29]; ret["r30"] = (int)regs.GPR[30]; ret["r31"] = (int)regs.GPR[31];
ret[ "at"] = (int)regs.GPR[ 1];
ret[ "v0"] = (int)regs.GPR[ 2]; ret[ "v1"] = (int)regs.GPR[ 3];
ret[ "a0"] = (int)regs.GPR[ 4]; ret[ "a1"] = (int)regs.GPR[ 5]; ret[ "a2"] = (int)regs.GPR[ 6]; ret[ "a3"] = (int)regs.GPR[ 7];
ret[ "t0"] = (int)regs.GPR[ 8]; ret[ "t1"] = (int)regs.GPR[ 9]; ret[ "t2"] = (int)regs.GPR[10]; ret[ "t3"] = (int)regs.GPR[11];
ret[ "t4"] = (int)regs.GPR[12]; ret[ "t5"] = (int)regs.GPR[13]; ret[ "t6"] = (int)regs.GPR[14]; ret[ "t7"] = (int)regs.GPR[15];
ret[ "s0"] = (int)regs.GPR[16]; ret[ "s1"] = (int)regs.GPR[17]; ret[ "s2"] = (int)regs.GPR[18]; ret[ "s3"] = (int)regs.GPR[19];
ret[ "s4"] = (int)regs.GPR[20]; ret[ "s5"] = (int)regs.GPR[21]; ret[ "s6"] = (int)regs.GPR[22]; ret[ "s7"] = (int)regs.GPR[23];
ret[ "t8"] = (int)regs.GPR[24]; ret[ "t9"] = (int)regs.GPR[25];
ret[ "k0"] = (int)regs.GPR[26]; ret[ "k1"] = (int)regs.GPR[27];
ret[ "gp"] = (int)regs.GPR[28];
ret[ "sp"] = (int)regs.GPR[29];
ret[ "fp"] = (int)regs.GPR[30];
ret[ "ra"] = (int)regs.GPR[31];
ret[ "pc"] = (int)regs.PC;
ret[ "lo"] = (int)regs.LO;
ret[ "hi"] = (int)regs.HI;
ret[ "sr"] = (int)regs.SR;
ret["cause"] = (int)regs.CAUSE;
ret[ "epc"] = (int)regs.EPC;
return ret;
}
private static readonly Dictionary<string, int> CpuRegisterIndices = new Dictionary<string, int>() {
{ "r1", 1 }, { "r2", 2 }, { "r3", 3 }, { "r4", 4 }, { "r5", 5 }, { "r6", 6 }, { "r7", 7 },
{ "r8", 8 }, { "r9", 9 }, { "r10", 10 }, { "r11", 11 }, { "r12", 12 }, { "r13", 13 }, { "r14", 14 }, { "r15", 15 },
{ "r16", 16 }, { "r17", 17 }, { "r18", 18 }, { "r19", 19 }, { "r20", 20 }, { "r21", 21 }, { "r22", 22 }, { "r23", 23 },
{ "r24", 24 }, { "r25", 25 }, { "r26", 26 }, { "r27", 27 }, { "r28", 28 }, { "r29", 29 }, { "r30", 30 }, { "r31", 31 },
{ "at", 1 }, { "v0", 2 }, { "v1", 3 },
{ "a0", 4 }, { "a1", 5 }, { "a2", 6 }, { "a3", 7 },
{ "t0", 8 }, { "t1", 9 }, { "t2", 10 }, { "t3", 11 }, { "t4", 12 }, { "t5", 13 }, { "t6", 14 }, { "t7", 15 },
{ "s0", 16 }, { "s1", 17 }, { "s2", 18 }, { "s3", 19 }, { "s4", 20 }, { "s5", 21 }, { "s6", 22 }, { "s7", 23 },
{ "t8", 24 }, { "t9", 25 },
{ "k0", 26 }, { "k1", 27 },
{ "gp", 28 }, { "sp", 29 }, { "fp", 30 }, { "ra", 31 },
{ "pc", 32 },
//33 - PC_NEXT
//34 - IN_BD_SLOT
{ "lo", 35 },
{ "hi", 36 },
{ "sr", 37 },
{"cause", 38 },
{ "epc", 39 },
};
public void SetCpuRegister(string register, int value)
{
int index = CpuRegisterIndices[register];
OctoshockDll.shock_SetRegister_CPU(psx, index, (uint)value);
}
private readonly MemoryCallbackSystem _memoryCallbacks = new MemoryCallbackSystem(new[] { "System Bus" }); // Note: there is no system bus memory domain, but there's also no hard rule that the memory callback system domains have to correspond to actual domains in MemoryDomains, that could be good, or bad, but something to be careful about
public IMemoryCallbackSystem MemoryCallbacks => _memoryCallbacks;
public bool CanStep(StepType type) => false;
[FeatureNotImplemented]
public void Step(StepType type) => throw new NotImplementedException();
[FeatureNotImplemented]
public long TotalExecutedCycles => throw new NotImplementedException();
private OctoshockDll.ShockCallback_Mem mem_cb;
private void ShockMemCallback(uint address, OctoshockDll.eShockMemCb type, uint size, uint value)
{
MemoryCallbackFlags flags = 0;
switch (type)
{
case OctoshockDll.eShockMemCb.Read:
flags |= MemoryCallbackFlags.AccessRead;
break;
case OctoshockDll.eShockMemCb.Write:
flags |= MemoryCallbackFlags.AccessWrite;
break;
case OctoshockDll.eShockMemCb.Execute:
flags |= MemoryCallbackFlags.AccessExecute;
break;
}
MemoryCallbacks.CallMemoryCallbacks(address, value, (uint)flags, "System Bus");
}
private void InitMemCallbacks()
{
mem_cb = new OctoshockDll.ShockCallback_Mem(ShockMemCallback);
_memoryCallbacks.ActiveChanged += RefreshMemCallbacks;
}
private void RefreshMemCallbacks()
{
OctoshockDll.eShockMemCb mask = OctoshockDll.eShockMemCb.None;
if (MemoryCallbacks.HasReads) mask |= OctoshockDll.eShockMemCb.Read;
if (MemoryCallbacks.HasWrites) mask |= OctoshockDll.eShockMemCb.Write;
if (MemoryCallbacks.HasExecutes) mask |= OctoshockDll.eShockMemCb.Execute;
OctoshockDll.shock_SetMemCb(psx, mem_cb, mask);
}
private void SetMemoryDomains()
{
var mmd = new List<MemoryDomain>();
OctoshockDll.shock_GetMemData(psx, out var ptr, out var size, OctoshockDll.eMemType.MainRAM);
mmd.Add(new MemoryDomainIntPtr("MainRAM", MemoryDomain.Endian.Little, ptr, size, true, 4));
OctoshockDll.shock_GetMemData(psx, out ptr, out size, OctoshockDll.eMemType.GPURAM);
mmd.Add(new MemoryDomainIntPtr("GPURAM", MemoryDomain.Endian.Little, ptr, size, true, 4));
OctoshockDll.shock_GetMemData(psx, out ptr, out size, OctoshockDll.eMemType.SPURAM);
mmd.Add(new MemoryDomainIntPtr("SPURAM", MemoryDomain.Endian.Little, ptr, size, true, 4));
OctoshockDll.shock_GetMemData(psx, out ptr, out size, OctoshockDll.eMemType.BiosROM);
mmd.Add(new MemoryDomainIntPtr("BiosROM", MemoryDomain.Endian.Little, ptr, size, true, 4));
OctoshockDll.shock_GetMemData(psx, out ptr, out size, OctoshockDll.eMemType.PIOMem);
mmd.Add(new MemoryDomainIntPtr("PIOMem", MemoryDomain.Endian.Little, ptr, size, true, 4));
OctoshockDll.shock_GetMemData(psx, out ptr, out size, OctoshockDll.eMemType.DCache);
mmd.Add(new MemoryDomainIntPtr("DCache", MemoryDomain.Endian.Little, ptr, size, true, 4));
mmd.Add(new MemoryDomainDelegate("System Bus", 0x1_0000_0000, MemoryDomain.Endian.Little,
(a) => { OctoshockDll.shock_PeekMemory(psx, (uint)a, out byte v); return v; },
(a, v) => { OctoshockDll.shock_PokeMemory(psx, (uint)a, v); },
4));
MemoryDomains = new MemoryDomainList(mmd);
(ServiceProvider as BasicServiceProvider).Register<IMemoryDomains>(MemoryDomains);
}
private IMemoryDomains MemoryDomains;
}
}

View File

@ -1,27 +0,0 @@
using System.Collections.Generic;
using System.Text;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Sony.PSX
{
public partial class Octoshock : IDisassemblable
{
public string Cpu
{
get => "R3000A";
set { }
}
public IEnumerable<string> AvailableCpus { get; } = [ "R3000A" ];
public string PCRegisterName => "pc";
public string Disassemble(MemoryDomain m, uint addr, out int length)
{
length = 4;
var buf = new StringBuilder(32);
var result = OctoshockDll.shock_Util_DisassembleMIPS(addr, m.PeekUint(addr, false), buf, buf.Capacity);
return result==0?buf.ToString():"";
}
}
}

View File

@ -1,38 +0,0 @@
using System.Text;
using BizHawk.Emulation.Common;
using BizHawk.Common.NumberExtensions;
namespace BizHawk.Emulation.Cores.Sony.PSX
{
public partial class Octoshock
{
public TraceBuffer Tracer { get; private set; }
public const string TraceHeader = "R3000A: PC, machine code, mnemonic, operands, registers (GPRs, lo, hi, sr, cause, epc)";
private OctoshockDll.ShockCallback_Trace trace_cb;
public void ShockTraceCallback(IntPtr opaque, uint PC, uint inst, string dis)
{
var regs = GetCpuFlagsAndRegisters();
StringBuilder sb = new StringBuilder();
foreach (var r in regs)
{
if (r.Key != "pc")
sb.Append($"{r.Key}:{r.Value.Value.ToHexString(r.Value.BitSize / 4)} ");
}
Tracer.Put(new(disassembly: $"{PC:X8}: {inst:X8} {dis.PadRight(30)}", registerInfo: sb.ToString().Trim()));
}
private void ConnectTracer()
{
trace_cb = new OctoshockDll.ShockCallback_Trace(ShockTraceCallback);
Tracer = new TraceBuffer(TraceHeader);
ServiceProvider = new BasicServiceProvider(this);
(ServiceProvider as BasicServiceProvider).Register<ITraceable>(Tracer);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,71 +1,7 @@
//TODO - make sure msvc builds with 32bit enums and get rid of the extra marshalling fluff here
using System.Runtime.InteropServices;
using System.Text;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Sony.PSX
{
public static unsafe class OctoshockDll
public static class OctoshockDll
{
private const CallingConvention cc = CallingConvention.Cdecl;
private const string dd = "octoshock.dll";
public enum eRegion : int
{
JP = 0,
NA = 1,
EU = 2,
NONE = 3 //TODO - whats the difference between unset, and region unknown?
}
public enum eVidStandard : int
{
NTSC = 0,
PAL = 1,
}
public enum eShockStep
{
Frame
}
public enum eShockFramebufferFlags
{
None = 0,
Normalize = 1
}
public enum eMemType
{
MainRAM = 0, //2048K
BiosROM = 1, //512K
PIOMem = 2, //64K
GPURAM = 3, //512K
SPURAM = 4, //512K
DCache = 5 //1K
}
public enum eShockStateTransaction : int
{
BinarySize = 0,
BinaryLoad = 1,
BinarySave = 2,
TextLoad = 3,
TextSave = 4
}
public enum eShockMemcardTransaction
{
Connect = 0, //connects it to the addressed port (not supported yet)
Disconnect = 1, //disconnects it from the addressed port (not supported yet)
Write = 2, //writes from the frontend to the memcard
Read = 3, //reads from the memcard to the frontend. Also clears the dirty flag
CheckDirty = 4, //checks whether the memcard is dirty
}
public enum ePeripheralType : int
{
None = 0, //can be used to signify disconnection
@ -78,230 +14,5 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
Multitap = 10,
}
/// <summary>
/// this is implemented as an overall render type instead of a horizontal clip control
/// in case the Framebuffer render type ever develops any differences in its Y-handling.
/// At that time, we might need to change the GUI to separate the vertical and horizontal components, or something like that
/// </summary>
public enum eShockRenderType : int
{
Normal,
ClipOverscan,
Framebuffer
}
public enum eShockDeinterlaceMode : int
{
Weave,
Bob,
BobOffset
}
[Flags]
public enum eShockMemCb : int
{
None = 0,
Read = 1,
Write = 2,
Execute = 4
}
public const int SHOCK_OK = 0;
public const int SHOCK_FALSE = 0;
public const int SHOCK_TRUE = 1;
public const int SHOCK_ERROR = -1;
public const int SHOCK_NOCANDO = -2;
public const int SHOCK_INVALID_ADDRESS = -3;
public const int SHOCK_OVERFLOW = -4;
[StructLayout(LayoutKind.Sequential)]
public struct ShockDiscInfo
{
public eRegion region;
public unsafe fixed sbyte id[5]; //SCEI, SCEA, SCEE, etc. with null terminator
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockTOCTrack
{
public byte adr;
public byte control;
public uint lba;
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockTOC
{
public byte first_track;
public byte last_track;
public byte disc_type;
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockFramebufferInfo
{
public int width, height;
[MarshalAs(UnmanagedType.I4)]
public eShockFramebufferFlags flags;
public void* ptr;
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockRenderOptions
{
public int scanline_start, scanline_end;
public eShockRenderType renderType;
public eShockDeinterlaceMode deinterlaceMode;
public bool skip;
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockMemcardTransaction
{
[MarshalAs(UnmanagedType.I4)]
public eShockMemcardTransaction transaction;
public void* buffer128k;
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockRegisters_CPU
{
public fixed uint GPR[32];
public uint PC, PC_NEXT;
public uint IN_BD_SLOT;
public uint LO, HI;
public uint SR, CAUSE, EPC;
}
[StructLayout(LayoutKind.Sequential)]
public struct ShockStateTransaction
{
public eShockStateTransaction transaction;
public void* buffer;
public int bufferLength;
public TextStateFPtrs ff;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ShockCallback_Trace(IntPtr opaque, uint PC, uint inst, string dis);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int ShockDisc_ReadTOC(IntPtr opaque, ShockTOC* read_target, ShockTOCTrack* tracks101);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int ShockDisc_ReadLBA(IntPtr opaque, int lba, void* dst);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ShockCallback_Mem(uint address, eShockMemCb type, uint size, uint value);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Util_DisassembleMIPS(uint PC, uint instr, StringBuilder outbuf, int buflen);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_CreateDisc(out IntPtr outDisc, IntPtr Opaque, int lbaCount, ShockDisc_ReadTOC ReadTOC, ShockDisc_ReadLBA ReadLBA2448, bool suppliesDeinterleavedSubcode);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_DestroyDisc(IntPtr disc);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_AnalyzeDisc(IntPtr disc, out ShockDiscInfo info);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Create(out IntPtr psx, eRegion region, void* firmware512k);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Destroy(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Peripheral_Connect(
IntPtr psx,
int address,
[MarshalAs(UnmanagedType.I4)] ePeripheralType type
);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Peripheral_SetPadInput(IntPtr psx, int address, uint buttons, byte left_x, byte left_y, byte right_x, byte right_y);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Peripheral_SetNegconInput(IntPtr psx, int address, uint buttons, byte twist, byte analog1, byte analog2, byte analogL);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Peripheral_MemcardTransact(IntPtr psx, int address, ref ShockMemcardTransaction transaction);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Peripheral_PollActive(IntPtr psx, int address, bool clear);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_MountEXE(IntPtr psx, void* exebuf, int size, bool ignore_pcsp);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_PowerOn(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SoftReset(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_PowerOff(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_OpenTray(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SetDisc(IntPtr psx, IntPtr disc);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_PokeDisc(IntPtr psx, IntPtr disc);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_CloseTray(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SetRenderOptions(IntPtr psx, ref ShockRenderOptions opts);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_Step(IntPtr psx, eShockStep step);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_GetFramebuffer(IntPtr psx, ref ShockFramebufferInfo fb);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_GetSamples(IntPtr psx, void* buffer);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_GetMemData(
IntPtr psx,
out IntPtr ptr,
out int size,
[MarshalAs(UnmanagedType.I4)] eMemType memType
);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_StateTransaction(IntPtr psx, ref ShockStateTransaction transaction);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_GetRegisters_CPU(IntPtr psx, ref ShockRegisters_CPU buffer);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SetRegister_CPU(IntPtr psx, int index, uint value);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SetTraceCallback(IntPtr psx, IntPtr opaque, ShockCallback_Trace callback);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SetMemCb(IntPtr psx, ShockCallback_Mem cb, eShockMemCb cbMask);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_SetLEC(IntPtr psx, bool enable);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_GetGPUUnlagged(IntPtr psx);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_PeekMemory(IntPtr psx, uint address, out byte value);
[DllImport(dd, CallingConvention = cc)]
public static extern int shock_PokeMemory(IntPtr psx, uint address, byte value);
}
}

View File

@ -1,75 +0,0 @@
using System.IO;
using System.Collections.Generic;
using BizHawk.Common.IOExtensions;
namespace BizHawk.Emulation.Cores.Sony.PSX
{
public class PSF
{
public readonly IDictionary<string, string> TagsDictionary = new Dictionary<string, string>();
public readonly IList<string> LooseTags = new List<string>();
public byte[] Data;
public byte[] LibData;
public bool Load(string fpPSF, Func<Stream,int,byte[]> cbDeflater)
{
using(var fs = File.OpenRead(fpPSF))
{
//not endian safe
var br = new BinaryReader(fs);
var sig = br.ReadStringFixedUtf8(4);
if (sig != "PSF\x1")
return false;
int reserved_size = br.ReadInt32();
int compressed_size = br.ReadInt32();
int compressed_crc32 = br.ReadInt32();
//load tags
//tags run until the end of the file
fs.Position = 16 + reserved_size + compressed_size;
if (fs.Position + 5 > fs.Length)
{
//theres no space for tags, probably just no tags in the file
}
else
{
if (br.ReadStringFixedUtf8(5) == "[TAG]")
{
var tagstring = br.ReadStringFixedUtf8((int)(fs.Length - fs.Position)).Replace("\r\n", "\n");
foreach (var tag in tagstring.Split('\n', '\x0'))
{
if (tag.Trim() == "")
continue;
int eq = tag.IndexOf('=');
if (eq != -1)
TagsDictionary[tag.Substring(0, eq)] = tag.Substring(eq + 1);
else
LooseTags.Add(tag);
}
}
}
//load compressed section buffer
fs.Position = 16 + reserved_size;
Data = cbDeflater(fs, compressed_size);
//load lib if needed
if (TagsDictionary.TryGetValue("_lib", out var relPath))
{
var fpLib = Path.Combine(Path.GetDirectoryName(fpPSF), relPath);
if (!File.Exists(fpLib))
return false;
PSF lib = new PSF();
if (!lib.Load(fpLib,cbDeflater))
return false;
LibData = lib.Data;
}
}
return true;
}
}
}

View File

@ -43,7 +43,6 @@ namespace BizHawk.Emulation.Cores
public const string NeoPop = "NeoPop";
public const string Nymashock = "Nymashock";
public const string O2Hawk = "O2Hawk";
public const string Octoshock = "Octoshock";
public const string PceHawk = "PCEHawk";
public const string PicoDrive = "PicoDrive";
public const string UAE = "UAE";

View File

@ -13,38 +13,7 @@ namespace BizHawk.Emulation.Cores
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core, Action<string> showMessageBox)
{
if (core is Octoshock octo)
{
var settings = octo.GetSyncSettings();
var fioConfig = settings.FIOConfig.ToLogical();
for (int i = 0; i < fioConfig.DevicesPlayer.Length; i++)
{
if (fioConfig.DevicesPlayer[i] == OctoshockDll.ePeripheralType.None)
{
continue;
}
int pNum = i + 1;
if (fioConfig.DevicesPlayer[i] == OctoshockDll.ePeripheralType.DualAnalog || fioConfig.DevicesPlayer[i] == OctoshockDll.ePeripheralType.DualShock)
{
yield return DualShockController(pNum);
}
if (fioConfig.DevicesPlayer[i] == OctoshockDll.ePeripheralType.Pad)
{
yield return GamePadController(pNum);
}
if (fioConfig.DevicesPlayer[i] == OctoshockDll.ePeripheralType.NegCon)
{
yield return NeGcon(pNum);
}
}
yield return ConsoleButtons(octo);
}
else if (core is Nymashock nyma)
if (core is Nymashock nyma)
{
foreach (var result in nyma.ActualPortData)
{
@ -69,45 +38,6 @@ namespace BizHawk.Emulation.Cores
}
}
private static PadSchema DualShockController(int controller)
{
var stickRanges = new[] { new AxisSpec(0.RangeTo(255), 128), new AxisSpec(0.RangeTo(255), 128, isReversed: true) };
return new PadSchema
{
Size = new Size(500, 290),
DisplayName = $"DualShock Player{controller}",
Buttons = new PadSchemaControl[]
{
ButtonSchema.Up(32, 50, controller),
ButtonSchema.Down(32, 71, controller),
ButtonSchema.Left(11, 62, controller),
ButtonSchema.Right(53, 62, controller),
new ButtonSchema(3, 32, controller, "L1"),
new ButtonSchema(191, 32, controller, "R1"),
new ButtonSchema(3, 10, controller, "L2"),
new ButtonSchema(191, 10, controller, "R2"),
new ButtonSchema(72, 90, controller, "L3"),
new ButtonSchema(130, 90, controller, "R3"),
new ButtonSchema(148, 62, controller, "Square") { Icon = VGamepadButtonImage.Square },
new ButtonSchema(169, 50, controller, "Triangle") { Icon = VGamepadButtonImage.Triangle },
new ButtonSchema(190, 62, controller, "Circle") { Icon = VGamepadButtonImage.Circle },
new ButtonSchema(169, 71, controller, "Cross") { Icon = VGamepadButtonImage.Cross },
new ButtonSchema(112, 62, controller, "Start", "S"),
new ButtonSchema(90, 62, controller, "Select", "s"),
new AnalogSchema(3, 120, $"P{controller} LStick X")
{
Spec = stickRanges[0],
SecondarySpec = stickRanges[1]
},
new AnalogSchema(260, 120, $"P{controller} RStick X")
{
Spec = stickRanges[0],
SecondarySpec = stickRanges[1]
}
}
};
}
private static PadSchema NymaDualShockController(int controller)
{
var stickRanges = new[] { new AxisSpec(0.RangeTo(0xFF), 0x80), new AxisSpec(0.RangeTo(0xFF), 0x80, isReversed: true) };
@ -149,32 +79,6 @@ namespace BizHawk.Emulation.Cores
};
}
private static PadSchema GamePadController(int controller)
{
return new PadSchema
{
Size = new Size(240, 115),
DisplayName = $"Gamepad Player{controller}",
Buttons = new[]
{
ButtonSchema.Up(37, 55, controller),
ButtonSchema.Down(37, 76, controller),
ButtonSchema.Left(16, 67, controller),
ButtonSchema.Right(58, 67, controller),
new ButtonSchema(8, 37, controller, "L1"),
new ButtonSchema(196, 37, controller, "R1"),
new ButtonSchema(8, 15, controller, "L2"),
new ButtonSchema(196, 15, controller, "R2"),
new ButtonSchema(153, 67, controller, "Square") { Icon = VGamepadButtonImage.Square },
new ButtonSchema(174, 55, controller, "Triangle") { Icon = VGamepadButtonImage.Triangle },
new ButtonSchema(195, 67, controller, "Circle") { Icon = VGamepadButtonImage.Circle },
new ButtonSchema(174, 76, controller, "Cross") { Icon = VGamepadButtonImage.Cross },
new ButtonSchema(112, 67, controller, "Start", "S"),
new ButtonSchema(90, 67, controller, "Select", "s")
}
};
}
private static PadSchema NymaGamePadController(int controller)
{
return new PadSchema
@ -414,19 +318,6 @@ namespace BizHawk.Emulation.Cores
};
}
private static PadSchema ConsoleButtons(Octoshock octo)
{
return new ConsoleSchema
{
Size = new Size(310, 400),
Buttons = new PadSchemaControl[]
{
new ButtonSchema(10, 15, "Reset"),
new DiscManagerSchema(10, 54, new Size(300, 300), octo, new[] { "Open", "Close", "Disc Select" })
}
};
}
private static PadSchema NymaConsoleButtons(AxisSpec diskRange)
{
return new ConsoleSchema