Main > Lightguns

Arduino as USB Guncon 2

(1/3) > >>

Hi everyone,

I am working on a new firmware for the SAMCO DIY gun to have the gun look as a USB Guncon 2 when connected to a PS2.
It seems like a novel thing, over the years people have written drivers to use a Guncon 2 on a PC which is like the complementary problem.
On the other hand, I think people have successfully emulated a Guncon with an Arduino for PS1 and PS2.
But I wanted to avoid having another cable come out of the SAMCO (I only have a PS2 and PS2 light gun games to play).

After a couple of painful days, I got it to a state where the gun is recognised by the PS2 and so are the buttons (trigger, dpad, etc.).
I have not tried to activate the X and Y coordinates just yet. Mainly because I am not sure what values I should use.

Does anyone know what are the minimum/maximum X/Y coordinates that the PS2 expects?

I still have the guts of the Guncon 2 I used to create the SAMCO, but unfortunately I do not have a CRT handy that I can use to capture the X and Y coordinates reported.
I unsuccessfully tried to figure this information out from old posts (1)(2) and the drivers linked therein.
It seems like different Guncon 2s can have different minimum and maximum values which is just very confusing.
Especially when the calibration in a game like Time Crisis 2 (for example) only asks you to shoot in the center (so how does the PS2 compensate?).
I can also just try out different values until I feel it works nicely. But that is going to be painful, so I though I would ask first...
Finally, happy to share the code once it is in a usable state.

got a real guncon 2 , a PS2 with FreeMcboot  and a CRT TV if i could help

Tested right now with my gcon2 driver using a pvm with NTSC signal.
Look for min and max values at attached image.

Also original gcon2 and third party ones works different at least on a pc. Original ones starts in "progressive mode" with the "rolling X" problem.
I have no idea how the game handles it.

Also check this out

You should at least implement the "no light" error code when pointer is out of screen.

@bandicoot Thanks for the offer!
@sonik Thanks for the test and the link!

In parallel I also did what I defined as the painful test:
I set the dpad to control x/y, first in 10 units increments and then 1 unit increments, and started shooting in Time Crisis 2's menu to track the position of the shot.
The measures I came up with are:
#define GUNCON_X_MIN      150
#define GUNCON_X_MAX      724
#define GUNCON_Y_MIN       32
#define GUNCON_Y_MAX      295

I am playing on a PAL PS2, so it might expect slightly different values.
On top of that, it is producing some non symmetric black bars on all sides of the picture which might influence the coordinates system slightly.
I will do more testing to find a sweet spot and try it out with other games...

I also found out that x=0 and y=0 also seems to be a valid "no light" pair but I will change it to the Guncon specs in the link which are probably consistent with the Guncon 2 specs (I did notice that the dismantled Guncon 2 reports x=1 and y=5 when idle).

I did a quick playing session, it was good but not super accurate.
But that might be because of Samco + IR calibration rather then the value sent form the gun to the PS2.
The only issue was that the Time Crisis 2 calibration screen did not work at all.
I don't know enough yet to understand what might be not working there.


You should also take a look at this emulator plugin as it returns the values that the games expects.

Do you plan on releasing the source code of the firmware?
I might use it on my guncon1 to arduino adapter. Would be cool to use it on a ps2 simulating a guncon2.


[0] Message Index

[#] Next page

Go to full version