Skip to content

About

A USC fork

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2,357 Commits

Folders and files

Repository files navigation

Unnamed SDVX Clone (Rust Edition) & SDVX Controller Driver

Rust Edition License: MIT Platform

A ground-up Rust rewrite of Unnamed SDVX Clone (USC) paired with sdvx-driver, a standalone Windows user-mode Raw HID controller configurator, software knob stabilizer, and multi-key chord mapper for arcade and DIY Sound Voltex controllers.

Looking for the original C++ codebase?
It is preserved unmodified on the legacy branch.


Table of Contents


Highlights

Game Engine (usc-app)

  • Authentic SDVX Gameplay: .ksh beatmap parser with timing stops, audio FX timeline, intro cue & lead-in gating, .urf replay support, and authentic dynamic BPM speed behavior in MMod/XMod.
  • Lua 5.3 Skin Compatibility: Sandboxed Lua 5.3 (mlua) skin and background host backed by OpenGL 3.3 Core (glow), FemtoVG canvas rendering, and egui overlays for settings and audio/offset calibration.
  • High-BPM Visual & Laser Fidelity: Keeps visual note/hold/laser objects rendered smoothly through the judgment line at high BPMs, with clean critical-circle and stage BT hit-light release behavior.
  • Automatic Song Database Management: Bundled SQLite (maps.db) chart scanner with search filtering and automatic stale-path rescanning when song directories move.
  • Menu-Friendly Knob Sensitivity: Automatically uses 1.00 knob sensitivity in menus and song select while preserving your tuned sensitivity during gameplay.

Controller Companion (sdvx-driver)

  • User-Mode Raw HID Monitoring: Reads USB HID Gamepad (Col01), Mouse (Col02), and Keyboard (Col03) interfaces filtered directly to your controller's VID/PID without DirectInput calibration drift.
  • Software Knob Stabilizer: Built-in per-axis signal filtering for jumpy optical and mechanical EC11 rotary encoders (deadzone, reverse-glitch anti-chatter, spike clamping, and impulse smoothing) with presets and a live Raw vs. Stabilized trace.
  • Multi-Key Controller Combos: Chord recorder and configurable multi-button bindings (e.g., START + FX-L + FX-R → Back, START + BT-B + BT-C → Restart) with safe START-prefixed defaults and warnings against accidental gameplay-only chords.
  • One-Click Main.cfg Setup: Click-to-bind for HID and KB+Mouse controllers, hardware LED controls, optional user-mode SendInput virtual keyboard/mouse translation, and live encoder diagnostics.

Prerequisites

  • OS: Windows 10 / 11 (x64) with an OpenGL 3.3+ capable GPU
  • Toolchain: Rust 1.92 or newer (Edition 2024) with MSVC build tools (x86_64-pc-windows-msvc)

SQLite (rusqlite) and Lua 5.3 (mlua) are vendored/bundled automatically by Cargo—no external CMake or vcpkg setup is required.


Quick Start

1. Clone and Build

git clone https://github.com/awm404/usc.git
cd usc
cargo build --release -p usc-app --bins

This produces two binaries in target/release/:

  • target/release/usc-app.exe — the game executable and CLI tool
  • target/release/sdvx-driver.exe — the standalone SDVX controller driver GUI

2. Run from Source

# Launch the controller driver & configurator GUI
cargo run --release --bin sdvx-driver

# Launch the game
cargo run --release --bin usc-app -- play --songs-dir path\to\songs --skin-dir bin\skins\Default

3. Portable / Standalone Layout

To run outside Cargo, place the executables together with your assets in a folder (for example, dist/):

dist/
├── usc-app.exe        (or renamed to usc-game.exe)
├── sdvx-driver.exe
├── Main.cfg           (auto-created / configured by sdvx-driver)
├── sdvx-driver.json   (persisted stabilizer, combos, and driver settings)
├── maps.db            (auto-generated from songs/)
├── audio/             (copied from bin/audio/)
├── fonts/             (copied from bin/fonts/)
├── skins/             (copied from bin/skins/, plus any custom skins)
└── songs/             (your .ksh chart folders)

SDVX Controller Driver (sdvx-driver)

Launch sdvx-driver.exe (optionally passing --config path\to\Main.cfg) to configure your controller across six tabs:

Tab Purpose
USC Setup (Main.cfg) Detect HID vs. KB+Mouse mode, click-to-bind buttons/knobs, tune sensitivity & bounce guard, and launch the game
Knob Stabilizer Configure per-axis (VOL-L / VOL-R) filtering with presets (Off, Mild (Noisy Optical), EC11 Mechanical Anti-Bounce, Heavy Stabilizer) and inspect the live Raw vs. Stabilized waveform
Multi-Key Combos Record and manage chord shortcuts (Back, Start, Restart, Pause, Skip Intro, Hi-Speed Up/Down, Reload Skin, or custom keys) shared live with the game via sdvx-driver.json
Virtual Driver Optional user-mode SendInput translation from Raw HID controller inputs to keyboard/mouse events
LEDs & Hardware Configure HID button lighting modes
Diagnostics Inspect live Raw HID reports, polling rates, and encoder step deltas

Hardware Probe (CLI)

sdvx-driver.exe --probe --json

CLI & Headless Tools

usc-app includes headless inspection and simulation commands useful for skin authors, charter tooling, and CI regression checks:

# Launch the desktop game window
usc-app.exe play

# Scan a songs directory into maps.db
usc-app.exe scan path\to\songs --db maps.db --json

# Inspect a beatmap, replay, audio file, config, database, or skin
usc-app.exe inspect path\to\chart.ksh --json
usc-app.exe inspect-replay path\to\replay.urf --json
usc-app.exe inspect-audio path\to\song.ogg --json
usc-app.exe inspect-skin bin\skins\Default --json
usc-app.exe inspect-db maps.db --search "level:18" --json
usc-app.exe compute-offset path\to\chart.ksh --json

# Headless Lua 5.3 skin smoke test & deterministic gameplay simulation
usc-app.exe smoke-lua bin\skins\Default\scripts\titlescreen.lua --frames 5 --json
usc-app.exe simulate-play path\to\chart.ksh --max-seconds 60 --json

Run usc-app.exe --help for the complete list of subcommands and flags.


Workspace Architecture

The repository is organized as a 9-crate Rust workspace enforcing #![forbid(unsafe_code)] at the workspace lint level (isolating platform FFI strictly where required):

Crate Path Responsibility
usc-app app/ Desktop game binary (usc-app), controller driver GUI (sdvx-driver), InputManager, multi-key combos, software knob stabilizer, and CLI tools
usc-shared crates/usc-shared/ Math/transforms, colors, UTF-8/CP932/CP949 decoding, .cfg serialization, chart source abstractions
usc-beatmap crates/usc-beatmap/ .ksh parser, timing/BPM/scroll stops, audio FX timeline, playback clock
usc-db crates/usc-db/ SQLite maps.db scanner, search query parser, scores and challenges storage
usc-gameplay-core crates/usc-gameplay-core/ Scoring and judgment engine, gauge curves, .urf replays, game & skin config models
usc-audio crates/usc-audio/ cpal audio output, Symphonia decoding (MP3/OGG/Vorbis/WAV/FLAC/PCM), DSP effects, preview player, offset solver
usc-graphics crates/usc-graphics/ OpenGL 3.3 track/laser renderer, camera, particles, shader normalization, Windows Raw HID & WinMM gamepad backend
usc-gui crates/usc-gui/ Sandboxed Lua 5.3 skin host, FemtoVG canvas bridge, fast HUD, egui overlays
usc-integrations crates/usc-integrations/ Optional Discord RPC, Backbeat sync, multiplayer TCP, online IR, light plugins, and updater

Additional architecture and porting documentation is available in MAP.md, DECISIONS.md, GLOSSARY.md, and HANDOFF.md.


Cargo Feature Flags

By default, usc-app builds with all-integrations. To build a minimal offline binary without optional integrations:

cargo build --release -p usc-app --no-default-features

Individual optional features: backbeat, multiplayer, online-http, discord-rpc, light-plugins, updater.


Development & Verification

Before opening a pull request, run the full formatting, lint, and workspace test suite:

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Branches

  • main — Active Rust rewrite + sdvx-driver companion utility.
  • legacy — Archived original C++ Unnamed SDVX Clone codebase.

Credits & License

  • Built upon the original Unnamed SDVX Clone by Guus Waals and Emil Draws (Drewol) and its open-source contributors.
  • Released under the MIT License — see LICENSE.md for details.

About

A USC fork

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages