Primary firmware for the NaxGCC, and optional firmware for the PhobGCC, utilizing the embassy-rs framework.
Find a file
Naxdy 1b4fbddd78
All checks were successful
Publish nightly release / build (push) Successful in 1m23s
feat(config): implement rest of config / calibration options
2024-04-02 22:05:57 +02:00
.forgejo/workflows feat(ci): (re-)generate tag 2024-03-26 21:21:34 +01:00
src feat(config): implement rest of config / calibration options 2024-04-02 22:05:57 +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 change(config): remove notch adjustment logic (for now) 2024-04-01 23:03:08 +02:00
Embed.toml project setup with sample code 2024-03-03 16:31:37 +01:00
flake.lock change(flake): refer to embassy hosted on naxdy.org 2024-03-26 22:37:19 +01:00
flake.nix feat: implement stick calibration logic 2024-03-27 18:11:23 +01:00
memory.x refactor (WORKING) using embassy 2024-03-12 00:08:34 +01:00
README.md chore: update readme 2024-04-02 15:11:44 +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 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.

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.