Page 3 of 3

Re: TrackIR emulation coming soon

Posted: Wed Dec 12, 2012 10:03 pm
by djdevin
Yep that was it! Add the NPClient.def and worked as expected. Going to fool around with the haiku now...

Re: TrackIR emulation coming soon

Posted: Thu Dec 13, 2012 3:40 am
by CyberVillain
Nice work, djdevin hope you find that little poem in there :P

Re: TrackIR emulation coming soon

Posted: Thu Dec 13, 2012 7:45 am
by CyberRascal
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.

Re: TrackIR emulation coming soon

Posted: Tue Dec 18, 2012 10:24 am
by djdevin
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.

Re: TrackIR emulation coming soon

Posted: Tue Dec 18, 2012 11:47 am
by CyberVillain
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

Re: TrackIR emulation coming soon

Posted: Fri Dec 21, 2012 10:46 pm
by CyberRascal
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)

Re: TrackIR emulation coming soon

Posted: Sat Dec 22, 2012 6:03 am
by CyberVillain
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)
Yeah, maybe thats the best solution, and move the npclient code out of FreePIE like Freetrack did?

Re: TrackIR emulation coming soon

Posted: Tue Jan 01, 2013 11:48 am
by CyberVillain
@djdevin

Can you try this branch and see if it works for you with trackir fixer etc?

https://github.com/maxmalmgren/FreePIE/ ... ir-feature

Re: TrackIR emulation coming soon

Posted: Wed Jan 02, 2013 7:38 pm
by djdevin
Just grabbed the new NPClient.dll, and it works! Tested in Future Pinball and F1 2012.

Re: TrackIR emulation coming soon

Posted: Thu Jan 03, 2013 1:53 am
by CyberVillain
Cool!

Re: TrackIR emulation coming soon

Posted: Thu Jan 03, 2013 3:00 am
by CyberRascal
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

Re: TrackIR emulation coming soon

Posted: Wed Jun 04, 2014 12:19 pm
by evilC
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"

Re: TrackIR emulation coming soon

Posted: Wed Jun 04, 2014 12:30 pm
by evilC
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?

Re: TrackIR emulation coming soon

Posted: Wed Jun 04, 2014 12:46 pm
by CyberVillain

Re: TrackIR emulation coming soon

Posted: Thu Jun 05, 2014 10:50 am
by evilC
I used the contact form, but the message never got approved :(

Re: TrackIR emulation coming soon

Posted: Thu Jun 05, 2014 11:21 am
by CyberVillain
Maybe the project is dead. We should fix so that games work without the fixer at some point

Re: TrackIR emulation coming soon

Posted: Tue Jun 10, 2014 4:30 pm
by evilC
CyberVillain wrote:Maybe the project is dead. We should fix so that games work without the fixer at some point
I take it nobody has contact info, or a copy of the source?

Re: TrackIR emulation coming soon

Posted: Wed Jun 11, 2014 6:23 am
by CyberVillain
evilC wrote:
CyberVillain wrote:Maybe the project is dead. We should fix so that games work without the fixer at some point
I take it nobody has contact info, or a copy of the source?
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

Re: TrackIR emulation coming soon

Posted: Fri Oct 17, 2014 11:29 am
by Cercata
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
What's the status for this ?

The source code from that link is not available anymore ...

Re: TrackIR emulation coming soon

Posted: Mon Oct 20, 2014 2:49 am
by CyberVillain
https://github.com/AndersMalmgren/FreePIE/issues/30

Please check the link in the last post

Re: TrackIR emulation coming soon

Posted: Mon Oct 20, 2014 7:29 am
by Cercata
I think the integration steps would be the following:
  • 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.
And then the buffer passed by NP_GetData() should contain the TrackIR information in the way the Game expects it.
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.
What do you think ?
Since your code is C++, I guess you could reuse cksum() and enhance() without rewriting them, isn't it ?

Re: TrackIR emulation coming soon

Posted: Tue Oct 21, 2014 2:57 am
by CyberVillain
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++