PSX(Play Station 1/2) pad with SPI bus driver for Linux
Apr 14, 2017
I wrote PSX(Play Station 1/2) pad with SPI bus driver for Linux.
(for Enbedded Linux board has SPI, Raspberry Pi, Beagle, Panda, Armadillo, etc)
I pushed change sources to linux-kernel.
You'll can see detail sources in few days.(:D)
- PSX pad can be connect directly to SPI bus.(polling 60-120fps, low latency!!)
- All PSX pad can be gotten digital keys state.(PSXPAD_KEYSTATE_DIGITAL)
- PS1(with analog) pad can be gotten analog stick value.(PSXPAD_KEYSTATE_ANALOG1)
- PS1(with analog) and PS2 pad can rumble motors.(need 9V power)
How to use Raspberry Pi
To use this driver to Raspbian, You must recompile a Raspbian kernel. (RetroPie too)
To recompile kernel, see KERNEL BUILDING
And need this patch files
In kernel recomple, you get Raspbian kernel source, then use patch.
$ patch -p1 -d linux < psxpad-spi_rp.patch
This patch is include:
- PSX pad SPI bus driver
- SPI in Device Tree(DT) use "psxpad-spi" from "spidev"
Then menuconfig, enable driver.
$ cd linux $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig[Device Drivers] -> [Input device support] -> [Joysticks/Gamepads] -> <M> PSX(Play Station 1/2) pad with SPI Bus Driver
and [Save], and [Exit].
If you can recompile Raspbian kernel, install to SD card.
Then connect PSX(PS1/2) pad wire to Raspberry Pi, upper figure.
To connect pad jack pin(thick), you can use dupon(QI) connector.
(I made 4-ways special multi tap device ...)
(Appendix) Raspberry Pi's SPI bus have two CS. Other than Attention pin, wire is common. 2nd pad's Attention wire to GPIO7 SPI0_CS1_N.
PSX pads test program. not need kernel rebuild. spidev_psxpad.tar.xz