Main > Lightguns |
PS1 G-Con as USB Mouse |
(1/5) > >> |
sonik:
I'm trying to adapt a ps1 guncon to usb mouse using an arduino. Already got some readings from the guncon and mapped it as a mouse. This could theoretically work on any machine with usb hid mouse support. It's reporting error from time to time. Seems like it can not be read in the middle of a vsync (witch I don't have any control) Any advice? I can't find much info on this and the drivers for windows are all closed source. Update: Project is now on github https://github.com/sonik-br/GunconDuino |
sonik:
After some tweaks it's working very stable! :D I will make a video later. If anyone wants to make it just needs an arduino (I'm using a Leonardo) and a way to connect the gun to it (I'm an ps1 extension cord). Tested on windows only. Should work in any OS as it's reporting as a usb hid mouse. |
sonik:
Testing on windows 10 at 240p |
burn_654:
Very, very interested in following this! Especially your code on extracting the location from sync data. I've been on and off over the last several years working on a concept to get (3rd party) Guncon2's working with crt's using the TopGun driver (I've nicknamed it TopGunCon in some old threads). I've more or less accomplished the goal but it's a spaghetti mess of code and hardware. In its last running form it used 555 circuits to delay the shot just slightly, pulse an input on a usb interface (I used an input on jpac but most any would work) to launch a full-screen screen 'flasher' app. This limited shots to be timed within a white screen flash from my app so all locations on the screen could be properly shot and allow off-screen reload. If I had to get my specific scheme out there now I'd definitely clean it up and implement as much as possible in an arduino. Having a solution with an open code-base could solve a lot of problems I was solving because of the specific behavior of the Topgun driver. The flash becomes necessary even in games that have one, some (such as mame) only determine a *shot* or *miss* input after the controller logic has already happened - it plays dumb in that respect. If mame gets a left click (shot) it submits a left click to the mouse hardware coordinates. If it receives a right click it thinks it's offscreen. Thus, it's up to you to determine the on-screen/offscreen logic of the gun and send the appropriate left click/right click to the computer. At least that's the logic I followed. The flasher app my brother and I developed used the windows gamma ramp as a fullscreen *white* flash so it worked no matter resolution/fullscreen or windowed etc. It can map timed flashes to most hid devices (keyboard, mouse, gamepad). There are some minor issues with some colors not reaching all the way to white (windows protections because of the gamma ramp method), but overall it's been successful. It sounds like you may be able to use it with this, if it helps with your prototyping? I would be glad to provide it privately. I'll be following this with great interest...I'm not sure on the vsync issue. But I would be glad to test/chat about this! |
sonik:
I'm not touching video signal at all. Just reading the guncon with an arduino and the amazing library PsxNewLib. If you have a guncon1, a arduino and a way to connect the guncon to it, you could try it! My code works but it needs some adjustments and a propper way to calibrate. I still need to test it with games and see if it's required to flash the screen. I have also a code to access a guncon2 via usb and move the mouse. Works on windows 10. It's not a "driver". Works with guns that dont have the "rolling x" problem. It's possible to fix but I have not done it yet. I can share everything if there's any interest. |
Navigation |
Message Index |
Next page |