ChannelFHawk: Default controls and VirtualPad

This commit is contained in:
Asnivor 2024-09-04 17:36:57 +01:00
parent 999c7c2a80
commit 5d37fb1ec2
2 changed files with 83 additions and 0 deletions

View File

@ -242,6 +242,29 @@
"Insert Previous Disk": "F10",
"Get Disk Status": "F12"
},
"ChannelF Controller": {
"P1 Forward": "Keypad8, J1 POV1U, X1 DpadUp, X1 LStickUp",
"P1 Back": "Keypad2, J1 POV1D, X1 DpadDown, X1 LStickDown",
"P1 Left": "Keypad4, J1 POV1L, X1 DpadLeft, X1 LStickLeft",
"P1 Right": "Keypad6, J1 POV1R, X1 DpadRight, X1 LStickRight",
"P1 CCW": "Left, J1 Z-, X1 RStickLeft",
"P1 CW": "Right, J1 Z+, X1 RStickRight",
"P1 Pull": "Up, J1 RotationZ-, X1 RStickUp",
"P1 Push": "Down, J1 RotationZ+, X1 RStickDown",
"TIME": "F1",
"MODE": "F2",
"HOLD": "F3",
"START": "F4",
"RESET": "F5",
"P2 Forward": "W, J2 POV1U, X2 DpadUp, X2 LStickUp",
"P2 Back": "S, J2 POV1D, X2 DpadDown, X2 LStickDown",
"P2 Left": "A, J2 POV1L, X2 DpadLeft, X2 LStickLeft",
"P2 Right": "D, J2 POV1R, X2 DpadRight, X2 LStickRight",
"P2 CCW": "J, J2 Z-, X2 RStickLeft",
"P2 CW": "L, J2 Z+, X2 RStickRight",
"P2 Pull": "I, J2 RotationZ-, X2 RStickUp",
"P2 Push": "K, J2 RotationZ+, X2 RStickDown",
},
"Intellivision Controller": {
"P1 Up": "Up, J1 POV1U, X1 DpadUp, X1 LStickUp",
"P1 Down": "Down, J1 POV1D, X1 DpadDown, X1 LStickDown",

View File

@ -0,0 +1,60 @@

using BizHawk.Emulation.Common;
using System.Collections.Generic;
using System.Drawing;
namespace BizHawk.Emulation.Cores
{
[Schema(VSystemID.Raw.ChannelF)]
internal class ChannelFSchema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core, Action<string> showMessageBox)
{
yield return Joystick(1);
yield return Joystick(2);
yield return Console();
}
private static PadSchema Joystick(int controller)
{
string post = controller == 2 ? " (LEFT)" : " (RIGHT)";
return new PadSchema
{
DisplayName = $"Controller {controller} {post}",
Size = new Size(150, 160),
Buttons = new[]
{
new ButtonSchema(10, 25, controller, "CCW", "CCW"),
new ButtonSchema(92, 25, controller, "CW", " CW "),
new ButtonSchema(60, 35, controller, "Forward", "U"),
new ButtonSchema(60, 57, controller, "Back", "D"),
new ButtonSchema(38, 57, controller, "Left", "L"),
new ButtonSchema(85, 57, controller, "Right", "R"),
new ButtonSchema(10, 80, controller, "Pull", "PULL"),
new ButtonSchema(92, 80, controller, "Push", "PUSH")
}
};
}
private static PadSchema Console()
{
return new PadSchema
{
DisplayName = "Console",
Size = new Size(70, 160),
Buttons = new[]
{
new ButtonSchema(10, 25, "TIME"),
new ButtonSchema(10, 50, "MODE"),
new ButtonSchema(10, 75, "HOLD"),
new ButtonSchema(10, 100, "START"),
new ButtonSchema(10, 125, "RESET")
}
};
}
}
}