From 3bfb046afca1a5716b544c8789e5af2be0dabc9f Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Wed, 15 May 2024 21:42:15 +0200 Subject: [PATCH] mu3, chusan: improved library doc --- chuniio/chuniio.h | 12 ++++++++++-- dist/mai2/segatools.ini | 21 ++++++++++++--------- mu3io/mu3io.h | 29 +++++++++++++++++++++++++---- 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/chuniio/chuniio.h b/chuniio/chuniio.h index e149a52..8c575c9 100644 --- a/chuniio/chuniio.h +++ b/chuniio/chuniio.h @@ -163,9 +163,17 @@ HRESULT chuni_io_led_init(void); Chunithm uses two chains/boards with WS2811 protocol (each logical led corresponds to 3 physical leds). board 0 is on the left side and board 1 on the right side of the cab - left side has 5*10 rgb values for the billboard, followed by 3 rgb values for the air tower - right side has 6*10 rgb values for the billboard, followed by 3 rgb values for the air tower + Board 0 has 53 LEDs: + [0]-[49]: snakes through left half of billboard (first column starts at top) + [50]-[52]: left side partition LEDs + Board 1 has 63 LEDs: + [0]-[59]: right half of billboard (first column starts at bottom) + [60]-[62]: right side partition LEDs + + Board 2 is the slider and has 31 LEDs: + [0]-[31]: slider LEDs right to left BRG, alternating between keys and dividers + Each rgb value is comprised of 3 bytes in R,G,B order NOTE: billboard strips have alternating direction (bottom to top, top to bottom, ...) diff --git a/dist/mai2/segatools.ini b/dist/mai2/segatools.ini index ed8cc0a..596a295 100644 --- a/dist/mai2/segatools.ini +++ b/dist/mai2/segatools.ini @@ -69,6 +69,18 @@ freeplay=0 ; this to 1 on exactly one machine and set this to 0 on all others. dipsw1=1 +; ----------------------------------------------------------------------------- +; Misc. hook settings +; ----------------------------------------------------------------------------- + +[unity] +; Enable Unity hook. This will allow you to run custom .NET code before the game +enable=1 + +; Path to a .NET DLL that should run before the game. Useful for loading +; modding frameworks such as BepInEx. +targetAssembly= + ; ----------------------------------------------------------------------------- ; Custom IO settings ; ----------------------------------------------------------------------------- @@ -83,15 +95,6 @@ path= ; Leave empty if you want to use Segatools built-in keyboard input. path= -; ----------------------------------------------------------------------------- -; Misc. hook settings -; ----------------------------------------------------------------------------- - -[unity] -; Path to a .NET DLL that should run before the game. Useful for loading -; modding frameworks such as BepInEx. -targetAssembly= - ; ----------------------------------------------------------------------------- ; Input settings ; ----------------------------------------------------------------------------- diff --git a/mu3io/mu3io.h b/mu3io/mu3io.h index 522ef1b..b5f2c10 100644 --- a/mu3io/mu3io.h +++ b/mu3io/mu3io.h @@ -123,12 +123,33 @@ void mu3_io_get_lever(int16_t *pos); All subsequent calls may originate from arbitrary threads and some may overlap with each other. Ensuring synchronization inside your IO DLL is - your responsibility. */ + your responsibility. + + Minimum API version: 0x0101 */ HRESULT mu3_io_led_init(void); -/* Update the RGB LEDs. - - Exact layout is TBD. */ +/* Update the RGB LEDs. rgb is a pointer to an array of up to 61 * 3 = 183 bytes. + + ONGEKI uses one board with WS2811 protocol (each logical led corresponds to 3 + physical leds). Board 0 is used for all cab lights and both WAD button lights. + + Board 0 has 61 LEDs: + [0]-[1]: left side button + [2]-[8]: left pillar lower LEDs + [9]-[17]: left pillar center LEDs + [18]-[24]: left pillar upper LEDs + [25]-[35]: billboard LEDs + [36]-[42]: right pillar upper LEDs + [43]-[51]: right pillar center LEDs + [52]-[58]: right pillar lower LEDs + [59]-[60]: right side button + + Board 1 has 6 LEDs: + [0]-[5]: 3 left and 3 right controller buttons + + Each rgb value is comprised of 3 bytes in R,G,B order + + Minimum API version: 0x0101 */ void mu3_io_led_set_colors(uint8_t board, uint8_t *rgb);