Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Virtual joystick game controller with more than 16 buttons ?  (Read 2448 times)

0 Members and 1 Guest are viewing this topic.

Ppjoyguru

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:July 18, 2007, 08:32:32 pm
I've been using ppjoy virtual joystick driver for a pretty long time. I've made a controller app for it which uses the keyboard and a 4 button 2 axes regular joystick as inputs. This has boosted my gaming performance drasticly so I am quite satisfied with it, except I'd need a few more (at least 4 more) buttons on the virtual joystick game controller than it has originally (16 buttons). As far I know it, a standard windows game controller driver can detect 32 joystick buttons theoretically, at least in a 32 bit operating system  (considering the Buttons field of the JOYINFO data structure which is used to return joystick parameters).  The virtual joystick driver has 128 (!) programmable digital values, the first 16 of them are the buttons which can be accessed via the virtual joystick game controller.

Could anybody help me how could I make another 4 buttons accessible for reading by games / apps on a virtual joystick game controller ?

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Virtual joystick game controller with more than 16 buttons ?
« Reply #1 on: July 18, 2007, 05:47:21 am »
32 buttons is detectable ans useable, but it depend which API and programmering language the game have used.

You can actuelly use pjoy2key or autohotkey to remap the last buttons on these games, which only can detect the first 16 buttons, so you can use all 32 keys.
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Ppjoyguru

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:July 18, 2007, 08:32:32 pm
Re: Virtual joystick game controller with more than 16 buttons ?
« Reply #2 on: July 18, 2007, 07:48:57 am »
First of all, thanks for replying my post, Space Fractal :)

Well the games I've written my PPjoy controller app for can detect 20 joystick buttons. I can access mapping for all the 20 buttons in the joystick configuration menus of the games, so the games should be able to access all of them. The problem is that the ppjoy virtual joystick driver provides access for the first 16 buttons only for any applications (even though it can even accept 128 button values theoretically, and a standard windows game controller can access 32 buttons). Of course I've got ppjoykey but its capabilities are far from being enough for my purposes - this is the exact reason why I've written my own virtual joystick controller app (which works very well). Ppjoykey is quite good for demonstration or if you have limited game controlling needs. I know autohotkey too, and it's good for a lot of game controlling purposes, but I can access the controlled game functions only if I map them to a regular game controller's buttons for certain reasons I won't detail here. So additional key-mapping with autohotkey doesn't work either.

So the original question stays up. How could I make those extra buttons accessible on virtual joystick driver for apps / games ?

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Virtual joystick game controller with more than 16 buttons ?
« Reply #3 on: July 18, 2007, 04:14:11 pm »
Do you have the link to the application you are talk about? I guess it about a developer question?

I remember some limits, when I created Arcade Music Box:
In Blitz+, which the software was wrote in has the limit of 16 buttons, because the old DirectAPI it used.

But I upgraded from Blitz+ to Blitzmax when I created MutiJuke (developed from scracth. BlitzMax is a newer application, which can access all 32buttons, which I of course use (but MSDN it say it can use up to 128 inputs, maybe it for 4 joysticks = 4x32?).

Beware I'm are not Visual Basic or or C++ developer, so I cant help in this point, how it can been detected the extra buttons. But I found some tutorial using the DirectX SDK: Retrieving Data from the Joystick

Can other FE creators answear here?
« Last Edit: July 18, 2007, 04:31:25 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Ppjoyguru

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:July 18, 2007, 08:32:32 pm
Re: Virtual joystick game controller with more than 16 buttons ?
« Reply #4 on: July 18, 2007, 08:32:33 pm »
The controller application I am talking about is created by me, but the problem isn't in it. As I highlighted it above with red bold letters, the problem is in the game controller interface provided by the ppjoy virtual joystick driver. I decided to draw a simple draft to make it more understandable for you :



As you can see it from this image, I don't have any kind of problem with accessing any buttons of any game controller interface.  The problem is that the interface itself simply doesn't provide access for all the buttons for the games / applications which read it. So it's more than a developer problem, it's the problem of the ppjoy. If it would provide access for all the 32 buttons all my apps / games could access all of them.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Virtual joystick game controller with more than 16 buttons ?
« Reply #5 on: July 19, 2007, 03:44:24 am »
This is the limit in PPJoy itself, so you cant do anything. You simply need to get the author about that problem. He use the old API due to the limit.

THis is why I diddent use the app myself, but I use this one (because GPWiz use about 25 buttons with gameport):
http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.