Git Product home page Git Product logo

9pin2supergun's Introduction

9pin2supergun

Code for a Pi Pico to read a CD32 gamepad and output each control to a separate pin for use with Neo Geos and/or Superguns.

I am personally using this code with a Monster Joysticks CD32 joystick and a Minigun Supergun. I don't know if it works with anything else.

Aspirationally, this will also read a Mega Drive/Genesis controller (fairly simple), and possibly USB controllers (a lot more complex, and projects to do it already exist). I also intend to create a PCB that uses a bare RP2040 chip to make things a bit neater and easier to hook up.

Requirements

  • A Pi Pico or compatible device that exposes the GPIO pins
  • (Optional, but recommended) a level shifter for shifting the three signal pins going to the CD32 pad
  • A DE9 and DA151 connector (ideally plug for DE9, socket for DA15)

Setup

Take a look at the code to see how to wire this up (it's currently different from the schematic, which I'll update later, it's not a priority given I'm the only person using it).

Add a bidirectional level shifter for 3.3V to 5V between the Pico and pins 5, 6, and 9 of the DE9 to be on the safe side.

Build and install the firmware and you should now have a Neo Geo/Supergun-compatible output from your CD32 controller. If the buttons are wrong or not to your taste, either move them on the DA15 side - each button has a direct mapping to a single pin there - or modify the code to use different GPIOs for the output pins.

This code theoretically also copies signals from up/down/left/right through the GPIO system, but for just the CD32 support it's not needed so I wouldn't bother.

Building

This is based on the rp2040 project template, have a look there for details. You need a rust build environment and the project will build with Cargo.

Anything else

This polls at 125Hz - I don't know whether a real CD32 pad will be happy with this, but I don't see why it wouldn't. The timing for each polling burst is based on what I observed with my PAL Amiga 500+, so that should be fine, but it was only polling at 50Hz. Given how little time is spent polling compared to waiting even at 125Hz, though, I can't imagine what issues might arise.

Credits

Thanks to Mathew Carr's PSCD32 Development Diary for documenting how the CD32 protocol actually works.

Footnotes

  1. Literally everyone seems to call this a DB15 connector, but it is actually DA15. โ†ฉ

9pin2supergun's People

Contributors

turmoni avatar

Watchers

 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.