Primary firmware for the NaxGCC, and optional firmware for the PhobGCC, utilizing the embassy-rs framework.
Find a file
Naxdy d49c72d9c0
All checks were successful
Publish nightly release / build (push) Successful in 1m40s
feat(config): add ability to display current stick calibration values
2024-04-06 21:05:22 +02:00
.forgejo/workflows chore: clarify nightly 2024-04-05 23:46:05 +02:00
src feat(config): add ability to display current stick calibration values 2024-04-06 21:05:22 +02:00
.envrc project setup with sample code 2024-03-03 16:31:37 +01:00
.gitignore add button mapping, implement SPI, use patched embassy 2024-03-18 10:36:47 +01:00
build.rs refactor (WORKING) using embassy 2024-03-12 00:08:34 +01:00
Cargo.lock feat: implement stick calibration logic 2024-03-27 18:11:23 +01:00
Cargo.toml chore: refactor according to clippy & clean up config (#6) 2024-04-03 16:53:52 +00:00
Embed.toml project setup with sample code 2024-03-03 16:31:37 +01:00
flake.lock change(project): use https for git resolution 2024-04-05 12:39:39 +02:00
flake.nix change(project): use https for git resolution 2024-04-05 12:39:39 +02:00
LICENSE chore: amend readme & add license 2024-04-05 23:37:35 +02:00
memory.x refactor (WORKING) using embassy 2024-03-12 00:08:34 +01:00
README.md chore(readme): clarify default behavior 2024-04-05 23:40:07 +02:00

NaxGCC

This repo houses the firmware for the NaxGCC, a GameCube-style controller built on the PhobGCC. The firmware can also be used as an optional firmware for the PhobGCC, though the PhobGCC will then have to be connected to the console directly via USB.

Like the PhobGCC, the NaxGCC uses hall effect sensors instead of potentiometers for stick input. Additionally, it connects directly to the console via USB, by pretending to be a GCC adapter with 1 controller (itself) connected. This eliminates one additional layer of polling, and thus reduces perceived latency and improves input consistency. The NaxGCC also features a special "input consistency mode" that even further improves input consistency, beyond what is delivered by any other controller / adapter. The NaxGCC firmware makes use of the embassy-rs framework for asynchronous operations. Mainly, this means that the firmware is capable of polling the sticks and buttons at different frequencies, further improving input consistency and latency for button inputs.

Key Aspects

Click on any of these to expand.

NaxGCC has all the important PhobGCC features.

The hardware of NaxGCC is directly forked from PhobGCC's, meaning it benefits from the same improvements over a "regular" GCC, most importantly the fact that it uses hall-effect sensors instead of potentiometers for reading your stick positions.

Furthermore, large parts of its firmware have also been taken from PhobGCC's firmware, such as the snapback filter, cardinal snapping, and notch remapping to name a few. If you're used to calibrating a PhobGCC, you will have no trouble here.

Firmware is written in Rust, using the embassy-rs framework for asynchronous operations.

The firmware being written in Rust allows for writing much cleaner code than one would normally be used to when writing firmware in C, because Rust allows for many zero and low cost abstractions in order to enhance code readability and maintainability. Adding embassy-rs for asynchronous operations on top of that provides 2 main benefits:

  1. It further improves code readability and maintainability by allowing to separate functionality on a semantic level.
  2. It allows multiple tasks to be executed on the same thread, sharing their workload. Effectively, due to this, the NaxGCC can update its buttons at a ~50us (that's microseconds) interval, and its sticks at a 1ms interval.
Provides both the lowest latency of any Switch controller, as well as the best input integrity.

Because the NaxGCC connects directly to the console via USB, it already outperforms any controller that has to go through an adapter in terms of input latency.

Further, the NaxGCC has a special "input consistency" mode (enabled by default), which ensures a \gt 98\% input accuracy, compared to \lt 75\% for any other controller (worse if there is an adapter in the mix, with the exception of the Lossless Adapter).

For details on how it works, have a look at our wiki.

Compatible with Phob hardware.

The NaxGCC firmware is compatible with regular Phob 2.0 boards (those using an RP2040 microcontroller), since it's originally forked from the PhobGCC project. This means that if you are willing and able to slightly modify your controller shell to allow a micro USB cable to connect to your Phob board during play, you can turn your existing PhobGCC into a NaxGCC at no extra cost!

Contributing

The NaxGCC firmware is built using nix, which also provides a ready-to-go development environment, complete with all the tooling and libraries you need to get going. Simply install nix, enable flakes and run

nix develop .

and you're ready to work on the project. Submit your pull requests here.