works
This commit is contained in:
parent
8df563eb20
commit
3526d75ec8
51
README.md
51
README.md
|
@ -1,3 +1,52 @@
|
|||
# chuniio-tasoller
|
||||
|
||||
ChuniIO for Tasoller, but in Rust
|
||||
ChuniIO driver for Tasoller CFW 2.0 written in Rust
|
||||
|
||||
Thanks to:
|
||||
- [akiros](https://dev.s-ul.net/akiroz/chuniio-tasoller) for the original code (in Zig) and protocol information
|
||||
|
||||
Supported versions:
|
||||
- CHUNITHM SUN PLUS
|
||||
|
||||
Anything aftern CHUNITHM NEW should work, but unsupported because untested.
|
||||
|
||||
## Configuration
|
||||
segatools.ini
|
||||
|
||||
```ini
|
||||
[chuniio]
|
||||
;; For Chunithm NEW or newer
|
||||
path32=chuniio_tasoller_chusan.dll
|
||||
path64=chuniio_tasoller_amdaemon.dll
|
||||
|
||||
[io3]
|
||||
test=0x31
|
||||
service=0x32
|
||||
coin=0x33
|
||||
```
|
||||
|
||||
## USB Protocol
|
||||
Custom firmware USB device: 1CCF:2333
|
||||
- Interface 1
|
||||
- Endpoint 4 IN Interrupt (0x84)
|
||||
- data len: 36 bytes
|
||||
- data[0-2]: {0x68, 0x66, 0x84} (magic?)
|
||||
- data[3]
|
||||
- bit 0-5: beam 1-6 (1 = blocked)
|
||||
- bit 6-7: fn1 & fn2 (1 = pressed)
|
||||
- data[4-35]: touch sensor 1-32 pressure
|
||||
- Endpoint 3 OUT Bulk (0x03)
|
||||
- data len: 240 bytes
|
||||
- data[0-2]: {0x42, 0x4C, 0x00} (magic?)
|
||||
- data[3-95]: Slider LED (GRB order, right->left)
|
||||
- data[96-167]: Left LED (GRB order top->bottom)
|
||||
- data[168-239]: Right LED (GRB order bottom->top)
|
||||
|
||||
## Build instructions
|
||||
```shell
|
||||
cargo build --target i686-pc-windows-msvc -p chuniio-tasoller-chusan --release
|
||||
cargo build --target x86_64-pc-windows-msvc -p chuniio-tasoller-amdaemon --release
|
||||
|
||||
ls target/i686-pc-windows-msvc/release/chuniio_tasoller_chusan.dll
|
||||
ls target/x86_64-pc-windows-msvc/release/chuniio_tasoller_amdaemon.dll
|
||||
```
|
|
@ -17,7 +17,7 @@ use winapi::{
|
|||
};
|
||||
|
||||
use chuniio_tasoller_common::{create_input_shared_memory, log::init_logger};
|
||||
use log::{error, info};
|
||||
use log::{error, info, warn};
|
||||
use winapi::shared::winerror::E_FAIL;
|
||||
|
||||
type SliderCallbackFn = unsafe extern "C" fn(data: *const u8);
|
||||
|
@ -202,6 +202,10 @@ fn input_thread_proc() {
|
|||
if let Err(e) = device.read_interrupt(0x84, usb_in, Duration::from_micros(1)) {
|
||||
error!("Failed to read data from Tasoller: {e:#}");
|
||||
}
|
||||
|
||||
if usb_in[0] != 0x68 || usb_in[1] != 0x66 || usb_in[2] != 0x84 {
|
||||
warn!("Received packet does not start with magic bytes 68 66 84");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue