/arcin

Fork of zyp's arcin firmware repo

Primary LanguageC++BSD 2-Clause "Simplified" LicenseBSD-2-Clause

arcin

This repository contains firmware code for the arcin v1.1, a custom game controller board with support for 11 buttons, 2 analog or quadrature encoders, 2 always-on LEDs, and WS2812B LED lighting via the B9 connector.

This repository also contains necessary files for building and testing firmware, as well as creating binaries that can be distributed to users to easily flash their arcin.

Credits for the original codebase, forked repos, and many changes: zyp, K, handrew

The original codebase by zyp can be found at: http://cgit.jvnv.net/arcin/log/?h=conf

Branches

Each branch contains its own modifications made with a specific game/controller in mind.

sdvx-ac8 is intended for use with DJ Dao SVRE9 or SVSE5 game controllers outfitted with arcade-style encoders (digital potentiometers). In addition to implementing software-based smoothing, it is also configured to use the B9 connector to control WS2812B LED strips via HID lighting in supported games.

sdvx-ac16 is the same as sdvx-ac8 except it is modified to capture/output a 16-bit value for the two "analog" axes. This is useful for games that natively accept a more precise 16-bit value for these axes.

Note: either of these firmwares can technically be used with any basic "analog" potentiometer. If using a digital potentiometer it must have an operating voltage of 3.3v (for example, digital pots that require 5v VCC will not work with the arcin). The firmwares in this repository do not natively support Copal, Bourns, or any other types of rotary encoders, although the arcin hardware does support them.

Pre-Built Images

If you are only interested in a pre-compiled binary, the bin folder of each branch contains an up-to-date EXE you can use to flash your device.

Setup

  1. Grab the ARM toolchain: https://launchpad.net/gcc-arm-embedded/+download
  2. You will need SCons to build the image: http://scons.org/pages/download.html
  3. Supplementary scripts will require Python (2.7) as well as the hidapi-libusb library
  4. Clone the branch you want to work with.
  5. git submodule init: this will pull the external laks submodule, which contains headers for the hardware used by the arcin.

Building and Testing

  1. scons
  2. ./hidflash.py arcin.elf

See simpletest.py for an example test script to monitor HID reports generated by an arcin controller.

Packaging

After building an image using scons, run the following command to build a custom hidloader EXE with your new firmware image embedded into it. This EXE can be given to users to easily flash their device. Substitute arcin_flash_custom.exe with whatever filename you want.

  1. ./hidloader_append.py arcin.elf hidloader_v2.exe arcin_flash_custom.exe