Menu

Help for Xbox controller

Marco
2023-12-26
2024-03-14
  • Marco

    Marco - 2023-12-26

    Hello, everyone!

    I'm trying to play the game Captain Claw using the DXWnd V2.06 app, but I can't get my Xbox controller to work in the game. I can only play using the computer keyboard. Is there any configuration that needs to be done, or do I need to download another app to emulate the controller as well? Can you help me?

     
  • gho

    gho - 2023-12-27

    I have a XBox controller and a game "Claw" (a.k.a "Capitan Claw", from Accolade, 1997) that only works with the keyboard and doesn't listen to the XBox controller, so I suppose I could ...
    Let me see ...

     
    • Marco

      Marco - 2023-12-28

      Hello Gho!

      I managed to solve the problem! I downloaded the Xinput Plus app, linked the game to the app and unchecked the "Disable Joystick" box and everything worked.

      But if there's another way to solve the problem natively without needing other apps, that would be really cool.

       
  • gho

    gho - 2023-12-28

    I'm happy that you did it. I tried to replicate your success here, but I got some problems.
    First of all, it seems that Xinput plus is a very nice tool, well designed, though it seems able to work only with DirectInput games and not with other programs that make a direct keyboard access, but this for Claw is enough.
    My problem, instead, is that I used Claw v1.30 that is maybe a little different. The options panel appeared, but it was almost unreadable because all text was too big and truncated in the small form. But after a few tries with different configurations the options screen hanged the game, so that now I can't even capture a screenshot to show you. I have to understand why ...

     
  • gho

    gho - 2023-12-29

    Good news: I built a prototype for a XBox to keyboard remapper and tested it with Claw.
    It works pretty well, though I mapped only 4 keys: left, right, down and space (for the jumps).
    But as it is it would be really unsatisfactory because it lacks some configuration possibility for all other keys, I understand that preferences could be very different per each player and surely for each game. Also, it would be extremely interesting to add the possibility to configure up to 4 controllers. But this is just a matter of adding some configuration file and parsing logic, so please be patient.
    Also, I am considering seriously the possibility to add it as a plugin (an external dll like the dxwplay.dll player) so that it would be possible to improve the key mapper with no need to rebuild the main dxwnd.dll logic.
    If anyone is curious I can share some leaked beta .... ;)

     
  • Tony Barret

    Tony Barret - 2023-12-29

    I have a little peek here
    Its sounds great , many flys to take in 1 go
    Hope you get more than 4 keys to link
    I cross my fingers you get it done

     
  • gho

    gho - 2023-12-29

    This is an experimental version if anyone dare to test it.
    To enable the XBox keyboard remapping you have (in this experimental version) to enable the "Debug > Experimental 4" flag. To do this:
    1) set Options > Extended mode (if not done already)
    2) set the "Options > Global Settings > Debug mode" flag
    3) update the game and set the 4th flag in "Debug > Experim. [1-2-3-4]"

    Then you have to drop a keymap.ini configuration file in the game folder. This is an example that I used for Claw, but of course you can remap other buttons to other keys:

    [keymap]
    DPAD_UP=VK_UP
    DPAD_DOWN=VK_DOWN
    DPAD_LEFT=VK_LEFT
    DPAD_RIGHT=VK_RIGHT
    START=
    BACK=
    LEFT_THUMB=VK_UP
    RIGHT_THUMB=VK_DOWN
    LEFT_SHOULDER=VK_LEFT
    RIGHT_SHOULDER=VK_RIGHT
    A=VK_CONTROL
    B=VK_RIGHT
    X=VK_LEFT
    Y=VK_SPACE
    

    The left tokens are all the XBox buttons, a null value means that the button is not remapped.
    The values can be strings like "VK_UP" (at the moment only a subset of all possible strings) but also numeric values should be used (at least, this is untested): if they begins with 0x they represent hexadecimal values, otherwise decimal values. For valid keycode numbers see here:
    https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

    At the moment everything is working beyond my best hopes, the only problem some tuning that seems necessary about the timing: I set a 5 mSec delay in between each injected keycode, but this seems a little too fast for Claw. If necessary, there will have to be a configurable delay inside keymap.ini.

    I played Claw for a few minutes with my old XBox controller and, despite the damaged cable with unstable wired connections, it was a big improvement!

     
  • Tony Barret

    Tony Barret - 2023-12-29

    it seems tempting for me to try it on DX boulder
    I have never run a debug proces , i think is step by step running the startup , how you go to the next step?
    the first 2 steps settings no problem
    the 3 step update de game-- exit DXwnd en save settings?
    4 flag in debug exprerim 1.2.3.4 ?
    Can the ini. corrected via notepad , is the shooting button LEFT_thumb , and the key VK_CTRL and what about left and right CTLR keys?
    I am curious and think wait for the testing ,mayby over my head

     
    • huh

      huh - 2023-12-29

      3 - Here.

       
  • gho

    gho - 2023-12-29

    This one is much improved. The key handling is now correct (it doesn't send repeated keyboard event when a key remains pressed!!), the parser for the keymap.ini file is now completed and the activation flag is the new "Input > XBox to Keyboard mapping" flag, so it is available with no need to enter the extended + debug mode.
    The only problem is that my broken controller doesn't let me be sure about the 100% reliability, but you can try it.
    All the necessary stuff in within this bundle. Remember that each game should have its own keymap.ini file in the game execution folder.

     
  • gho

    gho - 2023-12-30

    Please, head to the release candidates thread where I posted a fix for dxwnd.dll. There was a bug affecting the control of the X and Y buttons of the XBox 360 c0ntroller.

     
  • gho

    gho - 2024-03-14

    Please, take note about the incoming changes in the XBox interface: the keymap file syntax is slightly changed to allow the use of up to 4 controllers. The included sample keymap file has comments to show the new syntax.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.