Shared memory documentation
-
We’re stepping perilously close to the edge of my knowledge here but I think the point is that the internal display export uses swap chains which avoids having to render to textures held in system memory. The latter is computationally expensive and painful and increasingly poorly supported by the graphics devices (the normal case is to you want zap bits to the card super fast and don’t care about getting bits back to main memory more or less ever so why make that path optimized at all…or some such logic). At any rate, that’s my weak understanding and would go to explaining why the render to texture thing is generally going to be slower in performance terms.
You don’t hold the master texture in SysRAM, you hold it in VRAM. Then you can download a copy to SysRAM.
After each render cycle you download the updated texture from VRAM to SysRAM.Uploading and downloading texture data from VRAM is one of the most basic operations you can do (something I do every day at work and sometimes at home), and does not require much compute power, unless you deal with very large textures (which we don’t). What you download or upload is just a buffer of bytes, which may be stored in what ever system ram area you wish. (Again this is super basic operations and can be done in OpenGL, OpenCL, Direct3D etc, although personally I have not done it in Direct3D, only OpenGL and OpenCL).
For example at work I download a 1080p-texture at 32 bpp each frame from VRAM to SysRAM, from a Dell underclocked GTX 560 ti. This takes me approximately 1-2 millisecond iirc - 500+ fps. (Some implementations are slow though, like sandy bridge integrated gpu we tried, which would’nt get above 19 fps while downloading equivalent data from VRAM). We also shuffle around a lot of textures from different video frame grabbing hardware to video ram and so on.
Downloading and uploading these each frame with today’s PCIE-buses is, when talking about the sizes we are talking about, a non-issue. However drawing multiple windows is a higher cost in many ways, because windows must obey certain drawing rules, which may halt the simulations own rendering while the secondary windows wait for Windows’ (xp or 7 etc) permission to draw. This might be (Im not sure how 7 implements this) even worse if you have those rendered on separate monitors (other timings!). I am fairly confident this is what causes the slowdowns and major stuttering for me and others when using the built in mfd extractor, and why I wish to get a pure mfd frame buffers in system ram instead.
Therefor the cost of downloading these textures from vram->sysram (and letting another application then handle), which is not in any way limited by windows 7/xp, can be much lower than rendering directly in another window.
EDIT: Oops sry I was wrong, the texture at work was 1680x1050, so not quite 1080p ;). Still pretty close.
Here is a comparison of PCIE-speeds to cost of downloading textures:
https://www.benchmarksims.org/forum/showthread.php?10150-Are-there-any-plans-to-expose-mfd-frame-buffers-textures-in-shared-memoryHere is some slightly old test results comparing upload to download (though I would ignore the 480 numbers as they seem to suffer from what is prob some driver issue, the gtx 285 seems OK though - in both cases however the UL speed is 2-5x the DL speed, but even with reduction it’s not a problem )
http://forums.nvidia.com/index.php?showtopic=166757Here is a discussion about even doing it on an iphone ^^:
http://www.imgtec.com/forum/forum_posts.asp?TID=1068One easy mistake to make when doing these things is to implicitly ask the graphics card or CPU to convert image data to fit a slightly different format (you might not even notice you asked for it). It is VERY important that downloads and uploads do not alter the format ;).
-
I’m still lost
Jshepard’s program is copying images from the “shared memory area”, just like Lightning’s MFD-E. nether of these programs get’s its data from shared memory, because there isn’t any MFD data in shared memory.
Sry I think you might be slightly mistaken here. I believe the following ways are used to get MFDs:
Falcon Vanilla/AF:
- Mfds are exported by reading fixed positions in the current d3d framebuffer in 2d views. This can be achieved by methods like hooking the d3d drawing functions, for example by dll injection.
OpenFalcon:
- Mfds are exported directly to system ram, which can be read by any application through using windows memory mapped files/shared memory.
BMS:
- Mfds are NOT written to system ram, but are probably rendered directly from VRAM in other windows with the built-in external instrument tool. JShephard’s application likely simply uses Windows (7/xp) API functions to find the desktop positions of these windows and use functions such as http://msdn.microsoft.com/en-us/library/dd144909(v=vs.85).aspx to read these pixels.
-
You 3dckpt.dat seems strange. Why are you using 512x512x16? The default has 600x600 (if you look, some of the RTT textures are outside of the area you defined). BTW the bpp value is ignored nowadays.
Also, the correct spelling should be
set g_bExportRTTTextures 1
set g_nRTTExportBatchSize 1- your uploaded .dat had g-bExportRTTTextures
the exported surface is (IIRC) an uncompressed 32bpp format and should be complete including the DDS header
-
You 3dckpt.dat seems strange. Why are you using 512x512x16? The default has 600x600 (if you look, some of the RTT textures are outside of the area you defined). BTW the bpp value is ignored nowadays.
Also, the correct spelling should be
set g_bExportRTTTextures 1
set g_nRTTExportBatchSize 1- your uploaded .dat had g-bExportRTTTextures
the exported surface is (IIRC) an uncompressed 32bpp format and should be complete including the DDS header
Answered this previously, sry maybe I should post a correction to my uploaded file: In short I have also tried setting the size to 600x600 and removing the bpp parameter among many other things but still get the same results: The shared textures memory area remains valid but blank.
Update: If you have time to post a working 3dcockpit.dat and config file I could try that? (assuming you know these actually do export shared textures?)
-
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
I can’t get anything to work. There is no installation or application guide, yes I went through the Help.txt there is no guide in there, I installed the apk, I installed the exe fired up BMS in window mode, server running, I am looking at a blank page. How do I set the client, server addresses etc these I don’t know, how do I set up the android application?
-
setup example for the left MFD…… you don’t need Falcon running for this
it is only a test to confirm connection.
1: Copy Local IP Address from the computer to Server IP on the android.
2: Copy Local IP Address from the android to Client IP on the computer.
3: Copy Local Port from the android to Client Port on the computer.
4: Copy Server Port from the android to Local Port on the computer.
5: Check Left MFD on the android.
6: go into the settings on the android and activate Left MFD.
7: press “Start Server” on the computer.
8: press “Connect” on the android…… and you should get a image of your desk top.
-
1: Copy Local IP Address from the computer to Server IP on the android.
2: Copy Local IP Address from the android to Client IP on the computer.
3: Copy Local Port from the android to Client Port on the computer.
4: Copy Server Port from the android to Local Port on the computer.
This is easy, I have done this part according to the pics, but note that I am getting IPv6 from Android, unlike your pics… it is fe80::226:e8ff:fe77:6e90%wlan0 Though you didn’t say if I check the tick mark “Run” for the LMFD on the TCP/IP Settings.
go into the settings on the android and activate Left MFD (remove the borders for now).
Here is where the problem starts, in order to go to settings, I have to hit back button, there is no apply/execute/OK - Cancel dialog so I am assuming that when you enter the data into android, it is recorded so I hit back button and I go to Gauge settings, I click on LMD, I click show gauge, I don’t click Show Frame like you say, if that is what you mean by “remove the borders”
press “Start Server” on the computer.
press “Connect” on the android…… and you should get a image of your desk top.
Uh oh what do I see? All the TCP/IP settings I entered is gone, reset, and Local IP on android is now fe80::226:e8ff:fe77:6e90%wlan0fe80::226:e8ff:fe77:6e90%wlan0…. I back out and come to it again, Local IP is fe80::226:e8ff:fe77:6e90%wlan0fe80::226:e8ff:fe77:6e90%wlan0fe80::226:e8ff:fe77:6e90%wlan0 … Do you see what is happening?
My conclusion is that PS UDP is not Android 4 compatible, both my phone and tablet are running ICS.
-
So I clear data and force stop on android. I come back to TCP/IP settings, I enter everything again, without leaving TCP/IP settings on Android, I run the server and hit connect on Android, well it says LMFDs client connected, I back out, blank screen. I go back in TCP/IP settings, everything is reset, it is like android app is not keeping the settings. I confirm this with the Background color setting, I pick purple and I back out, the background is still gray. Maybe Jshep might be able to install ICS on his tablet from XDA Developers and test it with ICS.
-
My conclusion is that PS UDP is not Android 4 compatible, both my phone and tablet are running ICS.
Hi Bushmaster, I also think the problem is with android 4, this was posted on viperpits,
WEEBO
Does not work on Android 4?
Jshepard
Hi Weebo,
I don’t have Android 4 yet, but it should work. Try it and post your results.
Thanks.
Shep -
Bushmaster, go into your WiFi connection and look at the IP,
I have the same address there. ?of course mine looks like this 192.168.0.100
-
Thank God I have more Android devices, I got it to work on my Xperia X10 that is running Cyanogenmod7 (AOS 2.3.7) and my Xperia PLAY (AOS 2.3.4) … But screens are too small to utilize, I got a piece of my desktop show on both these phones, now the issue is clearly AOS 4.0.3 and 4.0.4 which I run in my tablet and daily phone.
-
PM Jshepard, he is a member of this forum.
https://www.benchmarksims.org/forum/member.php?980-JShepehrd
-
Just tried it with my ICS phone as well, so it is safe to report to JShep that PSUDP is not ICS compatible.
What do you mean by go into my WiFi connection? 192.168.1.1 is for the router setup and start IP for the DHCP is 192.168.1.100 so devices on the networks start with that and go up. Like Android 2.3 devices showed just fine under 192.168.1.110 and 192.168.1.111 (in order they connected to the network) 192.168.1.100 is the laptop, and my desktop where I am running the PS UDP exe is 192.168.1.109 … Only ICS devices are giving me some weird IP addresses, like the tablet gave me IPv6 and ICS phone gave me an IP address; 10.118.105.19 … weird… Basic way to test if the apk is working to go to settings hit Show FPS back out and see if shows FPS on top left. ICS devices are not showing that meaning settings you enter don’t register.
-
PM Sent…
-
What do you mean by go into my WiFi connection?
Sorry, I meant to say look at the android WiFi settings, if that is written as a normal IP number, then try and use that on the computer ?
On my tablet I can see the same IP, in the WiFi settings and in the MFD app.
-
Sorry, I meant to say look at the android WiFi settings, if that is written as a normal IP number, then try and use that on the computer ?
On my tablet I can see the same IP, in the WiFi settings and in the MFD app.
I’m on a 7" tablet with android 2.2. Sorry m8 this doesn’t work. I mean the view the LMFD. So it’s not a android version thing only.
Edit:
Holly Fxxx it just works. I just enabled theset g_bUseExternalWindows 1
from 0 to 1 in falcon bms.cfg and baammm it just works super fine…
thanx… me bad I must missed that part.
So first u change the cfg file
than u do the above with the Ip than u connect both first the server next the android client than u fire up falcon. when u fire up falcon the android mfd changes. and when u get in game it gets alive…
Also if u still don’t see the alive mfd than u have lag. From the server side where JPG is ticked on the right side lower the percentage. With 10% u get pixelated but good speed with 30% I believe it’s good. 100% doesn’t work for me… Also the connection thing works like hell I was stopping it from server side and restarting it making jpg % changes and it was displaying just fine… So abuse it it takes it lol.
Now the FPS Impact LOL is a killer… 1920x1200 single screen full details Instant action from 60 to 44 when calm when explosions came up I went even to 17 fps… So a no go for campaigns? And it’s not a CPU matter. My cpu maxed at 80% - 90% (the one core).
Also MFD buttons didn’t seem to work… None of them is there a secret trick for them also.?
Will try it more… -
From the server side where JPG is ticked on the right side lower the percentage. With 10% u get pixelated but good speed with 30% I believe it’s good. 100% doesn’t work for me…
If JPG is not checked, the drawing data of the MFD’s is sent in PNG format, this is what I use, much better.
Now the FPS Impact LOL is a killer…
Lightning found that by running in “window mode”, helped considerably with FPS, that is why BMS runs “window mode” whenever MFD extraction is activated.
the problem with starting extraction manually (by adding the line “set g_bUseExternalWindows 1”) is that it isn’t running “window mode” and your FPS will fall, the best way to use Jshepards APP is to activate BMS extraction and use BMS “window mode”.Also the connection thing works like hell I was stopping it from server side and restarting it making jpg % changes and it was displaying just fine… So abuse it it takes it lol.
Yes, I have also noted how stable it is, once started it doesn’t like to stop, one problem I found, if I turn my tablet onto its side and the image turns around and runs off the edge of screen, then I lose connection.
-
Well Reboot, I could enter that number from the WiFi settings under “Settings” menu in Android it still wouldn’t work because in Android 4.0.X the app doesn’t seem to retain user selections. For instance, when I tried the app with my Android 2.3 devices, I went to select Show FPS and changed the background color and I backed out of that setting, and it correctly displayed the FPS and changed the color … This DOES NOT happen in Android 4.0.X … I am guessing JShep has to take a look when he has his hands on ICS.
I also see from Arty’s posts, maybe a comprehensive installation guide would be handy. But anyway, I can’t use this nice utility right now until it is compatible with Android 4.
-
Just saying I’m on 2.2 and can’t go higher. Bush u can. U can have a rom on an SD and boot from it. Just for falcon. It’s doable dig it.
Although an icecream with this heat would be the best. :rofl: -
You have to have the bootloader and crap unlocked first, my Sony Tablet is not unlocked in that matter, I am following XDA closely on that, I can not even get mine rooted yet. My options are to wait for these guys to upgrade the apk to ICS compatible or go get myself a cheap 7" Android 2.2/2.3 tablet.