January 20, 200521 yr If it is possible to write a program which detects color changes of pixels in a certain pixel-zone of a display we could use this program to get data from FS cockpit panels to our interfaces ... how about it ?
January 21, 200521 yr >If it is possible to write a program which detects color>changes of pixels in a certain pixel-zone of a display we>could use this program to get data from FS cockpit panels to>our interfaces ... how about it ?I don't think so.It would have been possible back in the DOS times. Just read memory starting at address 0x0A000 AFAIR.But nowadays... no (probably not completely entirely impossible, but for all practical purposes, no).Remember, most graphics cards have their own memory, the card usually in the AGP slot. You'd have to fetch that memory region so and so often and compare it to whatever you are looking for. Of course this extra data transfer and computation time can't be bought for nothing. I'd also think that AGP is highly optimzed for transfer TO the card, but not back.This would slow down things so much... your game/sim would not run as fast as it would normally.On the other hand... maybe something along the lines of "running a program on the GPU" instead of CPU could work.Some people try to make the (esp. floating point) computing power of the graphics card processor (GPU) available for non-graphical computations.. like number crunching ..This is just a wild idea. Its just the question if this all is worth the effort.What did you need this for ?Manuel
January 21, 200521 yr Why need this ? In combo with Key2mouse it would make any panel for FS interfacable towards a sim cockpit. That's quite something I think.Then .. I wasn't thinking AGP anyhow. Rather PCI cuz no one will give up an AGP card to show panels for mouse clicks and "reading" led status and never look at it .. a low budget PCI card is much more sutable for this.
January 21, 200521 yr >Why need this ? In combo with Key2mouse it would make any>panel for FS interfacable towards a sim cockpit. That's quite>something I think.>>Then .. I wasn't thinking AGP anyhow. Rather PCI cuz no one>will give up an AGP card to show panels for mouse clicks and>"reading" led status and never look at it .. a low budget PCI>card is much more sutable for this.Well, it is possible - how would stuff like VNC work otherwise?It's a lot more work than programming new gauges yourself though I bet.//Tuomas
January 21, 200521 yr >Well, it is possible - how would stuff like VNC work>otherwise?Hmm.. well... does VNC also transfer OpenGL/D3D stuff ?I believe the 3D stuff is rendered directly on the card.Isn't the 2D stuff (like windows, menues, ....) rendered in a buffer(graphics mem or main mem). The 2D buffers doesn't have to be switched around very often, but the 3D stuff probably is (at the FPS rate).>It's a lot more work than programming new gauges yourself>though I bet.Thats true. Probably the best way to do it.BTW: in the FlightGear Simulator, everything (from lift/drag coeff., flaps pos., ... to panel switch positions) is stored in the Property Tree. This tree can be accessed from inside the sim and also externally. All subsystems store their state inside the tree. This makes it *so* much easier for interfaceing :)Manuel
January 21, 200521 yr *quote*>It's a lot more work than programming new gauges yourself>though I bet.Thats true. Probably the best way to do it.*/quote*If this is true, then why are there no special simbuilders gauges around ?Why hasn't anyone thought of programming an FS gauge that holds the fmc WITH key commands ? Ok there is PM but that's external.I think I should afterall get some reading done about how gauges are made for FS ...
January 23, 200521 yr Yes it's possibile.Apart from the problem of strictly reading the display (may bog performance a little since you need a copy of every nth frame buffer), the main problem is you need to program some kind of writing recognition software in order to obtain data from the pixels.
January 23, 200521 yr Philippe,In many add-ons for PS1 this is done.The video buffer is read and translated in commands to the add-on.Ivan Ngeow did this all. See: http://744.hoppie.nl/forum.cgiHessel Oosten Netherlands
January 24, 200521 yr Tnx for the tip.PS1 however is a DOS program. I'm waiting to hear from Ivan if he got any idea to solve my riddle.Tnx.
January 24, 200521 yr Yeah, in DOS its easy.The VGA memory address doesn't change.Messing with memory or ports was quite normal under DOS.You could do everything as there was no protection at all.If you did something that was not ok (like uncareful use of pointers :), it would just crash (freeze).Thats the main reason some people would tell you that DOS isn't an operating system.But its different nowadays. OS's run in protected mode. Manuel
February 12, 200521 yr How about a graphics program that takes a screenshot, lets say, every second...it then exports that to a known format (JPG or GIF). The program then reads the information per-pixel.You would then be able to store what positions you're looking at to determine if a switch is off or on (pixel 123,512 would be 128,127,0 during the day or 129,130,90 at night if its off and 240,250,190 if its on)...its probably the only recourse without significant overhead on the CPU... Aaron
February 13, 200521 yr That was one of my ideas but idealy I would make that faster to every half a second. But what would this do to FPS ???
February 13, 200521 yr >That was one of my ideas but idealy I would make that faster>to every half a second. But what would this do to FPS ???That would put a incredible work load on your machine I'm afraid.I have once used a program that took a screenshot every 45 seconds and sent it to my website, so people from all over the world could take a virtual seat in my cockpit. I noticed already some slight stutters from that. (and I was more busy being a movie director, taking the right shots, then flying my plane ;-) )Another drawback of the proposed method is that your panel needs to be visible for a screen shot to be taken. So even if you have build a hardware overhead panel, you still need a monitor (and video output) with the overhead panel (and hopefully your screen capture program is capable of selecting that one..)No this is the wrong diretion, in my opinion. The best way still would be a SDK delivered with the sim by the developers. It looks like Flight1 will gonna deliver such in one of their next versions of LDS767...Nicowww.nicokaan.nl
February 13, 200521 yr "Another drawback of the proposed method is that your panel needs to be visible for a screen shot to be taken."Ok but that was the general idea. Otherwise key2mouse wouldn't work either ;)But I wonder what exactly about those "prtscrn2jpg" programs takes such a bite out of fps ? Is it the printscreen by itself ? Is it the processing to jpg format ? Or is it the save to the harddisk ?Because if you can keep the prtscrn info inside your program and not save it to your hdd .. or not convert it to jpg or gif .. that might change the situation ?
Create an account or sign in to comment