Jump to content
The simFlight Network Forums

Trying to disable FS menu?


Recommended Posts

In Delphi, Im trying to disable the FS menu using the offset at $32F0.

Ive written this procedure

procedure TFormMain.DisableMenu();

var

dwResult:DWORD;

dwDisable:DWORD;

begin

dwDisable:=$0100FF00;

FSUIPC_Write($32F0,4,@dwDisable,dwResult);

end;

FF is the Hi byte for the timer

01 is the Hi byte for 2^15 disable all menus

I cant seem to get it to work.

Am I missing the obvious??

Link to comment
Share on other sites

  • 2 weeks later...

Sorry for the delay in replying -- I've been on holiday with no Internet access. I'm just trying to catch up with an enormous backlog now!

In Delphi, Im trying to disable the FS menu using the offset at $32F0.

Ive written this procedure

procedure TFormMain.DisableMenu();

var

dwResult:DWORD;

dwDisable:DWORD;

begin

dwDisable:=$0100FF00;

FSUIPC_Write($32F0,4,@dwDisable,dwResult);

end;

FF is the Hi byte for the timer

01 is the Hi byte for 2^15 disable all menus

I cant seem to get it to work.

Am I missing the obvious??

Hex 0100FF00 gives

byte 0 = 00

byte 1 = FF

byte 2 = 00

byte 3 = 01

so your timeout is 1 tick (55msecs), the 01, and you are setting all bits 2^8 to 2^15. I think you have some odd inverse idea of where bits are in Intel processors?

As in ordinary universal decimal representation, MOST significat bits are written first, least significant last:

2^0 = 0x00000001

...

2^15 = 0x00008000

...

2^31 = 0x80000000

I think perhaps you meant to write $FF008000?

Regards,

Pete

Link to comment
Share on other sites

  • 3 years later...

if i want to disable flight, world and aircraft menu which hex will using ?

At 32F0?

Per documentation (did you look?):

bits 0-7 = 0 (no change to FSUIPC options)

bits 8-15 = 2^10 (0x00000400 bit) for World, 2^11 (0x00000800 bit) for Aircraft, 2^12 (0x00001000) for Flights, so 0x00001C00 for all three.

bits 16-23 = 0 (reserved)

bits 24-31 = your timeout, eg, 0xFF000000 for 255, or up to 14 seconds.

Putting all together gives you 0xFF001C00.

Regards

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.