Coder Social home page Coder Social logo

joeyparrish / retcon Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 898 KB

Use comfortable wireless PS3 controllers on your old Sega or Nintendo system.

License: GNU General Public License v3.0

C++ 44.31% Makefile 5.41% C 13.32% Shell 18.14% Python 14.77% Roff 4.05%
raspberry-pi ps3-controller sega gamepad nintendo schematics hail-eris

retcon's Introduction

RetCon

Retro Console Controller

Use comfortable wireless PS3 controllers on your old Sega or Nintendo system.

⚠️ NOTE ⚠️: This project has been deprecated.

I bought receivers from 8bitdo that do much more than my homebrew project ever could, in a smaller space, for less money. For example, here you can get a Sega Genesis receiver for bluetooth controllers that is tiny and powered by the Sega itself: https://www.8bitdo.com/retro-receiver-genesis-mega-drive/

I had begun a redesign based on a microcontroller that I hoped would be powered by the console itself, and would use generic Bluetooth instead of PS3, but for $20 (as of Feb 2024) it's hard to beat what 8bitdo is doing.

Feel free to build off of this repo if you wish, but I'm abandoning it in favor of https://www.8bitdo.com/

-Joey


The PS3 controllers pair with a Raspberry Pi, which translates the controller inputs to the game console through an external circuit.

The repository hosts the schematics, board layouts, and source code.

For a list of known issues, see our issue tracker.

Software

RetCon consists of three pieces of software that run on a Raspberry Pi:

  • retcon - reads events from the gamepad and toggle GPIO pins
  • trusting-steed - waits for gamepads and marks them as "trusted"
  • sixpair - waits for PS3 controllers over USB and pairs them for bluetooth

These run on the Raspberry Pi, and I do not recommend cross-compiling them. To build them, check out the source on Raspbian, install the deps, then build the debian package:

git clone https://github.com/cashpipeplusplus/retcon
sudo apt-get install libusb-dev pigpio python-gobject python-dbus
cd retcon/src/
fakeroot ./debian/rules binary

To install on Raspbian:

sudo dpkg -i ../retcon_0.0.1-1_armhf.deb

Raspberry Pi SD card image

The SD card image is generated using a fork of a tool called pi-gen, which is included as a submodule.

From retcon, you can check out the pi-gen code like this:

git submodule update --init --recursive

To build the SD image, first you must build the retcon debian package from Raspbian. Then, copy the deb file to your Linux machine and build the SD image there. Assuming the deb file is in the retcon folder, run this:

cd pi-gen
sudo ./build.sh ../retcon_0.0.1-1_armhf.deb

The output will appear in deploy/.

Pre-built SD card image

Pre-built SD card images are available from the releases page.

Hardware

The Raspberry Pi communicates with the game console through an external circuit. Schematics and board layouts for this extra hardware can be found in the circuit/ folder. The board file can be uploaded directly to DirtyPCBs if you want the boards printed for you. More details can be found in circuit/README.md.

retcon's People

Contributors

joeyparrish avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

retcon's Issues

Fails to boot up without network

If you boot up without a network adapter, the controller service seems never to start. Bluetooth is still working and controllers can connect, but nothing reaches the Sega.

Document the build process

Document how to build the tools and services in this repo, as well as the SD card image that runs on the Raspberry Pi.

Add packages to self-build

If I add debhelper, git, and libusb-dev to the SD image, I should be able to use a RetCon image to compile new versions of RetCon.

Speed up boot

The system boots too slowly.

First, time boot-up on a fresh SD card to get a baseline. Then see how much fat we can trim.

Bluetooth controller 1 LED blinks out

  1. Boot up
  2. Press PS button on a pre-paired PS3 controller
  3. LED 1 blinks on, then immediately back off
  4. Workaround: hold PS button to shut down controller, then press PS button again to reconnect
  5. LED 1 stays on this time

Automatically trust new BT gamepads

The prototype (unpublished) used parts of QtSixA to pair with and interface to PS3 controllers. This was buggy and largely unnecessary, since the bluetooth stack on Linux already supports PS3 controllers.

We already build sixpair.c (originally from QtSixA) to pair PS3 controllers over bluetooth, and that is a very minor dependency. To avoid using the rest of QtSixA, we need a server that waits for and automatically trusts gamepads.

Generalize to Nintendo

Sega Genesis is supported now, and thanks to backward compatibility, Sega Master System should work as well (untested).

Generalize to the serial interface used on SNES and NES. These should also be backward compatible electrically, although not in terms of the physical connectors.

Reduce image size

v1.2.0 is 292MB zipped and 1.4GB unzipped.

Ideally, we could make it smaller.

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.