From f841025ce6cfc0b4030f57a0c7110dea296a5832 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 7 Jul 2023 02:21:13 -0500 Subject: [PATCH] Game Boy: fix wave corruption this time for real thanks jvsTSX --- src/engine/platform/gb.cpp | 2 +- src/gui/about.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/gb.cpp b/src/engine/platform/gb.cpp index 683f97211..c5c66092e 100644 --- a/src/engine/platform/gb.cpp +++ b/src/engine/platform/gb.cpp @@ -322,7 +322,7 @@ void DivPlatformGB::tick(bool sysTick) { rWrite(16+i*5+4,((chan[i].keyOn||chan[i].keyOff)?0x80:0x00)|((chan[i].soundLen<64)<<6)); } else { rWrite(16+i*5+3,(2048-chan[i].freq)&0xff); - rWrite(16+i*5+4,(((2048-chan[i].freq)>>8)&7)|((chan[i].keyOn||chan[i].keyOff)?0x80:0x00)|((chan[i].soundLen<63)<<6)); + rWrite(16+i*5+4,(((2048-chan[i].freq)>>8)&7)|((chan[i].keyOn||(chan[i].keyOff && i!=2))?0x80:0x00)|((chan[i].soundLen<63)<<6)); } if (enoughAlready) { // more compat garbage rWrite(16+i*5+1,((chan[i].duty&3)<<6)|(63-(chan[i].soundLen&63))); diff --git a/src/gui/about.cpp b/src/gui/about.cpp index 2aef20b9e..7afd015c1 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -134,6 +134,7 @@ const char* aboutLine[]={ "fd", "GENATARi", "host12prog", + "jvsTSX", "Lumigado", "Lunathir", "plane",