games/gb: fix reversed audio channels
The high bits correspond to the left channel, and the low bits to the right channel. Reference: https://gbdev.io/pandocs/#sound-control-registers Tested with pokemon crystal.
This commit is contained in:
parent
e502abe001
commit
415c110b28
1 changed files with 4 additions and 4 deletions
|
@ -115,13 +115,13 @@ filter(int t)
|
||||||
if(i == 2 ? ((reg[NR30] & 0x80) == 0) : ((*sndch[i].env & 0xf8) == 0))
|
if(i == 2 ? ((reg[NR30] & 0x80) == 0) : ((*sndch[i].env & 0xf8) == 0))
|
||||||
continue;
|
continue;
|
||||||
v = sndch[i].samp * 2 - 15;
|
v = sndch[i].samp * 2 - 15;
|
||||||
if((cnth & 1<<i) != 0)
|
|
||||||
ov0 += v;
|
|
||||||
if((cnth & 1<<4<<i) != 0)
|
if((cnth & 1<<4<<i) != 0)
|
||||||
|
ov0 += v;
|
||||||
|
if((cnth & 1<<i) != 0)
|
||||||
ov1 += v;
|
ov1 += v;
|
||||||
}
|
}
|
||||||
ov0 *= 1 + (cntl & 7);
|
ov0 *= 1 + (cntl >> 4 & 7);
|
||||||
ov1 *= 1 + (cntl >> 4 & 7);
|
ov1 *= 1 + (cntl & 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue