Jump to content
The simFlight Network Forums

FS Version check (Offset: 3308) / Prepar3D read by FS-Communicator


Recommended Posts

Dear Pete

Im still using FS-Communicator due to the fact its still one of the best FBW Software. Since we changed our Flightsimulator to Prepar3D, FSC crash with a runtime error 9. After several investigations and creating logs of everything, im sure i found out the error.

FSC is reading out the offset 3308 (FS Version) and since FSUIPC is using 0A (Nr. 10 for Prepar3D) instead of 08 (=FSX, you know :smile: ) im mostly sure FSC can not handle that and ends with that runtime error mentioned above. As you perhaps know, Robert Fischer (Programmer of FSC) is not longer in business and Im wondering if there is any chance to "trick" FSUIPC to send out another variable than the 0A?

Best way would be, that FSUIPC 4 will use Nr. 1 for Prepar3D instead of FS98 :smile: But any other approach is very appreciated.

Thanks in advance for a response,

Daniel

FSUIPC V 4.859s

Log: Log with 3 attemps to start FSC.txt

Link to comment
Share on other sites

FSC is reading out the offset 3308 (FS Version) and since FSUIPC is using 0A (Nr. 10 for Prepar3D) instead of 08 (=FSX, you know :smile: ) im mostly sure FSC can not handle that and ends with that runtime error mentioned above. As you perhaps know, Robert Fischer (Programmer of FSC) is not longer in business and Im wondering if there is any chance to "trick" FSUIPC to send out another variable than the 0A?

Have you tried using the "spoofing" facility for offsets using the special facilities provided for use in a Lua plug-in? Please check out offset 0024 for writing. If you look in your FSUIPC Documents folder you will find an example Lua plug-in called "Liar.lua" which is actually much more advanced than your needs, but which will certainly give you the idea.

Regards

Pete

Link to comment
Share on other sites

  • 1 year later...

Daniel

I want to do the same thing, I have looked through the LUA documentation but it is all Greek to me, I am too old I think.

I have found the liar.lua and I understand that I put it in the Modules folder, in fact I have put it there and it is numbered in the config file so I have done something right I think.

I have to put values in the script I presume, can you tell me what to do please?

Barry

www.a320sim.com

Link to comment
Share on other sites

  • 2 years later...

Dear Pete,

I have been struggling with the same. Could you please kindly let me know how I should modify the liar.lua in order to tell FS communicator that I am running FSX (8) although i am running prepar3d.

I assume it will be a simple 3 lines of code ;

1 - read version (0x3308)

2- set version = 8

3 - write to 0x0024 the new version

Best regards from Istanbul

Okan Sacli

 

 

 

Link to comment
Share on other sites

It's really pretty simple to adapt the example code. After all you are then only dealing with one offset, so the code simplies down enormously, to something like

-- "Liar" example LUA plug-in for FSUIPC4/ESPIPC only, by Pete Dowson, January 2009
origversion = ipc.readUW(0x3308)

-- Loop till flag 0 is set
while ipc.testflag(0) == false do

-- and write false value to 3308
ipc.writeStruct(0x0024, "3UW", 0x3308, 2, 8)

-- Sleep for 50 mSecs so the update gets done roughly 20 times per second
ipc.sleep(50)

end

-- Now undo the override (otherwise it'll take about 12 seconds to die, with frozen value provided!)
ipc.writeStruct(0x0024, "3UW", 0x3308, 2, origversion)

Okay?

Pete

 

Link to comment
Share on other sites

  • 10 months later...
Quote

is the above liar.lua still applicable for FSUIPC5 (p3dV4) to set version as 8 ?

Well, the code is still there, and it is unrelated to to the conversion to 64-bit, so whilst i've not specifically tested it (it is pretty impossible to test everything every time), yes, it should be fine. Let me know if it isn't.

Pete

 

Link to comment
Share on other sites

17 hours ago, okansacli said:

But it seems to keep the version as 12.

Found the problem. A 32-bit pointer in a structure expanding to 64-bit (of course). Missed it, sorry. It will be fixed in interim update 5.103b (or later). Check the Download Links subforum over the next couple of days.

Pete

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.