Quick Neural Mind-Driven Souls-like Controller (formerly QNMDsol)
Neurostick is a Rust app that reads EEG data from OpenBCI Cyton + Daisy (16ch) (via BrainFlow) and outputs a vJoy virtual gamepad for game control. The UI also provides waveform/spectrum visualization, impedance estimation, and CSV recording.
- English setup:
USAGE.md - 中文说明:
使用说明.md
- Mode selector (SIM / REAL):
- SIM: keyboard shortcuts drive the vJoy device. Only works when the QNMDsol window has focus.
- REAL: OpenBCI Cyton+Daisy (BrainFlow) streams EEG into QNMDsol, which applies a simple threshold demo and drives vJoy.
- Connection flow: CONNECT opens the data source (keyboard simulator or serial port), START STREAM begins data acquisition, STOP stream cleanly closes it.
- Waveform view: real-time plot of the incoming channels with a reset button to clear history.
- Spectrum view: FFT-based magnitude plot with selectable window/size (for quick alpha/beta checks).
- Calibration tab:
- Guided buttons Record Relax (3s) and Record Action (3s) capture two windows and compute a demo threshold.
- The resulting Threshold slider can be adjusted manually if the trigger is too sensitive or too hard.
- Impedance tab: estimates per-channel impedance quality and labels them (Good / Acceptable / Poor / Railed) for rapid electrode checks.
- AI Data Collection: enters a free-form label and records CSV EEG samples for offline training (saved under the repo root; see
trainer/). - AI Model UI: loads a
brain_model.jsonpath, reloads on demand, and shows placeholder per-class probabilities in the status bar (inference pipeline is not yet wired intoengine). - vJoy output preview: left panel mirrors stick/trigger/button states so you can confirm mappings before opening a game.
- OpenBCI Cyton + Daisy (16 channels) + USB dongle
- Windows 10/11 (64-bit)
- Rust stable (install: https://rustup.rs)
- vJoy v2.2.2.0 (required): https://github.com/BrunnerInnovation/vJoy/releases/tag/v2.2.2.0
- Runtime DLLs (required; must be in working directory / next to
.exe):BoardController.dll(BrainFlow)DataHandler.dll(BrainFlow)vJoyInterface.dll(vJoy SDK)
This repository includes these DLLs in the repo root for Windows x64. If you removed them, see USAGE.md / 使用说明.md.
git clone https://github.com/Skiyoshika/Neurostick.git
cd Neurostick
cargo runMost modern games only recognize Xbox controllers (XInput). vJoy is a DirectInput device, so you usually need Steam Input to translate:
-
Steam → Settings → Controller → enable “Generic Gamepad Configuration Support”
-
Game → Properties → Controller → enable “Steam Input”
-
Game → “Controller Layout” → bind vJoy axes/buttons to Xbox controls
-
Preparation: Launch Steam and ensure Elden Ring is in your Steam library (add it as a non-Steam game if necessary).
-
Generic Support: Go to Steam -> Settings -> Controller -> Check "Enable Generic Gamepad Configuration Support".
-
Enable Steam Input: In the Steam Library, right-click Elden Ring -> Properties -> Controller -> Select "Enable Steam Input".
-
Button Mapping: Click "Controller Layout". You must manually map the signals output by Neurostick (e.g., Button 1, Axis X/Y) to the corresponding standard Xbox 360 Buttons (e.g., A button, Left Stick).
- Tip: Steam detects the vJoy device input, not your keyboard. SIM keyboard shortcuts only work when the Neurostick window is focused. For mapping, prefer REAL mode (EEG drives vJoy in the background) or use
joy.cplto confirm axes/buttons first.
- Tip: Steam detects the vJoy device input, not your keyboard. SIM keyboard shortcuts only work when the Neurostick window is focused. For mapping, prefer REAL mode (EEG drives vJoy in the background) or use
After completing these steps, the game will be able to recognize your mind-controlled gamepad.
Plug in the OpenBCI Dongle (COM port is selectable in the UI).
Turn on the Cyton Board.
Select REAL mode in the GUI.
Click CONNECT. Once connected, click START STREAM.
Data Recording: Enter a label (e.g., "Attack") and click 🔴 RECORD to save training data.
[x] v0.1 Demo: Core architecture, Simulation, vJoy integration, Data recording.
[ ] v0.2 AI Integration: Integrate ONNX Runtime to load Python-trained CSP+LDA models.
[ ] v0.3 Macro System: automated macros for complex in-game actions (e.g., healing, dodging).
[ ] v1.0 Release: Closed-loop bidirectional VR sensory modulation integration.
This project is in early Alpha.
Do not use BCI devices while operating heavy machinery.
The developer is not responsible for emotional damage caused by in-game deaths ("YOU DIED").
GNU AGPLv3 (see LICENSE).
Made with ❤️ and 🧠 by Independent Developer.
- Offline scripts live under
trainer/. trainer/run_all.batproduces a demobrain_model.jsonin the project root.
MIT License (see LICENSE).