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

@ -1525,6 +1525,14 @@ void DivInstrument::readFeatureMA(SafeReader& reader, short version) {
}
}
if (version<193) {
if (type==DIV_INS_AY || type==DIV_INS_AY8930) {
for (int j=0; j<std.waveMacro.len; j++) {
std.waveMacro.val[j]++;
}
}
}
READ_FEAT_END;
}
@ -2325,6 +2333,13 @@ DivDataErrors DivInstrument::readInsDataOld(SafeReader &reader, short version) {
std.dutyMacro.val[j]-=12;
}
}
if (version<193) {
if (type==DIV_INS_AY || type==DIV_INS_AY8930) {
for (int j=0; j<std.waveMacro.len; j++) {
std.waveMacro.val[j]++;
}
}
}
if (version>=17) {
READ_MACRO_VALS(std.pitchMacro.val,std.pitchMacro.len);
READ_MACRO_VALS(std.ex1Macro.val,std.ex1Macro.len);