I need to unmute the DSP in order to allow expansion audio to play. I understand that this requires uploading code to the SPC. Looking at this document, the process looks pretty straightforward. However, this is only my second time even touching SPC code, and the first time was so far into a caffeine-fueled all-nighter, I am basically starting from scratch here. Now, all I want to do is unmute the DSP and then leave the SPC idle, so I feel like the SPC code should be as simple as:
The main thing missing from that link is the actual value of #SPCExec (the start-of-execution address). With that, it seems like all I need to do is transfer the 6-byte code block above and execute it, using the code example from that link verbatim, right? Or is there more to it than that?
Edit: derp, got my bitmask backwards
Code:
arch snes.smp
define REG_FLAG($6C)
define FLAG_ECHO(#$20)
define FLAG_MUTE(#$40)
lda {REG_FLAG} // E4 6C
ora {FLAG_ECHO} // 08 20
and ~{FLAG_MUTE} // 28 BF
sta {REG_FLAG} // C4 6C
-; bra - // 2F FE
define REG_FLAG($6C)
define FLAG_ECHO(#$20)
define FLAG_MUTE(#$40)
lda {REG_FLAG} // E4 6C
ora {FLAG_ECHO} // 08 20
and ~{FLAG_MUTE} // 28 BF
sta {REG_FLAG} // C4 6C
-; bra - // 2F FE
The main thing missing from that link is the actual value of #SPCExec (the start-of-execution address). With that, it seems like all I need to do is transfer the 6-byte code block above and execute it, using the code example from that link verbatim, right? Or is there more to it than that?
Edit: derp, got my bitmask backwards