Furnace VGM to SMPS to ASM causing instruments to not be loaded.

Discussion in 'Discussion & Q&A' started by Saum22, Mar 9, 2024.

  1. Saum22

    Saum22 Newcomer Member

    Joined:
    Sep 25, 2022
    Messages:
    12
    I converted a segment of BIG SHOT over to Furnace in order to see if I could port over more naturally-created music than Midi2SMPS conversions would allow for, and during the conversion, the header for the FM and PSG instruments has the Header's call for each instrument locked.

    Here is the converted assembly code.

    Code:
    Fun_Header:
        sHeaderInit
        sHeaderPatch    Fun_Patches
        sHeaderCh    $07, $03
        sHeaderTempo    $01, $00
        sHeaderDAC    Fun_DAC1
    
    Fun_DAC1:
        sStop
        sHeaderFM    Fun_FM1, $00, $00
        sHeaderFM    Fun_FM2, $00, $00
        sHeaderFM    Fun_FM3, $00, $00
        sHeaderFM    Fun_FM4, $00, $00
        sHeaderFM    Fun_FM1, $00, $00
        sHeaderFM    Fun_FM1, $00, $00
        sHeaderPSG    Fun_FM1, $00, $00, $00, v00
        sHeaderPSG    Fun_FM1, $00, $00, $00, v00
        sHeaderPSG    Fun_FM1, $00, $00, $00, v00
        dc.b $00, $00, $00, $00    ; Unused
    
    Fun_FM1:
        sStop
    
    Fun_FM2:
        sPatFM        $00
        sPan        spCenter
        dc.b nRst, $0C
        sPatFM        $01
        saVolFM        $09
        dc.b nBb5, $01
    
    Fun_Jump1:
        dc.b sHold, nBb5, $05, nRst, $0C, nBb5, $06, nRst
        dc.b $0C, nBb5, $06, nRst, $0C, nCs6, $06, nRst
        dc.b $0C, nEb6, $06, nRst, $12, nBb5, $06, nRst
        dc.b $0C, nBb5, $06, nRst, $0C, nE6, $06, nRst
        dc.b $0C, nCs6, $06, nRst, $0C, nEb6, $06, nRst
        dc.b $12, nBb5, $06, nRst, $0C, nBb5, $06, nRst
        dc.b $0C, nBb5, $06, nRst, $0C, nCs6, $06, nRst
        dc.b $0C, nEb6, $06, nRst, $12, nBb5, $06, nRst
        dc.b $0C, nBb5, $06, nRst, $0C, nAb5, $06, nRst
        dc.b $0C, nA5, $06, nRst, $0C, nBb5, $06, nRst
        dc.b $12, nBb5, $01
        sPan        spCenter
        sJump        Fun_Jump1
    
    Fun_FM3:
        sPatFM        $00
        sPan        spCenter
        dc.b nRst, $0C
        sPatFM        $01
        saVolFM        $09
        dc.b nBb3, $01
    
    Fun_Jump2:
        dc.b sHold, nBb3, $05, nRst, $0C, nBb3, $06, nRst
        dc.b $0C, nBb3, $06, nRst, $0C, nCs4, $06, nRst
        dc.b $0C, nEb4, $06, nRst, $12, nBb3, $06, nRst
        dc.b $0C, nBb3, $06, nRst, $0C, nE4, $06, nRst
        dc.b $0C, nCs4, $06, nRst, $0C, nEb4, $06, nRst
        dc.b $12, nBb3, $06, nRst, $0C, nBb3, $06, nRst
        dc.b $0C, nBb3, $06, nRst, $0C, nCs4, $06, nRst
        dc.b $0C, nEb4, $06, nRst, $12, nBb3, $06, nRst
        dc.b $0C, nBb3, $06, nRst, $0C, nAb3, $06, nRst
        dc.b $0C, nA3, $06, nRst, $0C, nBb3, $06, nRst
        dc.b $12, nBb3, $01
        sPan        spCenter
        sJump        Fun_Jump2
    
    Fun_FM4:
        sPatFM        $00
        sPan        spCenter
        dc.b nRst, $0C
        sPatFM        $01
        saVolFM        $09
        dc.b nBb4, $01
    
    Fun_Jump3:
        dc.b sHold, nBb4, $05, nRst, $0C, nBb4, $06, nRst
        dc.b $0C, nBb4, $06, nRst, $0C, nCs5, $06, nRst
        dc.b $0C, nEb5, $06, nRst, $12, nBb4, $06, nRst
        dc.b $0C, nBb4, $06, nRst, $0C, nE5, $06, nRst
        dc.b $0C, nCs5, $06, nRst, $0C, nEb5, $06, nRst
        dc.b $12, nBb4, $06, nRst, $0C, nBb4, $06, nRst
        dc.b $0C, nBb4, $06, nRst, $0C, nCs5, $06, nRst
        dc.b $0C, nEb5, $06, nRst, $12, nBb4, $06, nRst
        dc.b $0C, nBb4, $06, nRst, $0C, nAb4, $06, nRst
        dc.b $0C, nA4, $06, nRst, $0C, nBb4, $06, nRst
        dc.b $12, nBb4, $01
        sPan        spCenter
        sJump        Fun_Jump3
    
    Fun_Patches:
    
        ; Patch $00
        ; $00
        ; $00, $00, $00, $00,    $00, $00, $00, $00
        ; $00, $00, $00, $00,    $00, $00, $00, $00
        ; $FF, $FF, $FF, $FF,    $00, $00, $00, $00
        spAlgorithm    $00
        spFeedback    $00
        spDetune    $00, $00, $00, $00
        spMultiple    $00, $00, $00, $00
        spRateScale    $00, $00, $00, $00
        spAttackRt    $00, $00, $00, $00
        spAmpMod    $00, $00, $00, $00
        spSustainRt    $00, $00, $00, $00
        spSustainLv    $0F, $0F, $0F, $0F
        spDecayRt    $00, $00, $00, $00
        spReleaseRt    $0F, $0F, $0F, $0F
        spTotalLv    $00, $00, $00, $00
    
        ; Patch $01
        ; $27
        ; $22, $71, $20, $71,    $19, $1F, $1F, $1B
        ; $08, $0A, $04, $81,    $0C, $00, $10, $04
        ; $53, $F4, $45, $A9,    $05, $15, $0C, $00
        spAlgorithm    $07
        spFeedback    $04
        spDetune    $02, $02, $07, $07
        spMultiple    $02, $00, $01, $01
        spRateScale    $00, $00, $00, $00
        spAttackRt    $19, $1F, $1F, $1B
        spAmpMod    $00, $00, $00, $01
        spSustainRt    $08, $04, $0A, $01
        spSustainLv    $05, $04, $0F, $0A
        spDecayRt    $0C, $10, $00, $04
        spReleaseRt    $03, $05, $04, $09
        spTotalLv    $05, $0C, $15, $00
    
     
  2. Devon

    Devon help me, i am in hell Member

    Joined:
    Aug 26, 2013
    Messages:
    1,406
    Location:
    your mom
    The header doesn't have any of the FM tracks properly defined, so you gotta add them after the DAC one (see the smps2asm header file to see how an FM track is defined in the header). And since there's 1 DAC track, 4 FM tracks, and 0 PSG tracks, sHeaderCh's parameters should be changed to $05 and $00.
     
    ProjectFM likes this.
  3. Saum22

    Saum22 Newcomer Member

    Joined:
    Sep 25, 2022
    Messages:
    12
    oh
     
    nineko likes this.