The function names don't start with an underscore, so unless I modify the source code myself, I don't see a way to use the FamiTone functions in C.
I created a wrapper file that does the following since the FamiTone library doesn't include the export commands:
Code: Select all
.segment "CODE"
.include "famitone2.s"
.export FamiToneInit
.export FamiToneUpdate
.export FamiToneMusicPlay
.export FamiToneMusicStop
After all, this version here is not the best solution:
Code: Select all
_FamiToneMusicPlay:
JSR FamiToneMusicPlay
RTS
_FamiToneMusicStop:
JSR FamiToneMusicStop
RTS