コード例 #1
0
ファイル: Psx.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition Justifier(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "PSX Konami Justifier";
            device.CommandStart = "psx.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "O", MednafenCommand = device.CommandStart + ".justifier.o"
                },
                new Mapping {
                    Description = "Offscreen Shot(Simulated)", MednafenCommand = device.CommandStart + ".guncon.offscreen_shot"
                },
                new Mapping {
                    Description = "Start", MednafenCommand = device.CommandStart + ".justifier.start"
                },
                new Mapping {
                    Description = "Trigger", MednafenCommand = device.CommandStart + ".justifier.trigger"
                },
                new Mapping {
                    Description = "X Axis", MednafenCommand = device.CommandStart + ".justifier.x_axis"
                },
                new Mapping {
                    Description = "Y Axis", MednafenCommand = device.CommandStart + ".justifier.y_axis"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #2
0
        public static DeviceDefinition DualShock(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "PSX DualShock GamePad";
            device.ControllerName = "dualshock";
            device.CommandStart   = "psx.input.port" + VirtualPort;
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };

            device.CustomOptions = new List <NonControlMapping>
            {
                new NonControlMapping {
                    Description     = "Analog axis scale coefficient",
                    MednafenCommand = device.CommandStart + ".dualshock.axis_scale",
                    MinValue        = 1, MaxValue = 1.5,
                    ContType        = ContrType.UPDOWN,
                    TickFrequency   = 0.01,
                    ConvType        = ConvertionType.DOUBLE
                },
            };

            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #3
0
ファイル: Snes.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition Superscope(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SNES Super Scope";
            device.CommandStart = "snes.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "Cursor", MednafenCommand = device.CommandStart + ".superscope.cursor"
                },
                new Mapping {
                    Description = "Offscreen Shot(Simulated)", MednafenCommand = device.CommandStart + ".superscope.offscreen_shot"
                },
                new Mapping {
                    Description = "Pause", MednafenCommand = device.CommandStart + ".superscope.pause"
                },
                new Mapping {
                    Description = "Trigger", MednafenCommand = device.CommandStart + ".superscope.trigger"
                },
                new Mapping {
                    Description = "Turbo", MednafenCommand = device.CommandStart + ".superscope.turbo"
                },
                new Mapping {
                    Description = "X Axis", MednafenCommand = device.CommandStart + ".superscope.x_axis"
                },
                new Mapping {
                    Description = "Y Axis", MednafenCommand = device.CommandStart + ".superscope.y_axis"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #4
0
ファイル: Pcfx.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "PCFX GamePad";
            device.CommandStart = "pcfx.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = device.CommandStart + ".gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = device.CommandStart + ".gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = device.CommandStart + ".gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = device.CommandStart + ".gamepad.right"
                },
                new Mapping {
                    Description = "SELECT", MednafenCommand = device.CommandStart + ".gamepad.select"
                },
                new Mapping {
                    Description = "RUN", MednafenCommand = device.CommandStart + ".gamepad.run"
                },
                new Mapping {
                    Description = "MODE 1", MednafenCommand = device.CommandStart + ".gamepad.mode1"
                },
                new Mapping {
                    Description = "MODE 2", MednafenCommand = device.CommandStart + ".gamepad.mode2"
                },
                new Mapping {
                    Description = "I", MednafenCommand = device.CommandStart + ".gamepad.i"
                },
                new Mapping {
                    Description = "II", MednafenCommand = device.CommandStart + ".gamepad.ii"
                },
                new Mapping {
                    Description = "III", MednafenCommand = device.CommandStart + ".gamepad.iii"
                },
                new Mapping {
                    Description = "IV", MednafenCommand = device.CommandStart + ".gamepad.iv"
                },
                new Mapping {
                    Description = "V", MednafenCommand = device.CommandStart + ".gamepad.v"
                },
                new Mapping {
                    Description = "VI", MednafenCommand = device.CommandStart + ".gamepad.vi"
                },

                /*
                 * new Mapping { Description = "Rapid I", MednafenCommand = device.CommandStart +".gamepad.rapid_i" },
                 * new Mapping { Description = "Rapid II", MednafenCommand = device.CommandStart +".gamepad.rapid_ii" }
                 */
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #5
0
ファイル: Pce.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition Mouse(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "PCE Mouse";
            device.CommandStart = "pce.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "Left Button", MednafenCommand = device.CommandStart + ".mouse.left"
                },
                new Mapping {
                    Description = "Right Button", MednafenCommand = device.CommandStart + ".mouse.right"
                },
                new Mapping {
                    Description = "RUN", MednafenCommand = device.CommandStart + ".mouse.run"
                },
                new Mapping {
                    Description = "SELECT", MednafenCommand = device.CommandStart + ".mouse.select"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #6
0
        public static DeviceDefinition MegaMouse(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "MD Mega Mouse";
            device.CommandStart = "md.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "Left Button", MednafenCommand = device.CommandStart + ".megamouse.left"
                },
                new Mapping {
                    Description = "Middle Button", MednafenCommand = device.CommandStart + ".megamouse.middle"
                },
                new Mapping {
                    Description = "Right Button", MednafenCommand = device.CommandStart + ".megamouse.right"
                },
                new Mapping {
                    Description = "Start Button", MednafenCommand = device.CommandStart + ".gamepad6.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".megamouse.start"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #7
0
ファイル: Pce.cs プロジェクト: OldSchoolOnline/MedLaunch
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "PCE GamePad";
            device.CommandStart   = "pce.input.port" + VirtualPort;
            device.ControllerName = "gamepad";
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };

            device.CustomOptions = new List <NonControlMapping>
            {
                new NonControlMapping {
                    Description     = "Default position for 'MODE' switch",
                    MednafenCommand = device.CommandStart + ".gamepad.mode_select.defpos",
                    MinValue        = 2, MaxValue = 6,
                    Values          = new List <string>
                    {
                        "2", "6"
                    },
                    ContType = ContrType.COMBO,
                    ConvType = ConvertionType.STRING
                },
            };

            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #8
0
        public static DeviceDefinition Gun(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SS Light Gun";
            device.CommandStart = "ss.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "Offscreen Shot(Simulated)", MednafenCommand = device.CommandStart + ".gun.offscreen_shot"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".gun.start"
                },
                new Mapping {
                    Description = "Trigger", MednafenCommand = device.CommandStart + ".gun.trigger"
                },
                new Mapping {
                    Description = "X Axis", MednafenCommand = device.CommandStart + ".gun.x_axis"
                },
                new Mapping {
                    Description = "Y Axis", MednafenCommand = device.CommandStart + ".gun.y_axis"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #9
0
        public static DeviceDefinition Zapper(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "NES Zapper";
            device.CommandStart = "nes.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "Away Trigger", MednafenCommand = device.CommandStart + ".zapper.away_trigger"
                },
                new Mapping {
                    Description = "Trigger", MednafenCommand = device.CommandStart + ".zapper.trigger"
                },
                new Mapping {
                    Description = "X Axis", MednafenCommand = device.CommandStart + ".zapper.x_axis"
                },
                new Mapping {
                    Description = "Y Axis", MednafenCommand = device.CommandStart + ".zapper.y_axis"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #10
0
ファイル: Nes.cs プロジェクト: OldSchoolOnline/MedLaunch
        public static DeviceDefinition ArkanoidPaddle(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            if (VirtualPort == 666)
            {
                device.CommandStart = "nes.input.fcexp"; // + VirtualPort;
            }
            else
            {
                device.CommandStart = "nes.input.port" + VirtualPort;
            }
            device.DeviceName     = "NES Arkanoid Paddle";
            device.ControllerName = "arkanoid";
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };

            DeviceDefinition.ParseOptionsFromConfig(device);

            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #11
0
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "GB GamePad";
            device.CommandStart = "gb.input.builtin";
            device.VirtualPort  = 0;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = "gb.input.builtin.gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = "gb.input.builtin.gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = "gb.input.builtin.gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = "gb.input.builtin.gamepad.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = "gb.input.builtin.gamepad.start"
                },
                new Mapping {
                    Description = "SELECT", MednafenCommand = "gb.input.builtin.gamepad.select"
                },
                new Mapping {
                    Description = "A", MednafenCommand = "gb.input.builtin.gamepad.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = "gb.input.builtin.gamepad.b"
                },
                new Mapping {
                    Description = "Rapid A", MednafenCommand = "gb.input.builtin.gamepad.rapid_a"
                },
                new Mapping {
                    Description = "Rapid B", MednafenCommand = "gb.input.builtin.gamepad.rapid_b"
                },
                new Mapping {
                    Description = "Tilt: UP ↑", MednafenCommand = "gb.input.tilt.tilt.up"
                },
                new Mapping {
                    Description = "Tilt: DOWN ↓", MednafenCommand = "gb.input.tilt.tilt.down"
                },
                new Mapping {
                    Description = "Tilt: LEFT ←", MednafenCommand = "gb.input.tilt.tilt.left"
                },
                new Mapping {
                    Description = "Tilt: RIGHT →", MednafenCommand = "gb.input.tilt.tilt.right"
                },
            };

            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #12
0
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SS Digital GamePad";
            device.CommandStart = "ss.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "D-Pad UP ↑", MednafenCommand = device.CommandStart + ".gamepad.up"
                },
                new Mapping {
                    Description = "D-Pad DOWN ↓", MednafenCommand = device.CommandStart + ".gamepad.down"
                },
                new Mapping {
                    Description = "D-Pad LEFT ←", MednafenCommand = device.CommandStart + ".gamepad.left"
                },
                new Mapping {
                    Description = "D-Pad RIGHT →", MednafenCommand = device.CommandStart + ".gamepad.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".gamepad.start"
                },
                new Mapping {
                    Description = "A", MednafenCommand = device.CommandStart + ".gamepad.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = device.CommandStart + ".gamepad.b"
                },
                new Mapping {
                    Description = "C", MednafenCommand = device.CommandStart + ".gamepad.c"
                },
                new Mapping {
                    Description = "X", MednafenCommand = device.CommandStart + ".gamepad.x"
                },
                new Mapping {
                    Description = "Y", MednafenCommand = device.CommandStart + ".gamepad.y"
                },
                new Mapping {
                    Description = "Z", MednafenCommand = device.CommandStart + ".gamepad.z"
                },
                new Mapping {
                    Description = "Left Shoulder", MednafenCommand = device.CommandStart + ".gamepad.ls"
                },
                new Mapping {
                    Description = "Right Shoulder", MednafenCommand = device.CommandStart + ".gamepad.rs"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #13
0
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "LYNX GamePad";
            device.CommandStart = "lynx.input.builtin";
            device.VirtualPort  = 0;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = "lynx.input.builtin.gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = "lynx.input.builtin.gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = "lynx.input.builtin.gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = "lynx.input.builtin.gamepad.right"
                },
                new Mapping {
                    Description = "PAUSE", MednafenCommand = "lynx.input.builtin.gamepad.pause"
                },
                new Mapping {
                    Description = "A (outer)", MednafenCommand = "lynx.input.builtin.gamepad.a"
                },
                new Mapping {
                    Description = "B (inner)", MednafenCommand = "lynx.input.builtin.gamepad.b"
                },
                new Mapping {
                    Description = "Option 1 (upper)", MednafenCommand = "lynx.input.builtin.gamepad.option_1"
                },
                new Mapping {
                    Description = "Option 2 (lower)", MednafenCommand = "lynx.input.builtin.gamepad.option_2"
                },
                new Mapping {
                    Description = "Rapid A (outer)", MednafenCommand = "lynx.input.builtin.gamepad.rapid_a"
                },
                new Mapping {
                    Description = "Rapid B (inner)", MednafenCommand = "lynx.input.builtin.gamepad.rapid_b"
                },
                new Mapping {
                    Description = "Rapid Option 1 (upper)", MednafenCommand = "lynx.input.builtin.gamepad.rapid_option_1"
                },
                new Mapping {
                    Description = "Rapid Option 2 (lower)", MednafenCommand = "lynx.input.builtin.gamepad.rapid_option_2"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #14
0
        public static DeviceDefinition Wheel(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SS Steering Wheel";
            device.CommandStart = "ss.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "Analog LEFT ←", MednafenCommand = device.CommandStart + ".wheel.analog_left"
                },
                new Mapping {
                    Description = "Analog RIGHT →", MednafenCommand = device.CommandStart + ".wheel.analog_right"
                },
                new Mapping {
                    Description = "L Gear Shift(Equiv. UP ↑)", MednafenCommand = device.CommandStart + ".wheel.up"
                },
                new Mapping {
                    Description = "R Gear Shift(Equiv. DOWN ↓)", MednafenCommand = device.CommandStart + ".wheel.down"
                },
                new Mapping {
                    Description = "Throttle Up (Analog)", MednafenCommand = device.CommandStart + ".mission.throttle_up"
                },
                new Mapping {
                    Description = "Throttle Down (Analog)", MednafenCommand = device.CommandStart + ".mission.throttle_down"
                },

                new Mapping {
                    Description = "X (L Group)", MednafenCommand = device.CommandStart + ".wheel.x"
                },
                new Mapping {
                    Description = "Y (L Group)", MednafenCommand = device.CommandStart + ".wheel.y"
                },
                new Mapping {
                    Description = "Z (L Group)", MednafenCommand = device.CommandStart + ".wheel.z"
                },
                new Mapping {
                    Description = "A (R Group)", MednafenCommand = device.CommandStart + ".wheel.a"
                },
                new Mapping {
                    Description = "B (R Group)", MednafenCommand = device.CommandStart + ".wheel.b"
                },
                new Mapping {
                    Description = "C (R Group)", MednafenCommand = device.CommandStart + ".wheel.c"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #15
0
        public static IDeviceDefinition Misc(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "Misc Bindings";
            device.CommandStart = "command";
            device.VirtualPort  = 0;
            device.MapList      = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };
            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #16
0
        public static DeviceDefinition Mouse(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "SNES Mouse";
            device.CommandStart   = "snes.input.port" + VirtualPort;
            device.ControllerName = "mouse";
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };
            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #17
0
        public static DeviceDefinition Justifier(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "PSX Konami Justifier";
            device.ControllerName = "justifier";
            device.CommandStart   = "psx.input.port" + VirtualPort;
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };
            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #18
0
ファイル: Ngp.cs プロジェクト: OldSchoolOnline/MedLaunch
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "NGP GamePad";
            device.CommandStart   = "ngp.input.builtin";
            device.ControllerName = "gamepad";
            device.VirtualPort    = 0;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };
            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #19
0
ファイル: Pce.cs プロジェクト: OldSchoolOnline/MedLaunch
        public static DeviceDefinition Tsushin(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "PCE Tsushin Keyboard";
            device.CommandStart   = "pce.input.port" + VirtualPort;
            device.ControllerName = "tsushinkb";
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };
            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #20
0
ファイル: Wswan.cs プロジェクト: newton9278/MedLaunch
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "WSWAN GamePad";
            device.CommandStart = "wswan.input.builtin";
            device.VirtualPort  = 0;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "X1(X UP ↑)", MednafenCommand = "wswan.input.builtin.gamepad.up-x"
                },
                new Mapping {
                    Description = "X3(X DOWN ↓)", MednafenCommand = "wswan.input.builtin.gamepad.down-x"
                },
                new Mapping {
                    Description = "X4(X LEFT ←)", MednafenCommand = "wswan.input.builtin.gamepad.left-x"
                },
                new Mapping {
                    Description = "X2(X RIGHT →)", MednafenCommand = "wswan.input.builtin.gamepad.right-x"
                },
                new Mapping {
                    Description = "Y1(Y UP ↑)", MednafenCommand = "wswan.input.builtin.gamepad.up-y"
                },
                new Mapping {
                    Description = "Y3(Y DOWN ↓)", MednafenCommand = "wswan.input.builtin.gamepad.down-y"
                },
                new Mapping {
                    Description = "Y4(Y LEFT ←)", MednafenCommand = "wswan.input.builtin.gamepad.left-y"
                },
                new Mapping {
                    Description = "Y2(Y RIGHT →)", MednafenCommand = "wswan.input.builtin.gamepad.right-y"
                },
                new Mapping {
                    Description = "START", MednafenCommand = "wswan.input.builtin.gamepad.start"
                },
                new Mapping {
                    Description = "A", MednafenCommand = "wswan.input.builtin.gamepad.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = "wswan.input.builtin.gamepad.b"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #21
0
        public static DeviceDefinition ThreeButton(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "MD GamePad (3-Button)";
            device.CommandStart = "md.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = device.CommandStart + ".gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = device.CommandStart + ".gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = device.CommandStart + ".gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = device.CommandStart + ".gamepad.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".gamepad.start"
                },
                new Mapping {
                    Description = "A", MednafenCommand = device.CommandStart + ".gamepad.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = device.CommandStart + ".gamepad.b"
                },
                new Mapping {
                    Description = "C", MednafenCommand = device.CommandStart + ".gamepad.c"
                },
                new Mapping {
                    Description = "Rapid A", MednafenCommand = device.CommandStart + ".gamepad.rapid_a"
                },
                new Mapping {
                    Description = "Rapid B", MednafenCommand = device.CommandStart + ".gamepad.rapid_b"
                },
                new Mapping {
                    Description = "Rapid C", MednafenCommand = device.CommandStart + ".gamepad.rapid_c"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #22
0
ファイル: Psx.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition NeGcon(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "PSX NeGcon Controller";
            device.CommandStart = "psx.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "D-Pad UP ↑", MednafenCommand = device.CommandStart + ".negcon.up"
                },
                new Mapping {
                    Description = "D-Pad DOWN ↓", MednafenCommand = device.CommandStart + ".negcon.down"
                },
                new Mapping {
                    Description = "D-Pad LEFT ←", MednafenCommand = device.CommandStart + ".negcon.left"
                },
                new Mapping {
                    Description = "D-Pad RIGHT →", MednafenCommand = device.CommandStart + ".negcon.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".negcon.start"
                },
                new Mapping {
                    Description = "A", MednafenCommand = device.CommandStart + ".negcon.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = device.CommandStart + ".negcon.b"
                },
                new Mapping {
                    Description = "I (Analog)", MednafenCommand = device.CommandStart + ".negcon.i"
                },
                new Mapping {
                    Description = "II (Analog)", MednafenCommand = device.CommandStart + ".negcon.ii"
                },
                new Mapping {
                    Description = "Twist ↑|↓ (Analog, Turn Left)", MednafenCommand = device.CommandStart + ".negcon.twist_ccwise"
                },
                new Mapping {
                    Description = "Twist ↓|↑ (Analog, Turn Right)", MednafenCommand = device.CommandStart + ".negcon.twist_cwise"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #23
0
ファイル: Md.cs プロジェクト: OldSchoolOnline/MedLaunch
        public static DeviceDefinition SixButton(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName     = "MD GamePad (6-Button)";
            device.CommandStart   = "md.input.port" + VirtualPort;
            device.ControllerName = "gamepad6";
            device.VirtualPort    = VirtualPort;
            device.MapList        = new List <Mapping>
            {
                /* MapList is now autogenerated from mednafen.cfg */
            };

            DeviceDefinition.ParseOptionsFromConfig(device);
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #24
0
        /// <summary>
        /// populate DeviceDefinition object with config strings from mednafen config
        /// </summary>
        /// <param name="deviceDef"></param>
        public static void PopulateConfig(DeviceDefinition deviceDef)
        {
            // get all config strings from the mednafen config file that match the 'CommandStart' property of deviceDef
            List <string> cfgs = File.ReadAllLines(Paths.GetPaths().mednafenExe + @"\mednafen-09x.cfg").Where(a => a.Contains(deviceDef.CommandStart)).ToList();

            // iterate through each mapping and set the config string
            for (int i = 0; i < deviceDef.MapList.Count; i++)
            {
                string cName = deviceDef.MapList[i].MednafenCommand;

                // look up the config command in the string list
                string lookup = (from a in cfgs
                                 where a.Contains(cName + " ")
                                 select a).FirstOrDefault();

                if (lookup == null || lookup == "" || lookup == " ")
                {
                    // command wasnt found
                    continue;
                }

                // if there is no config set for this command - continue
                if (!lookup.Contains(" "))
                {
                    continue;
                }

                // command was found - get just the config details
                string[] arr = lookup.Split(' ');

                // build the new string without the command
                StringBuilder sb = new StringBuilder();
                for (int c = 1; c < arr.Length; c++)
                {
                    sb.Append(arr[c]);
                    sb.Append(" ");
                }
                string cfg = sb.ToString().TrimEnd();

                // update deviceDef with the config
                deviceDef.MapList[i].Config = cfg;
            }
        }
コード例 #25
0
ファイル: Psx.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition DancePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "PSX DancePad";
            device.CommandStart = "psx.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "D-Pad UP ↑", MednafenCommand = device.CommandStart + ".dancepad.up"
                },
                new Mapping {
                    Description = "D-Pad DOWN ↓", MednafenCommand = device.CommandStart + ".dancepad.down"
                },
                new Mapping {
                    Description = "D-Pad LEFT ←", MednafenCommand = device.CommandStart + ".dancepad.left"
                },
                new Mapping {
                    Description = "D-Pad RIGHT →", MednafenCommand = device.CommandStart + ".dancepad.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".dancepad.start"
                },
                new Mapping {
                    Description = "SELECT", MednafenCommand = device.CommandStart + ".dancepad.select"
                },
                new Mapping {
                    Description = "△ (upper)", MednafenCommand = device.CommandStart + ".dancepad.triangle"
                },
                new Mapping {
                    Description = "○ (right)", MednafenCommand = device.CommandStart + ".dancepad.circle"
                },
                new Mapping {
                    Description = "x (lower)", MednafenCommand = device.CommandStart + ".dancepad.cross"
                },
                new Mapping {
                    Description = "□ (left)", MednafenCommand = device.CommandStart + ".dancepad.square"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #26
0
ファイル: Gg.cs プロジェクト: newton9278/MedLaunch
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "GG GamePad";
            device.CommandStart = "gg.input.builtin";
            device.VirtualPort  = 0;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = "gg.input.builtin.gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = "gg.input.builtin.gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = "gg.input.builtin.gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = "gg.input.builtin.gamepad.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = "gg.input.builtin.gamepad.start"
                },
                new Mapping {
                    Description = "Button 1", MednafenCommand = "gg.input.builtin.gamepad.button1"
                },
                new Mapping {
                    Description = "Button 2", MednafenCommand = "gg.input.builtin.gamepad.button2"
                },
                new Mapping {
                    Description = "Rapid Button 1", MednafenCommand = "gg.input.builtin.gamepad.rapid_button1"
                },
                new Mapping {
                    Description = "Rapid Button 2", MednafenCommand = "gg.input.builtin.gamepad.rapid_button2"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #27
0
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "NGP GamePad";
            device.CommandStart = "ngp.input.builtin";
            device.VirtualPort  = 0;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = "ngp.input.builtin.gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = "ngp.input.builtin.gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = "ngp.input.builtin.gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = "ngp.input.builtin.gamepad.right"
                },
                new Mapping {
                    Description = "OPTION", MednafenCommand = "ngp.input.builtin.gamepad.option"
                },
                new Mapping {
                    Description = "A", MednafenCommand = "ngp.input.builtin.gamepad.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = "ngp.input.builtin.gamepad.b"
                },
                new Mapping {
                    Description = "Rapid A", MednafenCommand = "ngp.input.builtin.gamepad.rapid_a"
                },
                new Mapping {
                    Description = "Rapid B", MednafenCommand = "ngp.input.builtin.gamepad.rapid_b"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #28
0
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SMS GamePad";
            device.CommandStart = "sms.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "UP ↑", MednafenCommand = device.CommandStart + ".gamepad.up"
                },
                new Mapping {
                    Description = "DOWN ↓", MednafenCommand = device.CommandStart + ".gamepad.down"
                },
                new Mapping {
                    Description = "LEFT ←", MednafenCommand = device.CommandStart + ".gamepad.left"
                },
                new Mapping {
                    Description = "RIGHT →", MednafenCommand = device.CommandStart + ".gamepad.right"
                },
                new Mapping {
                    Description = "Fire 1/Start", MednafenCommand = device.CommandStart + ".gamepad.fire1"
                },
                new Mapping {
                    Description = "Fire 2", MednafenCommand = device.CommandStart + ".gamepad.fire2"
                },
                new Mapping {
                    Description = "Rapid Fire 1/Start", MednafenCommand = device.CommandStart + ".gamepad.rapid_fire1"
                },
                new Mapping {
                    Description = "Rapid Fire 2", MednafenCommand = device.CommandStart + ".gamepad.rapid_fire2"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #29
0
        public static DeviceDefinition ThreeD(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SS 3D Control Pad";
            device.CommandStart = "ss.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "D-Pad UP ↑", MednafenCommand = device.CommandStart + ".3dpad.up"
                },
                new Mapping {
                    Description = "D-Pad DOWN ↓", MednafenCommand = device.CommandStart + ".3dpad.down"
                },
                new Mapping {
                    Description = "D-Pad LEFT ←", MednafenCommand = device.CommandStart + ".3dpad.left"
                },
                new Mapping {
                    Description = "D-Pad RIGHT →", MednafenCommand = device.CommandStart + ".3dpad.right"
                },
                new Mapping {
                    Description = "Analog UP ↑", MednafenCommand = device.CommandStart + ".3dpad.analog_up"
                },
                new Mapping {
                    Description = "Analog DOWN ↓", MednafenCommand = device.CommandStart + ".3dpad.analog_down"
                },
                new Mapping {
                    Description = "Analog LEFT ←", MednafenCommand = device.CommandStart + ".3dpad.analog_left"
                },
                new Mapping {
                    Description = "Analog RIGHT →", MednafenCommand = device.CommandStart + ".3dpad.analog_right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".3dpad.start"
                },
                new Mapping {
                    Description = "MODE", MednafenCommand = device.CommandStart + ".3dpad.mode"
                },
                new Mapping {
                    Description = "A", MednafenCommand = device.CommandStart + ".3dpad.a"
                },
                new Mapping {
                    Description = "B", MednafenCommand = device.CommandStart + ".3dpad.b"
                },
                new Mapping {
                    Description = "C", MednafenCommand = device.CommandStart + ".3dpad.c"
                },
                new Mapping {
                    Description = "X", MednafenCommand = device.CommandStart + ".3dpad.x"
                },
                new Mapping {
                    Description = "Y", MednafenCommand = device.CommandStart + ".3dpad.y"
                },
                new Mapping {
                    Description = "Z", MednafenCommand = device.CommandStart + ".3dpad.z"
                },
                new Mapping {
                    Description = "Left Shoulder (Analog)", MednafenCommand = device.CommandStart + ".3dpad.ls"
                },
                new Mapping {
                    Description = "Right Shoulder (Analog)", MednafenCommand = device.CommandStart + ".3dpad.rs"
                }
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }
コード例 #30
0
ファイル: Snes.cs プロジェクト: Silanda/MedLaunch
        public static DeviceDefinition GamePad(int VirtualPort)
        {
            DeviceDefinition device = new DeviceDefinition();

            device.DeviceName   = "SNES GamePad";
            device.CommandStart = "snes.input.port" + VirtualPort;
            device.VirtualPort  = VirtualPort;
            device.MapList      = new List <Mapping>
            {
                new Mapping {
                    Description = "D-Pad UP ↑", MednafenCommand = device.CommandStart + ".gamepad.up"
                },
                new Mapping {
                    Description = "D-Pad DOWN ↓", MednafenCommand = device.CommandStart + ".gamepad.down"
                },
                new Mapping {
                    Description = "D-Pad LEFT ←", MednafenCommand = device.CommandStart + ".gamepad.left"
                },
                new Mapping {
                    Description = "D-Pad RIGHT →", MednafenCommand = device.CommandStart + ".gamepad.right"
                },
                new Mapping {
                    Description = "START", MednafenCommand = device.CommandStart + ".gamepad.start"
                },
                new Mapping {
                    Description = "SELECT", MednafenCommand = device.CommandStart + ".gamepad.select"
                },
                new Mapping {
                    Description = "B (center, lower)", MednafenCommand = device.CommandStart + ".gamepad.b"
                },
                new Mapping {
                    Description = "A (right)", MednafenCommand = device.CommandStart + ".gamepad.a"
                },
                new Mapping {
                    Description = "Y (left)", MednafenCommand = device.CommandStart + ".gamepad.y"
                },
                new Mapping {
                    Description = "X (center, upper)", MednafenCommand = device.CommandStart + ".gamepad.x"
                },
                new Mapping {
                    Description = "Left Shoulder", MednafenCommand = device.CommandStart + ".gamepad.l"
                },
                new Mapping {
                    Description = "Right Shoulder", MednafenCommand = device.CommandStart + ".gamepad.r"
                },
                new Mapping {
                    Description = "Rapid B (center, lower)", MednafenCommand = device.CommandStart + ".gamepad.rapid_b"
                },
                new Mapping {
                    Description = "Rapid A (right)", MednafenCommand = device.CommandStart + ".gamepad.rapid_a"
                },
                new Mapping {
                    Description = "Rapid Y (left)", MednafenCommand = device.CommandStart + ".gamepad.rapid_y"
                },
                new Mapping {
                    Description = "Rapid X (center, upper)", MednafenCommand = device.CommandStart + ".gamepad.rapid_x"
                },
            };
            DeviceDefinition.PopulateConfig(device);
            return(device);
        }