mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 10:32:40 +00:00
C64: another tiny fix
also document conversion approach
This commit is contained in:
parent
592a3f102a
commit
e29113c926
3 changed files with 47 additions and 4 deletions
|
@ -634,7 +634,9 @@ size | description
|
|||
1 | osc sync
|
||||
1 | to filter
|
||||
1 | init filter
|
||||
1 | vol macro is cutoff
|
||||
1 | vol macro is cutoff (<187) or reserved
|
||||
| - from version 187 onwards, volume and cutoff macros are separate.
|
||||
| - if this is on and the version is less than 187, move the volume macro into the ALG one.
|
||||
1 | resonance
|
||||
1 | low pass
|
||||
1 | band pass
|
||||
|
@ -1122,6 +1124,23 @@ size | description
|
|||
- `val[14]`: loop
|
||||
- `val[15]`: global (not sure how will I implement this)
|
||||
|
||||
## 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.
|
||||
|
||||
if version is less than 187, you must convert these:
|
||||
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.
|
||||
4. if ex3 is not a Sequence type macro, stop here.
|
||||
5. if ex3 macro length is 0, stop here.
|
||||
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.
|
||||
|
||||
don't worry about loop or release...
|
||||
|
||||
# wavetable
|
||||
|
||||
```
|
||||
|
|
|
@ -295,7 +295,9 @@ size | description
|
|||
1 | flags 1
|
||||
| - bit 7: dutyIsAbs
|
||||
| - bit 6: initFilter
|
||||
| - bit 5: volIsCutoff
|
||||
| - bit 5: volIsCutoff (<187)
|
||||
| - from version 187 onwards, volume and cutoff macros are separate.
|
||||
| - if this is on and the version is less than 187, move the volume macro into the ALG one.
|
||||
| - bit 4: toFilter
|
||||
| - bit 3: noise on
|
||||
| - bit 2: pulse on
|
||||
|
@ -322,6 +324,23 @@ size | description
|
|||
| - bit 0-10: cutoff
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
if version is less than 187, you must convert these:
|
||||
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.
|
||||
4. if ex3 is not a Sequence type macro, stop here.
|
||||
5. if ex3 macro length is 0, stop here.
|
||||
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.
|
||||
|
||||
don't worry about loop or release...
|
||||
|
||||
# Game Boy data (GB)
|
||||
|
||||
```
|
||||
|
|
|
@ -3477,8 +3477,13 @@ void DivInstrument::convertC64SpecialMacro() {
|
|||
std.ex4Macro.val[i]=(std.ex4Macro.val[i]&1)?9:1;
|
||||
}
|
||||
|
||||
// merge ex3 into ex4
|
||||
if (std.ex3Macro.len>0) {
|
||||
// merge ex3 into ex4 if viable to
|
||||
if (std.ex3Macro.len>0 && !(std.ex3Macro.open&6)) {
|
||||
if (std.ex4Macro.len>0 && std.ex4Macro.len<maxLen) {
|
||||
for (int i=std.ex4Macro.len; i<maxLen; i++) {
|
||||
std.ex4Macro.val[i]=std.ex3Macro.val[std.ex4Macro.len-1];
|
||||
}
|
||||
}
|
||||
for (int i=0; i<maxLen; i++) {
|
||||
if (i>=std.ex3Macro.len) {
|
||||
std.ex4Macro.val[i]|=(std.ex3Macro.val[std.ex3Macro.len-1]&3)<<1;
|
||||
|
|
Loading…
Reference in a new issue