.vbs files that support joystick/gamepad

Shockman

appropriate at this time
Joined
Oct 26, 2004
Messages
3,199
Solutions
5
Reaction score
119
Points
90
Favorite Pinball Machine
Star Trek
- VPMkeys.vbs - This adds the aliases for the gamepad support. This is the file you will have to mod if your device returns different keycodes. With this, for one, example LeftFlipperKey can be replaced with joy7, or you could use Or to check for both.

- Bally.vbs - using this .vbs file you will not have to code anything. With the correct keycodes for you device in the VPMkeys.vbs file gamepad 7 and 8 keys will flip the flippers in the Bally tables without any modification to them.

- joystick.vbs - beta. For VP, non VPM. For now copy and paste that file in total to the top of your script and you will be able to use the same aliases.

The function this provides is use of the four joystick directions and 12 buttons, but the 4 directions use the same code as buttons 1-4. VP has support for this. This just provides aliases for those functions so you only have to figure out the keycodes for your device once, put them into VPMkeys.vbs and then you can use,

joyUp
joyDown
joyLeft
joyRight

joy1
joy2
..
joy12

just as you do LeftFlipperKey instead of 80 or whatever it is, and PlungerKey, LeftNudgeKey etc.

If enough people want to use this I will provide a full package for all manufactures support files, make joystick.vbs external, and probably not .vbs at all, and try to include the nudging and plunger as constants as well not not table script or any part of the table for that matter will need modification to support joystick/gamepads. As it is. using this VPMkeys.vbs file and Bally.vbs file, all bally tables will use buttons 7 and 8 (which should be shoulder buttons) for the flippers automatically. The plunger and nudging will need added to the key up and down using Or. (if keycode = PlungerDownKey or keycode = joyDown then ...) but only for now, I hope.
 

Attachments

  • VPM_VBS files_joy_support_beta.zip
    3.2 KB · Views: 683
Last edited:
Sounds awesome Shockman.

I used to use joytokey: http://joytokey.webs.com/download.htm which allows an arbitrary mapping of keys to a joystick, but I understand you're solving a different sort of problem than simple I/O mapping.

I'm not an pinnie author, but as a player joytokey is very useful.
 
What about the ESc Button?

Thanx a lot for the instructuions on how to change VPMkeys and the table .vbs. This was the only solution for my Joypad Usage problem until now. I tried joy2key and RBjoy7, but nine worked within my Mamewah environment.:appl:
Now that I can insert coins, start the game, use the plunger and the flippers, I am facing the problem to exit the table.
I found no way to remap the ESC (or key 1) button to something on my pad. Is there a way to do this?
 
Hi All

I've found all this info very helpful in edditing the VP scripts to accept joypad and I have say Hats off to Shockman. Some of you may be wondering how to go about editing scrips and what you have to do. I wrote a little guide and wanted to share it with you all. I'm not saying its the best way of doing things or the easiest but it works for me.

http://jukecade.mameaddicts.com/vp.html

Cheers
 
Forum activity
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.
      Mibs Mibs: StevOz has posted a new reply in the thread "Post interesting videos you found on YouTube".
      Back
      Top