TrackIR emulation coming soon
- djdevin
- Two Eyed Hopeful
- Posts: 55
- Joined: Wed Oct 17, 2012 1:10 pm
- Location: Philadelphia, USA
Re: TrackIR emulation coming soon
Yep that was it! Add the NPClient.def and worked as expected. Going to fool around with the haiku now...
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
Nice work, djdevin hope you find that little poem in there
-
- Two Eyed Hopeful
- Posts: 74
- Joined: Fri Sep 21, 2012 4:46 am
Re: TrackIR emulation coming soon
Yep, good job
To log the haiku you should probably use get_log_path, and open a stream in binary mode, and write the memory as a string to that file. You might find it useful to use another file though, so you only get the binary data.
Good luck, hope you find something useful! Since it is an encrypted version of trackir, the location of the poem is probably changed, hopefully it's still close to the input buffer though.
To log the haiku you should probably use get_log_path, and open a stream in binary mode, and write the memory as a string to that file. You might find it useful to use another file though, so you only get the binary data.
Good luck, hope you find something useful! Since it is an encrypted version of trackir, the location of the poem is probably changed, hopefully it's still close to the input buffer though.
- djdevin
- Two Eyed Hopeful
- Posts: 55
- Joined: Wed Oct 17, 2012 1:10 pm
- Location: Philadelphia, USA
Re: TrackIR emulation coming soon
So I managed to do some step debugging to attach to F1 2012 and poke around the memory when NPClient.dll was loaded, but I was unable to find the haikus near the buffer. I'll try broader searching later - my short term goal was to get F1 2012 actually working with FreePie/TrackIR. I *did* get it working by writing certain haikus and feeding them in - so that's confirmed, it does actually work. Mapped my hillcrest tracker and all is well.
While the search algorithm is a great idea, I don't think it can handle all cases. For example maybe the haikus aren't even loaded into memory at the time our DLL is called. Or like you said they could be in an entirely different or encrypted/protected area. So looked at some other solutions and linux-freetrack seems to already do what I have in mind.
https://code.google.com/p/linux-track/s ... main.c#280
Read the signature from a file and load that instead. I think we can combine all the techniques together so we have a signature function that searches memory and falls back to an optional NPClient.ini file.
While the search algorithm is a great idea, I don't think it can handle all cases. For example maybe the haikus aren't even loaded into memory at the time our DLL is called. Or like you said they could be in an entirely different or encrypted/protected area. So looked at some other solutions and linux-freetrack seems to already do what I have in mind.
https://code.google.com/p/linux-track/s ... main.c#280
Read the signature from a file and load that instead. I think we can combine all the techniques together so we have a signature function that searches memory and falls back to an optional NPClient.ini file.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
My plan from the beginning was to have it as a setting in FreePIE, but my brother (CyberRascal) liked this way better :)like you say maybe we can combine them
-
- Two Eyed Hopeful
- Posts: 74
- Joined: Fri Sep 21, 2012 4:46 am
Re: TrackIR emulation coming soon
djdevin: Sorry for the late reply!
Anyway, good investigation I guess we'll have to go with either plain-text, supplied by the user, or storing it using a simple cipher (so it is hard to read, like in freetrack), supplied with the program.
I'm leaning towards the second option for usability, do you agree? If freetrack can get away with it, so should we. (both Villain and djdevin)
Anyway, good investigation I guess we'll have to go with either plain-text, supplied by the user, or storing it using a simple cipher (so it is hard to read, like in freetrack), supplied with the program.
I'm leaning towards the second option for usability, do you agree? If freetrack can get away with it, so should we. (both Villain and djdevin)
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
Yeah, maybe thats the best solution, and move the npclient code out of FreePIE like Freetrack did?CyberRascal wrote:djdevin: Sorry for the late reply!
Anyway, good investigation I guess we'll have to go with either plain-text, supplied by the user, or storing it using a simple cipher (so it is hard to read, like in freetrack), supplied with the program.
I'm leaning towards the second option for usability, do you agree? If freetrack can get away with it, so should we. (both Villain and djdevin)
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
@djdevin
Can you try this branch and see if it works for you with trackir fixer etc?
https://github.com/maxmalmgren/FreePIE/ ... ir-feature
Can you try this branch and see if it works for you with trackir fixer etc?
https://github.com/maxmalmgren/FreePIE/ ... ir-feature
- djdevin
- Two Eyed Hopeful
- Posts: 55
- Joined: Wed Oct 17, 2012 1:10 pm
- Location: Philadelphia, USA
Re: TrackIR emulation coming soon
Just grabbed the new NPClient.dll, and it works! Tested in Future Pinball and F1 2012.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
-
- Two Eyed Hopeful
- Posts: 74
- Joined: Fri Sep 21, 2012 4:46 am
Re: TrackIR emulation coming soon
Thanks djdevin, much appreciated.
For those interested, I decided NOT to make the implementation of getting the signature part of the available source code - I just provided a header file containing the interface for it. The currently existing NPClient.dll in the source repository has an implementation provided by me, statically linked.
Cheers
For those interested, I decided NOT to make the implementation of getting the signature part of the available source code - I just provided a header file containing the interface for it. The currently existing NPClient.dll in the source repository has an implementation provided by me, statically linked.
Cheers
-
- One Eyed Hopeful
- Posts: 4
- Joined: Wed Jun 04, 2014 12:16 pm
Re: TrackIR emulation coming soon
Hi, sorry to necro a thread, but is this project still alive?
I tried to download from http://naturalpointofview.blogspot.co.u ... fixer.html but the MediaFire download was blocked by Chrome as "malicious"
I tried to download from http://naturalpointofview.blogspot.co.u ... fixer.html but the MediaFire download was blocked by Chrome as "malicious"
-
- One Eyed Hopeful
- Posts: 4
- Joined: Wed Jun 04, 2014 12:16 pm
Re: TrackIR emulation coming soon
It does, however, seem like this was an erroneous warning, my AV software didn't grumble at all.
I now understand that this software only works for the listed games. Is there any way to add support for a game?
I wish to use MechWarrior Online with TrackIRFixer - the game is free to play so could anyone maybe add support for it?
I now understand that this software only works for the listed games. Is there any way to add support for a game?
I wish to use MechWarrior Online with TrackIRFixer - the game is free to play so could anyone maybe add support for it?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
-
- One Eyed Hopeful
- Posts: 4
- Joined: Wed Jun 04, 2014 12:16 pm
Re: TrackIR emulation coming soon
I used the contact form, but the message never got approved
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
Maybe the project is dead. We should fix so that games work without the fixer at some point
-
- One Eyed Hopeful
- Posts: 4
- Joined: Wed Jun 04, 2014 12:16 pm
Re: TrackIR emulation coming soon
I take it nobody has contact info, or a copy of the source?CyberVillain wrote:Maybe the project is dead. We should fix so that games work without the fixer at some point
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
If you are good at C and C++ you could take a look at integrating this into FreePIE,evilC wrote:I take it nobody has contact info, or a copy of the source?CyberVillain wrote:Maybe the project is dead. We should fix so that games work without the fixer at some point
https://github.com/AndersMalmgren/FreeP ... t-27280148
It replaces the need of TrackIrFixer
-
- One Eyed Hopeful
- Posts: 21
- Joined: Fri Oct 17, 2014 1:50 am
Re: TrackIR emulation coming soon
What's the status for this ?CyberVillain wrote:If you are good at C and C++ you could take a look at integrating this into FreePIE,
https://github.com/AndersMalmgren/FreeP ... t-27280148
It replaces the need of TrackIrFixer
The source code from that link is not available anymore ...
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
-
- One Eyed Hopeful
- Posts: 21
- Joined: Fri Oct 17, 2014 1:50 am
Re: TrackIR emulation coming soon
I think the integration steps would be the following:
I guess it required a lot of hard reverse engineeing to make the enhance function, and the program that unscrambles "sgl.dat" from the TrackIR inslalation.
For obtaining the "tables" you can use the suplied programs. It must be done each time a new game is added to trackIr:
Since your code is C++, I guess you could reuse cksum() and enhance() without rewriting them, isn't it ?
- Get the GameId when the game calls NP_RegisterProgramProfileID().
- For each game you will need later a 8 byte array("table"), you can setup it here.
- For a first test you can hardcode it for a game.
- Later you can load it from a CSV like they do in getGameData()
- Or maybe you prefer load it from somewere else.
- Calc the checksum in set_trackir_data() after setting the parameters.
You can user their function cksum() for doing this. chsum must be 0 in the structure before calculation. - if the GameId is in the list of protected games:
- Scramble the tir_data structure set_trackir_data()
- You can use their enhance() function, with the "table" asociated to the gameId.
I guess it required a lot of hard reverse engineeing to make the enhance function, and the program that unscrambles "sgl.dat" from the TrackIR inslalation.
For obtaining the "tables" you can use the suplied programs. It must be done each time a new game is added to trackIr:
- You must compile the supplied main.c (requires http://mxml.sourceforge.net/)
- Run it against "sgl.dat" from the TrackIR instalation
- This gives you a list with gameId, gameName and gameKey(8 byte table in hexascii)
- Then they run the perl script to merge it with other file, and generate a CSV with more info about each game, but I think that this is not needed.
Since your code is C++, I guess you could reuse cksum() and enhance() without rewriting them, isn't it ?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: TrackIR emulation coming soon
The guy that wrote this is no longer active in the project, and I have very little time these day, I mostly have some time todo minor maintance work and such.
Yes our fake dll is C++
Yes our fake dll is C++