Skip to content

nulvox/UnlicProController

Repository files navigation

No Maintenance Intended

Introduction

Unlic. Pro Controller is a Nintendo Switch Fightstick designed for the Sparkfun Pro Picro, though any board with the Mega34U should work fine such as the Arduino Leonardo with some changes to upload or pinout procedure.

Specifically, this is a fork of ATMega32U4-Switch-Fightstick from fluffymadness modified to fit my needs and his original README is moved to README-OLD.md and contains instructions for building and flashing as well as further atributions for the work. The specific changes made to that codebase are described further here.

Pinout definitions

I found it counterintuitive that the button names would be defined constants which are not used when assigning buttons to pins, I changed lines 118-133 of main.ino to use these constants instead of hard-coded numbers. changing pinout to your needs now only mandates that you change the constants on lines 43-60 of main.ino.

The Shift Key

I added a new face button labeled SHIFT. This key is used as a modifier to the directional inputs and now controls changing input modes.

  • To change modes, you now press SHIFT+Home instead of ++-.
  • While in Analog Mode, SHIFT will change your inputs to the right analog stick
  • While in Smash mode, the face keys are left alone and shift is now used to change joystick intensity.
  • While in analog mode, shift is used to input Simultaneous Oposite Cardinal Direction (SOCD) inputs with behavior optomized for playing Tekken 7

Input Mode Indicators

I liked the input modes, but I didn't like having to test the mode or reset the gamepad to determine which mode I was in. I renamed ONBOARDLED to REDLIGHT and added BLUELIGHT, then attached blue and red LEDs to those pins. The two LEDs are attached to the same diffuser so I can have a blue, red, or purple power indicator based on which input mode is active.

Directional Processing

I noticed the directional processing tested each key multiple times. While this is simple to implement, it degrades performance, especially when no directional input is submitted. I have started with DPAD processing to reduce the number of tst instructions generated by the compiler. I may get to analog and smash processing one day.

Moreover, I wanted to use the shift key myself in a few ways, so I had to move the check for that key inside of the SMASH processing. While this makes the code a bit uglier, it allows the input modes to work the way I wanted them to (optionally providing use of the right stick) without removing functionality.

Final Notes

This project was developed for personal use. I am not maintaining it and the fork was performed lazily by deleting .git/ when I descided I needed to preserve and share it somewhere. If you really want the history of development, the ability to reasonably use git blame or any other reason you could think of to need the old .git/, you will need to check out the project I lazily forked here. fluffymadness did some great groundwork on this project and I would have taken a lot longer to get it done without them.

Thank you, fluffymadness

About

A nintendo switch fightstick for the Sparkfun ProMicro (ATMega32U4) with some unique features.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published