Zerk Zone

Pages for the Creations of Ryan Armstrong

Sega Genesis/Master System to USB Converter

Posted on December 24th, 2018 @ 9:42 am by Zerker

With my Sega Genesis arcade stick, and a more recent Master System/C64 stick I put together, I have been increasingly unhappy with commercial Genesis to USB converters. The one I have essentially assumes a 6-button Genesis Pad, and doesn’t do proper detection. This means nuisance extra button presses when using a less capable device, which is no good. So I decided to make my own.

For this project, I decided on the Teensy 2.0, which gives me a small size, good IO complement, nice USB features, and most importantly: 5 volt logic.

Mechanical design was pretty basic: just a small project box, a DE9 connector, wiring to the Teensy and some drilling/dremelling. The Teensy, however, seems to be designed to mount directly by pins into a protoboard/breadboard. Since I was wiring directly to the board, I needed a different solution. Thankfully, I already had some Scotch Brand mounting tape, which works extremely well for securing small PCBs into a project.

When assembled and programmed, the converter works the way a converter of this type should work. If a 1-button C64/Atari stick is inserted, that button registers as the primary button 1 only. If a 2-button Master System stick is inserted, those two buttons become buttons 1 and 2. For the 3-button Genesis pad, the buttons are 1, 2, 3 and 10, which is a customary position for the start button on Windows games. The 6-button pad therefore adds buttons 4, 5, 6 and 9 to fill out the set. Buttons 7 and 8 positions are unused; most software would expect those to be L2/R2 buttons which have no equivalent.

For source code and more information on the software, check out the github project page. Per the project page readme, I am intentionally maintaining several branches depending on the desired USB device type. Please see the readme for more information and select the branch of interest.

Comments (0)

Filed under: Hardware |

Automatic .desktop launcher generation Python library

Posted on January 29th, 2018 @ 6:57 pm by Zerker

Having tried a number of different frontends to emulators over the years (e.g. EmulationStation, Attract Mode, DBGL), I’ve never found one that I particularly like. In the end, I decided to let the operating system be my ‘frontend’ and created a library that can be used to auto-generate launchers for games. And here we are.

For example, you can give it a folder to search for SNES games and generate a launcher with matching icon for every .sfc file found. Or DOSBOX .conf files. Or give it the path to the Mame executable to generate a full lookup of short name to full name, then give it the path to your Mame .zip files and generate launchers for every name recognized. Or just give it a list of Doom wad files and create launchers directly for them.

For illustration purposes, here’s the menu on my system:

First up: this is not going to be useful for anyone who doesn’t run some *nix variant. And right now, I only directly supported Xfce and Gnome menu systems, though the Xfce technique probably works with most other desktop environments. It also requires a little bit of Python knowledge, though it’s rather tame overall.

If this sounds like something you are interested in, give it a download and see how you like it. You will need to create your own ‘generate’ script to create the launchers for the systems/emulators/whatever you have on your machine. Either extract the download to one of your site-packages/dist-packages folders, or just use it in the same folder as your generate script. Full documentation is inside the file, as well as a pydoc html render inside the tarball. The documentation has a few example snippets of script that you can use in your generate script as a starting point for a few scenarios.

Download (9 kb)

Comments (0)

Filed under: Programs/Libraries,Python |