Correct neutral Y position for SNES lightguns (fixes old BSNES lightguns), add in a controller button for offscreen shots for Snes9x and new BSNES, add UI option to disable drawing lightgun cursor for new BSNES

This commit is contained in:
CasualPokePlayer 2023-03-30 20:25:26 -07:00
parent 6ea7fd04d8
commit c7ea4cbd0e
7 changed files with 471 additions and 440 deletions

View File

@ -28,426 +28,438 @@
/// </summary>
private void InitializeComponent()
{
this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.cbDoubleSize = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblPriority1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblPriority0 = new BizHawk.WinForms.Controls.LocLabelEx();
this.Bg4_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg3_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg2_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg1_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg4_1Checkbox = new System.Windows.Forms.CheckBox();
this.Bg3_1Checkbox = new System.Windows.Forms.CheckBox();
this.Bg2_1Checkbox = new System.Windows.Forms.CheckBox();
this.Bg1_1Checkbox = new System.Windows.Forms.CheckBox();
this.Obj4Checkbox = new System.Windows.Forms.CheckBox();
this.Obj3Checkbox = new System.Windows.Forms.CheckBox();
this.Obj2Checkbox = new System.Windows.Forms.CheckBox();
this.Obj1Checkbox = new System.Windows.Forms.CheckBox();
this.EntropyBox = new System.Windows.Forms.ComboBox();
this.RegionBox = new System.Windows.Forms.ComboBox();
this.cbGameHotfixes = new System.Windows.Forms.CheckBox();
this.cbFastPPU = new System.Windows.Forms.CheckBox();
this.cbCropSGBFrame = new System.Windows.Forms.CheckBox();
this.cbUseSGB2 = new System.Windows.Forms.CheckBox();
this.cbFastDSP = new System.Windows.Forms.CheckBox();
this.cbFastCoprocessor = new System.Windows.Forms.CheckBox();
this.cbNoPPUSpriteLimit = new System.Windows.Forms.CheckBox();
this.AspectRatioCorrectionBox = new System.Windows.Forms.ComboBox();
this.cbShowOverscan = new System.Windows.Forms.CheckBox();
this.SatellaviewCartridgeBox = new System.Windows.Forms.ComboBox();
this.lblSatellaviewCartridge = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblAspectRatioCorrection = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblRegion = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblEntropy = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblDoubleSize = new BizHawk.WinForms.Controls.LocLabelEx();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// 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(136, 392);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 26;
this.btnOk.Text = "OK";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.BtnOk_Click);
//
// 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(217, 392);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 0;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// cbDoubleSize
//
this.cbDoubleSize.AutoSize = true;
this.cbDoubleSize.Location = new System.Drawing.Point(16, 16);
this.cbDoubleSize.Name = "cbDoubleSize";
this.cbDoubleSize.Size = new System.Drawing.Size(178, 17);
this.cbDoubleSize.TabIndex = 1;
this.cbDoubleSize.Text = "Always Double-Size Framebuffer";
this.cbDoubleSize.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.lblPriority1);
this.groupBox1.Controls.Add(this.lblPriority0);
this.groupBox1.Controls.Add(this.Bg4_0Checkbox);
this.groupBox1.Controls.Add(this.Bg3_0Checkbox);
this.groupBox1.Controls.Add(this.Bg2_0Checkbox);
this.groupBox1.Controls.Add(this.Bg1_0Checkbox);
this.groupBox1.Controls.Add(this.Bg4_1Checkbox);
this.groupBox1.Controls.Add(this.Bg3_1Checkbox);
this.groupBox1.Controls.Add(this.Bg2_1Checkbox);
this.groupBox1.Controls.Add(this.Bg1_1Checkbox);
this.groupBox1.Controls.Add(this.Obj4Checkbox);
this.groupBox1.Controls.Add(this.Obj3Checkbox);
this.groupBox1.Controls.Add(this.Obj2Checkbox);
this.groupBox1.Controls.Add(this.Obj1Checkbox);
this.groupBox1.Location = new System.Drawing.Point(18, 269);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(274, 115);
this.groupBox1.TabIndex = 13;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Display";
//
// lblPriority1
//
this.lblPriority1.Location = new System.Drawing.Point(220, 14);
this.lblPriority1.MaximumSize = new System.Drawing.Size(100, 0);
this.lblPriority1.Name = "lblPriority1";
this.lblPriority1.Text = "Priority 1";
//
// lblPriority0
//
this.lblPriority0.Location = new System.Drawing.Point(162, 14);
this.lblPriority0.MaximumSize = new System.Drawing.Size(100, 0);
this.lblPriority0.Name = "lblPriority0";
this.lblPriority0.Text = "Priority 0";
this.lblPriority0.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Bg4_0Checkbox
//
this.Bg4_0Checkbox.AutoSize = true;
this.Bg4_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg4_0Checkbox.Location = new System.Drawing.Point(128, 93);
this.Bg4_0Checkbox.Name = "Bg4_0Checkbox";
this.Bg4_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg4_0Checkbox.TabIndex = 24;
this.Bg4_0Checkbox.Text = "BG 4 ";
this.Bg4_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg3_0Checkbox
//
this.Bg3_0Checkbox.AutoSize = true;
this.Bg3_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg3_0Checkbox.Location = new System.Drawing.Point(128, 72);
this.Bg3_0Checkbox.Name = "Bg3_0Checkbox";
this.Bg3_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg3_0Checkbox.TabIndex = 22;
this.Bg3_0Checkbox.Text = "BG 3 ";
this.Bg3_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg2_0Checkbox
//
this.Bg2_0Checkbox.AutoSize = true;
this.Bg2_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg2_0Checkbox.Location = new System.Drawing.Point(128, 51);
this.Bg2_0Checkbox.Name = "Bg2_0Checkbox";
this.Bg2_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg2_0Checkbox.TabIndex = 20;
this.Bg2_0Checkbox.Text = "BG 2 ";
this.Bg2_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg1_0Checkbox
//
this.Bg1_0Checkbox.AutoSize = true;
this.Bg1_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg1_0Checkbox.Location = new System.Drawing.Point(128, 30);
this.Bg1_0Checkbox.Name = "Bg1_0Checkbox";
this.Bg1_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg1_0Checkbox.TabIndex = 18;
this.Bg1_0Checkbox.Text = "BG 1 ";
this.Bg1_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg4_1Checkbox
//
this.Bg4_1Checkbox.AutoSize = true;
this.Bg4_1Checkbox.Location = new System.Drawing.Point(234, 94);
this.Bg4_1Checkbox.Name = "Bg4_1Checkbox";
this.Bg4_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg4_1Checkbox.TabIndex = 25;
this.Bg4_1Checkbox.UseVisualStyleBackColor = true;
//
// Bg3_1Checkbox
//
this.Bg3_1Checkbox.AutoSize = true;
this.Bg3_1Checkbox.Location = new System.Drawing.Point(234, 73);
this.Bg3_1Checkbox.Name = "Bg3_1Checkbox";
this.Bg3_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg3_1Checkbox.TabIndex = 23;
this.Bg3_1Checkbox.UseVisualStyleBackColor = true;
//
// Bg2_1Checkbox
//
this.Bg2_1Checkbox.AutoSize = true;
this.Bg2_1Checkbox.Location = new System.Drawing.Point(234, 52);
this.Bg2_1Checkbox.Name = "Bg2_1Checkbox";
this.Bg2_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg2_1Checkbox.TabIndex = 21;
this.Bg2_1Checkbox.UseVisualStyleBackColor = true;
//
// Bg1_1Checkbox
//
this.Bg1_1Checkbox.AutoSize = true;
this.Bg1_1Checkbox.Location = new System.Drawing.Point(234, 31);
this.Bg1_1Checkbox.Name = "Bg1_1Checkbox";
this.Bg1_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg1_1Checkbox.TabIndex = 19;
this.Bg1_1Checkbox.UseVisualStyleBackColor = true;
//
// Obj4Checkbox
//
this.Obj4Checkbox.AutoSize = true;
this.Obj4Checkbox.Location = new System.Drawing.Point(21, 93);
this.Obj4Checkbox.Name = "Obj4Checkbox";
this.Obj4Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj4Checkbox.TabIndex = 17;
this.Obj4Checkbox.Text = "OBJ 4";
this.Obj4Checkbox.UseVisualStyleBackColor = true;
//
// Obj3Checkbox
//
this.Obj3Checkbox.AutoSize = true;
this.Obj3Checkbox.Location = new System.Drawing.Point(21, 72);
this.Obj3Checkbox.Name = "Obj3Checkbox";
this.Obj3Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj3Checkbox.TabIndex = 16;
this.Obj3Checkbox.Text = "OBJ 3";
this.Obj3Checkbox.UseVisualStyleBackColor = true;
//
// Obj2Checkbox
//
this.Obj2Checkbox.AutoSize = true;
this.Obj2Checkbox.Location = new System.Drawing.Point(21, 51);
this.Obj2Checkbox.Name = "Obj2Checkbox";
this.Obj2Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj2Checkbox.TabIndex = 15;
this.Obj2Checkbox.Text = "OBJ 2";
this.Obj2Checkbox.UseVisualStyleBackColor = true;
//
// Obj1Checkbox
//
this.Obj1Checkbox.AutoSize = true;
this.Obj1Checkbox.Location = new System.Drawing.Point(21, 30);
this.Obj1Checkbox.Name = "Obj1Checkbox";
this.Obj1Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj1Checkbox.TabIndex = 14;
this.Obj1Checkbox.Text = "OBJ 1";
this.Obj1Checkbox.UseVisualStyleBackColor = true;
//
// EntropyBox
//
this.EntropyBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.EntropyBox.FormattingEnabled = true;
this.EntropyBox.Location = new System.Drawing.Point(17, 198);
this.EntropyBox.Name = "EntropyBox";
this.EntropyBox.Size = new System.Drawing.Size(128, 21);
this.EntropyBox.TabIndex = 10;
//
// RegionBox
//
this.RegionBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.RegionBox.FormattingEnabled = true;
this.RegionBox.Location = new System.Drawing.Point(162, 243);
this.RegionBox.Name = "RegionBox";
this.RegionBox.Size = new System.Drawing.Size(128, 21);
this.RegionBox.TabIndex = 13;
//
// cbGameHotfixes
//
this.cbGameHotfixes.AutoSize = true;
this.cbGameHotfixes.Location = new System.Drawing.Point(161, 81);
this.cbGameHotfixes.Name = "cbGameHotfixes";
this.cbGameHotfixes.Size = new System.Drawing.Size(93, 17);
this.cbGameHotfixes.TabIndex = 3;
this.cbGameHotfixes.Text = "Game hotfixes";
this.cbGameHotfixes.UseVisualStyleBackColor = true;
//
// cbFastPPU
//
this.cbFastPPU.AutoSize = true;
this.cbFastPPU.Location = new System.Drawing.Point(161, 129);
this.cbFastPPU.Name = "cbFastPPU";
this.cbFastPPU.Size = new System.Drawing.Size(90, 17);
this.cbFastPPU.TabIndex = 7;
this.cbFastPPU.Text = "Use fast PPU";
this.cbFastPPU.UseVisualStyleBackColor = true;
this.cbFastPPU.CheckedChanged += new System.EventHandler(this.FastPPU_CheckedChanged);
//
// cbCropSGBFrame
//
this.cbCropSGBFrame.AutoSize = true;
this.cbCropSGBFrame.Location = new System.Drawing.Point(16, 81);
this.cbCropSGBFrame.Name = "cbCropSGBFrame";
this.cbCropSGBFrame.Size = new System.Drawing.Size(105, 17);
this.cbCropSGBFrame.TabIndex = 2;
this.cbCropSGBFrame.Text = "Crop SGB Frame";
this.cbCropSGBFrame.UseVisualStyleBackColor = true;
//
// cbUseSGB2
//
this.cbUseSGB2.AutoSize = true;
this.cbUseSGB2.Location = new System.Drawing.Point(16, 105);
this.cbUseSGB2.Name = "cbUseSGB2";
this.cbUseSGB2.Size = new System.Drawing.Size(76, 17);
this.cbUseSGB2.TabIndex = 4;
this.cbUseSGB2.Text = "Use SGB2";
this.cbUseSGB2.UseVisualStyleBackColor = true;
//
// cbFastDSP
//
this.cbFastDSP.AutoSize = true;
this.cbFastDSP.Location = new System.Drawing.Point(161, 105);
this.cbFastDSP.Name = "cbFastDSP";
this.cbFastDSP.Size = new System.Drawing.Size(101, 17);
this.cbFastDSP.TabIndex = 5;
this.cbFastDSP.Text = "DSP Fast Mode";
this.cbFastDSP.UseVisualStyleBackColor = true;
//
// cbFastCoprocessor
//
this.cbFastCoprocessor.AutoSize = true;
this.cbFastCoprocessor.Location = new System.Drawing.Point(161, 153);
this.cbFastCoprocessor.Name = "cbFastCoprocessor";
this.cbFastCoprocessor.Size = new System.Drawing.Size(138, 17);
this.cbFastCoprocessor.TabIndex = 9;
this.cbFastCoprocessor.Text = "Coprocessor Fast Mode";
this.cbFastCoprocessor.UseVisualStyleBackColor = true;
//
// cbNoPPUSpriteLimit
//
this.cbNoPPUSpriteLimit.AutoSize = true;
this.cbNoPPUSpriteLimit.Location = new System.Drawing.Point(16, 153);
this.cbNoPPUSpriteLimit.Name = "cbNoPPUSpriteLimit";
this.cbNoPPUSpriteLimit.Size = new System.Drawing.Size(113, 17);
this.cbNoPPUSpriteLimit.TabIndex = 8;
this.cbNoPPUSpriteLimit.Text = "No PPU sprite limit";
this.cbNoPPUSpriteLimit.UseVisualStyleBackColor = true;
//
// AspectRatioCorrectionBox
//
this.AspectRatioCorrectionBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.AspectRatioCorrectionBox.FormattingEnabled = true;
this.AspectRatioCorrectionBox.Location = new System.Drawing.Point(162, 198);
this.AspectRatioCorrectionBox.Name = "AspectRatioCorrectionBox";
this.AspectRatioCorrectionBox.Size = new System.Drawing.Size(128, 21);
this.AspectRatioCorrectionBox.TabIndex = 11;
//
// cbShowOverscan
//
this.cbShowOverscan.AutoSize = true;
this.cbShowOverscan.Location = new System.Drawing.Point(16, 129);
this.cbShowOverscan.Name = "cbShowOverscan";
this.cbShowOverscan.Size = new System.Drawing.Size(102, 17);
this.cbShowOverscan.TabIndex = 6;
this.cbShowOverscan.Text = "Show Overscan";
this.cbShowOverscan.UseVisualStyleBackColor = true;
//
// SatellaviewCartridgeBox
//
this.SatellaviewCartridgeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.SatellaviewCartridgeBox.FormattingEnabled = true;
this.SatellaviewCartridgeBox.Location = new System.Drawing.Point(17, 243);
this.SatellaviewCartridgeBox.Name = "SatellaviewCartridgeBox";
this.SatellaviewCartridgeBox.Size = new System.Drawing.Size(128, 21);
this.SatellaviewCartridgeBox.TabIndex = 12;
//
// lblSatellaviewCartridge
//
this.lblSatellaviewCartridge.Location = new System.Drawing.Point(14, 227);
this.lblSatellaviewCartridge.Name = "lblSatellaviewCartridge";
this.lblSatellaviewCartridge.Text = "Satellaview cartridge";
//
// lblAspectRatioCorrection
//
this.lblAspectRatioCorrection.Location = new System.Drawing.Point(159, 182);
this.lblAspectRatioCorrection.Name = "lblAspectRatioCorrection";
this.lblAspectRatioCorrection.Text = "Aspect Ratio Correction";
//
// lblRegion
//
this.lblRegion.Location = new System.Drawing.Point(159, 227);
this.lblRegion.Name = "lblRegion";
this.lblRegion.Text = "Region";
//
// lblEntropy
//
this.lblEntropy.Location = new System.Drawing.Point(14, 182);
this.lblEntropy.Name = "lblEntropy";
this.lblEntropy.Text = "Entropy";
//
// lblDoubleSize
//
this.lblDoubleSize.Location = new System.Drawing.Point(31, 33);
this.lblDoubleSize.MaximumSize = new System.Drawing.Size(260, 0);
this.lblDoubleSize.Name = "lblDoubleSize";
this.lblDoubleSize.Text = "Some games are changing the resolution constantly (e.g. SD3) so this option can f" +
"orce the SNES output to stay double-size always.";
//
// BSNESOptions
//
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(304, 423);
this.Controls.Add(this.SatellaviewCartridgeBox);
this.Controls.Add(this.lblSatellaviewCartridge);
this.Controls.Add(this.cbShowOverscan);
this.Controls.Add(this.AspectRatioCorrectionBox);
this.Controls.Add(this.lblAspectRatioCorrection);
this.Controls.Add(this.cbNoPPUSpriteLimit);
this.Controls.Add(this.cbFastCoprocessor);
this.Controls.Add(this.cbFastDSP);
this.Controls.Add(this.cbUseSGB2);
this.Controls.Add(this.cbCropSGBFrame);
this.Controls.Add(this.cbFastPPU);
this.Controls.Add(this.cbGameHotfixes);
this.Controls.Add(this.lblRegion);
this.Controls.Add(this.lblEntropy);
this.Controls.Add(this.EntropyBox);
this.Controls.Add(this.RegionBox);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.lblDoubleSize);
this.Controls.Add(this.cbDoubleSize);
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 = "BSNESOptions";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "BSNES Options";
this.Load += new System.EventHandler(this.OnLoad);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.cbDoubleSize = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblPriority1 = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblPriority0 = new BizHawk.WinForms.Controls.LocLabelEx();
this.Bg4_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg3_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg2_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg1_0Checkbox = new System.Windows.Forms.CheckBox();
this.Bg4_1Checkbox = new System.Windows.Forms.CheckBox();
this.Bg3_1Checkbox = new System.Windows.Forms.CheckBox();
this.Bg2_1Checkbox = new System.Windows.Forms.CheckBox();
this.Bg1_1Checkbox = new System.Windows.Forms.CheckBox();
this.Obj4Checkbox = new System.Windows.Forms.CheckBox();
this.Obj3Checkbox = new System.Windows.Forms.CheckBox();
this.Obj2Checkbox = new System.Windows.Forms.CheckBox();
this.Obj1Checkbox = new System.Windows.Forms.CheckBox();
this.EntropyBox = new System.Windows.Forms.ComboBox();
this.RegionBox = new System.Windows.Forms.ComboBox();
this.cbGameHotfixes = new System.Windows.Forms.CheckBox();
this.cbFastPPU = new System.Windows.Forms.CheckBox();
this.cbCropSGBFrame = new System.Windows.Forms.CheckBox();
this.cbUseSGB2 = new System.Windows.Forms.CheckBox();
this.cbFastDSP = new System.Windows.Forms.CheckBox();
this.cbFastCoprocessor = new System.Windows.Forms.CheckBox();
this.cbNoPPUSpriteLimit = new System.Windows.Forms.CheckBox();
this.AspectRatioCorrectionBox = new System.Windows.Forms.ComboBox();
this.cbShowOverscan = new System.Windows.Forms.CheckBox();
this.cbShowCursor = new System.Windows.Forms.CheckBox();
this.SatellaviewCartridgeBox = new System.Windows.Forms.ComboBox();
this.lblSatellaviewCartridge = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblAspectRatioCorrection = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblRegion = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblEntropy = new BizHawk.WinForms.Controls.LocLabelEx();
this.lblDoubleSize = new BizHawk.WinForms.Controls.LocLabelEx();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// 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(136, 405);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 26;
this.btnOk.Text = "OK";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.BtnOk_Click);
//
// 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(217, 405);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 0;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// cbDoubleSize
//
this.cbDoubleSize.AutoSize = true;
this.cbDoubleSize.Location = new System.Drawing.Point(16, 16);
this.cbDoubleSize.Name = "cbDoubleSize";
this.cbDoubleSize.Size = new System.Drawing.Size(178, 17);
this.cbDoubleSize.TabIndex = 1;
this.cbDoubleSize.Text = "Always Double-Size Framebuffer";
this.cbDoubleSize.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.lblPriority1);
this.groupBox1.Controls.Add(this.lblPriority0);
this.groupBox1.Controls.Add(this.Bg4_0Checkbox);
this.groupBox1.Controls.Add(this.Bg3_0Checkbox);
this.groupBox1.Controls.Add(this.Bg2_0Checkbox);
this.groupBox1.Controls.Add(this.Bg1_0Checkbox);
this.groupBox1.Controls.Add(this.Bg4_1Checkbox);
this.groupBox1.Controls.Add(this.Bg3_1Checkbox);
this.groupBox1.Controls.Add(this.Bg2_1Checkbox);
this.groupBox1.Controls.Add(this.Bg1_1Checkbox);
this.groupBox1.Controls.Add(this.Obj4Checkbox);
this.groupBox1.Controls.Add(this.Obj3Checkbox);
this.groupBox1.Controls.Add(this.Obj2Checkbox);
this.groupBox1.Controls.Add(this.Obj1Checkbox);
this.groupBox1.Location = new System.Drawing.Point(18, 282);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(274, 115);
this.groupBox1.TabIndex = 13;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Display";
//
// lblPriority1
//
this.lblPriority1.Location = new System.Drawing.Point(220, 14);
this.lblPriority1.MaximumSize = new System.Drawing.Size(100, 0);
this.lblPriority1.Name = "lblPriority1";
this.lblPriority1.Text = "Priority 1";
//
// lblPriority0
//
this.lblPriority0.Location = new System.Drawing.Point(162, 14);
this.lblPriority0.MaximumSize = new System.Drawing.Size(100, 0);
this.lblPriority0.Name = "lblPriority0";
this.lblPriority0.Text = "Priority 0";
this.lblPriority0.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Bg4_0Checkbox
//
this.Bg4_0Checkbox.AutoSize = true;
this.Bg4_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg4_0Checkbox.Location = new System.Drawing.Point(128, 93);
this.Bg4_0Checkbox.Name = "Bg4_0Checkbox";
this.Bg4_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg4_0Checkbox.TabIndex = 24;
this.Bg4_0Checkbox.Text = "BG 4 ";
this.Bg4_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg3_0Checkbox
//
this.Bg3_0Checkbox.AutoSize = true;
this.Bg3_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg3_0Checkbox.Location = new System.Drawing.Point(128, 72);
this.Bg3_0Checkbox.Name = "Bg3_0Checkbox";
this.Bg3_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg3_0Checkbox.TabIndex = 22;
this.Bg3_0Checkbox.Text = "BG 3 ";
this.Bg3_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg2_0Checkbox
//
this.Bg2_0Checkbox.AutoSize = true;
this.Bg2_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg2_0Checkbox.Location = new System.Drawing.Point(128, 51);
this.Bg2_0Checkbox.Name = "Bg2_0Checkbox";
this.Bg2_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg2_0Checkbox.TabIndex = 20;
this.Bg2_0Checkbox.Text = "BG 2 ";
this.Bg2_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg1_0Checkbox
//
this.Bg1_0Checkbox.AutoSize = true;
this.Bg1_0Checkbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.Bg1_0Checkbox.Location = new System.Drawing.Point(128, 30);
this.Bg1_0Checkbox.Name = "Bg1_0Checkbox";
this.Bg1_0Checkbox.Size = new System.Drawing.Size(62, 17);
this.Bg1_0Checkbox.TabIndex = 18;
this.Bg1_0Checkbox.Text = "BG 1 ";
this.Bg1_0Checkbox.UseVisualStyleBackColor = true;
//
// Bg4_1Checkbox
//
this.Bg4_1Checkbox.AutoSize = true;
this.Bg4_1Checkbox.Location = new System.Drawing.Point(234, 94);
this.Bg4_1Checkbox.Name = "Bg4_1Checkbox";
this.Bg4_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg4_1Checkbox.TabIndex = 25;
this.Bg4_1Checkbox.UseVisualStyleBackColor = true;
//
// Bg3_1Checkbox
//
this.Bg3_1Checkbox.AutoSize = true;
this.Bg3_1Checkbox.Location = new System.Drawing.Point(234, 73);
this.Bg3_1Checkbox.Name = "Bg3_1Checkbox";
this.Bg3_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg3_1Checkbox.TabIndex = 23;
this.Bg3_1Checkbox.UseVisualStyleBackColor = true;
//
// Bg2_1Checkbox
//
this.Bg2_1Checkbox.AutoSize = true;
this.Bg2_1Checkbox.Location = new System.Drawing.Point(234, 52);
this.Bg2_1Checkbox.Name = "Bg2_1Checkbox";
this.Bg2_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg2_1Checkbox.TabIndex = 21;
this.Bg2_1Checkbox.UseVisualStyleBackColor = true;
//
// Bg1_1Checkbox
//
this.Bg1_1Checkbox.AutoSize = true;
this.Bg1_1Checkbox.Location = new System.Drawing.Point(234, 31);
this.Bg1_1Checkbox.Name = "Bg1_1Checkbox";
this.Bg1_1Checkbox.Size = new System.Drawing.Size(15, 14);
this.Bg1_1Checkbox.TabIndex = 19;
this.Bg1_1Checkbox.UseVisualStyleBackColor = true;
//
// Obj4Checkbox
//
this.Obj4Checkbox.AutoSize = true;
this.Obj4Checkbox.Location = new System.Drawing.Point(21, 93);
this.Obj4Checkbox.Name = "Obj4Checkbox";
this.Obj4Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj4Checkbox.TabIndex = 17;
this.Obj4Checkbox.Text = "OBJ 4";
this.Obj4Checkbox.UseVisualStyleBackColor = true;
//
// Obj3Checkbox
//
this.Obj3Checkbox.AutoSize = true;
this.Obj3Checkbox.Location = new System.Drawing.Point(21, 72);
this.Obj3Checkbox.Name = "Obj3Checkbox";
this.Obj3Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj3Checkbox.TabIndex = 16;
this.Obj3Checkbox.Text = "OBJ 3";
this.Obj3Checkbox.UseVisualStyleBackColor = true;
//
// Obj2Checkbox
//
this.Obj2Checkbox.AutoSize = true;
this.Obj2Checkbox.Location = new System.Drawing.Point(21, 51);
this.Obj2Checkbox.Name = "Obj2Checkbox";
this.Obj2Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj2Checkbox.TabIndex = 15;
this.Obj2Checkbox.Text = "OBJ 2";
this.Obj2Checkbox.UseVisualStyleBackColor = true;
//
// Obj1Checkbox
//
this.Obj1Checkbox.AutoSize = true;
this.Obj1Checkbox.Location = new System.Drawing.Point(21, 30);
this.Obj1Checkbox.Name = "Obj1Checkbox";
this.Obj1Checkbox.Size = new System.Drawing.Size(55, 17);
this.Obj1Checkbox.TabIndex = 14;
this.Obj1Checkbox.Text = "OBJ 1";
this.Obj1Checkbox.UseVisualStyleBackColor = true;
//
// EntropyBox
//
this.EntropyBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.EntropyBox.FormattingEnabled = true;
this.EntropyBox.Location = new System.Drawing.Point(16, 215);
this.EntropyBox.Name = "EntropyBox";
this.EntropyBox.Size = new System.Drawing.Size(128, 21);
this.EntropyBox.TabIndex = 10;
//
// RegionBox
//
this.RegionBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.RegionBox.FormattingEnabled = true;
this.RegionBox.Location = new System.Drawing.Point(162, 255);
this.RegionBox.Name = "RegionBox";
this.RegionBox.Size = new System.Drawing.Size(128, 21);
this.RegionBox.TabIndex = 13;
//
// cbGameHotfixes
//
this.cbGameHotfixes.AutoSize = true;
this.cbGameHotfixes.Location = new System.Drawing.Point(161, 81);
this.cbGameHotfixes.Name = "cbGameHotfixes";
this.cbGameHotfixes.Size = new System.Drawing.Size(93, 17);
this.cbGameHotfixes.TabIndex = 3;
this.cbGameHotfixes.Text = "Game hotfixes";
this.cbGameHotfixes.UseVisualStyleBackColor = true;
//
// cbFastPPU
//
this.cbFastPPU.AutoSize = true;
this.cbFastPPU.Location = new System.Drawing.Point(161, 129);
this.cbFastPPU.Name = "cbFastPPU";
this.cbFastPPU.Size = new System.Drawing.Size(90, 17);
this.cbFastPPU.TabIndex = 7;
this.cbFastPPU.Text = "Use fast PPU";
this.cbFastPPU.UseVisualStyleBackColor = true;
this.cbFastPPU.CheckedChanged += new System.EventHandler(this.FastPPU_CheckedChanged);
//
// cbCropSGBFrame
//
this.cbCropSGBFrame.AutoSize = true;
this.cbCropSGBFrame.Location = new System.Drawing.Point(16, 81);
this.cbCropSGBFrame.Name = "cbCropSGBFrame";
this.cbCropSGBFrame.Size = new System.Drawing.Size(105, 17);
this.cbCropSGBFrame.TabIndex = 2;
this.cbCropSGBFrame.Text = "Crop SGB Frame";
this.cbCropSGBFrame.UseVisualStyleBackColor = true;
//
// cbUseSGB2
//
this.cbUseSGB2.AutoSize = true;
this.cbUseSGB2.Location = new System.Drawing.Point(16, 105);
this.cbUseSGB2.Name = "cbUseSGB2";
this.cbUseSGB2.Size = new System.Drawing.Size(76, 17);
this.cbUseSGB2.TabIndex = 4;
this.cbUseSGB2.Text = "Use SGB2";
this.cbUseSGB2.UseVisualStyleBackColor = true;
//
// cbFastDSP
//
this.cbFastDSP.AutoSize = true;
this.cbFastDSP.Location = new System.Drawing.Point(161, 105);
this.cbFastDSP.Name = "cbFastDSP";
this.cbFastDSP.Size = new System.Drawing.Size(101, 17);
this.cbFastDSP.TabIndex = 5;
this.cbFastDSP.Text = "DSP Fast Mode";
this.cbFastDSP.UseVisualStyleBackColor = true;
//
// cbFastCoprocessor
//
this.cbFastCoprocessor.AutoSize = true;
this.cbFastCoprocessor.Location = new System.Drawing.Point(161, 153);
this.cbFastCoprocessor.Name = "cbFastCoprocessor";
this.cbFastCoprocessor.Size = new System.Drawing.Size(138, 17);
this.cbFastCoprocessor.TabIndex = 9;
this.cbFastCoprocessor.Text = "Coprocessor Fast Mode";
this.cbFastCoprocessor.UseVisualStyleBackColor = true;
//
// cbNoPPUSpriteLimit
//
this.cbNoPPUSpriteLimit.AutoSize = true;
this.cbNoPPUSpriteLimit.Location = new System.Drawing.Point(16, 153);
this.cbNoPPUSpriteLimit.Name = "cbNoPPUSpriteLimit";
this.cbNoPPUSpriteLimit.Size = new System.Drawing.Size(113, 17);
this.cbNoPPUSpriteLimit.TabIndex = 8;
this.cbNoPPUSpriteLimit.Text = "No PPU sprite limit";
this.cbNoPPUSpriteLimit.UseVisualStyleBackColor = true;
//
// AspectRatioCorrectionBox
//
this.AspectRatioCorrectionBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.AspectRatioCorrectionBox.FormattingEnabled = true;
this.AspectRatioCorrectionBox.Location = new System.Drawing.Point(161, 215);
this.AspectRatioCorrectionBox.Name = "AspectRatioCorrectionBox";
this.AspectRatioCorrectionBox.Size = new System.Drawing.Size(128, 21);
this.AspectRatioCorrectionBox.TabIndex = 11;
//
// cbShowOverscan
//
this.cbShowOverscan.AutoSize = true;
this.cbShowOverscan.Location = new System.Drawing.Point(16, 129);
this.cbShowOverscan.Name = "cbShowOverscan";
this.cbShowOverscan.Size = new System.Drawing.Size(102, 17);
this.cbShowOverscan.TabIndex = 6;
this.cbShowOverscan.Text = "Show Overscan";
this.cbShowOverscan.UseVisualStyleBackColor = true;
//
// cbShowCursor
//
this.cbShowCursor.AutoSize = true;
this.cbShowCursor.Location = new System.Drawing.Point(16, 176);
this.cbShowCursor.Name = "cbShowCursor";
this.cbShowCursor.Size = new System.Drawing.Size(130, 17);
this.cbShowCursor.TabIndex = 27;
this.cbShowCursor.Text = "Show Lightgun Cursor";
this.cbShowCursor.UseVisualStyleBackColor = true;
//
// SatellaviewCartridgeBox
//
this.SatellaviewCartridgeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.SatellaviewCartridgeBox.FormattingEnabled = true;
this.SatellaviewCartridgeBox.Location = new System.Drawing.Point(16, 255);
this.SatellaviewCartridgeBox.Name = "SatellaviewCartridgeBox";
this.SatellaviewCartridgeBox.Size = new System.Drawing.Size(128, 21);
this.SatellaviewCartridgeBox.TabIndex = 12;
//
// lblSatellaviewCartridge
//
this.lblSatellaviewCartridge.Location = new System.Drawing.Point(14, 239);
this.lblSatellaviewCartridge.Name = "lblSatellaviewCartridge";
this.lblSatellaviewCartridge.Text = "Satellaview cartridge";
//
// lblAspectRatioCorrection
//
this.lblAspectRatioCorrection.Location = new System.Drawing.Point(159, 198);
this.lblAspectRatioCorrection.Name = "lblAspectRatioCorrection";
this.lblAspectRatioCorrection.Text = "Aspect Ratio Correction";
//
// lblRegion
//
this.lblRegion.Location = new System.Drawing.Point(159, 239);
this.lblRegion.Name = "lblRegion";
this.lblRegion.Text = "Region";
//
// lblEntropy
//
this.lblEntropy.Location = new System.Drawing.Point(13, 198);
this.lblEntropy.Name = "lblEntropy";
this.lblEntropy.Text = "Entropy";
//
// lblDoubleSize
//
this.lblDoubleSize.Location = new System.Drawing.Point(31, 33);
this.lblDoubleSize.MaximumSize = new System.Drawing.Size(260, 0);
this.lblDoubleSize.Name = "lblDoubleSize";
this.lblDoubleSize.Text = "Some games are changing the resolution constantly (e.g. SD3) so this option can f" +
"orce the SNES output to stay double-size always.";
//
// BSNESOptions
//
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(304, 436);
this.Controls.Add(this.SatellaviewCartridgeBox);
this.Controls.Add(this.lblSatellaviewCartridge);
this.Controls.Add(this.cbShowCursor);
this.Controls.Add(this.cbShowOverscan);
this.Controls.Add(this.AspectRatioCorrectionBox);
this.Controls.Add(this.lblAspectRatioCorrection);
this.Controls.Add(this.cbNoPPUSpriteLimit);
this.Controls.Add(this.cbFastCoprocessor);
this.Controls.Add(this.cbFastDSP);
this.Controls.Add(this.cbUseSGB2);
this.Controls.Add(this.cbCropSGBFrame);
this.Controls.Add(this.cbFastPPU);
this.Controls.Add(this.cbGameHotfixes);
this.Controls.Add(this.lblRegion);
this.Controls.Add(this.lblEntropy);
this.Controls.Add(this.EntropyBox);
this.Controls.Add(this.RegionBox);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.lblDoubleSize);
this.Controls.Add(this.cbDoubleSize);
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 = "BSNESOptions";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "BSNES Options";
this.Load += new System.EventHandler(this.OnLoad);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -486,6 +498,7 @@
private System.Windows.Forms.ComboBox AspectRatioCorrectionBox;
private WinForms.Controls.LocLabelEx lblAspectRatioCorrection;
private System.Windows.Forms.CheckBox cbShowOverscan;
private System.Windows.Forms.CheckBox cbShowCursor;
private WinForms.Controls.LocLabelEx lblSatellaviewCartridge;
private System.Windows.Forms.ComboBox SatellaviewCartridgeBox;
}

View File

@ -37,6 +37,7 @@ namespace BizHawk.Client.EmuHawk
CropSGBFrame = s.CropSGBFrame,
NoPPUSpriteLimit = s.NoPPUSpriteLimit,
ShowOverscan = s.ShowOverscan,
ShowCursor = s.ShowCursor,
Hotfixes = ss.Hotfixes,
FastPPU = ss.FastPPU,
FastDSP = ss.FastDSP,
@ -63,6 +64,7 @@ namespace BizHawk.Client.EmuHawk
s.CropSGBFrame = dlg.CropSGBFrame;
s.NoPPUSpriteLimit = dlg.NoPPUSpriteLimit;
s.ShowOverscan = dlg.ShowOverscan;
s.ShowCursor = dlg.ShowCursor;
s.AspectRatioCorrection = dlg.AspectRatioCorrection;
ss.Entropy = dlg.Entropy;
ss.RegionOverride = dlg.RegionOverride;
@ -111,6 +113,12 @@ namespace BizHawk.Client.EmuHawk
{
get => cbShowOverscan.Checked;
init => cbShowOverscan.Checked = value;
}
private bool ShowCursor
{
get => cbShowCursor.Checked;
init => cbShowCursor.Checked = value;
}
private BsnesApi.ASPECT_RATIO_CORRECTION AspectRatioCorrection => (BsnesApi.ASPECT_RATIO_CORRECTION)AspectRatioCorrectionBox.SelectedIndex;

View File

@ -27,6 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
public abstract void snes_set_ppu_sprite_limit_enabled(bool enabled);
[BizImport(CallingConvention.Cdecl)]
public abstract void snes_set_overscan_enabled(bool enabled);
[BizImport(CallingConvention.Cdecl)]
public abstract void snes_set_cursor_enabled(bool enabled);
[BizImport(CallingConvention.Cdecl)]
public abstract IntPtr snes_get_audiobuffer_and_size(out int size);

View File

@ -303,13 +303,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
internal class BsnesSuperScopeController : IBsnesController
{
private static readonly ControllerDefinition _definition = new ControllerDefinition("(SNES Controller fragment)")
{ BoolButtons = { "0Trigger", "0Cursor", "0Turbo", "0Pause" } }
{ BoolButtons = { "0Trigger", "0Cursor", "0Turbo", "0Pause", "0Offscreen" } }
.AddLightGun("0Scope {0}");
public ControllerDefinition Definition => _definition;
public short GetState(IController controller, int index, int id)
{
if (id is 0 or 1 && controller.IsPressed("0Offscreen"))
return -1;
return id switch
{
0 => (short) controller.AxisValue("0Scope X"),
@ -326,11 +329,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
{
Definition = chained
? new ControllerDefinition("(SNES Controller fragment)")
{ BoolButtons = { "0Trigger", "0Start", "1Trigger", "1Start" } }
{ BoolButtons = { "0Trigger", "0Start", "0Offscreen", "1Trigger", "1Start", "1Offscreen" } }
.AddLightGun("0Justifier {0}")
.AddLightGun("1Justifier {0}")
: new ControllerDefinition("(SNES Controller fragment)")
{BoolButtons = { "0Trigger", "0Start"} }
{ BoolButtons = { "0Trigger", "0Start", "0Offscreen" } }
.AddLightGun("0Justifier {0}");
_chained = chained;
}
@ -344,11 +347,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
if (index == 1 && !_chained)
return 0;
if (id is 0 or 1 && controller.IsPressed($"{index}Offscreen"))
return -1;
return id switch
{
0 => (short) controller.AxisValue($"{index}Justifier X"),
1 => (short) controller.AxisValue($"{index}Justifier Y"),
2 or 3 => (short) (controller.IsPressed(Definition.BoolButtons[index * 2 + id - 2]) ? 1 : 0),
2 or 3 => (short) (controller.IsPressed(Definition.BoolButtons[index * 3 + id - 2]) ? 1 : 0),
_ => 0
};
}

View File

@ -54,6 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
Api.core.snes_set_layer_enables(ref enables);
Api.core.snes_set_ppu_sprite_limit_enabled(!o.NoPPUSpriteLimit);
Api.core.snes_set_overscan_enabled(o.ShowOverscan);
Api.core.snes_set_cursor_enabled(o.ShowCursor);
}
_settings = o;
@ -92,6 +93,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
public bool CropSGBFrame { get; set; }
public bool NoPPUSpriteLimit { get; set; }
public bool ShowOverscan { get; set; }
public bool ShowCursor { get; set; }
public BsnesApi.ASPECT_RATIO_CORRECTION AspectRatioCorrection { get; set; } = BsnesApi.ASPECT_RATIO_CORRECTION.Auto;
}

View File

@ -90,12 +90,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
internal static class SNESControllerDefExtensions
{
/// <remarks>
/// problem: when you're in 240 line mode, the limit on Y needs to be 240. when you're in 224 mode, it needs to be 224.
/// problem: when you're in 240 line mode, the limit on Y needs to be 0-239. when you're in 224 mode, it needs to be 0-224.
/// perhaps the deck needs to account for this...
/// for reference Snes9x is always in 224 mode
/// </remarks>
public static ControllerDefinition AddLightGun(this ControllerDefinition def, string nameFormat)
=> def.AddXYPair(nameFormat, AxisPairOrientation.RightAndUp, 0.RangeTo(256), 128, 0.RangeTo(240), 0); //TODO verify direction against hardware
=> def.AddXYPair(nameFormat, AxisPairOrientation.RightAndDown, 0.RangeTo(255), 128, 0.RangeTo(239), 120); //TODO verify direction against hardware
}
public interface ILibsnesController
@ -331,7 +331,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
public LibsnesApi.SNES_INPUT_PORT PortType => LibsnesApi.SNES_INPUT_PORT.SuperScope;
private static readonly ControllerDefinition _definition
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Cursor", "0Turbo", "0Pause" } }
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Cursor", "0Turbo", "0Pause", "0Offscreen" } }
.AddLightGun("0Scope {0}");
public ControllerDefinition Definition => _definition;
@ -343,11 +343,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
default:
return 0;
case 0:
var x = (int)controller.AxisValue("0Scope X");
return (short)x;
if (controller.IsPressed("0Offscreen")) return -1;
return (short)controller.AxisValue("0Scope X");
case 1:
var y = (int)controller.AxisValue("0Scope Y");
return (short)y;
if (controller.IsPressed("0Offscreen")) return -1;
return (short)controller.AxisValue("0Scope Y");
case 2:
return (short)(controller.IsPressed("0Trigger") ? 1 : 0);
case 3:
@ -365,7 +365,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
public LibsnesApi.SNES_INPUT_PORT PortType => LibsnesApi.SNES_INPUT_PORT.Justifier;
private static readonly ControllerDefinition _definition
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Start", "1Trigger", "1Start" } }
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Start", "0Offscreen", "1Trigger", "1Start", "1Offscreen" } }
.AddLightGun("0Justifier {0}")
.AddLightGun("1Justifier {0}");
@ -378,11 +378,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
default:
return 0;
case 0:
var x = (int)controller.AxisValue(index + "Justifier X");
return (short)x;
if (controller.IsPressed(index + "Offscreen")) return -1;
return (short)controller.AxisValue(index + "Justifier X");
case 1:
var y = (int)controller.AxisValue(index + "Justifier Y");
return (short)y;
if (controller.IsPressed(index + "Offscreen")) return -1;
return (short)controller.AxisValue(index + "Justifier Y");
case 2:
return (short)(controller.IsPressed(index + "Trigger") ? 1 : 0);
case 3:

View File

@ -198,7 +198,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
public void ApplyState(IController controller, short[] input, int offset)
{
foreach (var s in Definition.Axes.Keys)
input[offset++] = (short)(controller.AxisValue(s));
input[offset++] = (short)controller.AxisValue(s);
foreach (var s in Definition.BoolButtons)
input[offset++] = (short)(controller.IsPressed(s) ? 1 : 0);
}
@ -208,7 +208,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
{
private static readonly ControllerDefinition _definition
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Mouse Left", "0Mouse Right" } }
.AddXYPair("0Mouse {0}", AxisPairOrientation.RightAndUp, (-127).RangeTo(127), 0); //TODO verify direction against hardware
.AddXYPair("0Mouse {0}", AxisPairOrientation.RightAndDown, (-127).RangeTo(127), 0); //TODO verify direction against hardware
public override ControllerDefinition Definition => _definition;
}
@ -216,7 +216,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
private class SuperScope : Analog
{
private static readonly ControllerDefinition _definition
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Cursor", "0Turbo", "0Pause" } }
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Cursor", "0Turbo", "0Pause", "0Offscreen" } }
.AddLightGun("0Scope {0}");
public override ControllerDefinition Definition => _definition;
@ -225,7 +225,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
private class Justifier : Analog
{
private static readonly ControllerDefinition _definition
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Start" } }
= new ControllerDefinition("(SNES Controller fragment)") { BoolButtons = { "0Trigger", "0Start", "0Offscreen" } }
.AddLightGun("0Justifier {0}");
public override ControllerDefinition Definition => _definition;