Joystick solution for VPF.org

Shockman

appropriate at this time
Joined
Oct 26, 2004
Messages
3,199
Solutions
5
Reaction score
121
Points
90
Favorite Pinball Machine
Star Trek
There is a discussion going on at VPF.org about all these key mappers for gamepads, and how some are better than others and some are not working etc.

This is what I would post in the 'Controller Support' thread that is still on the front page list. I would also post it in the thread that destruk links to, because the answer is not there either.

Someone please go there and tell them that that discussion is going on at the wrong site.

Or alternatively you can drop this file in that thread and tell them that VP9 fully supports the gamepad. that none of those key mappers are required. Tell them that it was implemented a long time ago but just on an axis basis. Now it supports every direction and every button. How many buttons I don't know. I don't use this.

Actually just drop it in, if you will and tell them to run it and move the stick or push a button and write down the number that is in the text box then they can add this number, or replace the keycode in the key subs with it.

The screenshot shows my gamepad stick left. I would just give the numbers but they could be different for each joystick.
 

Attachments

  • keycode_VP.zip
    31.5 KB · Views: 216
  • Capture.PNG
    Capture.PNG
    96.7 KB · Views: 240
Last edited:
I bet the guy trying the X-box controller trying to find a third party solution has the same option. To just find out what VP sees when it is used and use it. Exactly how you would do it if you wanted VP to react to the q key but did not know how to ask it to. You would find the keycode and use it. This program of course will give you the keycodes from your keyboard as well. I would just as soon you redirect them here, in case they have any other questions, but you can take this solution there if you want.
 
Of course key mappers have their advantages as well. Once running, you would not have to mod the tables with these codes to run them with a gamepad. If I played VP with a gamepad, I would mod a .vbs file.
 
There is however no reason why these controls could be in the .vbs file for the keys, or for that matter, available in the program editor's drop down menu for keys. But they would have to be sampled, unless I am wrong and every device will return the same keycode.

I will see if I can create support for mine in the core and or keys .vbs file and let you know. It will not replace keys with pad input. Both will work.
 
I have succeeded in altering my VPMKeys.vbs file to have my game work for input as well as the keyboard. Doing it in this manor gives VP something that the it already had but was unusable because it had no interface.

VP it's self is a little tricky because the pull down menu for some reason does not have support for the joysticks

VP does have support for the joysticks so getting them working would be a matter of having a non-MAME keys.vbs file it seems. Doable though.

I have not sacrificed anything for this and I did not create any code. The VPMkeys.vbs always have had separate entries for joysticks, and I am talking not about your gamepads but the real joysticks on games like Baby PacMan. However these were set to keyboard keys and I think that is silly, because if you want to use a keyboard to function as a joystick you should use the keycode that already exists, not waste joypad support.

I also expanded the entries for the joystick buttons to 8 in my VPMkeys.vbs file.

I have to go. I'll continue this later.
 
What would help is if everyone that has a gamepad or a joystick let me know what the numbers are when you use just stick up and button1, then I will know if these numbers are consistent among the different models out there. If they are it's a done deal. I will release a VPMkeys.vbs file that adds aliases for the gamepad function, if not then you will have to have a .vbs file specific for your device.

For those that want nothing but gamepad support they can replace for example LeftFlipperButton with the number and all tables that use LeftFlipperButton will use the gamepad button only.

Baby PacMan and the others can be modified to have the four directions work with the joystick as well as the keyboard.

I don't use a joystick but I don't play those hi-bred tables myself. If there is anyone planning a cabinet with a joystick I would think they would want to use it automatically instead of running a key mapper app with those games.
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    maxangelo19 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Dragonslapper has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    royaljet has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tyfox has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Goldtopboy has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    slick267 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    dabreeze has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Spike has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tofa has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Atropine has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    bongo2k5 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Bouly has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Felipefx3 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    djrbx has left the room.
  • F @ freebird1963:
    were do music and sound files go
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    jhbradley has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Conejazo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Sedulous has left the room.
      Chat Bot Mibs Chat Bot Mibs: Sedulous has left the room.
      Back
      Top