Sign in to follow this  
marukiaro

Is it possible to flash the screen ?

Recommended Posts

Hi all, I am new to this forum and I hate to say, 'cause I know it is not fair, I subscribed because i need your help. I wrote a driver to use ps2 lightguns on the PC, and it works very nice. The problem is that a lot of ppl using my driver are trying to use it with not lightgun-designed games. As you probably know to work well the gun needs to detect light from monitor, and if you aim to a black area the gun does not respond. So basically, I would need to software flash the screen each time the gun's trigger is pressed (for lightgun-designed games this flash is made by the game itself). I tried to use directX to do that but I was not able to capture the surface when MAME is running. I am very new in windows graphic programming, so I would like to know if it is possible to make a program that flashes the screen while another program (let'say mame i.e.) is running at full screen. Thanks in advance Diego [Edited by - marukiaro on August 4, 2005 2:45:30 AM]

Share this post


Link to post
Share on other sites
I'm afraid I can't help, but it sounds an interesting problem - welcome to the forums by the way!

You say you're new to graphics programming, but if you wrote a hardware driver you're presumably quite experienced in C or C++ - this will help people target their advice to your skills better.

Share this post


Link to post
Share on other sites
The only solution I can think of is to use DLL injection to substitute your own d3d9/8.dll to the game, where you provide your own implementation of IDirect3DDevice9::Present (or similar) which will do the flashing for you - I don't have any details on this, though.

Let's just wait for Dustin Franklin (circlesoft), he's done something like this before [smile]

Share this post


Link to post
Share on other sites
"but if you wrote a hardware driver you're presumably quite experienced in C or C++"

Yes I am. But really know nothing about Graphic handling :(

"The only solution I can think of is to use DLL injection to substitute your own d3d9/8.dll to the game, where you provide your own implementation of IDirect3DDevice9::Present (or similar) which will do the flashing for you - I don't have any details on this, though."

URGH !!! Sounds quite difficult for me :D Anyway whis would work just for games using directX right ?

Please show me the light.

Oh, the driver is downloadable from http://xoomer.virgilio.it/smogdragon

Thanks for the interest. Hope "Dustin Franklin" will help :D

[Edited by - marukiaro on October 27, 2005 11:30:54 AM]

Share this post


Link to post
Share on other sites
I would feel free to send a PM to him (GDnet name is "Circlesoft"). Users here are generally quite happy to be PMed, especially for interesting questions they may have specialist knowledge in.

You might try http://msdn.microsoft.com/newsgroups as well for techy DX questions - the "Graphics & Multimedia" option on the left has a "DirectX" sub-menu.

Share this post


Link to post
Share on other sites
Well (sadly) coming from an ex-game hacking background, the easiest way to do this is actually to inject your code into the game (mame), hook the directx driver and the gun's trigger driver.. when the gun trigger is pulled, draw a white quad over the entirety of the screen, then call your trigger function, and fade out or whatever you want to do.

It's opposite of the anti-flashbang hacks in some games...

Heh, never knew game hacking would be actually useful at some point.

Share this post


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

Sign in to follow this