Jump to content
The simFlight Network Forums
ManuManuu

Mouse macros and PMDG 747X

Recommended Posts

Hi all,

I am currently trying to use Mouse macros for PMDG 747X (FSX) FMC in order to use with a hardware FMC. So I have been mouse trapping each keys pretty easily.

Example :

[Macros]
Module="PMDG_747400_Main.DLL"
1=key A=RX10ad0*X8b00
2=key B=RX10b00*X8bcc
3=key C=RX10b30*X8bcc
4=key D=RX10b60*X8bcc[/CODE]

However : when trying the recorded macro with the TAB key, nothing happens, and when assigning the macro to a button, nothing happens either (which would seem pretty logical considering TAB didn't work).

Any idea why even the TAB would not work ? And if it's a parameter needed (I had a look at the other macros included in the Fsuipc install : all use parameter 0 and even if I change the parameter it doesn't make any difference), how to search for the right parameter ?

I tried digging a little bit, and tried some of the 747 OVH macros that are included in Fsuipc's install. Some function without any problem (Engine startup, or Anti-Ice for instance) but others like "AirHumid", "Air APU Bleed" and the sort didn't work. [i]edit : found why : the 747 OVH macro file included contained wrong adresses. Problem solved.[/i]

[s]So has this any connection with my FMC/CDU macros not working or is it an entirely different problem ?[/s]

So any idea how to have TAB function on the FMC/CDU macros ? And therefore the possibility to assign a button ?

Many thanks in advance

Edited by Nephi

Share this post


Link to post
Share on other sites

However : when trying the recorded macro with the TAB key, nothing happens, and when assigning the macro to a button, nothing happens either (which would seem pretty logical considering TAB didn't work).

Any idea why even the TAB would not work ? And if it's a parameter needed (I had a look at the other macros included in the Fsuipc install : all use parameter 0 and even if I change the parameter it doesn't make any difference), how to search for the right parameter ?

Sorry, I don't know. It's by trial and error. I don't know of any other way.

So any idea how to have TAB function on the FMC/CDU macros ? And therefore the possibility to assign a button ?

Most of the things you need to do with the CDU require a pretty full keyboard. I doubt if anything less will do. However, others may know a way. Have you checked in the User Contributions sub-forum? If someone has done it for the PMDG 737NGX it may well also apply to the 747X?

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete,

many thanks for your reply. SO no idea as to why every mouse macro on the PMDG 747X is OK with the TAB test but not the FMC/CDU ones ?! They really must have programmed something differently here I guess. If you should have any idea, this would be most interesting !

Most of the things you need to do with the CDU require a pretty full keyboard. I doubt if anything less will do.

The idea is to use FDS's PRO-MX-CDU with the PMDG 747X so it should be OK as far as keys are concerned ;)

AS for the user's contribution : there are tons about the PMDG 747X, about MCP, Overhead, front panel,... everything BUT the FMC ! Which is why I started this little project.

Many thanks again for your help.

Edited by Nephi

Share this post


Link to post
Share on other sites

many thanks for your reply. SO no idea as to why every mouse macro on the PMDG 747X is OK with the TAB test but not the FMC/CDU ones ?! They really must have programmed something differently here I guess. If you should have any idea, this would be most interesting !

Sorry. I don't have the 747X so I can't even do a test. Hopefully others may help.

The idea is to use FDS's PRO-MX-CDU with the PMDG 747X so it should be OK as far as keys are concerned ;)

Okay. So it would then only be a matter of keyboard focus? You just need to find the way to get the 747X's attention on the CDU.

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete, thanks for the reply.

I don't think it's a matter of focus. I think Kalamaras and PMDG have tried to protect their work in order to prevent others from making money from it (which I understand fully) and in order to make even more money themselves out of it. You just need to have a look at the fact that Kalamaras's FlightSimLab is selling a driver for the FMC/CDU to go with engravity's one [for an outrageous price but that's irrelevant at this point]. So there's definitely something here.

And from what I know (but I could be wrong as I don't own it), Vrinsight's CDU II functions with the 747X only by using a keyboard/mouse click emulator. I could stand corrected on this point though.

I also listed all the LUA variables there, none that seems connected to the FMC/CDU : there are lots about the OVH, the MCP, the state of the aircraft, lights, options (winglets,...) but nothing about FMC/CDU.

I also tried with the leave/release parameteres in the macro file (11, 17) but with no success so far.

So if mouse macros don't seem to work using the TAB check although the event is perfectly detected by Fsuipc [didn't try the parameter though as I wouldn't know which numers to try], and if no LUA var seems available, do you believe there's anything we might try ?

Share this post


Link to post
Share on other sites

I don't think it's a matter of focus. I think Kalamaras and PMDG have tried to protect their work in order to prevent others from making money from it (which I understand fully) and in order to make even more money themselves out of it. You just need to have a look at the fact that Kalamaras's FlightSimLab is selling a driver for the FMC/CDU to go with engravity's one [for an outrageous price but that's irrelevant at this point]. So there's definitely something here.

Well, you could be right. But whatever is going on, surely you need a keyboard to drive a CDU in any case.

And from what I know (but I could be wrong as I don't own it), Vrinsight's CDU II functions with the 747X only by using a keyboard/mouse click emulator. I could stand corrected on this point though.

I think it has to. How else would you key in A-Z, 0-9, /, delete, clear, +. -, and the assorted function keys? Even Project Magenta's pilot and copilot CDUs use a normal keyboard. The PFC Boeing style CDUs in my cockpit have their own keyboard and screen and a mini-PC each.

I also listed all the LUA variables there, none that seems connected to the FMC/CDU : there are lots about the OVH, the MCP, the state of the aircraft, lights, options (winglets,...) but nothing about FMC/CDU.

Even if there were it would be really clunky feeding each keyboard character in one Lua value at a time.

So if mouse macros don't seem to work using the TAB check although the event is perfectly detected by Fsuipc [didn't try the parameter though as I wouldn't know which numers to try], and if no LUA var seems available, do you believe there's anything we might try ?

Using a keyboard. That's why I was talking about focus. I assume you can use the PCs own keyboard once the CDU has focus, or do they force everyone to use the mouse to press each and every key?

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete, thanks for the fast reply.

Yes you can use the keyboard, but only after clicking on a specific spot on the 2D FMC/CDU : then you can type on the CDU and it overrides any keyboard shortcuts in the sim. And if you want to revert back to normal operations you click again on the same sweet spot and your keyboard becomes "usable" again in the "normal" way.

I managed to get the mouse macro ident on this sweep spot but on this one too, the TAB check doesn't work.

Otherwise, the mouse is the way to go (for example in the 3D cockpit).

AS for Vrinsight's CDU, what I meant is that they did not rely solely on keyboard : they had to use some sort of keyboard2mouse. From what I gather (but once again, I don't own the unit) they display the entire CDU (with its bezel and keypad) UNDER the hardware keyboard (there'e a full screen under, that's hidden under the hardware) in order to be able to emulate mouse clicks.

Share this post


Link to post
Share on other sites

Yes you can use the keyboard, but only after clicking on a specific spot on the 2D FMC/CDU

So that's the one you really want an LVar or mouse macro for.

I managed to get the mouse macro ident on this sweep spot but on this one too, the TAB check doesn't work.

Hmm. shame, then. Don't PMDG provide a keyboard shortcut for it? Else they are forcing you to use the mouse, which isn't good.

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete.

There is a keyboard shortcut called "Toggle Key Lock" that allows you to use your keyboard to type. Which indeed settles the keypad problem, but not the problem for all the remaining keys (INIT/REF, VNAV, DEP/ARR, NAV/RAD LEGS...)

For all of these, unless somebody tells me I'm wrong (which I would gladly be), there's no other solution than the mouse I'm afraid.

Share this post


Link to post
Share on other sites

There is a keyboard shortcut called "Toggle Key Lock" that allows you to use your keyboard to type. Which indeed settles the keypad problem, but not the problem for all the remaining keys (INIT/REF, VNAV, DEP/ARR, NAV/RAD LEGS...)

For all of these, unless somebody tells me I'm wrong (which I would gladly be), there's no other solution than the mouse I'm afraid.

Surely they've got keyboard short cuts for all of those, and the 12 LSK keys too -- usually F1-F12 on the CDU's I've seen. I just cannot believe they force people to use the mouse.

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete,

been doing my homework and tried every possible combination. Results are :

1) letters and numbers are OK, corresponding to the matching one on the keyboard. Same for / and the dot

2) F1-F6 is Left LSK's as usual and F7-F12 is Right LSK's

3) Page Up is PREV and Page Down is NXT

4) Backspace is CLR

5) Delete is DEL

6) Enter is EXEC

7)+/- can be done either with + and - or with * on the numpad

However for all the other keys, which -one might say- are quite important :razz: , no way to find any keyboard shortcut, and the mouse macro, although it is detected by Fsuipc, still doesn't do anything with the TAB check. Seems like we're forced to use the mouse as I said at least for the menu keys :???:

Share this post


Link to post
Share on other sites

However for all the other keys, which -one might say- are quite important :razz: , no way to find any keyboard shortcut

That's a serious defect, then, and most certainly needs at least a mention if not a full blown report on their support forum!

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete,

I managed to dig out some very old posts about that on the PMDG forum... Evidently all of them ended up with no answer, no intervention of any PMDG staff member, so I doubt it would change anything now. Especially since the 747X is so old and has given way to their new baby.

So I guess we're on our own as I feared from the get go.

So any idea as to how we might bypass this limitation ?

Someone should offer you a copy of PMDG's stuff so you can check on your own :razz: :mrgreen:

Share this post


Link to post
Share on other sites

So any idea as to how we might bypass this limitation ?

Sorry, no, not if none of the mouse macro or LVar methods work. I assume no one else has solved it -- so how do folks manage? Do they all use a mouse?

A touch sensitive screen work work well too. maybe use an iPad with AirPlay to act as a second screen to accommodate an undocked CDU window.

Someone should offer you a copy of PMDG's stuff so you can check on your own :razz: :mrgreen:

Only PMDG could do that, and they won't if the only way of getting into it is hacking their code, which I wouldn't do in any case. Sorry.

Pete

Share this post


Link to post
Share on other sites

So apart from mouse macro and Lvars, no other option then :???: ? Crap I really belived we could pull this one off.

As for the touchscreen yes I thought about it, but I have been offered a FDS CDU for christmas by all the family, which is quite more realistic.

As for hacking, no, I just hoped that the mouse macros and others options Fsuipc offered would have functionned but I guess they really didn't want anybody to use any hardware with their software then. What a pity.

Share this post


Link to post
Share on other sites

I guess they really didn't want anybody to use any hardware with their software then. What a pity.

PMDG have always been consistent in refusing a cheap kit for interfacing to their products. They seem to feel that hardware makers would be getting a boost from the hard work and investment in PMDG, so they set a premium on the interface -- which some hardware makers have paid up. But not all, including PFC who I've done a lot of developments with (PFC are the makers of my 737NG cockpit). In my earlier days interfacing with some of PMDG's employees I tried to persuade them towards the view that an open interface benefits everyone, that they would sell more as a result. But it all fell on deaf ears I'm afraid.

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete,

been trying some other ideas in order to get it working but no joy so far. So a very blunt question -and I emphasize : I'm not asking you to hack anything or betray any secrets, I just ask for your specialist guidance as I'm not a software developper- (I would have done it via MP had you opened it) : where would you suggest I start searching for a way (and how) with the info we've gathered so far ? I'm ready for anything lengthy, boring, complicated... but as I'm no specialist I have absolutely no idea where to start and how to start (which programs to use,...). I'm just sooooooooo disappointed everytime I see my beautiful piece of 1000$ hardware sitting there only being half-functionnal. I don't want to make money, I don't want to spoil PMDG or Kalamaras of their work, I don't want to sell anything, I just want to be able to use my CDU fully !

There IS a way since the Engravity CDU functions with the PMDG. So it IS possible. So any guidance as to where to start would be invaluable as -I repeat- I have absolutely no idea on where to start and how to do it unfortunately :/

Thanks a gazillion times

Share this post


Link to post
Share on other sites

been trying some other ideas in order to get it working but no joy so far

I assume, then, that you've tried all the assorted ways of modifying and augmenting the mouse macro encodings, as described in the User Guide? (the section in The Mouse Macros chapter a box entitled "Variations for Mouse activated switches which might be made to work by editing the Macro file").

So a very blunt question -and I emphasize : I'm not asking you to hack anything or betray any secrets, I just ask for your specialist guidance as I'm not a software developper- (I would have done it via MP had you opened it)

Assuming you mean a "PM", I don't get them so can't open them.

: where would you suggest I start searching for a way (and how) with the info we've gathered so far ?

Sorry, I don't know. If you want to hack into their software then the starting place is the offset into the GAU or DLL recorded in the mouse macro for the keys you are concerned about. That will give you the entry point into the code. You'd need to trace it through using a debugger in disassembly mode to see how to make it work. It's the sort of thing I used to have to do with FS itself before SimConnect was invented, and used to take a long time, weeks, at 100 hours per week, and still often ending up with no results. If they didn't want you to do such things they can find many ways of stopping you or making it so difficult you'd give up.

There IS a way since the Engravity CDU functions with the PMDG. So it IS possible.

Well, either it is simpler than you've found, or they hacked it skillfully, or they got together with PMDG to solve it -- I would guess the latter with a commercial arrangement between them. Have you asked PMDG?

Regards

Pete

Share this post


Link to post
Share on other sites

I assume, then, that you've tried all the assorted ways of modifying and augmenting the mouse macro encodings, as described in the User Guide? (the section in The Mouse Macros chapter a box entitled "Variations for Mouse activated switches which might be made to work by editing the Macro file").

Indeed. Unfortunately no joy with this either. Bless you for making it possible "on the fly" without having to reload FSX otherwise I would have gone nuts I think.

Assuming you mean a "PM", I don't get them so can't open them.

Yes PM, sorry, not a Member of Parliament :razz: And that's what I meant by "open" : you have chosen not to open this channel of communication. Which I understand perfectly as I suspect you'd be swarmed with PMs.

Sorry, I don't know. If you want to hack into their software then the starting place is the offset into the GAU or DLL recorded in the mouse macro for the keys you are concerned about. That will give you the entry point into the code. You'd need to trace it through using a debugger in disassembly mode to see how to make it work. It's the sort of thing I used to have to do with FS itself before SimConnect was invented, and used to take a long time, weeks, at 100 hours per week, and still often ending up with no results. If they didn't want you to do such things they can find many ways of stopping you or making it so difficult you'd give up.

Right : so, assuming it is programmed in C/C++ I'd need to find a debugger. Then "entry point" would be RX10ad0*X8b00 for key "A" for example (that's what is in the macro file)... how do I find this "entry point" ? :oops:

Well, either it is simpler than you've found, or they hacked it skillfully, or they got together with PMDG to solve it -- I would guess the latter with a commercial arrangement between them. Have you asked PMDG?

Well they use a dll made by Lefteris Kalamaras (FsLabs) who was lead on the 747x development before he left PMDG with the offsets. So he should know what to do :)

The problem is that nobody at PMDG has ever answered to any of our many many questions (mine and others') on their forum about this. I guess they either don't want to answer or don't want to come back to the conflict that seems to have opposed them to Lefteris. (Disclaimer : all of this is what I gathered by earsay, I don't know anybody there or at FsLabs. I'm just a regular user trying desperately to have his CDU hardware function with the software).

Maybe looking into the Engravity/Fslabs dll would help ? No idea how to do it and what to look for but.

Someone on the LINDA forum suggested looking at "the Rotor_brake and a parameter, e.g. (66587, 12345)" (http://forum.avsim.n...ost__p__2247856) I'll also have to give this a try although I fear this is again a wild goose chase...

Share this post


Link to post
Share on other sites

Right : so, assuming it is programmed in C/C++ I'd need to find a debugger.

The programming language isn't really relevant because you don't have access to any source code. You'd need to plough through and understand the machine code, or rather the assembly code shown by the debugger. I use the one built into Microsoft's Visual Studio system.

Then "entry point" would be RX10ad0*X8b00 for key "A" for example (that's what is in the macro file)... how do I find this "entry point" ? :oops:

The entry is 0x10AD0 bytes offset from the beginning on the DLL or GAU file identified in the Macro. The 0x8B00 value is just a check -- the first two bytes at that offset. They are just used to prevent FSUIPC crashing FS should the GAU or DLL be changed and the entry point moved.

Well they use a dll made by Lefteris Kalamaras (FsLabs) who was lead on the 747x development before he left PMDG with the offsets. So he should know what to do :)

Yes, it would be easy for the original programmers to provide an interface. The FSLabs one wouldn't have been free. Maybe the maker of your CDU can bribe PMDG or FSLabs to give them a driver too, or perhaps the FSLabs one can be used for your CDU? I don't think folks in either company would deal with individual users on this. They would be looking to make money for such support, no doubt.

Maybe looking into the Engravity/Fslabs dll would help ? No idea how to do it and what to look for but.

In the end I think you'd find it easier and cheaper (especialy in terms of your time) to sell your CDU and buy the Engravity one. Don't you think?

Someone on the LINDA forum suggested looking at "the Rotor_brake and a parameter, e.g. (66587, 12345)" (http://forum.avsim.n...ost__p__2247856) I'll also have to give this a try although I fear this is again a wild goose chase...

An easier wild goose chase than ploughing into disassembled code I assure you!

Regards

Pete

Share this post


Link to post
Share on other sites

Hi again Pete (yes I'm quite motivated here, I really want to find a way to use my hardware) and thanks for your time and advice.

The programming language isn't really relevant because you don't have access to any source code. You'd need to plough through and understand the machine code, or rather the assembly code shown by the debugger. I use the one built into Microsoft's Visual Studio system.

Ok so, I just open the dll file with something like windbg or the like, or does it have tu be running ?

The entry is 0x10AD0 bytes offset from the beginning on the DLL or GAU file identified in the Macro. The 0x8B00 value is just a check -- the first two bytes at that offset. They are just used to prevent FSUIPC crashing FS should the GAU or DLL be changed and the entry point moved.

I have mapped all the CDU keys using Fsuipc's macro record tool. All the CDU keys are, from what I understand you say, offset regularly :

1=key A=RX10ad0*X8b00
2=key B=RX10b00*X8bcc
3=key C=RX10b30*X8bcc
4=key D=RX10b60*X8bcc
5=key F=RX10bc0*X8bcc[/CODE]

From what I understand of what you explained (but I could be completely wrong) this means that all key's offsets being 10b60(hex)-10b30(hex)=48(decimal) apart, they all point to something 48 bits long. Am I correct here or am I way over what I will ever understand ?

Another funny thing : they all seem to have the same check code : 0x8BCC, apart for three of them which have 0x8B00 (the letter A, the PREV and NEXT PAGE keys) plus all the LSK keys. Could we get something out of this ? Or is it normal...

They would be looking to make money for such support, no doubt.

Well that's the point, I don't think anybody is really interested at making this : FDS don't need this to be one of the most successful simming hardware makers, FsLabs will demand a sample of the hardware, which FDS has no interest whatsoever in giving out for free, and besides FsLabs will charge an absurdly huge amount of money (see their other drivers) for something easy to do for them since they ave all the infos, and PMDG being in conflict with them will not do anything either. So no way here.

In the end I think you'd find it easier and cheaper (especialy in terms of your time) to sell your CDU and buy the Engravity one. Don't you think?

Well, apart from the fact that I hate selling gifts that I received, FDS's stuff is, actually, not at the same level as the Engravity stuff. Let's say FDS stuff is the best right now, way over Engravity (no offense meant here, it's just not the same thing).

An easier wild goose chase than ploughing into disassembled code I assure you!

Indeed I checked using Fsuipc's logging tool : the problem with the CDU is that pressing its keys triggers absolutely NO event whatsoever in the log. Nada. No lua vars, no FS controls,... Nothing seems to happen on the log when using the CDU. So the Rotor-brake seems definitely not to be the solution, as well as any other FS control I guess. Or did I not understand anything once again ?

Share this post


Link to post
Share on other sites

Ok so, I just open the dll file with something like windbg or the like, or does it have tu be running ?

Since you need to know how it is activating the action you need, it has to be running. You put a breakpoint on the place called when you click the mouse and trace through, one instruction at a time ("single-stepping"), carefully observing what it is doing, until you find out how to do it yourself. Then you write that code, or code to call the right parts. This can take many many hours. Only recently I spend over two weeks, at about 12 hours a day, trying to decode parts of one FS module in order to dynamically remove the default push-back vehicles. After following numerous clues I gave up. Maybe in my younger days I'd have kept on for another 200 hours. Luckily FSDreamTeam then came out with GSX which did the job by patching the graphics to make it invisible instead! ;-)

I started out working life as an assembly code level programmer, in 1963. Even with 49 years experience with this sort of hacking and debugging I still can't do many things, and some are just impossible. If you don't know assembly level code thoroughly I don't think you stand a chance, and even if you do it is entirely possible you'll reach a dead end. It is so easy for the original programmers (PMDG/FSLabs) to make things quite obscure so that only they know how to interface to it.

If you are dead set then the only way I can think is for you to borrow an Engravity CDU and use a debugger to work out how that does it. But I cannot help you there as it is a violation of their rights. It might be different if you bought one.

I have mapped all the CDU keys using Fsuipc's macro record tool. All the CDU keys are, from what I understand you say, offset regularly :

1=key A=RX10ad0*X8b00
2=key B=RX10b00*X8bcc
3=key C=RX10b30*X8bcc
4=key D=RX10b60*X8bcc
5=key F=RX10bc0*X8bcc[/CODE]

From what I understand of what you explained (but I could be completely wrong) this means that all key's offsets being 10b60(hex)-10b30(hex)=48(decimal) apart, they all point to something 48 bits long.

Are those the keys which don't work? I thought it was only some of the functions, not the regular alpha keys?

The offsets are 48 BYTES, not BITS apart. That just means they address a short piece of code which probably sets someting ('B', 'C', 'D' etc in these cases) and call a common code. That would be understandable in the cases of the text keys as they all do the same thing, enter a character. The function keys will all do different things, so probably won't be the same. You should be able to see from the disassembled code at those entry points.

Another funny thing : they all seem to have the same check code : 0x8BCC, apart for three of them which have 0x8B00 (the letter A, the PREV and NEXT PAGE keys) plus all the LSK keys. Could we get something out of this ? Or is it normal...

It's quite normal. It is likely they all do something similar initially, like push a register which is going to be used onto the stack so it doesn't get overwritten. Quite usually it's a "push ebp" which saves the parameter pointer for the previous stack level, followed by a "mov ebp,esp" to set a new parameter base ("stack frame" being the more technical term).

Regards

Pete

Share this post


Link to post
Share on other sites

Hi Pete, I hope you're well. Apologies for resurrecting this thread, but I'm just wondering if you've heard of anyone having any luck getting FSUIPC macros to work with the PMDG 747-400X FMC / CDU.

I've tried it, and hit the same problem as the OP (recording the macro works, but it doesn't play back).

I'm not up to the task of reverse engineering PMDG's .dll files (and that is probably a dead-end anyway).

Share this post


Link to post
Share on other sites

Apologies for resurrecting this thread, but I'm just wondering if you've heard of anyone having any luck getting FSUIPC macros to work with the PMDG 747-400X FMC / CDU.

I'm still not sure why you'd want to. The SDK seems to list controls for everything in the CDU.

Pete

Share this post


Link to post
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...

×
×
  • 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.