1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2025-01-31 20:15:20 +01:00

Add sdvx generator lights to sdvxio-bio2.

This commit is contained in:
96021c6f149619c2abfb151ec48670b44f896293 2022-05-20 03:49:29 +00:00 committed by 6fe20d9b80a9661a09ef66dfd58832d49592386b
parent 04442a6dbc
commit 51a018b0cf
3 changed files with 12 additions and 2 deletions

View File

@ -41,8 +41,7 @@ struct ac_io_kfca_poll_in {
struct ac_io_kfca_poll_out {
uint32_t gpio;
uint8_t pwm[18];
uint8_t unk[2];
uint8_t pwm[20];
};
#pragma pack(pop)

View File

@ -33,6 +33,7 @@ enum sdvx_io_out_gpio_bit {
SDVX_IO_OUT_GPIO_D = 0,
SDVX_IO_OUT_GPIO_FX_L = 1,
SDVX_IO_OUT_GPIO_FX_R = 2,
SDVX_IO_OUT_GPIO_GENERATOR_B = 3,
SDVX_IO_OUT_GPIO_START = 12,
SDVX_IO_OUT_GPIO_A = 13,
SDVX_IO_OUT_GPIO_B = 14,

View File

@ -172,6 +172,9 @@ static uint8_t assign_light(uint32_t gpio_lights, uint32_t shift)
return 0;
}
/* Blue generator lights are gpio, while the red and green are pwm on the KFCA.
Tested this on a gen 1 sdvx pcb, and indeed the blue lights are only on/off,
while the red & green can fade. */
void sdvx_io_set_gpio_lights(uint32_t gpio_lights)
{
pout_staging.gpio[0] = assign_light(gpio_lights, SDVX_IO_OUT_GPIO_START);
@ -181,6 +184,7 @@ void sdvx_io_set_gpio_lights(uint32_t gpio_lights)
pout_staging.gpio[4] = assign_light(gpio_lights, SDVX_IO_OUT_GPIO_D);
pout_staging.gpio[5] = assign_light(gpio_lights, SDVX_IO_OUT_GPIO_FX_L);
pout_staging.gpio[6] = assign_light(gpio_lights, SDVX_IO_OUT_GPIO_FX_R);
pout_staging.generator[2] = assign_light(gpio_lights, SDVX_IO_OUT_GPIO_GENERATOR_B);
}
void sdvx_io_set_pwm_light(uint8_t light_no, uint8_t intensity)
@ -207,6 +211,12 @@ void sdvx_io_set_pwm_light(uint8_t light_no, uint8_t intensity)
case 17:
pout_staging.controller[2] = intensity;
break;
case 18:
pout_staging.generator[0] = intensity;
break;
case 19:
pout_staging.generator[1] = intensity;
break;
default:
break;
}