GithubHelp home page GithubHelp logo

asure / gb2000s-arcade-joystick-driver Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 45 KB

GPIO-based Arcade controller driver for the H3 based Pandora Games X Jamma board.

License: GNU General Public License v2.0

Batchfile 72.35% Makefile 0.47% C 27.19%

gb2000s-arcade-joystick-driver's Introduction

mk_arcade_joystick_rpi

Based on The Raspberry Pi GPIO Joystick Driver

Modified by Vanni Bruto

Introduction

Looks like a quick & dirty GPIO banger for Pandora's Box 6 "Aus" 3H / 3A / Whatever it's an Orangi pi clone. :) I didn't make this but it's here at github for safekeeping.

The Software

The joystick driver is based on the gamecon_gpio_rpi driver by marqs

It is written for 4 directions joysticks and 8 buttons per player.

It can read one joystick + buttons wired on RPi GPIOs (two sticks and 13(?) buttons for the Pandora's box revision).

It uses internal pull-ups of the H3 GPIO ports, so all switches must be directly connected to its corresponding GPIO and to the ground.

Installation

Tested to compile on 3.4.113 default Sunxi kernel.

Installation on Retr0rangePi 4.2 lite (3.4.113 kernel)

Get a USB-lan adapter. ADMTek pegasus II confirmed to work. Plug into internal port and connect to your LAN. Get a USB keyboard. Plug it into the 'outside left' port. Closest to the short side. Boot up Retr0rangePi 4.2, press F4 to drop to shell. Use 'ifconfig' to get the ip of the device.

Download the installation script :

sudo apt install linux-headers-$(uname-r)
sudo make
sudo insmod mk_arcade_joystick_rpi.ko

Check with dmesg to see the driver is loaded.

If this doesn't work, compile, or complains about unable to download headers, use dhclient eth2 or whatever the USB lan adapter is. It will set the default route for you :) (Add the dhclient command to /etc/rc.local to avoid this in the future.)

Auto load at startup

Copy the compiled kernel module to a safe place, and load it from rc.local for example:

insmod /home/pi/mk_arcade_joystick_rpi.ko

Testing

Use the following command to test joysticks inputs :

jstest /dev/input/js0

(Might need "sudo apt install joystick" if the jstest command is missing.)

More Joysticks case : MCP23017

The MCP23017 is not supported by this version of the driver, and it's very unlikely i'll port it over. Sorry.

Known Bugs

  • Coin button not working at the moment.
  • Doesn't compile on current mainline. (todo!)

Credits

gb2000s-arcade-joystick-driver's People

Contributors

asure avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.