Game Boy: fix wave corruption

this time for real
thanks jvsTSX
This commit is contained in:
tildearrow 2023-07-07 02:21:13 -05:00
parent 5c97f9981a
commit f841025ce6
2 changed files with 2 additions and 1 deletions

View File

@ -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)));

View File

@ -134,6 +134,7 @@ const char* aboutLine[]={
"fd",
"GENATARi",
"host12prog",
"jvsTSX",
"Lumigado",
"Lunathir",
"plane",