dev193 - AY: fix wave macro

prior to this version, the wave macro was offset by 1
- 0 = square
- 1 = noise
- 2 = square + noise
- ...
due to Defle crap...

now it's no longer offset
- 0 = nothing
- 1 = square
- 2 = noise
- ...
This commit is contained in:
tildearrow 2024-02-19 18:58:50 -05:00
parent dbcd552811
commit b0be01146e
6 changed files with 34 additions and 10 deletions

View file

@ -256,9 +256,7 @@ void DivPlatformAY8930::tick(bool sysTick) {
}
if (chan[i].std.wave.had) {
if (!(chan[i].nextPSGMode.val&8)) {
// TODO: clean up.
// why does Defle start from 1?!
chan[i].nextPSGMode.val=(chan[i].std.wave.val+1)&7;
chan[i].nextPSGMode.val=chan[i].std.wave.val&7;
if (chan[i].active) {
chan[i].curPSGMode.val=chan[i].nextPSGMode.val;
}