NaxGCC-FW/README.md

65 lines
4.7 KiB
Markdown
Raw Permalink Normal View History

2024-03-26 21:29:12 +00:00
# NaxGCC
2024-04-09 17:30:52 +00:00
The main repository is located at [git.naxdy.org](https://git.naxdy.org/NaxdyOrg/NaxGCC-FW). The GitHub mirror exists solely for the sake of discoverability and redundancy.
> **Please do not submit issues or pull requests on GitHub.**
Find the latest releases here: https://git.naxdy.org/NaxdyOrg/NaxGCC-FW/releases
Full documentation is available at [gcc.naxdy.org](https://gcc.naxdy.org/).
2024-04-11 10:17:30 +00:00
Join the NaxGCC matrix chat at [#naxgcc:naxdy.org](https://matrix.to/#/#naxgcc:naxdy.org) to discuss development or ask for help.
2024-04-09 17:30:52 +00:00
---
2024-03-26 21:29:12 +00:00
This repo houses the firmware for the NaxGCC, a GameCube-style controller built on the [PhobGCC](https://github.com/PhobGCC/PhobGCC-SW). 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.
2024-04-05 21:37:35 +00:00
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](https://github.com/embassy-rs/embassy) 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.
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
### Key Aspects
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
Click on any of these to expand.
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
<details><summary>NaxGCC has all the important PhobGCC features.</summary>
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
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.
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
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.
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
</details>
2024-03-26 21:29:12 +00:00
2024-04-05 21:37:35 +00:00
<details><summary>Firmware is written in Rust, using the <a href="https://github.com/embassy-rs/embassy">embassy-rs</a> framework for asynchronous operations.</summary>
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
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:
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
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 *micro*seconds) interval, and its sticks at a 1ms interval.
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
</details>
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
<details><summary>Provides both the lowest latency of any Switch controller, as well as the best input integrity.</summary>
2024-03-26 21:29:12 +00:00
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.
2024-04-02 20:18:09 +00:00
2024-04-09 17:30:52 +00:00
Further, the NaxGCC has a special "input consistency" mode (enabled by default), which ensures a $\gt 98\%$ input accuracy, compared to $\lt 76\%$ for any other controller (worse if there is an adapter in the mix, with the exception of the Lossless Adapter).
2024-04-02 20:18:09 +00:00
2024-04-09 17:30:52 +00:00
For details on how it works, have a look at our [documentation](https://gcc.naxdy.org/).
2024-04-02 20:18:09 +00:00
</details>
<details><summary>Compatible with Phob hardware.</summary>
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!
2024-04-02 11:36:18 +00:00
</details>
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
## Contributing
2024-03-26 21:29:12 +00:00
2024-04-05 21:37:35 +00:00
The NaxGCC firmware is built using [nix](https://nixos.org/download/), 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](https://nixos.wiki/wiki/Flakes) and run
2024-03-26 21:29:12 +00:00
2024-04-02 11:36:18 +00:00
```bash
nix develop .
```
2024-03-26 21:29:12 +00:00
2024-04-12 19:46:04 +00:00
and you're ready to work on the project. Submit your pull requests [here](https://git.naxdy.org/NaxdyOrg/NaxGCC-FW/pulls). Also be sure to have a look at our [CONTRIBUTING.md](./CONTRIBUTING.md) for more information on how to contribute.