initial commit
[gbajam22] / libs / maxmod / mp_defs.inc
1 /****************************************************************************
2  *                                                          __              *
3  *                ____ ___  ____ __  ______ ___  ____  ____/ /              *
4  *               / __ `__ \/ __ `/ |/ / __ `__ \/ __ \/ __  /               *
5  *              / / / / / / /_/ />  </ / / / / / /_/ / /_/ /                *
6  *             /_/ /_/ /_/\__,_/_/|_/_/ /_/ /_/\____/\__,_/                 *
7  *                                                                          *
8  *         Copyright (c) 2008, Mukunda Johnson (mukunda@maxmod.org)         *
9  *                                                                          *
10  * Permission to use, copy, modify, and/or distribute this software for any *
11  * purpose with or without fee is hereby granted, provided that the above   *
12  * copyright notice and this permission notice appear in all copies.        *
13  *                                                                          *
14  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES *
15  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF         *
16  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR  *
17  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES   *
18  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN    *
19  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF  *
20  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.           *
21  ****************************************************************************/
22
23 #ifndef MP_DEFS_INC
24 #define MP_DEFS_INC
25
26 @ song 'mode' can be one of the following:
27 .equ            MPP_PLAY_LOOP   ,0
28 .equ            MPP_PLAY_ONCE   ,1
29 .equ            MPP_PLAY_JINGLE ,2
30
31 @ other definitions
32 #ifdef SYS_GBA
33
34 .struct 0
35 MM_GBA_SYSTEM_MODE:             .space 4
36 MM_GBA_SYSTEM_MCH_COUNT:        .space 4
37 MM_GBA_SYSTEM_ACH_COUNT:        .space 4
38 MM_GBA_SYSTEM_MODCH:            .space 4
39 MM_GBA_SYSTEM_ACTCH:            .space 4
40 MM_GBA_SYSTEM_MIXCH:            .space 4
41 MM_GBA_SYSTEM_MIXMEM:           .space 4
42 MM_GBA_SYSTEM_WAVEMEM:          .space 4
43 MM_GBA_SYSTEM_SOUNDBANK:        .space 4
44 MM_GBA_SYSTEM_SIZE:
45
46 .equ            SAMPFRAC,               12      @ # of bits used in fractional part of sample reading
47 #endif
48
49 .equ            MP_SCHANNELS    ,4
50
51 @ callback parameters
52
53 .equ    MMCB_SONGREQUEST        ,0x1A   @ nds9
54 .equ    MMCB_SAMPREQUEST        ,0x1B   @ nds9
55 .equ    MMCB_DELETESONG         ,0x1C   @ nds9
56 .equ    MMCB_DELETESAMPLE       ,0x1D   @ nds9
57
58 @.equ   MPCB_SAMPMEMORY         ,0x1E   @ ---
59 @.equ   MPCB_SONGMEMORY         ,0x1F   @ ---
60 .equ    MMCB_BANKMEMORY         ,0x1E   @ nds9
61
62 .equ    MPCB_SONGMESSAGE        ,0x2A   @ gba/nds7 song playback
63 .equ    MPCB_SONGFINISHED       ,0x2B   @ gba/nds7
64
65 .struct 0
66 mms_rate:       .space 4
67 mms_len:        .space 4
68 mms_function:   .space 4
69 mms_format:     .space 4
70 mms_timer:      .space 4
71 mms_manual:     .space 1
72 mms_size:
73
74 .struct 0                               // reverb cfg struct
75 mmrc_flags:             .space 4
76 mmrc_memory:            .space 4
77 mmrc_delay:             .space 2
78 mmrc_rate:              .space 2
79 mmrc_feedback:          .space 2
80 mmrc_panning:           .space 1
81
82 .equ    MMRFS_MEMORY,           0
83 .equ    MMRFS_DELAY,            1
84 .equ    MMRFS_RATE,             2
85 .equ    MMRFS_FEEDBACK,         3
86 .equ    MMRFS_PANNING,          4
87 .equ    MMRFS_LEFT,             5
88 .equ    MMRFS_RIGHT,            6
89 .equ    MMRFS_INVERSEPAN,       7
90 .equ    MMRFS_NODRYLEFT,        8
91 .equ    MMRFS_NODRYRIGHT,       9
92 .equ    MMRFS_8BITLEFT,         10
93 .equ    MMRFS_16BITLEFT,        11
94 .equ    MMRFS_8BITRIGHT,        12
95 .equ    MMRFS_16BITRIGHT,       13
96 .equ    MMRFS_DRYLEFT,          14
97 .equ    MMRFS_DRYRIGHT,         15
98
99 // reverbcfg flags
100 .equ    MMRF_MEMORY,    1<<MMRFS_MEMORY
101 .equ    MMRF_DELAY,     1<<MMRFS_DELAY
102 .equ    MMRF_RATE,      1<<MMRFS_RATE
103 .equ    MMRF_FEEDBACK,  1<<MMRFS_FEEDBACK
104 .equ    MMRF_PANNING,   1<<MMRFS_PANNING
105 .equ    MMRF_LEFT,      1<<MMRFS_LEFT
106 .equ    MMRF_RIGHT,     1<<MMRFS_RIGHT
107 .equ    MMRF_INVERSEPAN,1<<MMRFS_INVERSEPAN
108 .equ    MMRF_NODRYLEFT, 1<<MMRFS_DRYLEFT
109 .equ    MMRF_NODRYRIGHT,1<<MMRFS_DRYRIGHT
110 .equ    MMRF_8BITLEFT,  1<<MMRFS_8BITLEFT
111 .equ    MMRF_16BITLEFT, 1<<MMRFS_16BITLEFT
112 .equ    MMRF_8BITRIGHT, 1<<MMRFS_8BITRIGHT
113 .equ    MMRF_16BITRIGHT,1<<MMRFS_16BITRIGHT
114 .equ    MMRF_DRYLEFT,   1<<MMRFS_DRYLEFT
115 .equ    MMRF_DRYRIGHT,  1<<MMRFS_DRYRIGHT
116
117 #endif