try to fix RSS volume

commit 345e1124864a12c205da28f62c8b939d1be9fe65 of https://github.com/nukeykt/YM2608-LLE
by nukeykt
This commit is contained in:
tildearrow 2024-04-27 01:39:33 -05:00
parent ae7c090a4a
commit 7a55ff48fe

View file

@ -2670,10 +2670,12 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk)
chip->rss_tl_shift[1] = chip->rss_tl_shift[0]; chip->rss_tl_shift[1] = chip->rss_tl_shift[0];
} }
int tl = (chip->rss_params[1] & 0x1f) + chip->rss_tl_l; int tl = (((chip->rss_params[1] & 0x1f) | 0x20) + chip->rss_tl_l + 1) ^ 63;
int key = (chip->rss_key[1] & 0x20) != 0; int key = (chip->rss_key[1] & 0x20) != 0;
if ((tl & 64) != 0 || !key) if ((tl & 64) == 0 || !key)
tl = 63; tl = 63;
else
tl &= 63;
if (chip->rss_cnt1[1] == 5) if (chip->rss_cnt1[1] == 5)
{ {
chip->rss_tl_shift[0] = (tl >> 3); chip->rss_tl_shift[0] = (tl >> 3);