Jump to content

Steel Battalion controller and win 7 64-Bit drivers


417 replies to this topic

#81 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 26 September 2012 - 09:58 PM

Honestly - because MWO has so few keys and the controller has so many buttons :)

Everything seems to be working except the POV (which I have mapped anyway using XPadder), I upped a new version (same name) that has a latched left control for 'free look' (F3 on the controller). I am going to have to log in and play a few.

Edited by von Pilsner, 26 September 2012 - 10:12 PM.


#82 Palinus

    Rookie

  • Legendary Founder
  • Legendary Founder
  • 5 posts

Posted 26 September 2012 - 10:17 PM

Where did you find an adapter to hook up your steel battalion controller? I have been looking for one on and off for the last 2 years since a friend gave me his controller and game.

#83 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 26 September 2012 - 10:20 PM

http://www.ebay.com/...=item19ae36ba51

Thats the same one I have. Its a straight connection, just a different interface, so you really shouldn't be paying more than $5 for it total

#84 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 12:53 AM

OK, I think I got everything mapped where I want it!!! The POV works and I got the Free Look to latch for me.

I played for a while and I am not 100% sure that I like the speed (gain) and sensitivity settings (first 2 lines in the user.cfg file example):
cl_joystick_gain = 1.35
;cl_joystick_sensitivity = 0.8
cl_joystick_invert_throttle = 0
cl_joystick_invert_pitch = 1
cl_joystick_invert_yaw = 0
cl_joystick_invert_turn = 0
cl_joystick_throttle_range = 0

You have to un-comment the sensitivity line if you want to adjust it...

Once again here is my current profile (same link I use every time): BvP-MWO.cs
Tested with: Steel-Batallion-64_v2_pre.zip
Steel-Batallion-64_v2_beta.zip <-- new version - old profiles no longer work!
New profile (working with beta): BvP-MWO-0.8.cs.
Example user.cfg
Button mapping diagram
Toggle explanation: here


p.s. - I added an 'override' binding to the 'eject' button in addition to the 2 other 'override' bindings.

Edited by von Pilsner, 27 September 2012 - 11:14 AM.


#85 Ximmons

    Member

  • Pip
  • 17 posts

Posted 27 September 2012 - 03:41 AM

View PostPalinus, on 26 September 2012 - 10:17 PM, said:

Where did you find an adapter to hook up your steel battalion controller? I have been looking for one on and off for the last 2 years since a friend gave me his controller and game.


You could make your own cable with a few minutes worth of work. The xobx controller is basically already wired for a usb cable. If you have a extra cable for the controller, just the short cable that detaches, a spare usb mouse or keyboard or anything, and some electrical tape your in business. Just cut off the connector on the xbox side, i did this close to the connector to keep the cable longer. then cut the usb cable depending on how long you would like this part to be. I would suggest you are generous as i hate being cramped when working. Once you open up the two wires you will notice the usb cable has 3 wires and the xbox has 4. This is no issue because we are not going to be using the yellow wire. Take off some of the wire exposing the metal, I usually do a quarter of an inch for wires, and tape the wires together making sure they make good contact and you match the wires. Tapping the wires is quick and will work I would probably twist the two matching wires together before taping just to be certain. I then taped each pair, covering the exposed wire, to avoid any shorting between the pairs. Soldering the wires works better but not every one has a soldering iron at home. I am a hack and you can prolly find a video or something online that better explains. Just wanted to post this quick to say it IS possible to do it yourself for free.

#86 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 27 September 2012 - 07:27 AM

http://steel-batalli...-64_v2_beta.zip

For those beta testing for me, I've created a new version. I've included von Pilsner's config file as an example. This new version has the following additions / fixes

-Flattened project into one namespace,
-added appropriate error checking if you use a lighting function with a nonlighted button, it simply ignores the lighting command and still applies the button mapping
-fixed dll binding error, can now start and stop the project at whim
-added von Pilsner's configuration file, tweaked by myself as an example.

von Pilsner, would you mind testing this version out, I've incorporated my dual function left pedal into this one. Give it a try you might like the setup. Additionally I updated the GetButtonState command so it now accepts buttons insteadof just ints. Also, I'm not sure why you have the setButton function within this if statement:


// toggle tricks!!!
if(controller.GetButtonState(ButtonEnum.ToggleFilterControl)) //FILT Toggle
{
controller.AddButtonKeyMapping(ButtonEnum.RightJoyFire,  Microsoft.DirectX.DirectInput.Key.BackSlash, true);
//joystick.setButton((bool)controller.GetButtonState(1),(uint)1,(char)(15));
}
[size=3]
In game do you want a button to be pressed when you flip the switch?Thanks for the very fast work you've done testing it.[/size]

#87 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 10:07 AM

View PostHackNFly, on 27 September 2012 - 07:27 AM, said:

von Pilsner, would you mind testing this version out, I've incorporated my dual function left pedal into this one. Give it a try you might like the setup. Additionally I updated the GetButtonState command so it now accepts buttons insteadof just ints. Also, I'm not sure why you have the setButton function within this if statement:
 
 
// toggle tricks!!!
if(controller.GetButtonState(ButtonEnum.ToggleFilterControl)) //FILT Toggle
{
controller.AddButtonKeyMapping(ButtonEnum.RightJoyFire,  Microsoft.DirectX.DirectInput.Key.BackSlash, true);
//joystick.setButton((bool)controller.GetButtonState(1),(uint)1,(char)(15));
}
[size=3]
In game do you want a button to be pressed when you flip the switch?Thanks for the very fast work you've done testing it.[/size]


I could not find a way to unbind the button on the fly so I moved the 'fire selected' (button0) to a non-mapped button (button15) when I add the 'alpha strike' mapping and swap them back when toggle is toggled again... :D

I will test the new setup and config today and let you know how they work for me.

#88 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 27 September 2012 - 10:12 AM

That may be a misnomer on my part. AddButtonKeyMapping, replaces the currently mapped buttonkey.

#89 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 10:31 AM

View PostHackNFly, on 27 September 2012 - 10:12 AM, said:

That may be a misnomer on my part. AddButtonKeyMapping, replaces the currently mapped buttonkey.


I did it that way because when the toggle is up I want it bound to a kb command '\'
toggle down bound to joystick 'button0'

That way I can use the default MWO button layout for both. (which is why I move it to an unused button when it's in alpha mode).

EDIT: do we still need to be in Test Mode for LibUSB to work?

Edited by von Pilsner, 27 September 2012 - 10:32 AM.


#90 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 27 September 2012 - 10:34 AM

That makes sense, I just meant that the


[color=#880000]//joystick.setButton((bool)controller.GetButtonState(1),(uint)1,(char)(15))

[/color]

part didn't seem necessary since using AddButtonKeyMapping removes the current mapping (or adds it if there is none) and changes it to whatever you define.

#91 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 11:00 AM

Tested your profile and the pedals are having problems. The jump jets do not work, they spam the key so fast (i think) that you never get any lift. I fixed it in my profile using the timing loops (I know they are ugly code-wise).

The trigger (sub weapon) does not seem to work in non-alpha mode.

Here is my current profile (everything works with my toggle and timing hacks) I changed the namespace so it works with the newest version (Steel-Batallion-64_v2_beta.zip) BvP-MWO-0.8.cs.

Nice work on the Steel-Batallion-64_v2_beta code updates (seems very stable), no errors and I can stop and start profiles on-the-fly. Move it from beta to RC :D

Edited by von Pilsner, 27 September 2012 - 11:07 AM.


#92 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 27 September 2012 - 11:14 AM

Check something for me, when you start up the program with my new .cs config file, press the pedal down while clicking inside the error window as a test. You should only get one keypress. I know I tested that this morning. I didn't launch the game though, so maybe its expecting something different. Reason I'm trying to avoid the code you put, is if you try your version, thats exactly whats happening, you're getting a lot of keystrokes. You've slowed them down with your code, but its constantly pressing and releasing the x or space key. It should emulate one keypress down and one up.

I'll double check the sub weapon, when I get home.

Your code does give me an idea on how to emulate analog control for the jumpjets, but not sure thats of any use.

#93 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 11:28 AM

Ahhhhhhh... That is the problem hehehehehe

It is only pressing 'space' once.

It is stylistic - mine is set for my play style, I hold accelerate until the throttle is where I want it (hence the spamming of the key) and then release the pedal (I don't want to tap it for multiple levels of acceleration, just hold it down and release when throttle is set).

Jump jets have to spam 'space' to work (at least when using kb to play - same as holding it down).

The reverse works the same way (hold it till you achieve the appropriate throttle setting on screen and release).

I should make the all stop not spam 'x' cause it only needs to be pressed once however.... (so I will tidy my code today).

Test it in game and see - I think you will like my funky solution :D

EDIT: the pedals work well this way for 'hill humping' and it's how my final VTCHID profile was set back in the MW IV days (I don't know if I uploaded that version).

The loop timer was simply to spam the key at a rate that 'feels' right to me (like my user.cfg changes).

Edited by von Pilsner, 27 September 2012 - 11:42 AM.


#94 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 27 September 2012 - 11:42 AM

I'm not cutting down your solution, its just that from a driver level it should work. If you send a keydown command and no key up command, that the same as holding down the key. Which indicates to me something might be off. In fact I think I remember when using the old inputSimulator.cs that when I held down the left pedal that it would spam multiple x across the text. I'll look into it when I get home.

I feel I'm almost there. Thanks for the testing support. Nice to have someone testing that also knows code. BTW, if you could clean up one thing for me in your code, since I'm using yours as an example :D

change these:
if(controller.GetButtonState(34)) //FILT Toggle

to this
if(controller.GetButtonState(ButtonEnum.ToggleFilterControl)) //FILT Toggle


I've added the proper ButtonEnums in the version of the your config file that comes with my download.

Edited by HackNFly, 27 September 2012 - 11:44 AM.


#95 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 11:51 AM

I can tidy the code this afternoon, will let you know when it's uploaded.

Steel-Batallion-64_v2_beta is working pretty much perfectly on my computer, with the user.cfg changes I am getting a very good feel to the controller in-game, I suppose I can delete my Win XP partition now... :D

View PostHackNFly, on 27 September 2012 - 11:42 AM, said:

If you send a keydown command and no key up command, that the same as holding down the key.

I noticed that, that is why I added a key up at the end (I quit out of the program and the key stayed down, it was control so it took me a minute to figure out why my kb was being wierd :))

  public void shutDown()
  {
   controller.sendKeyUp(Microsoft.DirectX.DirectInput.Key.LeftControl);
   controller.UnInit();
   joystick.Release(1);
  }

Edited by von Pilsner, 27 September 2012 - 12:00 PM.


#96 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 12:57 PM

Cleaned up, commented, and re-formatted: BvP-MWO.cs (permalink to v0.9).

#97 HackNFly

    Member

  • PipPipPipPipPip
  • 131 posts

Posted 27 September 2012 - 02:13 PM

I was certain I tested it. I just logged into the game, and the dual pedal works fine. Were you pressing both the right pedal and the left pedal at the same time? That triggers you to ust the jump jets. If you press the left pedal by itself it works as a stop pedal. The system works well for me.

Still can't reverse though. Might be something in the .cfg file I copied from one of the force feedback controllers. I"ll copy yours over when I have more time. I'm feeling pretty confident where the program is right now though. Last thing i want to do is test a new dll, the author of vJoy created for me. I promised to test it for him. Other than that, I think the program is ready for general use.

#98 Ximmons

    Member

  • Pip
  • 17 posts

Posted 27 September 2012 - 03:01 PM

At this rate you two combined could solve the problem of creating a warp bubble for space travel. My previous post was me not understanding what you had done Von Pilsner but I think you knew that. All of the controls respond out of game with your setup, every button is entering what it should in notepad. Once I get in game with the default settings none of the controls are responding. I have gone ahead and updated the steelbattalion64 and loaded your newest config. I have not changed the user config yet as I am not sure where it is but that is just the speed the joystick responds so not the issue. I am sure its something simple that I am looking over but any oversight or steps you could give to get it up and running would be much appreciated

#99 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 27 September 2012 - 06:08 PM

View PostXimmons, on 27 September 2012 - 03:01 PM, said:

At this rate you two combined could solve the problem of creating a warp bubble for space travel. My previous post was me not understanding what you had done Von Pilsner but I think you knew that. All of the controls respond out of game with your setup, every button is entering what it should in notepad. Once I get in game with the default settings none of the controls are responding. I have gone ahead and updated the steelbattalion64 and loaded your newest config. I have not changed the user config yet as I am not sure where it is but that is just the speed the joystick responds so not the issue. I am sure its something simple that I am looking over but any oversight or steps you could give to get it up and running would be much appreciated

That may be a better question for HackNFly, but I would make sure you are in 'Test Mode' (I'm pretty sure it is still required, but too lazy to switch my computer to test today), uninstall PPJoy,
Download and unzip the newest version of the driver: Steel-Batallion-64_v2_beta.zip.
Re-install the SB LibUSB Driver. Verify that it finds the controller (in device manager).
Posted Image

Add the user.cfg changes or the Y-Axis and throttle may be wrong.

Then I would delete my '\MechWarrior Online\USER\Profiles\von Pilsner\actionmaps.xml' file, restart the game and re-bind 'throttle' to the throttle stick on the controller and save the options.

NOTE: if the POV / weapon group control seems twitchy remap the 4 'Weapon Group Hilight' commands to 'button0' (trigger/sub weapon) one at a time. Then remap 'button0' back to 'Fire Selected Weapon Group' and save your options.

Download site: Steel-Batallion-64_v2_beta.zip (local copy)
LibUSBDotNet_Setup.2.2.8 (local copy)
Download MWO profile: BvP-MWO.cs
Example user.cfg
Button diagram here.
Explanation of the toggle switches: toggle.txt.

If you need to you can check that VJoy controller is configured correctly with vJoyConf.
Posted Image
If you get the twitchy POV you can actually select '0 POVs' and the thumbstick will still work in-game.

Hope that helps, I bet HackNFly will have more suggestions if you can't get it working.

Edited by von Pilsner, 27 September 2012 - 06:29 PM.


#100 shotokan5

    Member

  • PipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 550 posts
  • Google+: Link
  • Locationvirginia

Posted 27 September 2012 - 06:19 PM

Man you guys have worked hard. No one wants a stick more than me. In a little over a month I will not be changing files or such Most joysticks
will be working. I traded two Husky's and 10 lbs of dog food for this info. I know the game was ment to be played with a stick and they think so to. I can't go into dedails but they have to put all the ingredients in the stew before they put in the last sezening. They will not get the hotsause
until they have finished. We have waited this long and I can not wait to set up the stick and get sweet revenge.

Revenge is a dish best served cold. Great work and it will be here before you know it. Don't worry be happy.





4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users