Compare commits

...

8 Commits
1.7.0 ... main

Author SHA1 Message Date
scrib-bler
c5f6496adf Changed default dll behaviour to be compatiable with chusanApp games 2024-08-06 18:37:51 +01:00
8078821d7c Attempt to make configuration instructions clearer. 2024-07-26 17:21:37 +00:00
1bc0bc65e3 Update README.md
Removed reference to chuniio branch, as all versions of Dniel97 segatools now support the LED change
2024-06-09 21:39:35 +00:00
da041efcec LUMINOUS support
added LUMINOUS support, kek
2024-03-22 05:51:09 +00:00
a67e50866e removed [io3] section
removed [io3] section from readme as it was confusing for some people
2024-03-22 05:49:01 +00:00
8ace7dace5 clean up alignment
probably still bad
2024-01-09 19:49:08 +00:00
84489e8fae Make tower LEDs more arcade accurate
Now using all the tower LED data sent by the game instead of just using 1 and repeating it across all LEDs.

This will have no effect in game as the game simply sets them all to the same colour anyway :(
2024-01-09 19:36:56 +00:00
1cfbf74bc6 API version bumped to 0x0102 in line wtih Dniel97 segatools
0x0102 is to signify the Tower LED support, which has already been implemented. This is so that we are reporting the correct API version.
2023-12-25 23:25:48 +00:00
2 changed files with 48 additions and 34 deletions

View File

@ -2,43 +2,37 @@
chuniio driver for tasoller custom 2.0 firmware chuniio driver for tasoller custom 2.0 firmware
now with working air tower LEDs when using [Dniel97 segatools](https://gitea.tendokyu.moe/Dniel97/segatools/src/branch/chuniio) now with working air tower LEDs when using [Dniel97 segatools](https://gitea.tendokyu.moe/Dniel97/segatools/src/branch/chuniio)
this currently only works with the chuniio branch of segatools, but may work on the main branch in the future
thanks to: thanks to:
- [**akiroz**](https://dev.s-ul.net/akiroz/chuniio-tasoller) for the original code and USB Protocol information - [**akiroz**](https://dev.s-ul.net/akiroz/chuniio-tasoller) for the original code and USB Protocol information
- [**Dniel97**](https://gitea.tendokyu.moe/Dniel97) for rewritting my failed attempts at making this work - [**Dniel97**](https://gitea.tendokyu.moe/Dniel97) for rewritting my failed attempts at making this work
the current implementation may not be fully arcade accurate, but should be visually acceptable during gameplay
this should hopefully be addressed in the future
Supported titles: Supported titles:
- Chunithm - CHUNITHM
- Chunithm NEW - CHUNITHM NEW
- Chunithm NEW PLUS - CHUNITHM NEW PLUS
- Chunithm SUN - CHUNITHM SUN
- Chunithm SUN PLUS - CHUNITHM SUN PLUS
- CHUNITHM LUMINOUS
## Configuration ## Configuration
- For modern CHUNITHM (NEW and above)
segatools.ini segatools.ini
```ini ```ini
[chuniio] [chuniio]
;; For Chunithm
;path=chuniio_tasoller.dll
;; For Chunithm NEW or newer
path32=chuniio_tasoller.dll path32=chuniio_tasoller.dll
path64=chuniio_tasoller_x64.dll path64=chuniio_tasoller_x64.dll
```
;; Uncomment for Chunithm NEW or newer - For older CHUNITHM (PARADISE LOST and older)
chusan=1
[io3] segatools.ini
test=0x31 ```ini
service=0x32 [chuniio]
coin=0x33 path=chuniio_tasoller.dll
chusan=0
``` ```
## USB Protocol ## USB Protocol

View File

@ -190,7 +190,7 @@ fn slider_thread_proc(callback: chuni_io_slider_callback_t) void {
// DLL EXPORTS ====================================================================================================== // DLL EXPORTS ======================================================================================================
export fn chuni_io_get_api_version() c_ushort { export fn chuni_io_get_api_version() c_ushort {
return 0x0101; return 0x0102;
} }
pub export fn DllMain(hDllHandle: HANDLE, dwReason: DWORD, lpreserved: LPVOID) BOOL { pub export fn DllMain(hDllHandle: HANDLE, dwReason: DWORD, lpreserved: LPVOID) BOOL {
@ -201,10 +201,10 @@ pub export fn DllMain(hDllHandle: HANDLE, dwReason: DWORD, lpreserved: LPVOID) B
const cfg_file = ".\\segatools.ini"; const cfg_file = ".\\segatools.ini";
std.log.info("[chuniio] Loading config from {s}", .{cfg_file}); std.log.info("[chuniio] Loading config from {s}", .{cfg_file});
cfg = .{ cfg = .{
.test_key = @as(i32, @intCast(GetPrivateProfileIntA("io3", "test", 0x31, cfg_file))), .test_key = @as(i32, @intCast(GetPrivateProfileIntA("io3", "test", 0x70, cfg_file))),
.serv_key = @as(i32, @intCast(GetPrivateProfileIntA("io3", "service", 0x32, cfg_file))), .serv_key = @as(i32, @intCast(GetPrivateProfileIntA("io3", "service", 0x71, cfg_file))),
.coin_key = @as(i32, @intCast(GetPrivateProfileIntA("io3", "coin", 0x33, cfg_file))), .coin_key = @as(i32, @intCast(GetPrivateProfileIntA("io3", "coin", 0x72, cfg_file))),
.chusan = @as(i32, @intCast(GetPrivateProfileIntA("chuniio", "chusan", 0, cfg_file))), .chusan = @as(i32, @intCast(GetPrivateProfileIntA("chuniio", "chusan", 1, cfg_file))),
}; };
return win32.zig.TRUE; return win32.zig.TRUE;
@ -299,19 +299,39 @@ export fn chuni_io_led_set_colors(board: u8, rgb: ?[*]u8) void {
var n: u32 = 0; var n: u32 = 0;
if (board == 0) { if (board == 0) {
const out = usb_out[96..168]; const out = usb_out[96..168];
while (n < 24) : (n += 1) { const led_limit: u32 = 3;
out[n * 3 + 1] = rgb.?[0x96]; const i_limit: u32 = 8;
out[n * 3 + 0] = rgb.?[0x97];
out[n * 3 + 2] = rgb.?[0x98]; var led: u32 = 0;
while (led < led_limit) {
var i: u32 = 0;
while (i < i_limit) {
n = (8 * led) + i;
out[n * 3 + 1] = rgb.?[0x96 + (led * 3)];
out[n * 3 + 0] = rgb.?[0x97 + (led * 3)];
out[n * 3 + 2] = rgb.?[0x98 + (led * 3)];
i += 1;
} }
led += 1;
}
} else if (board == 1) { } else if (board == 1) {
const out = usb_out[168..240]; const out = usb_out[168..240];
while (n < 24) : (n += 1) { const led_limit: u32 = 3;
out[n * 3 + 1] = rgb.?[0xb4]; const i_limit: u32 = 8;
out[n * 3 + 0] = rgb.?[0xb5];
out[n * 3 + 2] = rgb.?[0xb6]; var led: u32 = 0;
while (led < led_limit) {
var i: u32 = 0;
while (i < i_limit) {
n = (8 * led) + i;
out[n * 3 + 1] = rgb.?[0xb4 + (led * 3)];
out[n * 3 + 0] = rgb.?[0xb5 + (led * 3)];
out[n * 3 + 2] = rgb.?[0xb6 + (led * 3)];
i += 1;
} }
led += 1;
} }
}
usb_out_op.lock(); usb_out_op.lock();
defer usb_out_op.unlock(); defer usb_out_op.unlock();