C64: more fixes...

This commit is contained in:
tildearrow 2023-10-29 03:12:33 -05:00
parent e29113c926
commit 7575e7a4a7
3 changed files with 22 additions and 4 deletions

View file

@ -1127,9 +1127,9 @@ size | description
## C64 compatibility note (>=187)
in Furnace dev187 the volume and cutoff macros have been separated, as noted above.
however, there's another change as well: a new, improved Special macro.
however, there are two other changes as well: **inverted relative (non-absolute) cutoff macro**; and a new, improved Special macro.
if version is less than 187, you must convert these:
if version is less than 187, you must convert the Special macro:
1. do not continue if ex4 is not a Sequence type macro!
2. move bit 0 of ex4 macro data into bit 3.
3. set bit 0 on all steps of ex4 macro to 1.
@ -1138,6 +1138,7 @@ if version is less than 187, you must convert these:
6. merge the ex3 macro (former Special) into ex4 (former Test).
- use the largest size (between ex3 and ex4).
- if the ex3 macro is shorter than the ex4 one, use the last value of ex3, and vice-versa.
- if the ex4 macro length is 0, expand it to the largest size, and set all steps to 1.
don't worry about loop or release...

View file

@ -327,9 +327,9 @@ size | description
## C64 compatibility note (>=187)
in Furnace dev187 the volume and cutoff macros have been separated, as noted above.
however, there's another change as well: a new, improved Special macro.
however, there are two other changes as well: **inverted relative (non-absolute) cutoff macro**; and a new, improved Special macro.
if version is less than 187, you must convert these:
if version is less than 187, you must convert the Special macro:
1. do not continue if ex4 is not a Sequence type macro!
2. move bit 0 of ex4 macro data into bit 3.
3. set bit 0 on all steps of ex4 macro to 1.
@ -338,6 +338,7 @@ if version is less than 187, you must convert these:
6. merge the ex3 macro (former Special) into ex4 (former Test).
- use the largest size (between ex3 and ex4).
- if the ex3 macro is shorter than the ex4 one, use the last value of ex3, and vice-versa.
- if the ex4 macro length is 0, expand it to the largest size, and set all steps to 1.
don't worry about loop or release...

View file

@ -2683,6 +2683,12 @@ DivDataErrors DivInstrument::readInsDataNew(SafeReader& reader, short version, b
memcpy(&std.algMacro,&std.volMacro,sizeof(DivInstrumentMacro));
std.algMacro.macroType=DIV_MACRO_ALG;
std.volMacro=DivInstrumentMacro(DIV_MACRO_VOL,true);
if (!c64.filterIsAbs) {
for (int i=0; i<std.algMacro.len; i++) {
std.algMacro.val[i]=-std.algMacro.val[i];
}
}
}
// <187 special/test/gate merge
@ -3429,6 +3435,12 @@ DivDataErrors DivInstrument::readInsDataOld(SafeReader &reader, short version) {
memcpy(&std.algMacro,&std.volMacro,sizeof(DivInstrumentMacro));
std.algMacro.macroType=DIV_MACRO_ALG;
std.volMacro=DivInstrumentMacro(DIV_MACRO_VOL,true);
if (!c64.filterIsAbs) {
for (int i=0; i<std.algMacro.len; i++) {
std.algMacro.val[i]=-std.algMacro.val[i];
}
}
}
// <187 special/test/gate merge
@ -3483,6 +3495,10 @@ void DivInstrument::convertC64SpecialMacro() {
for (int i=std.ex4Macro.len; i<maxLen; i++) {
std.ex4Macro.val[i]=std.ex3Macro.val[std.ex4Macro.len-1];
}
} else {
for (int i=0; i<maxLen; i++) {
std.ex4Macro.val[i]=1;
}
}
for (int i=0; i<maxLen; i++) {
if (i>=std.ex3Macro.len) {