From 79f1b350ae30741cb5ff4c54fcf32b50a1ab1268 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 11 Oct 2022 13:10:17 -0500 Subject: [PATCH] Virtual Boy: more mod table work --- src/engine/platform/vb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/vb.cpp b/src/engine/platform/vb.cpp index ddc1e568a..29ff6a934 100644 --- a/src/engine/platform/vb.cpp +++ b/src/engine/platform/vb.cpp @@ -310,12 +310,12 @@ int DivPlatformVB::dispatch(DivCommand c) { break; case DIV_CMD_FDS_MOD_DEPTH: // set modulation if (c.chan!=4) break; - modulation=c.value; + modulation=(c.value<<4)&15; modType=true; chWrite(4,0x07,modulation); if (modulation!=0) { chan[c.chan].envHigh&=~0x70; - chan[c.chan].envHigh|=0x70; + chan[c.chan].envHigh|=0x40|((c.value&15)<<4); } else { chan[c.chan].envHigh&=~0x70; }