chuni/chusan: added LED output to DLLs (will break most DLLs)

Credits: somewhatlurker, skogaby
https://dev.s-ul.net/skogaby/segatools/-/blob/ongeki-15093/
This commit is contained in:
2023-12-19 12:43:26 +01:00
parent ed042176d7
commit 8ebdf67d6e
33 changed files with 743 additions and 107 deletions

View File

@ -3,6 +3,7 @@
#include <stdlib.h>
#include "board/io4.h"
#include "board/led15093.h"
#include "board/sg-reader.h"
#include "board/vfd.h"
@ -96,7 +97,8 @@ static DWORD CALLBACK fgo_pre_startup(void)
goto fail;
}
hr = led15093_hook_init(&fgo_hook_cfg.led15093, 17, 1, 1, 2);
hr = led15093_hook_init(&fgo_hook_cfg.led15093,
fgo_dll.led_init, fgo_dll.led_set_leds, 17, 1, 1, 2);
if (FAILED(hr)) {
goto fail;

View File

@ -24,6 +24,12 @@ const struct dll_bind_sym fgo_dll_syms[] = {
}, {
.sym = "fgo_io_get_analogs",
.off = offsetof(struct fgo_dll, get_analogs),
}, {
.sym = "fgo_io_led_init",
.off = offsetof(struct fgo_dll, led_init),
}, {
.sym = "fgo_io_led_set_leds",
.off = offsetof(struct fgo_dll, led_set_leds),
}
};

View File

@ -11,6 +11,8 @@ struct fgo_dll {
void (*get_opbtns)(uint8_t *opbtn);
void (*get_gamebtns)(uint8_t *gamebtn);
void (*get_analogs)(int16_t *stick_x, int16_t *stick_y);
int (*led_init)();
void (*led_set_leds)(uint8_t board, uint8_t *rgb);
};
struct fgo_dll_config {

View File

@ -17,6 +17,8 @@ EXPORTS
fgo_io_get_opbtns
fgo_io_init
fgo_io_poll
fgo_io_led_init
fgo_io_led_set_leds
fwdlusb_open
fwdlusb_close
fwdlusb_listupPrinter