Jump to content
  • Announcement

    The HyperSpin 2 early access beta is here!

    We’re starting the first public testing phase with Platinum Members to keep the scope manageable while we test the current feature set and begin to add more. In the future, we’ll provide a version for basic members as well.  On behalf of the entire HyperSpin team, we look forward to another exciting adventure with our community.

Problem Mapping Both Joystick Buttons and XBOX Controller


blaudo

Recommended Posts

Posted

So let me start off by explaining my setup. I am almost done completing my two player cabinet that comes with 7 buttons for each player. As for my plan, I want to be able to use both the cabinet buttons, and an xbox controller for playing any of the consoles. This has not been a problem for any of the consoles that have a buttoned joystick (SNES, Sega Genesis, Gameboys) as i just use xpadder to map my xbox controllers' keys to my associated buttons.

So far my problem has been with mapping emulators with analog joysticks (PS2, PSX, Dreamcast, N64, Gamecube). I cant use the same method of using xpadder because it wouldn't recognize slight movements in the xbox's analog sticks, and would instantly translate any movement to a full on direction on the controller (making it extremely difficult to play racing games on the xbox controller).

A while ago i realized that PS2 and Gamecube emulators actually allow dual inputs for a single key so i fixed my problem of the over sensitive analog sticks and just connected the controller natively to the emulator. However, the problem still persists with the PSX, Dreamcast, and N64 emulators as they only accept a single input for a movement output in the games.

One method of getting around this was to see if i could use my joystick on the cabinet to emulate an xbox360 controller, then just map my xbox controller natively to the 3 emulators; however, im pretty sure this would require the xbox controller to always be on in order for xpadder to transfer the cabinet joystick commands back to key presses.

I've been pulling my hair out for a week straight because of this problem so any wisdom you guys have to share would really help. :D

Posted
So let me start off by explaining my setup. I am almost done completing my two player cabinet that comes with 7 buttons for each player. As for my plan, I want to be able to use both the cabinet buttons, and an xbox controller for playing any of the consoles. This has not been a problem for any of the consoles that have a buttoned joystick (SNES, Sega Genesis, Gameboys) as i just use xpadder to map my xbox controllers' keys to my associated buttons.

So far my problem has been with mapping emulators with analog joysticks (PS2, PSX, Dreamcast, N64, Gamecube). I cant use the same method of using xpadder because it wouldn't recognize slight movements in the xbox's analog sticks, and would instantly translate any movement to a full on direction on the controller (making it extremely difficult to play racing games on the xbox controller).

A while ago i realized that PS2 and Gamecube emulators actually allow dual inputs for a single key so i fixed my problem of the over sensitive analog sticks and just connected the controller natively to the emulator. However, the problem still persists with the PSX, Dreamcast, and N64 emulators as they only accept a single input for a movement output in the games.

One method of getting around this was to see if i could use my joystick on the cabinet to emulate an xbox360 controller, then just map my xbox controller natively to the 3 emulators; however, im pretty sure this would require the xbox controller to always be on in order for xpadder to transfer the cabinet joystick commands back to key presses.

I've been pulling my hair out for a week straight because of this problem so any wisdom you guys have to share would really help. :D

You say you had trouble playing games when the joysticks are mapped to keys using xpadder correct (either full go or no go)? How would playing the same games with actual keys be any better (same full go or no go)?

Posted

Not necessarily problems, but lets say in order to allow NullDC for dreamcast to work with both xbox360 controllers and the joystick buttons, i had to set my joystick buttons as the controller for NullDC, then use xpadder to emulate keyboard keys with my 360 controller. I just found that doing this through xpadder made the analog stick on the 360 extremely sensitive as opposed to connecting it directly to NullDC and not having a connection with my arcade buttons.

Posted
Not necessarily problems, but lets say in order to allow NullDC for dreamcast to work with both xbox360 controllers and the joystick buttons, i had to set my joystick buttons as the controller for NullDC, then use xpadder to emulate keyboard keys with my 360 controller. I just found that doing this through xpadder made the analog stick on the 360 extremely sensitive as opposed to connecting it directly to NullDC and not having a connection with my arcade buttons.

Are they joystick buttons or an ipac keyboard?

How do programs see your ipac "joystick", as a keyboard or as an analog?

Posted
I just found that doing this through xpadder made the analog stick on the 360 extremely sensitive

What if you use the xpadder sticks settings ?

6rhyqAQ.png

Select Options

D3LjGYZ.png

Try to move that setting the way it's best for you.

Posted

My joysticks are connected to an ipac.

I tried adjusting the dead zone, but that just makes my xbox controller less sensitive in the middle.. which is still problematic for driving or shooting games when i only need to move the left analog stick only slightly.

Posted
My joysticks are connected to an ipac.

I tried adjusting the dead zone, but that just makes my xbox controller less sensitive in the middle.. which is still problematic for driving or shooting games when i only need to move the left analog stick only slightly.

So it sounds like to me the joysticks on your ipac are not analog. Is this correct?

Posted

Yeah thats correct, i have them setup so that the joystick movements equal directional button presses on the keyboard

Posted
Yeah thats correct, i have them setup so that the joystick movements equal directional button presses on the keyboard

Now why would someone want to play on the ipac when you have an unfair advantage over them if you are using a gamepad in these games that use analog?

Sounds to me you just need to be able to exit the game with the ipac and not play with it.

Here are the best options based on your situation I could come up with (In the order I thought them up):

1.) (medium-easy) Map the emulator to the gamepad and put a warning in fade layer 2 that this game requires a gamepad

2.) (easy) Map the emulator to the gamepad and tell your friends that the game requires a gamepad to play

3.) (medium) Use vjoy to remap the ipac keys temporarily (only while game is running) to the gamepad controls

4.) (hard) Make two settings files for the emulator one with ipac controls and one with gamepad controls and use the user functions init file with your custom code in it to detect when gamepads are plugged in and do a settings file swap based on if your gamepads are plugged in at the start or not.

Some Comments:

1 and 2 are probably the most reliable methods

3.) probably will do what you asked in the first post, but it can possibly make setting up your other systems a pain due to two virtual controllers always being on.

4.) is the best method in my opinion if you require that the games be playable with the ipac although it is the most difficult option

Posted

wow thanks man number 4 seems like the way to go on this. I'm not THAT great at coding the line, but i could figure it out if you could give me some guidance as to where to start. Would i need to use AutoHotkey for this?

Posted
wow thanks man number 4 seems like the way to go on this. I'm not THAT great at coding the line, but i could figure it out if you could give me some guidance as to where to start. Would i need to use AutoHotkey for this?

You will need to use autohotkey.

You will need to put the code in the User Functions Init.ahk file found in your HyperLaunch\Lib folder.

You will most likely need to use the getjoystickarray() function found in HyperLaunch\Lib\Keymapper.ahk folder

--I don't mind helping explain the inputs and outputs of that function

You will need to know the ahk commands and statements, If , If in, FileMove, and FileExist().

You will also need to be familiar with general ahk syntax.

You will also need to know the variable names that hyperlaunch stores useful information in. You can see a list of these names and what they store in a troubleshooting log before the module code starts.

I will not write the code, but I do not mind helping you look for bugs in mostly finished code.

Please note, that this method will only work when you start up the game and not during the game, meaning turn your gamepads on before the game starts and not during the middle of it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...