From 7a55ff48fe8385808a87a86e3603aaf13d47384e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 27 Apr 2024 01:39:33 -0500 Subject: [PATCH] try to fix RSS volume commit 345e1124864a12c205da28f62c8b939d1be9fe65 of https://github.com/nukeykt/YM2608-LLE by nukeykt --- extern/YM2608-LLE/fmopna_impl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extern/YM2608-LLE/fmopna_impl.c b/extern/YM2608-LLE/fmopna_impl.c index bb6a174fb..642f80df0 100644 --- a/extern/YM2608-LLE/fmopna_impl.c +++ b/extern/YM2608-LLE/fmopna_impl.c @@ -2670,10 +2670,12 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) 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; - if ((tl & 64) != 0 || !key) + if ((tl & 64) == 0 || !key) tl = 63; + else + tl &= 63; if (chip->rss_cnt1[1] == 5) { chip->rss_tl_shift[0] = (tl >> 3);