Jump to content




Photo
- - - - -

add XINPUT to Pinscape

XINPUT

  • Please log in to reply
25 replies to this topic

#1 captaincav

captaincav

    Neophyte

  • Members
  • Pip
  • 2 posts

  • Flag: France

  • Favorite Pinball: centaur

Posted 10 January 2019 - 10:47 PM

Hello I would like to be able to use Terry’s doflinx with a kl25z and the pinscape program but apparently you would have to modify pinscape to be able to use it. MJR would have to modify some things in it

add XINPUT to Pinscape…that would benefit so many people
thank you

 

Thank you Terry for the clarification.
Sorry about my English.


Edited by captaincav, 10 January 2019 - 11:00 PM.


#2 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 10 January 2019 - 10:53 PM

DDH69...to help clarify...

 

He uses Pinscape with DINPUT controls. He wants to be able to use that with DOFLinx...in particular DOFLinx: Effects.

 

Is there a way to make that work (without changing his pinscape controls to keys)? Can x360ce be used with doflinx?

 

Any chance of DINPUT being added?

 

I would rather see MJR add XINPUT to Pinscape as that would make things so much easier for use with FX3, but of course DINPUT on DOFLinx would also be nice.

 

I've been spoiled with my hacked up xbox 360 gamepad. Never had to deal with any of this stuff. :)


Edited by TerryRed, 10 January 2019 - 10:54 PM.


#3 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 10 January 2019 - 10:54 PM

Can you please describe what you are trying to achieve?  Getting an understanding of your problem will help determine if there is a current solution.

 

EDIT - Just saw TerryRed post at the same time - thanks.


Edited by DDH69, 10 January 2019 - 10:55 PM.


#4 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 10 January 2019 - 11:09 PM

DOFLinx reads XInput, not DInput.  DInput is depreciated by Microsoft and as such I have no plans to retrofit old DLLs, etc into DOFLinx.

 

I have never used XInput / DInput with the Pinscape and am reasonably unfamiliar with the Pinscape capability.

 

Are you saying that the Pinscape connected buttons can be presented to Windows as DInput?  Or are you connecting an XInput controller via Pinscape and having it convert that to DInput?



#5 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 10 January 2019 - 11:45 PM

DOFLinx reads XInput, not DInput.  DInput is depreciated by Microsoft and as such I have no plans to retrofit old DLLs, etc into DOFLinx.

 

I have never used XInput / DInput with the Pinscape and am reasonably unfamiliar with the Pinscape capability.

 

Are you saying that the Pinscape connected buttons can be presented to Windows as DInput?  Or are you connecting an XInput controller via Pinscape and having it convert that to DInput?

 

 

Pinscape (using KL25Z) only supports DINPUT if you configure it to use gamepad controls.

 

Since he is using Pinscape with gamepad controls (many people do), he can't use that with DOFLinx. If pinscape was able to use XINPUT maybe that "could" allow for not needing x360ce for FX3. Don't know if mjr will ever add that to pinscape though. :( If he did I would be using KL25Z for my cab and not my hacked up gamepad.

 

Sadly, MOST of the controllers out there for pinball, arcade, etc only support DINPUT. In fact I don't think I know any that use XINPUT?


Edited by TerryRed, 10 January 2019 - 11:48 PM.


#6 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 11 January 2019 - 01:21 AM

If the Xbox controller is connected to the Pinscape and turning its buttons into DirectInput commands, aren't those DIInput commands just keyboard key strokes?  At this point isn't the fact that it starts from an Xbox controller irrelevant?  What am I missing?



#7 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 11 January 2019 - 04:22 AM

If the Xbox controller is connected to the Pinscape and turning its buttons into DirectInput commands, aren't those DIInput commands just keyboard key strokes?  At this point isn't the fact that it starts from an Xbox controller irrelevant?  What am I missing?

 

 

You are all mixed up. :) But that's ok.

 

Pinscape (KL25Z) firmware can be configured to allow it's input/output pins to be used as two things only.... as a keyboard controller, or a windows gamepad that uses DINPUT. He (and many people) has his setup to be a gamepad. This allows for analogue AXIS for both nudge (via acceleromter) and the plunger.

 

The KL25Z plugs into the PC and is seen as a windows gamepad...an "older" type of gamepad that uses DINPUT.  Then you just connect your choice of buttons or arcade joystick to it to control it.

 

It's not capable of operating as an XINPUT device with its firmware. That's why anyone using it with FX3 needs to use x360ce (to translate DINPUT to XINPUT via x360ce created DLL) because FX3 also only recognizes xbox gamepads or keyboards. 

 

He wants to use his Pinscape with DOFLinx...but can't because it only works with newer type of XINPUT based controllers / gamepads.

 

Like I said though... I don't know of any "controller" board that uses XINPUT...they all seem to only use the older DINPUT standard, or they can act as a keyboard. Many people only use gamepad controls.

 

I'm a special case because I'm smart and did a lot of testing when I built my cab to know what controller would work with everything... hence why I hacked up a xbox 360 gamepad, and a logitech gamepad that can switch between the two standards.  :)


Edited by TerryRed, 11 January 2019 - 04:27 AM.


#8 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 11 January 2019 - 05:53 AM

Thank you.  I need to let this percolate in my head and perhaps play with my test Pinscape.



#9 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 11 January 2019 - 11:45 PM

DDH69...to help clarify...

 

He uses Pinscape with DINPUT controls..........

 

So are we talking about the 32 joystick buttons that you would see in the "Button Tester" screen of the Pinscape setup?



#10 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 12 January 2019 - 12:35 AM

 

DDH69...to help clarify...

 

He uses Pinscape with DINPUT controls..........

 

So are we talking about the 32 joystick buttons that you would see in the "Button Tester" screen of the Pinscape setup?

 

 

I think...you can configure those to be either a button or key. If it's buttons then you should be able to test them on Windows "Game Controllers".



#11 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 12 January 2019 - 01:39 AM

Well if all of this talk about DInput are simply buttons presented as joystick buttons then it shouldn't be a problem.

 

I knocked up a quick test screen this morning and have attached the beta.  If you right click and select "Test Gamepad Buttons" then you will be able to test the buttons on both Xbox and joystick devices.  I don't think its 100% correct yet, but I can read a few buttons from my test Pinscape.

 

I will head to the shed and make a couple of proper buttons so I can test more.

 

Interested to know if the test routine is picking up those buttons known as DInput buttons.  If so, then yes, I can add another class of input button.  So far we have keyboard scan codes and XBox keys, I'll just make a third.

Attached Files



#12 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 12 January 2019 - 02:32 AM

Well if all of this talk about DInput are simply buttons presented as joystick buttons then it shouldn't be a problem.

 

I knocked up a quick test screen this morning and have attached the beta.  If you right click and select "Test Gamepad Buttons" then you will be able to test the buttons on both Xbox and joystick devices.  I don't think its 100% correct yet, but I can read a few buttons from my test Pinscape.

 

I will head to the shed and make a couple of proper buttons so I can test more.

 

Interested to know if the test routine is picking up those buttons known as DInput buttons.  If so, then yes, I can add another class of input button.  So far we have keyboard scan codes and XBox keys, I'll just make a third.

 

Sadly I don't have anything to test it with. My only controllers I currently have are xinput. :(

 

I know there are others out there that use doflinx with pinscape an buttons controls. I'll link this thread to the VP Addicts FB group.



#13 Rappelbox

Rappelbox

    Enthusiast

  • Banned
  • PipPipPip
  • 88 posts

  • Flag: Germany

  • Favorite Pinball: Creature fr...... ;)

Posted 12 January 2019 - 07:38 PM

I suggest to most people to use the keyboard inputs as they seem to be easier to setup across all commonly used programs. Plus, the Pinscapes I deliver are all preprogrammed as keyboard devices.

Lmk if and what needs to be tested in particular and I’ll see what I can do for you ;)
www.GermanGamingSupplies.com - European Virtual Pinball Supplies and ready assembled Pinscape Boards, PIN²DMDs, Virtual Pins

Visual Pinball Addicts - the BIGGEST Visual and Virtual Pinball Group worldwide... Newest table releases, tutorials, videos, chat... all that fancy stuff

#14 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 2,629 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 12 January 2019 - 08:37 PM

I used to use keyboard input, but changed to Joystick because of issues when others are playing around with my cab when I'm working on it.  That is, when I'm adding tables or something, people are drawn into hitting plunger and flipper buttons on the VP cab.  If I have them as Joystick inputs nothing happens, but if they are keyboard inputs, my text files get messed up as they click the flippers.  I can still use 360ce for programs that need xbox controllers to control them (pinball fx3). so no biggie as I use VPX 95% of the time.



#15 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 12 January 2019 - 09:37 PM

Well if all of this talk about DInput are simply buttons presented as joystick buttons then it shouldn't be a problem.

 

I knocked up a quick test screen this morning and have attached the beta.  If you right click and select "Test Gamepad Buttons" then you will be able to test the buttons on both Xbox and joystick devices.  I don't think its 100% correct yet, but I can read a few buttons from my test Pinscape.

 

I will head to the shed and make a couple of proper buttons so I can test more.

 

Interested to know if the test routine is picking up those buttons known as DInput buttons.  If so, then yes, I can add another class of input button.  So far we have keyboard scan codes and XBox keys, I'll just make a third.

 

 

SILLY ME...

 

I completely forgot about my SIMPIT!

 

It uses older racing wheels (Logitech G25, etc) which use DINPUT! These act and are seen the exact same way any other older gamepad / DINPUT controller would be seen in windows.

 

...and the good news....it works with the Gamepad tests on my wheels DINPUT controller and my xbox 360 / one XINPUT controls...mostly. Well, the "buttons" all work in the GAMEPAD Tester fine...but the D-PAD doesn't do anything (the digital directional pad, up/down/left/right). That is the only thing missing.

 

I know the D-PAD works fine with XINPUT, as you already have support for that. Would you be able to add DINPUT D-PAD support? Unless of course it actually works already, and it's only the "Tester" that doesn't work with it?

 

GREAT work on this! Now anyone with a simpit or an arcade MAME Racer can add some CRAZY MX lighting and DOF feedback to their games!


Edited by TerryRed, 12 January 2019 - 09:39 PM.


#16 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 12 January 2019 - 10:03 PM

Thanks Rappelbox, will ask as required.

 

Thanks TerryRed, great news.  I don't believe you can read the Xbox controller D-PAD via DInput directly.  Using the tester you will notice that the XBox controller is specifically recognised (via XInput) but also presents to Windows as a Joystick with various joystick button numbers being pressed (A=1, B=2, X=3, Y=4,  LB=5, RB=6)

 

I'm doing some more work to specifically detect connected joysticks.  I should have a beta later in the day that accepts KK (key code), X1A (XBox controller 1 button A) and J0203 (joystick 2, button 3) as input across all of DOFLinx.



#17 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 12 January 2019 - 10:48 PM

So here is V6.6 Beata 3.  It will report the connected joysticks.  Remember the XBox controller will also show up as a joystick.  You are better off using the XBox controller in DOFLinx as an XBox controller not a joystick because of the D-Pad.

 

All the connected devices will show in the GamePad Tester.

 

To use a joystick button add it as a key in any DOFLinx parameter that takes a key code as JCCBB, J is fixed text, CC is the joystick number from 01 to 15 (it needs a leading zero), BB is the button number from 01 to 32 (again leading zeros)

 

I've done some limited testing using jumper wires on my PInscape.  I'll get some actual buttons soon to make it easier for me.

 

Let me know how things go.

Attached Files



#18 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 13 January 2019 - 12:55 AM

So here is V6.6 Beata 3.  It will report the connected joysticks.  Remember the XBox controller will also show up as a joystick.  You are better off using the XBox controller in DOFLinx as an XBox controller not a joystick because of the D-Pad.

 

All the connected devices will show in the GamePad Tester.

 

To use a joystick button add it as a key in any DOFLinx parameter that takes a key code as JCCBB, J is fixed text, CC is the joystick number from 01 to 15 (it needs a leading zero), BB is the button number from 01 to 32 (again leading zeros)

 

I've done some limited testing using jumper wires on my PInscape.  I'll get some actual buttons soon to make it easier for me.

 

Let me know how things go.

 

 

Just gave this a go! Works great! I'm using my racing wheel to trigger my cab's DOF.. :)

 

My DINPUT buttons are triggering DOFLinx: Effects nicely! 

 

The only thing missing is getting the DINPUT D-PAD to work....

 

...but regardless Excellent stuff.! Great work!

 

When this is locked down and released I'll add it to the SUP ini Creator sheet.


Edited by TerryRed, 13 January 2019 - 12:56 AM.


#19 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 2,100 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 13 January 2019 - 02:19 AM

DINPUT DPAD, tell me more .....  Is it digital (ie on / off) or is it analogue (ie multiple positions like a joystick - if yous set JOY_PORT= the controller with the DPAD will it trigger nudge when you press it)?  What is the controller name / model so that I can look it up?



#20 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 869 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 13 January 2019 - 04:34 AM

For any gamepad, there is a D-PAD. (Digital pad or Directional Pad)

 

https://www.google.c...chrome&ie=UTF-8

 

The UP, DOWN, LEFT, RIGHT part of the game pad..but NOT the same as the X-AXIS and Y-AXIS of the Thumbstick. It's a completely different control.

 

It's just digital On/ Off. No analogue or AXIS.

 

This is what you have for the xbox D-PAD with DOFLinx:

 

 

X2DU = Dpad Up

X2DD = Dpad Down

X2DL = Dpad Left

X2DR = Dpad Right

 

DINPUT controllers / gamepads also have a D-PAD. They are the same thing as they are for XINPUT. In windows "Game Controllers" it would show as the Point of View HAT on the right side.

 

https://www.google.c...=o0Kp_jecG4InoM:


Edited by TerryRed, 13 January 2019 - 04:36 AM.