-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfamitone5.mfk
38 lines (36 loc) · 1.86 KB
/
famitone5.mfk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
array FT_TEMP [3] @$FD
array FT_VARS [256] @$300
//Change FT_DPCM_OFF to match what the famitone5 binary blob expects,
//normally $FC00
const word FT_DPCM_OFF = $FC00
const word FT_DPCM_PTR = (FT_DPCM_OFF&$3fff)>>6
//------------------------------------------------------------------------------
// reset APU, initialize FamiTone
// in: A 0 for PAL, not 0 for NTSC
// X,Y pointer to music data
//------------------------------------------------------------------------------
asm void FamiToneInit(byte a, word xy) @$C000 extern
//------------------------------------------------------------------------------
// play music
// in: A number of subsong
//------------------------------------------------------------------------------
asm void FamiToneMusicPlay(byte a) @$C093 extern
//------------------------------------------------------------------------------
// play sound effect
// in: A is a number of the sound effect
// X is offset of sound effect channel, should be FT_SFX_CH0..FT_SFX_CH3
//------------------------------------------------------------------------------
asm void FamiToneSfxPlay(byte a, byte x) @$C905 extern
//------------------------------------------------------------------------------
// init sound effects player, set pointer to data
// in: X,Y is address of sound effects data
//------------------------------------------------------------------------------
asm void FamiToneSfxInit(byte xy) @$C8CB extern
//------------------------------------------------------------------------------
// update FamiTone state, should be called every NMI
// in: none
//------------------------------------------------------------------------------
asm void FamiToneUpdate() @$C147 extern
//Binary blob of famitone5, change it's starting address depending
//on where it expects to be (normally $C000)
segment(prgrom) const array famitone5 @ $C000 = file("famitone5.bin")