forked from TeamTofuShop/segatools
Compare commits
2 Commits
2024-05-12
...
2024-05-16
Author | SHA1 | Date | |
---|---|---|---|
d8b3d41809
|
|||
3bfb046afc
|
@ -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, ...)
|
||||
|
@ -170,7 +170,7 @@ HRESULT chuni_dll_init(const struct chuni_dll_config *cfg, HINSTANCE self)
|
||||
"\"%s\". Please contact your IO DLL's developer for "
|
||||
"further assistance.\n",
|
||||
sym->sym);
|
||||
dprintf("imported %d symbols\n",bind_count);
|
||||
dprintf("imported %d symbols\n", bind_count);
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
|
21
dist/mai2/segatools.ini
vendored
21
dist/mai2/segatools.ini
vendored
@ -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
|
||||
; -----------------------------------------------------------------------------
|
||||
|
@ -166,7 +166,7 @@ static HRESULT mu3_io4_write_gpio(uint8_t* payload, size_t len)
|
||||
lights_data & MU3_IO_LED_R3_B ? 0xFF : 0x00,
|
||||
};
|
||||
|
||||
mu3_io_led_set_colors(1, rgb_out);
|
||||
mu3_dll.led_set_leds(1, rgb_out);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -117,18 +117,42 @@ void mu3_io_get_gamebtns(uint8_t *left, uint8_t *right);
|
||||
|
||||
void mu3_io_get_lever(int16_t *pos);
|
||||
|
||||
|
||||
/* Initialize LED emulation. This function will be called before any
|
||||
other mu3_io_led_*() function calls.
|
||||
|
||||
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. The tricky part is
|
||||
that the board 0 is called from mu3 and the board 1 is called from amdaemon.
|
||||
So the library must be able to handle both calls, using shared memory f.e.
|
||||
This is up to the developer to decide how to handle this, recommended way is
|
||||
to use the amdaemon process as the main one and the mu3 call as a sub one.
|
||||
|
||||
Minimum API version: 0x0101 */
|
||||
|
||||
void mu3_io_led_set_colors(uint8_t board, uint8_t *rgb);
|
||||
|
Reference in New Issue
Block a user