Shared memory documentation
-
Possibly if they have an app which provives a udp or tcp stream that could also work.
There is an app made by JShepherd, small program you install in windows, first activate something in Falcon to create images in the SharedMemoryArea then the app will capture and then send by WI-fi over to your android phone, (or whatever ?)
this actually works very well, Iâve tested Gauges, 2D and 3D MFDâs, most of my testing was with Falcon OF but it does work with BMS (I had problems with my install in win7 but in the end I did get 3d MFD extraction).
You need to contact JShepherd, over at viperpits (Big problem! viperpits is down at the moment)
I have the app here at home, tell me how to post and you can try yourself.
Gauges
2D Extraction
3D Extraction
@Quote:
PS UDP Falcon Server for Android 2.2 (v0.8)(Beta)
This application extracts the flight data from Open Falcon, Falcon AF and Falcon
BMS simulators acting like a server and send this data to an android mobile device running the client application PS Gauges trough the TCP/UDP net protocol.PS UDP Falcon supports 5 clients connected at the same time so you can use five different android devices. Three of them are used for flight data, one for the left MFD, one for the right MFD and one for the HUD.
PS Gauges client application needs Android 2.2
Reboot.
-
Hey reboot r u nuts???
Please please get - give much more info on that⌠this is a must⌠most of us have some device or even a android tablet now is less expensive than a 8" vga touch screenâŚ
I already bought 2 tablets looking for an app like that for mfd (buttons and view)⌠and waiting for Lightnings extractor⌠-
Hereâs the app,
install the .exe on the computer
install the .apk on the android.
http://dl.dropbox.com/u/5918219/Stephen/PSUdpV08.rar
Remember all credit goâs to JShepherd.
Reboot.
PS: Iâll try and put together some kind of install guide, if anyoneâs interested.
-
Yes please do soâŚ
Thank you.
Wow hell it works⌠No adjustments at all buttons work⌠some are fubared but no major prob⌠what I would need help is that I canât see the pic inside the LMFD and RMFD⌠should I do something special?
Just a heads up every time u enable or adjust a displayed instrument u have to re connect from the client than it worksâŚ
-
WoW thx for this its awesome!
Cheers,
:drink:
-
Settings like this should give you a 2d image of your desktop (you donât have to start falcon to see this).
when using BMS, we donât need 2D MFDâs so donât do anything with the coordinates,
This 2D image is just a test to see if its working correct.
PS: If anyone needs help, you must say exactly what you can get working and what you cannot!
Reboot
-
In BMS just activate MFD extraction and set the MFD size to something like 250x250 pixels,
then its just a mater of pressing the correct hot-key,In MFD-E and falcon OF, lightning made hot-keys complicated so once set to the correct view (2D or 3D) it wasnât easy to hit the hot-key by mistake,
Falcon BMS only uses 3D so once set to 3D it shouldnât be necessary to change anymore.
@Quote:
HOW TO CHANGE MFD`s VIEWS
To change from one view to another, PS Udp reads the keyboard and see if the following keys have been pressed on the default configuration:
**- â2â for 2D view.
- â5â for view FOV.
- â4â for 3D view.**
You can modify the scan codes in the PSUdp.ini file but they have to be DirectInput key scan codes in decimal format.
In Falcon BMS this is not applicable as it uses only 3Dview.
-
Adjust to what? Bigger? Smaller? Mine is a 7" so probably increase it.
-
Iâve edited my last post, if you cannot see this 2D image then you cannot get to see anything in 3D,
please post back.
Reboot.
-
There is an app made by JShepherd, small program you install in windows, first activate something in Falcon to create images in the SharedMemoryArea then the app will capture and then send by WI-fi over to your android phone, (or whatever ?)
this actually works very well, Iâve tested Gauges, 2D and 3D MFDâs, most of my testing was with Falcon OF but it does work with BMS (I had problems with my install in win7 but in the end I did get 3d MFD extraction).
You need to contact JShepherd, over at viperpits (Big problem! viperpits is down at the moment)
I have the app here at home, tell me how to post and you can try yourself.
âŚReboot.
Ok, SO I am pretty well versed in C/C++ and Java, and read shared memory from other apps AND BMS frequently, but:
I thought f4bms did NOT export mfds in shared memory (and that you had to use the built in extractor).
If someone can tell me what the name of the shared memory areas that contain the bms mfd textures PLEASE let me know !!!,
also Iâll need to know how to activate them. The actual coding of a program that can read the areas = piece of cake ;).Stuff like format (RGB+bpp, RGBA+bpp) etc would also be goot to know, but I can figure those out myself by seing the data worst case).
I will investigate this zip you posted, if it contains something I can use.
Update: After reading the help.txt in the zip it seems like you still have to enable the built in extractor for bmsâŚhmmâŚwhich defeats my purposeâŚBut I will see what happens anyway for fun
-
The supposed shared memory texture area is just full of zeroes, even after doing the stuff in the zip
(add the config file settings, set 512 512 in the ckpitart, enable normal mfd extractors )There is a shared memory area created named âFalconTexturesSharedMemoryAreaâ (of about 4 MB size), but it just contains zeros.
Apparently my viperpits account has disappeared in their site reset, sigh, last time I applied for membership it took 2 mths :).
Anyway if you can see some error in hwo i read shared memory please tell me:void doRgbExport(const char * name, const char * outputFile) {
const HANDLE handle = OpenFileMapping(FILE_MAP_READ, FALSE, name);
if (handle != NULL) {
const void * view = MapViewOfFile(handle, FILE_MAP_READ, 0, 0, 0);
if (view != NULL) {MEMORY_BASIC_INFORMATION info;
memset(&info, 0, sizeof(MEMORY_BASIC_INFORMATION));
VirtualQuery(view, &info, sizeof(MEMORY_BASIC_INFORMATION));printf(âShared memory size of %s is %ld bytes\nâ, name, info.RegionSize);
//memcpy(s_bmsTexArea, view, info.RegionSize);
int i;
for (i = 0; i < info.RegionSize; i++) {
unsigned int v = ((unsigned char *) view)_;
if (v != 0) {
printf(âThere is data in %s\nâ, name);
break;
}
}UnmapViewOfFile(view);
} else {
printf(âUnable to get view for %s\nâ, name);
}
CloseHandle(handle);
} else {
printf(âUnable to get handle for %s\nâ, name);
}
fflush(stdout);}
void display() {
printf(â\n\nâ);
doRgbExport(âFalconSharedOsbMemoryAreaâ, âFalconSharedOsbMemoryArea.smemâ);
doRgbExport(âFalconSharedMemoryAreaâ, âFalconSharedMemoryArea.smemâ);
doRgbExport(âFalconSharedMemoryArea2â, âFalconSharedMemoryArea2.smemâ);
doRgbExport(âFalconTexturesSharedMemoryAreaâ, âFalconTexturesSharedMemoryArea.rgbâ);}
result:
Shared memory size of FalconSharedOsbMemoryArea is 4096 bytes
There is data in FalconSharedOsbMemoryArea
Shared memory size of FalconSharedMemoryArea is 4096 bytes
There is data in FalconSharedMemoryArea
Shared memory size of FalconSharedMemoryArea2 is 4096 bytes
There is data in FalconSharedMemoryArea2
Shared memory size of FalconTexturesSharedMemoryArea is 4198400 bytesFalconTexturesSharedMemoryArea only contain zeroes!
Update:
I know now, it will not work. That program simply just copies drawn pixels from one desktop to another :/. What I need is to be able to get the texture data without it being drawn in a separate window :/_ -
âFalconTexturesSharedMemoryAreaâ is as you say blank, its not until it is activated by adding a line to the FalconBMS.cfg
Set g-bExportRTTTextures 1
once started falcon begins to draw images to this area, and it is this! that drags the FPS down, Not the extractor program its self.
the size of this area and the size and position of the MFDâs, HUD, and some gauges
is set in the 3Dcockpit.dat file.some thing like this (This is from Falcon OF)
MED-extractor and also Jshepardâs program can take a copy from this area and show on another screen.
Lightningâs, Jshepardâs program and falcon BMS, all extract MFDâs in exactly the same way by copying images from this area.
Update:
I know now, it will not work. That program simply just copies drawn pixels from one desktop to another :/. What I need is to be able to get the texture data without it being drawn in a separate windowYes, it copyâs from one desktop to another 2D, and it also copyâs from the SharedMemoryArea to the desktop 3D.
RebootâŚâŚ
-
Lightningâs, Jshepardâs program and falcon BMS, all extract MFDâs in exactly the same way by copying images from this area.
Actually thatâs not completely correctâŚthe built in display extraction uses a different approach. That is how, for some cards and drivers, the frame rate hit for using extraction is rather less than when you turn on the texture export capability. Itâs not really material to your main point of courseâŚjust adding information.
-
Thanks for the correction Mark, (very interesting) but is it still not just copying images from the one place to the other, or is it more advanced than that, capturing data before itâs drawn ???⌠just what GiGurra is asking about.
-
After reading the help.txt in the zip it seems like you still have to enable the built in extractor for bmsâŚhmmâŚwhich defeats my purposeâŚBut I will see what happens anyway for fun
When MFD-Extractor first started, it could only capture 2D images from a set of screen coordinateâs,
(then the next version) after manually turning on the âtexture exportâ could capture 3D images from âagainâ another set of manually in-tested coordinateâs this time from the âSharedMemoryAreaâ,
latter, MFD-Extractor could automatically switch-on âtexture exportâ and get the coordinateâs its-self from the 3Dcockpit.dat file.so by using MFD-Extractor to turn on the âtexture exportâ was just a tidy way of doing it and again in Falcon BMS. turning on âtexture exportâ can be done ether manually or by activating it with the built in extractor.
-
âFalconTexturesSharedMemoryAreaâ is as you say blank, its not until it is activated by adding a line to the FalconBMS.cfg
Set g-bExportRTTTextures 1
once started falcon begins to draw images to this area, and it is this! that drags the FPS down, Not the extractor program its self.
the size of this area and the size and position of the MFDâs, HUD, and some gauges
is set in the 3Dcockpit.dat file.some thing like this (This is from Falcon OF)
MED-extractor and also Jshepardâs program can take a copy from this area and show on another screen.
Lightningâs, Jshepardâs program and falcon BMS, all extract MFDâs in exactly the same way by copying images from this area.
Yes, it copyâs from one desktop to another 2D, and it also copyâs from the SharedMemoryArea to the desktop 3D.
RebootâŚâŚ
Iâm sorry but the FalconTexturesSharedMemoryArea still just contains zeroes for me (the other areas I can read fine.)
Here is my falcon bms.cfg from the config folder : http://gigurra.se/falcon/falcon%20bms.cfg
and here is my 3dcockpit.dat : http://gigurra.se/falcon/3dckpit.datIâve also tried editing the spelling to
set g_bExportRTTTextures 1
set g_nRTTExportBatchSize n (tried n = 1,2 and 5)Iâve also tried setting (for ALL F-16 3dcockpit files and the root one)
rttTarget 600 600 32;But still, FalconTexturesSharedMemoryArea = 00000âŚ. (4 MB of zeros)
Lightningâs programâs MFDs donât work for the new bms afaik (They are blank. Other data is read fine)
-
What is this âYoda crazy shitâ at the bottom of your .cfg file ?
-
Just a little info,
the rttTarget (in red) is the size of the SharedMemoryArea
the numbers (in red) are the positioning and size of the left and right MFDâsâŚâŚ 225x225 pixels
// 3-d cockpit description
// N-pit
// Last change May 17 2007
// by Nanard// Boresight cross height
boresighty 0.75;// Shared render to texture target size. width height depth. depth needs to be 32 for texture alpha to work default is primary
rttTarget 512 512 16;// 3-d coords for Upper left. Upper Right and Lower Left // Rtt Top. Left. Right. Bottom. BlendMode. Alpha
// BlendModes are a = alpha blending. c = color blending. g = texture gouraud. t = texture. default = g
// example hud with 0.5 vertex alpha: hud 20.0 -2.0 0.0 20.0 2.0 0.0 20.0 -2.0 4.0 5 5 260 260 a 0.5;
// first number is toward you / away from you
// second number is left and right + number is right. - number is left
// third number is up / down - number is up. + number is down
// 0. 0 is in the middle of the screen (apprxomiately)hud 20063.0 -2750.0 -618.0 20063.0 2750.0 -618.0 20063.0 -2750.0 4902.0 0 0 280 280 c;
pfl 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 281 0 481 70 c;
ded 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 281 71 481 141 c;
rwr 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 482 0 600 118 c;
mfdleft 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 375 375 600 600 c;
mfdright 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 375 145 600 370 c;
hms 20.063 -4.000 -4.000 20.063 4.000 -4.000 20.063 -4.000 4.000 0 314 286 600 c; -
Just a little info,
the rttTarget (in red) is the size of the SharedMemoryArea
the numbers (in red) are the positioning and size of the left and right MFDâs
// 3-d cockpit description
// N-pit
// Last change May 17 2007
// by Nanard// Boresight cross height
boresighty 0.75;// Shared render to texture target size. width height depth. depth needs to be 32 for texture alpha to work default is primary
rttTarget 512 512 16;// 3-d coords for Upper left. Upper Right and Lower Left // Rtt Top. Left. Right. Bottom. BlendMode. Alpha
// BlendModes are a = alpha blending. c = color blending. g = texture gouraud. t = texture. default = g
// example hud with 0.5 vertex alpha: hud 20.0 -2.0 0.0 20.0 2.0 0.0 20.0 -2.0 4.0 5 5 260 260 a 0.5;
// first number is toward you / away from you
// second number is left and right + number is right. - number is left
// third number is up / down - number is up. + number is down
// 0. 0 is in the middle of the screen (apprxomiately)hud 20063.0 -2750.0 -618.0 20063.0 2750.0 -618.0 20063.0 -2750.0 4902.0 0 0 280 280 c;
pfl 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 281 0 481 70 c;
ded 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 281 71 481 141 c;
rwr 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 482 0 600 118 c;
mfdleft 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 375 375 600 600 c;
mfdright 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 375 145 600 370 c;
hms 20.063 -4.000 -4.000 20.063 4.000 -4.000 20.063 -4.000 4.000 0 314 286 600 c;Yes I know these positions are outside, BUT: I also tried size 600 600 32 but it made no difference whatsoever. (rttTarget 600 600 32);
-
Lightningâs programâs MFDs donât work for the new bms afaik
That is why I posted Jshepardâs program, now that works fine in BMS.