Rev 866 | Rev 934 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
828 | tk | 1 | ; $Id: setup_sammich_sid.asm 869 2009-12-08 21:52:43Z tk $ |
2 | LIST R=DEC |
||
3 | ; |
||
866 | nils | 4 | ; Prepared Setup File for sammichSID |
828 | tk | 5 | ; |
6 | |||
7 | ;; BankStick Chip Select Address for "ensembles" |
||
8 | ;; -1: only one ensemble available, stored in internal EEPROM |
||
9 | ;; 0..7: CS# configuration of BankStick (Pin 1, 2 and 3) |
||
10 | ;; reminder for default value 7: Pin 1, 2 and 3 have connected to +5V |
||
11 | ;; a 32k BankStick 24LC256 is sufficient for 128 storable ensembles |
||
12 | ;; a 64k BankStick will also work, but doesn't increase the number of available ensembles |
||
13 | #define DEFAULT_ENS_BS_CS 7 |
||
14 | |||
15 | ;; select default filter calibration value |
||
16 | ;; expecting 12bit values (0..4095) |
||
17 | ;; will be overwritten by ensemble setting - this is only used as default value for BankStick initialisation! |
||
18 | #define DEFAULT_FILTER_CALI_MIN 0 |
||
19 | #define DEFAULT_FILTER_CALI_MAX 1536 |
||
20 | |||
21 | ;; number of visible menu items on LCD |
||
22 | ;; use: 4 for 2x16 displays |
||
23 | ;; 5 for 2x20 displays |
||
24 | ;; 10 for 2x40 displays |
||
25 | #define CS_MENU_DISPLAYED_ITEMS 5 |
||
26 | ;; NOTE: if CS_MENU_DISPLAYED_ITEMS > 5, you have to adapt the DIN settings |
||
27 | ;; in CS_MENU_DIN_TABLE below |
||
28 | |||
29 | ;; number of LCD lines (supported: 2 for 2x* LCDs and 4 for 4x* LCDs) |
||
30 | #define DEFAULT_LCD_LINES 2 |
||
31 | |||
32 | ;; LCD line -> cursor offsets |
||
33 | #define DEFAULT_LCD_LINE_Y0 0x00 |
||
34 | #define DEFAULT_LCD_LINE_Y1 0x40 |
||
35 | #define DEFAULT_LCD_LINE_Y2 0x14 |
||
36 | #define DEFAULT_LCD_LINE_Y3 0x54 |
||
37 | |||
38 | ;; 1: LCD cursor will be set to current parameter position (clashes with bar graph which is enabled with DEFAULT_LCD_LINES >= 4) |
||
39 | ;; 0: disable this feature |
||
40 | #define DEFAULT_LCD_PRINT_CURSOR 0 |
||
41 | |||
42 | ;; Inc/Dec buttons or rotary encoder of data entry? |
||
43 | ;; use: 0 if rotary encoder should be used |
||
44 | ;; (pins of encoder are defined in MIOS_ENC_PIN_TABLE in this file) |
||
45 | ;; 1 if buttons should be used instead |
||
46 | #define CS_MENU_USE_INCDEC_BUTTONS 0 |
||
47 | |||
48 | ;; 0: J5 has no function at all (analog inputs don't need to be connected to ground) |
||
49 | ;; 1: J5 used for analog inputs - A0..A4 control Knob#1..#5, A5..A7 are not used at all |
||
50 | ;; 2: J5 used as digital output (pins can be added in CS_MENU_DOUT_TABLE as "shift register #0") |
||
51 | ;; 3: J5 used as digital output for external switches (replacement for DEFAULT_EXT_SWITCH_DOUT, AOUT_INTERFACE_TYPE must be != 0) |
||
52 | #define DEFAULT_J5_FUNCTION 0 |
||
53 | |||
54 | ;; DOUT/DIN shift register matrix: |
||
55 | ;; define the DOUT shift register (1-16) to which the cathodes are connected (common line driver) |
||
56 | ;; 0 disables this shift register (doesn't make much sense) |
||
835 | tk | 57 | #define DEFAULT_SRM_CATHODES 1 |
828 | tk | 58 | |
59 | ;; define the DOUT shift register (1-16) to which the anodes of the modulation matrix are connected |
||
60 | ;; 0 disables this shift register |
||
835 | tk | 61 | #define DEFAULT_SRM_MODMATRIX_DOUT 2 |
828 | tk | 62 | |
63 | ;; optional LED/Button Matrix (used by "Wilba's Board" to reduce number of shift registers) |
||
64 | ;; define the DOUT shift register (1-16) to which the anodes of the LED matrix are connected |
||
65 | ;; 0 disables the LED matrix function - LEDs have to be connected to individual DOUT pins |
||
66 | #define DEFAULT_SRM_LEDS_DOUT 0 |
||
67 | |||
68 | ;; define the DIN shift register (1-16) to which the button matrix is connected |
||
69 | ;; 0 disables the button matrix function - Buttons have to be connected to individual DIN pins |
||
70 | #define DEFAULT_SRM_BUTTONS_DIN 0 |
||
71 | |||
72 | ;; define the number of shift registers (1-16) in the SRIO chain (DIN/DOUT shift registers) |
||
73 | ;; use the number of the longest chain - e.g. 4 DOUT registers, 10 DIN registers: use 10 |
||
74 | ;; 0 disables the SRIO chain |
||
835 | tk | 75 | #define DEFAULT_SRIO_NUMBER 2 |
828 | tk | 76 | |
77 | |||
78 | ;; define the AOUT interface which is used here: |
||
79 | ;; 1: one MBHP_AOUT module |
||
80 | ;; 2: up to 4 (chained) MBHP_AOUT_LC modules |
||
81 | ;; 3: one MBHP_AOUT_NG module |
||
82 | ;; all other values invalid! |
||
83 | #define AOUT_INTERFACE_TYPE 0 |
||
84 | |||
85 | ;; only relevant if one or more AOUT_LC modules are used: |
||
86 | ;; define the resolution configuration here |
||
87 | ;; 0: first channel 12bit, second channel 4bit |
||
88 | ;; 1: first channel 8bit, second channel 8bit |
||
89 | ;; 2: combines M1,M2 and/or M3/M4: first channel 12bit, second channel 12bit, third channel 8bit, fourth channel ignored! |
||
90 | ;; all other values invalid! |
||
91 | #define AOUT_LC_RESOLUTION_OPTION_M1 0 |
||
92 | #define AOUT_LC_RESOLUTION_OPTION_M2 0 |
||
93 | #define AOUT_LC_RESOLUTION_OPTION_M3 0 |
||
94 | #define AOUT_LC_RESOLUTION_OPTION_M4 0 |
||
95 | |||
96 | |||
97 | ;; the 8 external switches can be routed to a DOUT shift register: |
||
98 | ;; 0: not used |
||
99 | ;; 1-16: DOUT SR#1..#16 |
||
100 | #define DEFAULT_EXT_SWITCH_DOUT 0 |
||
101 | |||
102 | ;; 0: SwinSID extensions disabled |
||
103 | ;; 1: SwinSID extensions enabled |
||
104 | #define DEFAULT_ENABLE_SWINSID 0 |
||
105 | |||
106 | ;; 0: only waveform 0-8 selectable |
||
107 | ;; 1: waveform 0-15 selectable (e.g. for selecting additional SwinSID Waveforms) |
||
108 | #define DEFAULT_ENABLE_UPPER_WAVEFORMS 0 |
||
109 | |||
110 | ;; assign the AOUT channels for the F2A (Filter to AOUT function) here |
||
111 | ;; we have 4 assignments for CutOff Left/Right and Resonance Left/Right |
||
112 | ;; 0 disables an assignment |
||
113 | #define DEFAULT_F2A_CUTOFF_L_AOUT 1 |
||
114 | #define DEFAULT_F2A_RESONANCE_L_AOUT 2 |
||
115 | #define DEFAULT_F2A_CUTOFF_R_AOUT 3 |
||
116 | #define DEFAULT_F2A_RESONANCE_R_AOUT 4 |
||
117 | |||
118 | ;; assign the AOUT channel for the V2A (Volume to AOUT function) here |
||
119 | ;; we have two assignments for the left/right SID channel |
||
120 | ;; 0 disables an assignment |
||
121 | #define DEFAULT_V2A_VOLUME_L_AOUT 5 |
||
122 | #define DEFAULT_V2A_VOLUME_R_AOUT 6 |
||
123 | |||
124 | ;; assign the AOUT channel for the P2A (Pulsewidth to AOUT function) here |
||
125 | ;; we have six assignments for all oscillators (left/right channel) |
||
126 | ;; note that there is a channel conflict between other *2A functions - adaption for your setup required! |
||
127 | ;; 0 disables an assignment |
||
128 | #define DEFAULT_P2A_OSC1_L_AOUT 5 |
||
129 | #define DEFAULT_P2A_OSC2_L_AOUT 0 |
||
130 | #define DEFAULT_P2A_OSC3_L_AOUT 0 |
||
131 | #define DEFAULT_P2A_OSC1_R_AOUT 6 |
||
132 | #define DEFAULT_P2A_OSC2_R_AOUT 0 |
||
133 | #define DEFAULT_P2A_OSC3_R_AOUT 0 |
||
134 | |||
135 | ;; assign the AOUT channel for the K2A (Key to AOUT function) here |
||
136 | ;; we have six assignments for all oscillators (left/right channel) |
||
137 | ;; note that there is a channel conflict between other *2A functions - adaption for your setup required! |
||
138 | ;; 0 disables an assignment |
||
139 | #define DEFAULT_K2A_OSC1_L_AOUT 7 |
||
140 | #define DEFAULT_K2A_OSC2_L_AOUT 0 |
||
141 | #define DEFAULT_K2A_OSC3_L_AOUT 0 |
||
142 | #define DEFAULT_K2A_OSC1_R_AOUT 8 |
||
143 | #define DEFAULT_K2A_OSC2_R_AOUT 0 |
||
144 | #define DEFAULT_K2A_OSC3_R_AOUT 0 |
||
145 | |||
146 | ;; assign the AOUT channel for the O2A (Oscillator Frequency to AOUT function) here |
||
147 | ;; we have six assignments for all oscillators (left/right channel) |
||
148 | ;; note that there is a channel conflict between other *2A functions - adaption for your setup required! |
||
149 | ;; note also, that with O2A enabled, the connected SIDs won't output the correct frequencies anymore |
||
150 | ;; 0 disables an assignment |
||
151 | #define DEFAULT_O2A_OSC1_L_AOUT 7 |
||
152 | #define DEFAULT_O2A_OSC2_L_AOUT 0 |
||
153 | #define DEFAULT_O2A_OSC3_L_AOUT 0 |
||
154 | #define DEFAULT_O2A_OSC1_R_AOUT 8 |
||
155 | #define DEFAULT_O2A_OSC2_R_AOUT 0 |
||
156 | #define DEFAULT_O2A_OSC3_R_AOUT 0 |
||
157 | |||
158 | ;; gate/slide/accent of all 6 oscillators can be forwarded to the 8 digital outputs at J5 |
||
159 | ;; note that this overlays the switch assignments of the patch structure |
||
160 | ;; DEFAULT_J5_FUNCTION should be set to 3 if you are plannung to use this function. |
||
161 | ;; possible values: 0..8 - 0 disables an assignment |
||
162 | |||
163 | ;; (gate supported by all engines) |
||
164 | #define DEFAULT_GATE_OSC1_L_OUT 1 |
||
165 | #define DEFAULT_GATE_OSC2_L_OUT 0 |
||
166 | #define DEFAULT_GATE_OSC3_L_OUT 0 |
||
167 | #define DEFAULT_GATE_OSC1_R_OUT 2 |
||
168 | #define DEFAULT_GATE_OSC2_R_OUT 0 |
||
169 | #define DEFAULT_GATE_OSC3_R_OUT 0 |
||
170 | |||
171 | ;; (slide flag currently only supported by bassline engine) |
||
172 | #define DEFAULT_SLIDE_OSC1_L_OUT 0 |
||
173 | #define DEFAULT_SLIDE_OSC2_L_OUT 0 |
||
174 | #define DEFAULT_SLIDE_OSC3_L_OUT 0 |
||
175 | #define DEFAULT_SLIDE_OSC1_R_OUT 0 |
||
176 | #define DEFAULT_SLIDE_OSC2_R_OUT 0 |
||
177 | #define DEFAULT_SLIDE_OSC3_R_OUT 0 |
||
178 | |||
179 | ;; (accent flag currently only supported by bassline and drum engine) |
||
180 | #define DEFAULT_ACCENT_OSC1_L_OUT 0 |
||
181 | #define DEFAULT_ACCENT_OSC2_L_OUT 0 |
||
182 | #define DEFAULT_ACCENT_OSC3_L_OUT 0 |
||
183 | #define DEFAULT_ACCENT_OSC1_R_OUT 0 |
||
184 | #define DEFAULT_ACCENT_OSC2_R_OUT 0 |
||
185 | #define DEFAULT_ACCENT_OSC3_R_OUT 0 |
||
186 | |||
187 | |||
188 | ;; sets the default display mode for the LED matrix |
||
189 | ;; 0: shows modulation assignments after power-on |
||
190 | ;; 1: shows modulation meters after power-on |
||
191 | ;; mode 0/1 can be toggled by pressing two mod target buttons at the same time (e.g. O1 and O2 Pitch) |
||
192 | ;; or by using a dedicated button (-> CS_MENU_BUTTON_M_Mode) |
||
835 | tk | 193 | #define DEFAULT_LEDMATRIX_MODE 1 |
828 | tk | 194 | |
195 | ;; if != 0, special variations for MB6582 hardware will be selected |
||
196 | #define DEFAULT_MB6582_CS 0 |
||
197 | |||
835 | tk | 198 | ;; if != 0, special variations for sammichSID hardware will be selected |
199 | #define DEFAULT_SAMMICHSID_CS 1 |
||
200 | |||
828 | tk | 201 | ;; if != 0, EDIT button won't store patch |
202 | ;; actually this doesn't really make sense - but this function could be useful if you |
||
203 | ;; want to demonstrate your MBSID to friends and ensure, that they won't unintentionally |
||
204 | ;; overwrite your patches |
||
205 | #define DEFAULT_DISABLE_EDIT_STORE_FUNCTION 0 |
||
206 | |||
207 | |||
208 | org 0x3082 ; never change the origin! |
||
209 | ; ========================================================================== |
||
210 | ; In this table all button functions are mapped to the DIN pins |
||
211 | ; |
||
212 | ; The function name can be found on the left, the shift register and pin |
||
213 | ; number on the right side. |
||
214 | ; |
||
215 | ; SR/pin numbers: |
||
216 | ; SR = 1 for the first DIN shift register |
||
217 | ; SR = 2 for the second DIN shift register |
||
218 | ; ... |
||
219 | ; SR = 16 for the last DIN shift register |
||
220 | ; |
||
221 | ; Pin = 0 for the D0 input pin of the shift register |
||
222 | ; Pin = 1 for the D1 input pin of the shift register |
||
223 | ; ... |
||
224 | ; Pin = 7 for the last input pin (D7) of the shift register |
||
225 | ; |
||
226 | ; Set the SR and pin number to 0 if a button function should not be used |
||
227 | ; or remove the entry |
||
228 | ; |
||
229 | ; Add +16 to the SR number if the button is part of the button matrix |
||
230 | ; (DEFAULT_SRM_BUTTONS_DIN must be > 0!) |
||
231 | ; |
||
232 | ; The table must be terminated with DIN_ENTRY_EOT! |
||
233 | ; ========================================================================== |
||
234 | |||
235 | DIN_ENTRY MACRO function, sr, pin |
||
236 | dw function, (pin + 8*(sr-1)) & 0xff |
||
237 | ENDM |
||
238 | |||
239 | DIN_ENTRY_EOT MACRO |
||
240 | dw 0x0000, 0x0000 |
||
241 | ENDM |
||
242 | |||
243 | CS_MENU_DIN_TABLE |
||
244 | ;; Function name SR# Pin# |
||
835 | tk | 245 | DIN_ENTRY CS_MENU_BUTTON_Dec, 0, 0 ; only valid if rotary encoder not assigned to these pins |
246 | DIN_ENTRY CS_MENU_BUTTON_Inc, 0, 0 ; (see MIOS_ENC_PIN_TABLE) and CS_MENU_USE_INCDEC_BUTTONS == 1 |
||
247 | DIN_ENTRY CS_MENU_BUTTON_Exec, 2, 0 |
||
248 | DIN_ENTRY CS_MENU_BUTTON_Sel1, 1, 4 |
||
249 | DIN_ENTRY CS_MENU_BUTTON_Sel2, 1, 5 |
||
250 | DIN_ENTRY CS_MENU_BUTTON_Sel3, 1, 6 |
||
251 | DIN_ENTRY CS_MENU_BUTTON_Sel4, 1, 7 |
||
252 | DIN_ENTRY CS_MENU_BUTTON_Sel5, 1, 0 |
||
828 | tk | 253 | DIN_ENTRY CS_MENU_BUTTON_Sel6, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 |
254 | DIN_ENTRY CS_MENU_BUTTON_Sel7, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 |
||
255 | DIN_ENTRY CS_MENU_BUTTON_Sel8, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 |
||
256 | DIN_ENTRY CS_MENU_BUTTON_Sel9, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 |
||
257 | DIN_ENTRY CS_MENU_BUTTON_Sel10, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 |
||
258 | |||
835 | tk | 259 | DIN_ENTRY CS_MENU_BUTTON_SID1, 0, 0 |
260 | DIN_ENTRY CS_MENU_BUTTON_SID2, 0, 0 |
||
261 | DIN_ENTRY CS_MENU_BUTTON_SID3, 0, 0 |
||
262 | DIN_ENTRY CS_MENU_BUTTON_SID4, 0, 0 |
||
263 | DIN_ENTRY CS_MENU_BUTTON_Shift, 2, 2 ; was: link button |
||
264 | DIN_ENTRY CS_MENU_BUTTON_CC_PageUp, 2, 1 ; combined CC/PageUp -- CC actived together with shift button (no error) |
||
265 | DIN_ENTRY CS_MENU_BUTTON_Edit_PageDown, 2, 3 ; combined Edit/PageDown -- Edit actived together with shift button (no error) |
||
828 | tk | 266 | |
835 | tk | 267 | DIN_ENTRY CS_MENU_BUTTON_Osc_Sel, 0, 0 |
268 | DIN_ENTRY CS_MENU_BUTTON_Osc_Ctrl, 0, 0 |
||
269 | DIN_ENTRY CS_MENU_BUTTON_Osc_Wav, 0, 0 |
||
270 | DIN_ENTRY CS_MENU_BUTTON_Osc_RS, 0, 0 |
||
828 | tk | 271 | |
835 | tk | 272 | DIN_ENTRY CS_MENU_BUTTON_LFO_Sel, 0, 0 |
273 | DIN_ENTRY CS_MENU_BUTTON_LFO_Wav, 0, 0 |
||
828 | tk | 274 | |
835 | tk | 275 | DIN_ENTRY CS_MENU_BUTTON_Env_Sel, 0, 0 |
276 | DIN_ENTRY CS_MENU_BUTTON_Env_Ctrl, 0, 0 |
||
828 | tk | 277 | |
835 | tk | 278 | DIN_ENTRY CS_MENU_BUTTON_Fil_Sel, 0, 0 |
279 | DIN_ENTRY CS_MENU_BUTTON_Fil_Mod, 0, 0 |
||
828 | tk | 280 | |
835 | tk | 281 | DIN_ENTRY CS_MENU_BUTTON_M_O1Ptch, 0, 0 |
282 | DIN_ENTRY CS_MENU_BUTTON_M_O2Ptch, 0, 0 |
||
283 | DIN_ENTRY CS_MENU_BUTTON_M_O3Ptch, 0, 0 |
||
284 | DIN_ENTRY CS_MENU_BUTTON_M_O1PW, 0, 0 |
||
285 | DIN_ENTRY CS_MENU_BUTTON_M_O2PW, 0, 0 |
||
286 | DIN_ENTRY CS_MENU_BUTTON_M_O3PW, 0, 0 |
||
287 | DIN_ENTRY CS_MENU_BUTTON_M_Filter, 0, 0 |
||
288 | DIN_ENTRY CS_MENU_BUTTON_M_E1, 0, 0 |
||
289 | DIN_ENTRY CS_MENU_BUTTON_M_E2, 0, 0 |
||
290 | DIN_ENTRY CS_MENU_BUTTON_M_L1, 0, 0 |
||
291 | DIN_ENTRY CS_MENU_BUTTON_M_L2, 0, 0 |
||
292 | DIN_ENTRY CS_MENU_BUTTON_M_L3, 0, 0 |
||
293 | DIN_ENTRY CS_MENU_BUTTON_M_L4, 0, 0 |
||
294 | DIN_ENTRY CS_MENU_BUTTON_M_L5, 0, 0 |
||
295 | DIN_ENTRY CS_MENU_BUTTON_M_L6, 0, 0 |
||
828 | tk | 296 | |
297 | ;; new for MBSID V2 (additional ***optional*** buttons) |
||
298 | ;; don't worry, you still have full access to all functions w/o these buttons! |
||
299 | ;; note that you could also re-arrange the pin assignments if required (e.g. if you don't like a certain button function) |
||
835 | tk | 300 | DIN_ENTRY CS_MENU_BUTTON_M_Vol, 0, 0 ; matrix: button below M_Filter |
301 | DIN_ENTRY CS_MENU_BUTTON_Play, 1, 3 ; direct access to play function |
||
869 | tk | 302 | DIN_ENTRY CS_MENU_BUTTON_SID_LR, 0, 0 ; direct access to L/R toggling |
866 | nils | 303 | DIN_ENTRY CS_MENU_BUTTON_M_Mode, 0, 0 ; direct access to meter on/off function |
835 | tk | 304 | DIN_ENTRY CS_MENU_BUTTON_Fil_ExtIn, 0, 0 ; direct access to Filter ExtIn Flag |
305 | DIN_ENTRY CS_MENU_BUTTON_Sync, 0, 0 ; jumps to ENS->CLK menu |
||
869 | tk | 306 | DIN_ENTRY CS_MENU_BUTTON_Arp, 1, 1 ; enables/disables the arpeggiator of *all* oscillators |
307 | DIN_ENTRY CS_MENU_BUTTON_Knob, 1, 2 ; changes to knob menu |
||
828 | tk | 308 | |
835 | tk | 309 | ;; sammichSID buttons (SR#, Pin#) are F1=1,3 F2=1,2 F3=1,1 |
310 | |||
828 | tk | 311 | ;; don't remove this "end-of-table" entry! |
312 | DIN_ENTRY_EOT |
||
313 | |||
314 | |||
315 | ; ========================================================================== |
||
316 | ; The following table defines all available DOUT pins with the appr. |
||
317 | ; register and bit which is assigned to the pin |
||
318 | ; CS_MENU_LED_Update uses this table to update all LEDs |
||
319 | ; |
||
320 | ; The register name and bit number can be found on the left, |
||
321 | ; the shift register and pin number on the right side. |
||
322 | ; |
||
323 | ; SR/pin numbers: |
||
324 | ; SR = 0 for J5 pins (note: the DEFAULT_J5_FUNCTION switch has to be set to "2" to get this working) |
||
325 | ; |
||
326 | ; SR = 1 for the first DOUT shift register |
||
327 | ; SR = 2 for the second DOUT shift register |
||
328 | ; ... |
||
329 | ; SR = 16 for the last DOUT shift register |
||
330 | ; |
||
331 | ; Pin = 0 for the D7 output pin of the shift register |
||
332 | ; Pin = 1 for the D6 output pin of the shift register |
||
333 | ; ... |
||
334 | ; Pin = 7 for the last output pin (D0) of the shift register |
||
335 | ; |
||
336 | ; Set the SR and pin number to 0 if a LED function should not be used |
||
337 | ; |
||
338 | ; Add +16 to the SR number if the LED is part of the LED matrix |
||
339 | ; (DEFAULT_SRM_LEDS_DOUT must be > 0!) |
||
340 | ; |
||
341 | ; The table must be terminated with DOUT_ENTRY_EOT! |
||
342 | ; ========================================================================== |
||
343 | |||
344 | DOUT_ENTRY MACRO reg, bit, sr, pin |
||
345 | if sr == 0 ; J5 selected |
||
346 | dw reg, bit | ((pin | 0x80) << 8) |
||
347 | else ; SR selected |
||
348 | dw reg, bit | ((pin + 8*(sr-1)) << 8) |
||
349 | endif |
||
350 | ENDM |
||
351 | |||
352 | DOUT_ENTRY_EOT MACRO |
||
353 | dw 0x0000, 0x0000 |
||
354 | ENDM |
||
355 | |||
356 | CS_MENU_DOUT_TABLE |
||
357 | ;; Register and bit SR# Pin# Description |
||
835 | tk | 358 | DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 0, 0, 0 ; SID1 LED (Note: Pin #0 is the D7 output of first SR) |
359 | DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 1, 0, 0 ; SID2 LED |
||
360 | DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 2, 0, 0 ; SID3 LED |
||
361 | DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 3, 0, 0 ; SID4 LED |
||
828 | tk | 362 | |
835 | tk | 363 | DOUT_ENTRY CS_MENU_MODE, 0, 0, 0 ; Shift LED |
364 | DOUT_ENTRY CS_MENU_MODE, 1, 0, 0 ; CC LED |
||
365 | DOUT_ENTRY CS_MENU_MODE, 4, 0, 0 ; Edit LED |
||
828 | tk | 366 | |
835 | tk | 367 | DOUT_ENTRY CS_MENU_SELECTED_OSC_FLAGS, 0, 0, 0 ; OSC1 LED |
368 | DOUT_ENTRY CS_MENU_SELECTED_OSC_FLAGS, 1, 0, 0 ; OSC2 LED |
||
369 | DOUT_ENTRY CS_MENU_SELECTED_OSC_FLAGS, 2, 0, 0 ; OSC3 LED |
||
828 | tk | 370 | |
835 | tk | 371 | DOUT_ENTRY TMP1, 0, 0, 0 ; OSC Env LED |
372 | DOUT_ENTRY TMP1, 1, 0, 0 ; OSC Misc LED |
||
373 | DOUT_ENTRY TMP1, 2, 0, 0 ; OSC Assign LED |
||
828 | tk | 374 | |
835 | tk | 375 | DOUT_ENTRY TMP1, 4, 0, 0 ; OSC Triangle LED |
376 | DOUT_ENTRY TMP1, 5, 0, 0 ; OSC Saw LED |
||
377 | DOUT_ENTRY TMP1, 6, 0, 0 ; OSC Pulse LED |
||
378 | DOUT_ENTRY TMP1, 7, 0, 0 ; OSC Noise LED |
||
828 | tk | 379 | |
835 | tk | 380 | DOUT_ENTRY TMP2, 0, 0, 0 ; OSC Sync LED |
381 | DOUT_ENTRY TMP2, 1, 0, 0 ; OSC Ring LED |
||
828 | tk | 382 | |
835 | tk | 383 | DOUT_ENTRY TMP3, 0, 0, 0 ; Filter O1 LED |
384 | DOUT_ENTRY TMP3, 1, 0, 0 ; Filter O2 LED |
||
385 | DOUT_ENTRY TMP3, 2, 0, 0 ; Filter O3 LED |
||
386 | DOUT_ENTRY TMP3, 3, 0, 0 ; Filter Ext LED |
||
828 | tk | 387 | |
835 | tk | 388 | DOUT_ENTRY TMP3, 4, 0, 0 ; Filter LP LED |
389 | DOUT_ENTRY TMP3, 5, 0, 0 ; Filter BP LED |
||
390 | DOUT_ENTRY TMP3, 6, 0, 0 ; Filter HP LED |
||
391 | DOUT_ENTRY TMP3, 7, 0, 0 ; Filter 3O LED |
||
828 | tk | 392 | |
835 | tk | 393 | DOUT_ENTRY TMP2, 4, 0, 0 ; ENV1 LED |
394 | DOUT_ENTRY TMP2, 5, 0, 0 ; ENV2 LED |
||
828 | tk | 395 | |
835 | tk | 396 | DOUT_ENTRY TMP2, 6, 0, 0 ; ENV Ctrl LED |
397 | DOUT_ENTRY TMP2, 7, 0, 0 ; ENV Assign LED |
||
828 | tk | 398 | |
835 | tk | 399 | DOUT_ENTRY TMP4, 0, 0, 0 ; LFO1 LED |
400 | DOUT_ENTRY TMP4, 1, 0, 0 ; LFO2 LED |
||
401 | DOUT_ENTRY TMP4, 2, 0, 0 ; LFO3 LED |
||
402 | DOUT_ENTRY TMP4, 3, 0, 0 ; LFO4 LED |
||
403 | DOUT_ENTRY TMP4, 4, 0, 0 ; LFO5 LED |
||
404 | DOUT_ENTRY TMP4, 5, 0, 0 ; LFO6 LED |
||
828 | tk | 405 | |
835 | tk | 406 | DOUT_ENTRY TMP5, 0, 0, 0 ; LFO Sine LED |
407 | DOUT_ENTRY TMP5, 1, 0, 0 ; LFO Triangle LED |
||
408 | DOUT_ENTRY TMP5, 2, 0, 0 ; LFO Saw LED |
||
409 | DOUT_ENTRY TMP5, 3, 0, 0 ; LFO Pulse LED |
||
410 | DOUT_ENTRY TMP5, 4, 0, 0 ; LFO Random LED |
||
828 | tk | 411 | |
412 | |||
413 | ;; additional LED functions which could be added: |
||
414 | ;; o Play LED (TMP5, 6) |
||
415 | ;; o Mode Meter LED (TMP2, 2) |
||
416 | ;; o Mode Matrix LED (TMP2, 3) |
||
417 | ;; o SID L LED (TMP4, 6) |
||
418 | ;; o SID R LED (TMP4, 7) |
||
419 | ;; o LFO Positive LED (TMP5, 5) |
||
420 | |||
421 | ;; don't remove this "end-of-table" entry! |
||
422 | DOUT_ENTRY_EOT |
||
423 | |||
424 | |||
425 | ;; -------------------------------------------------------------------------- |
||
426 | ;; In this table DIN pins have to be assigned to rotary encoders for the |
||
427 | ;; MIOS_ENC driver |
||
428 | ;; |
||
429 | ;; up to 64 entries are provided, for MIDIbox SID 15 entries are expected |
||
430 | ;; |
||
431 | ;; The table must be terminated with an ENC_EOT entry. |
||
432 | ;; |
||
433 | ;; ENC_ENTRY provides following parameters |
||
434 | ;; o first parameter: number of shift register - 1, 2, 3, ... 16 |
||
435 | ;; o second parameter: number of pin; since two pins are necessary |
||
436 | ;; for each encoder, an even number is expected: 0, 2, 4 or 6 |
||
437 | ;; o the third parameter contains the encoder mode: |
||
438 | ;; either MIOS_ENC_MODE_NON_DETENTED |
||
439 | ;; or MIOS_ENC_MODE_DETENTED1 |
||
440 | ;; or MIOS_ENC_MODE_DETENTED2 |
||
441 | ;; or MIOS_ENC_MODE_DETENTED3 |
||
442 | ;; see also http://www.midibox.org/dokuwiki/doku.php?id=encoder_types |
||
443 | ;; |
||
444 | ;; Configuration Examples: |
||
445 | ;; ENC_ENTRY 1, 0, MIOS_ENC_MODE_NON_DETENTED ; non-detented encoder at pin 0 and 1 of SR 1 |
||
446 | ;; ENC_ENTRY 1, 2, MIOS_ENC_MODE_DETENTED ; detented encoder at pin 2 and 3 of SR 1 |
||
447 | ;; ENC_ENTRY 9, 6, MIOS_ENC_MODE_NON_DETENTED ; non-detented encoder at pin 6 and 7 of SR 9 |
||
448 | ;; -------------------------------------------------------------------------- |
||
449 | org 0x3280 ; never change the origin! |
||
450 | |||
451 | ;; encoder entry structure |
||
452 | ENC_ENTRY MACRO sr, din_0, mode |
||
453 | dw (mode << 8) | (din_0 + 8*(sr-1)) |
||
454 | ENDM |
||
455 | ENC_EOT MACRO |
||
456 | dw 0xffff |
||
457 | ENDM |
||
458 | |||
459 | MIOS_ENC_PIN_TABLE |
||
460 | ;; SR Pin Mode |
||
461 | #if CS_MENU_USE_INCDEC_BUTTONS == 0 |
||
835 | tk | 462 | ENC_ENTRY 2, 4, MIOS_ENC_MODE_DETENTED2 ; menu encoder |
828 | tk | 463 | #endif |
464 | |||
465 | ;; additional CS encoders |
||
466 | ;; SR Pin Mode |
||
866 | nils | 467 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Osc delay/transpose/assign #1 |
468 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Osc attack/finetune/assign #2 |
||
469 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Osc decay/portamento/assign #3 |
||
470 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Osc sustain/release/assign #4 |
||
471 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Osc release/pulsewidth/assign #5 |
||
828 | tk | 472 | |
866 | nils | 473 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; LFO rate |
474 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; LFO depth |
||
828 | tk | 475 | |
866 | nils | 476 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Filter CutOff |
477 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Filter Resonance |
||
828 | tk | 478 | |
866 | nils | 479 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Env depth/assign #1 |
480 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Env attack/assign #2 |
||
481 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Env decay/assign #3 |
||
482 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Env sustain/assign #4 |
||
483 | ENC_ENTRY 16, 0, MIOS_ENC_MODE_DETENTED2 ; Env release/assign #5 |
||
828 | tk | 484 | |
485 | ;; don't remove this "end-of-table" entry! |
||
486 | ENC_EOT |
||
487 | |||
488 | |||
489 | ;; include the rest of the application |
||
490 | #include "src/main.inc" |