x52 Pro MFD Programming?

Tips, tactics, and general discussion for Evochron Legacy.
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

I've been thinking about grabbing an x52 Pro, and doing some work with the SDK to display data from the game (fuel? location?) on the throttle's LCD.

Vice, it looks like the Saitek SDK is based on DirectOutput. Is there any kind of API available within EL to access in-game variable values? I'd be happy to code the middleware for the x52, but obviously would need some way to access the information, analogous to how Microsoft's Flight Simulator exposes data via their FSX API.

Alternatively, it might be possible to read in ship data values from the stack, but I imagine that directly trolling through the executable's memory would be annoying at best. No idea how you'd feel about someone trying to reverse engineer that kind of information, either -- and it would probably be a maintenance nightmare as you update the program. :)
User avatar
Vice
Administrator
Administrator
Posts: 12227
Joined: Fri Apr 25, 2003 1:38 am

x52 Pro MFD Programming?

Post by Vice »

The memory points are fairly dynamic and move around, so it's not too practical to try and extract them externally. If there was a DLL I could interface with from within the game, I could send out the needed data for such a function. Perhaps Saitek provides this as part of their kit?
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

That's actually exactly how they do it -- they provide an SDK with the relevant DLL. There's a decent collection of community-made plugins (http://www.saitekforum.com/showthread.php?t=16965), which is where I had planned to start. The SDK itself comes with the x52 Pro drivers, which are available on Saitek's website (http://www.saitek.com/uk/down/drivers.php).

Might be worth asking if there's really much community interest in this beyond me, though. :)
User avatar
Vice
Administrator
Administrator
Posts: 12227
Joined: Fri Apr 25, 2003 1:38 am

x52 Pro MFD Programming?

Post by Vice »

Unfortunately, I don't have an X52 Pro with which to test, so if the SDK comes with an emulator of some kind, that would help. Got a link handy for the SDK? I can at least review it to analyze its feasibility.
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

The drivers link (second one in my reply) has the SDK -- if you're running Vista or Win7 x64, the direct link is ftp://ftp.saitek.com/pub/software/full/ ... SD6_64.exe.

Based on comments on the Saitek forum, it sounds like the actual SDK documentation is pretty thin. I've played with the DirectOutput.dll a bit, as well as looked at a quick and dirty C# wrapper that one of the forum members wrote, and it seems like the actual functionality is pretty straightforward. The wrapper suggests that you import the .dll, get a handle to the physical device, call DirectOutput_AddPage() to create a target for output on the stick's LCD screen, and then just pass strings of text via DirectOutput_SetString().

I've uploaded both the .dll and the wrapper (which I didn't write) to http://www.thehipgamer.com/download/.
GORF
Lieutenant
Lieutenant
Posts: 157
Joined: Wed Nov 19, 2008 10:56 pm
Location: here

x52 Pro MFD Programming?

Post by GORF »

Reg. x52 here also, sidenote , I named my flight profile for er/el "dontlookhere" :cool:

If a cetain pilot catches you looking at your "OTD" on throttle display ,........ur toast:)
StarWolves Clan, HellFire Squadron

An Exodus Storm is On its Way
alpha45
Lieutenant
Lieutenant
Posts: 135
Joined: Sun Sep 20, 2009 5:50 pm

x52 Pro MFD Programming?

Post by alpha45 »

Oh hey. Fellow X52 user here. I had that issue as well, made a topic a long time ago. I'd really like the controller to react to ingame things, such as the lights all going red and flashing when the ship is damaged, and such. Although, you can use the profile creator to hook joystick controls to key or mouse input.
\"Never take life seriously. Nobody gets out alive anyway.\" -Anonymous

\"Love your enemies. It makes them so damned mad.\" -P.D. East

\"Thousands of candles can be lighted from a single candle, and the life of the candle will not be shortened. Happiness never decreases by being shared.\" -Buddha



Delicious brains!
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

The x52 is a great stick. To be clear, though, the SDK and screen support is exclusive to the x52 Pro -- the standard x52 doesn't support any kind of programmatic access to the LED or LCD.

If anyone's interested, I have every in-game function mapped to the x52's buttons, including modes that distinguish between weapons safety/weapons free. Happy to send it around!
alpha45
Lieutenant
Lieutenant
Posts: 135
Joined: Sun Sep 20, 2009 5:50 pm

x52 Pro MFD Programming?

Post by alpha45 »

I've already got a decent profile, and yeah, I own an X-52 Pro. It's just making the plugin. I'm not exactly knowledgeable with C++.
\"Never take life seriously. Nobody gets out alive anyway.\" -Anonymous

\"Love your enemies. It makes them so damned mad.\" -P.D. East

\"Thousands of candles can be lighted from a single candle, and the life of the candle will not be shortened. Happiness never decreases by being shared.\" -Buddha



Delicious brains!
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

Vice: would be easier, since you don't have an x52 to work with, to provide pilot data in some sort of generic format? For example, if some kind of data feed (text file, a lightweight query API, etc.,) were available, I could write an MFD plugin for the x52. In addition, making the data available would open the door for other hardware devices without you needing to maintain and support lots of little custom plugins.
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

One last thing -- the actual SDK. Not sure how I managed to not provide this sooner.

http://www.thehipgamer.com/download/SDK.zip
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

Had a bit of time to play with the SDK this weekend, and I have a very simple command-line based test harness up and running. I'm consuming the .dll, and can write text to the MFD and set LEDs on and off at will. If Vice can provide me with some way to get data about the player's ship in real time, I can pull together a plugin for the x52 Pro.
Maarschalk
Captain
Captain
Posts: 7641
Joined: Wed Feb 25, 2009 12:24 am
Location: USA, Also check your six!

x52 Pro MFD Programming?

Post by Maarschalk »

Cool, although I have only a regeular X52 dang it.....LOL.....:P
Arvoch Alliance Stat:


Evochron Legends Stats:


Evochron Mercenary Stats:


Darkness is the absence of Light as Evil is the absence of Good
User avatar
Vice
Administrator
Administrator
Posts: 12227
Joined: Fri Apr 25, 2003 1:38 am

x52 Pro MFD Programming?

Post by Vice »

I'm willing to spend some time on it, although the moving addresses will be a challenge. I'll likely need to code something internally to feed the data out to the DLL, so maybe I could set up a custom build that would use it. If you want to, contact me via e-mail with details on how to call functions/pass data to the DLL and when/if my schedule allows, I can try out some ideas with it.
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
ChazFox
Ensign
Ensign
Posts: 30
Joined: Thu Dec 10, 2009 3:03 pm

x52 Pro MFD Programming?

Post by ChazFox »

I'm very tempted to pick up an X52 Pro. At the moment I'm using a Cyborg Evo, which is doing the job for me, but to have more control without having to look to the keyboard for things like warping and whatnot would be neat. ^^
Bartender/Occasional firefighter at the Intergalactic Truckstop.

The Romulan spoke to me and all I got was this lousy T-shirt.

[IM] Independent Merchants
ellF
Ensign
Ensign
Posts: 26
Joined: Sun Jun 06, 2010 9:22 pm
Location: Boston, MA

x52 Pro MFD Programming?

Post by ellF »

I'm pretty close to releasing my plugin, and could use some beta-testing from the community. Would any fellow X52 Pro users be willing to help out?

Thanks!
Maarschalk
Captain
Captain
Posts: 7641
Joined: Wed Feb 25, 2009 12:24 am
Location: USA, Also check your six!

x52 Pro MFD Programming?

Post by Maarschalk »

Cool, I would if I had an X52 Pro. I just have the regular X52......:(
Arvoch Alliance Stat:


Evochron Legends Stats:


Evochron Mercenary Stats:


Darkness is the absence of Light as Evil is the absence of Good
mic
Ensign
Ensign
Posts: 8
Joined: Tue Jun 29, 2010 8:37 am

x52 Pro MFD Programming?

Post by mic »

hey there,
just signed up here and about to purchase and play this great game.
I have a X52 Pro and coming from Falcon4 i know what great things can be done with the MFD. For Falcon there was a great tool to config the MFD and even set ingame warning to LED colors:
Image

If something like that was possible it would really make the game much more precious to X52 pro users and vice versa make the X52 pro more appealing to evochron users ;-)

[Edited on 6-29-2010 by mic]

[Edited on 6-29-2010 by mic]
GORF
Lieutenant
Lieutenant
Posts: 157
Joined: Wed Nov 19, 2008 10:56 pm
Location: here

x52 Pro MFD Programming?

Post by GORF »

Originally posted by Maarschalk
Cool, I would if I had an X52 Pro. I just have the regular X52......:(
same here , although a pro ver. might be nice to try ;)
StarWolves Clan, HellFire Squadron

An Exodus Storm is On its Way
Maarschalk
Captain
Captain
Posts: 7641
Joined: Wed Feb 25, 2009 12:24 am
Location: USA, Also check your six!

x52 Pro MFD Programming?

Post by Maarschalk »

Hi Mic, Nice, Welcome to the game and forum. Hope to see you out there some time...;):cool:
Arvoch Alliance Stat:


Evochron Legends Stats:


Evochron Mercenary Stats:


Darkness is the absence of Light as Evil is the absence of Good
mic
Ensign
Ensign
Posts: 8
Joined: Tue Jun 29, 2010 8:37 am

x52 Pro MFD Programming?

Post by mic »

thanks for the nice welcome, maarschalk. Good to see this game has a good community.

Finally a complex space sim that's multiplayer, I'm really looking forward to it. I love the option of switching between IDS and true inertial simulation (with thrusters). [Btw, In freelancer there was something similar with the engine kill option and afterburner boosts, but the ships loose speed so much (like in atmosphere, for whatever reason) it wasn't really fun/useful]

Regarding the x52 pro MFD, I'm willing to beta test this and assist with any help.

Great game :-)

[Edited on 6-29-2010 by mic]
ryuu
Lieutenant
Lieutenant
Posts: 328
Joined: Fri Nov 13, 2009 7:27 pm
Location: i refer you to rule #1!

x52 Pro MFD Programming?

Post by ryuu »

looks like something i'd like to use if i had an x52, shame i don't, i'm just stuck with my ooooolllldddd sidewinder joystick... that is if i can ever find the damned thing, if i ever come across one and have the cash would it be worth the buy?
the day has ended, the night is yet to come
light and darkness, opposite sides to the same coin, yet what may do not realize is that this coin holds a third side, a side not of either or the other, but of both, a side of twilight. when light and darkness destroy eachother, there is nothing left but twilight, yet aslong as one or the other exists twilight exists within it, that is both the power and weakness of twilight. i am Ryuu Hakumei, The twilight Dragon. The Dusk Has Come

part three of The Fire of Twilight now posted! http://www.starwraith.com/forum/viewthread.php?tid=5546
Maarschalk
Captain
Captain
Posts: 7641
Joined: Wed Feb 25, 2009 12:24 am
Location: USA, Also check your six!

x52 Pro MFD Programming?

Post by Maarschalk »

Yep, it is worth every penny even Euro if there are any......LOL.......:P:P:P:P:P
Arvoch Alliance Stat:


Evochron Legends Stats:


Evochron Mercenary Stats:


Darkness is the absence of Light as Evil is the absence of Good
ryuu
Lieutenant
Lieutenant
Posts: 328
Joined: Fri Nov 13, 2009 7:27 pm
Location: i refer you to rule #1!

x52 Pro MFD Programming?

Post by ryuu »

looks expensive, think i may just add it to my christmas list
the day has ended, the night is yet to come
light and darkness, opposite sides to the same coin, yet what may do not realize is that this coin holds a third side, a side not of either or the other, but of both, a side of twilight. when light and darkness destroy eachother, there is nothing left but twilight, yet aslong as one or the other exists twilight exists within it, that is both the power and weakness of twilight. i am Ryuu Hakumei, The twilight Dragon. The Dusk Has Come

part three of The Fire of Twilight now posted! http://www.starwraith.com/forum/viewthread.php?tid=5546
soulsacrifice
Lieutenant
Lieutenant
Posts: 234
Joined: Mon Sep 14, 2009 3:50 pm
Location: Riftspace

x52 Pro MFD Programming?

Post by soulsacrifice »

I can beta test if you're still working on this ellF. Would be great to have some hud info on the mfd.
Profile Share Thread (Links RE-fixed)