Main > Lightguns
PS1 G-Con as USB Mouse
<< < (5/5)
PL1:

--- Quote from: sonik on June 30, 2021, 10:55:18 pm ---It might work then if it can be used as a USB HID device.

For now I will keep using the Leonardo as it's the only arduino I have. And I'm waiting for the shield to arrive.

--- End quote ---
Yes, you can define any of the 32u4 series boards as a USB HID device via the firmware, assuming you use the proper code.
- I can't help with the HID code, but baritonomarchetto might.

On second thought, a lightgun mouse needs a lot more processing power than a console encoder for buttons and A/D conversion for analog thumbsticks so 3.3v/8MHz might not be fast enough to avoid lag.   :dunno
- It can't hurt to try and many of the boards have a solder pad jumper to select 3.3v or 5v so if running the board at 3.3v/8MHz doesn't work, you can easily revert to 5v/16MHz.
- Of course, if the board does work well with 3.3v, you don't need the 3.3v<=>5v logic level converter chips to protect the gun.   ;D

If you want to make it compatible with more AVR boards like the commonly-available and very-inexpensive Pro Micro, you might want to only use pins/ports that are available on that board.
- Avoid the seven pins/ports listed at the bottom of this diagram.
- For example, the miniArcade 2.0  firmware uses port C7 (32u4 pin 32) for rotary joystick #2 (Rot. 2B) so you can't run two rotary sticks on a single Pro Micro.  :(




Scott
sonik:
Pins are not a problem.
User can map the 4 PSX data pins to any 4 arduino I/O pins. Just need to update the sketch file with the pins numbers.

But I will start to interface the PSX controller using arduino's hardware SPI so it will need those dedicated pins.
sonik:
Project updated.
Now it uses the arduino's ICSP headers and proper 3.3v.

And it now can work in mouse or joystick mode.
I prefer to use joystick mode with Mame. And it's required to work on the Mister FPGA.
Navigation
Message Index
Previous page

Go to full version