Subversion Repositories svn.mios

Rev

Rev 1064 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
102 tk 1
;$Id: setup_808_default.asm 1176 2014-07-20 18:50:23Z tk $
194 tk 2
    LIST R=DEC
97 tk 3
;
4
; Default setup File for MB808
5
;
6
; Detailed infos for customization can be found at http://www.ucapps.de/midibox_seq_options.html
7
; and http://www.ucapps.de/midibox_808.html
8
;
9
; define the LCD display width:
10
;    16: for a 2x16 display
11
;    20: for a 2x20 display (no additional information - screen will be centered, thats all)
12
;    80: for two 2x40 displays
13
;    other values not supported!
14
#define DEFAULT_LCD_WIDTH 16
15
;
16
; Following table allows you to define
17
;   - the track names (must consist of exactly 6 characters!)
18
;   - the DOUT shift registers (SR) to which the drum triggers are connected
19
;     (1-16; 0 disables assignment)
20
;   - the DOUT pin to which the drum triggers are connected (0-7)
1064 tk 21
;     Note: since version v1.3 the "real" Dx pin number (D0..D7) has to be specified, in previous releases it was mirrored!
115 tk 22
;   - the MIDI output port (0=disabled, 1=Default, 2=Internal, 3=IIC1, 4=IIC2, 5=IIC3, 6=IIC4, 7=Trigger Only)
1064 tk 23
;   - the AOUT/CV channel to output velocity (1-16, 0=disabled)
24
;     Note: AOUT module only supports 8 highres channels, but CV outputs can also be realized with DOUTs (see DEFAULT_CV_DOUT* option)
97 tk 25
DEFAULT_TRKINFO MACRO
26
    ;;       Name     SR  Pin MPort AChn
1064 tk 27
    db  "BD    ",  1,  6,   1,    0 ; Track 1
28
    db  "SD    ",  1,  5,   1,    0 ; Track 2
29
    db  "LT/LC ",  1,  4,   1,    0 ; Track 3
30
    db  "MT/MC ",  1,  3,   1,    0 ; Track 4
31
    db  "HT/HC ",  1,  2,   1,    0 ; Track 5
32
    db  "CP    ",  1,  1,   1,    0 ; Track 6
33
    db  "MA    ",  1,  0,   1,    0 ; Track 7
34
    db  "RS/CL ",  4,  7,   1,    0 ; Track 8
35
    db  "CB    ",  4,  6,   1,    0 ; Track 9
36
    db  "CY    ",  4,  4,   1,    0 ; Track 10
37
    db  "OH    ",  4,  3,   1,    0 ; Track 11
38
    db  "CH    ",  4,  2,   1,    0 ; Track 12
97 tk 39
    db  "Ext1  ",  0,  0,   1,    0 ; Track 13
40
    db  "Ext2  ",  0,  0,   1,    0 ; Track 14
41
    db  "Ext3  ",  0,  0,   1,    0 ; Track 15
1064 tk 42
    db  "Acc.  ",  7,  0,   7,    0 ; Track 16
97 tk 43
    ENDM
44
;
198 tk 45
; define the track which is used for global accent
46
; (0=disabled, 1-16: track number)
47
#define DEFAULT_GLOBAL_ACCENT_TRK 16
48
;
49
;
97 tk 50
; BankStick Mode & Allocation Map
51
; Each BankStick (CS0..CS7) has an own entry
52
; Set the value to:
53
;     0: ignore BankStick which could be (or is) connected to the CS address
54
;     1: if a 32k BankStick (24LC256) is connected and should be used as Pattern Storage (64 patterns)
55
;     2: if a 64k BankStick (24LC512) is connected and should be used as Pattern Storage (128 patterns)
198 tk 56
;     3: if a 32k BankStick is connected and should be used as Song Storage
57
;     4: if a 64k BankStick is connected and should be used as Song Storage
97 tk 58
; NOTE: only one BankStick can be used as Song Storage, only one for Mixer Maps
59
;       If no entry with "mode 3" or "mode 4" is defined, Song mode will be disabled.
60
; If a BankStick is not connected to the MBSEQ, the appr. entry will have no effect
118 tk 61
; If a "MBSEQ Mixer BankStick" is connected, it will be automatically ignored (and not re-formatted)
97 tk 62
#define DEFAULT_BANKSTICK_MODE_CS0  2   ; 64k
63
#define DEFAULT_BANKSTICK_MODE_CS1  2   ; 64k
64
#define DEFAULT_BANKSTICK_MODE_CS2  2   ; 64k
65
#define DEFAULT_BANKSTICK_MODE_CS3  4   ; Song mode (using CS3 to ensure compatibility with Atmel EEPROMs which only provide 4 CS addresses)
66
#define DEFAULT_BANKSTICK_MODE_CS4  2   ; 64k
67
#define DEFAULT_BANKSTICK_MODE_CS5  2   ; 64k
68
#define DEFAULT_BANKSTICK_MODE_CS6  2   ; 64k
69
#define DEFAULT_BANKSTICK_MODE_CS7  2   ; 64k
70
;
71
;
72
; Max. length of the DIN/DOUT shift register chain (1-16)
73
#define DEFAULT_NUMBER_SR   13
74
;
75
; debounce counter (see the function description of MIOS_SRIO_DebounceSet)
76
; Use 0 for high-quality buttons, use higher values for low-quality buttons
77
#define DEFAULT_SRIO_DEBOUNCE_CTR 32
78
;
79
; Some menus are provide the possibility to use 16 "general purpose" buttons
80
; Define the two shift registers which are assigned to this function here:
81
; (valid numbers: 1-16)
82
#define DEFAULT_GP_DIN_SR_L 3   ; first GP DIN shift register assigned to SR#3
83
#define DEFAULT_GP_DIN_SR_R 4   ; second GP DIN shift register assigned to SR#4
84
;
1061 tk 85
; DIN pins reversed?
86
#define DEFAULT_GP_DIN_REVERSED 0
87
;
97 tk 88
; above these buttons LEDs should be mounted to visualize the played MIDI events,
89
; but also the current sequencer position, the selected pattern, the menu, etc.
90
; Define the two shift registers which are assigned to this function here:  
91
; (valid numbers: 1-16)
92
#define DEFAULT_GP_DOUT_SR_L    3   ; first GP DOUT shift register assigned to SR#3
93
#define DEFAULT_GP_DOUT_SR_R    5   ; second GP DOUT shift register assigned to SR#5
94
;
95
;
96
; === Shift Register Matrix ===
97
;
98
; set this value to 1 if each track has its own set of 16 LEDs to display unmuted steps and current sequencer position
99
#define DEFAULT_SRM_ENABLED     0
100
;
101
; define the shift registers to which the anodes of these LEDs are connected
379 tk 102
; Note: they can be equal to DEFAULT_GP_DOUT_SR_[LH], this saves two shift registers, but doesn't allow a separate view of UI selections
97 tk 103
#define DEFAULT_SRM_DOUT_L1 6
104
#define DEFAULT_SRM_DOUT_R1 9
105
;
106
; define the shift register to which the cathodes of these LEDs are connected
107
; Note that the whole shift register (8 pins) will be allocated! The 4 select lines are duplicated (4 for LED matrix, 4 for button matrix)
108
; The second DOUT_CATHODES2 selection is optional if LEDs with high power consumption are used - set this to 0 if not used
109
#define DEFAULT_SRM_DOUT_CATHODES1  5
110
#define DEFAULT_SRM_DOUT_CATHODES2  8
111
;
112
; set this to 1, if DUO colour LEDs are connected to the LED matrix
113
#define DEFAULT_SRM_DOUT_DUOCOLOUR  1
114
;
115
; define the shift registers to which the anodes of the "second colour" (red) LEDs are connected
116
#define DEFAULT_SRM_DOUT_L2 7
117
#define DEFAULT_SRM_DOUT_R2 10
118
;
119
; set this to 1 if a button matrix is connected
120
#define DEFAULT_SRM_BUTTONS_ENABLED 0
121
; set this to 1 if these buttons should only control the "step triggers" (gate, and other assigned triggers) - and no UI functions
122
#define DEFAULT_SRM_BUTTONS_NO_UI   1
123
; define the DIN shift registers to which the button matrix is connected
124
#define DEFAULT_SRM_DIN_L   11
125
#define DEFAULT_SRM_DIN_R   12
126
;
127
;
128
; === BPM digits ===
129
;
130
; set to 1 or 2 to enable the 3 optional BPM digits
131
;    0: BPM digits disabled
132
;    1: digits with common cathode
133
;    2: digits with common anode
134
#define DEFAULT_BPM_DIGITS_ENABLED 0
135
;
136
; define the shift register to which the segments are connected (0=disabled)
137
#define DEFAULT_BPM_DIGITS_SEGMENTS 5
138
; define the shift register to which the common pins (cathodes or anodes) are connected (0=disabled)
139
#define DEFAULT_BPM_DIGITS_COMMON   6
140
;
141
;
142
; the speed value for the tempo encoder (#0) which is used when the "FAST" button is activated:
143
#define DEFAULT_ENC_TEMPO_SPEED_VALUE   3
144
;
145
; the speed value for the additional encoders which is used when the "FAST" button is activated:
146
#define DEFAULT_ENC_SPEED_VALUE     3
147
 
148
;; Auto FAST mode: if a layer is assigned to velocity or CC, the fast button will be automatically
149
;; enabled - in other cases (e.g. Note or Length), the fast button will be automatically disabled
150
#define DEFAULT_AUTO_FAST_BUTTON        1
151
 
152
;; Behaviour of FAST button:
153
;; 0: button pressed: fast encoders, button depressed: slow encoders
154
;; 1: fast mode toggled when button pressed
155
#define DEFAULT_BEHAVIOUR_BUTTON_FAST   1
156
;; The same for the "ALL" button (if flag set, all step parameters will be changed with a single encoder)
157
#define DEFAULT_BEHAVIOUR_BUTTON_ALL    1
158
;; the same for the solo button (if flag set, the current selected track will be played solo)
159
#define DEFAULT_BEHAVIOUR_BUTTON_SOLO   1
160
;; the same for the metronome button
161
#define DEFAULT_BEHAVIOUR_BUTTON_METRON 1
162
;; the same for the scrub button
163
#define DEFAULT_BEHAVIOUR_BUTTON_SCRUB  0
164
 
165
; MIDI IN Channel which is used for the transpose/arpeggiator/remote function
166
; Allowed values: 1-16, select 0 to disable
167
#define DEFAULT_SEQUENCER_CHANNEL   10
168
;
169
; The Note number which activates the remote function (examples: 0x24 == C-2, 0x60 == C-7)
170
#define DEFAULT_MIDI_REMOTE_KEY     0x60    ; C-7
171
;
560 tk 172
; The CC number which activates the remote function (e.g. to conrol it with a footswitch)
173
; allowed numbers: 1-127 for CC#1..CC#127
174
; 0 disables this function (default)
175
#define DEFAULT_MIDI_REMOTE_CC      0
176
;
97 tk 177
; Optional channels for configuration via CC (1-16, select 0 to disable)
178
#define DEFAULT_MIDI_CHANNEL_CFG    10
179
 
180
;; if enabled (1), patterns can be changed via program change
181
;; if disabled (0), program changes will be ignored
182
#define DEFAULT_MIDI_PATTERN_CHANGE_PC  1
183
 
184
;; if enabled (1-127), song can be changed via given CC#
185
;; if disabled (0), program changes are ignored
186
#define DEFAULT_MIDI_SONG_CHANGE_VIA_CC 1
187
 
188
 
189
;; define the pin which should be used as external 24ppqn clock output here
190
;; DEFAULT_EXT_CLK_LAT can be LATC (Pin 0, 1, 2, 4, 5) or LATD (Pin 4)
191
;; Note that this should be an exclusive pin. E.g., if an AOUT module is
192
;; be connected, LATC.5 and LATD.4 are already allocated.
193
;; if a second LCD is connected, LATC.4 is already allocated
194
;; The external pin is disabled with DEFAULT_EXT_CLK_LAT == 0
195
;; default setting: RC0 (available at J6:RC of the core module)
196
#define DEFAULT_EXT_CLK_LAT LATC
197
#define DEFAULT_EXT_CLK_PIN 0
198
 
199
;; define the pin which should be used as external Start/Stop output here
200
;; default setting: RC1 (available at J6:SC of the core module)
201
#define DEFAULT_EXT_START_LAT   LATC
202
#define DEFAULT_EXT_START_PIN   1
203
 
204
 
205
;; define the pin to which the RI_N line of the IIC1 module is connected
206
;; this connections is required for the second MIDI IN port
207
;; Note: MIDI In is only supported for one MBHP_IIC_MIDI module,
208
;; and it must be the first one (IIC address 10, both jumpers stuffed)
209
;; By default, RC3 is used (available at J6:SI of the core module)
210
;; if RI_N_PORT == 0, the second MIDI Input will be disabled.
211
#define DEFAULT_IIC1_RI_N_PORT  PORTC
212
#define DEFAULT_IIC1_RI_N_TRIS  TRISC
213
#define DEFAULT_IIC1_RI_N_PIN   3
214
 
215
 
145 tk 216
;; define the AOUT interface which is used here:
217
;;   1: one MBHP_AOUT module
218
;;   2: up to 4 (chained) MBHP_AOUT_LC modules
219
;;   3: one MBHP_AOUT_NG module
220
;; all other values invalid!
221
#define AOUT_INTERFACE_TYPE 1
97 tk 222
 
145 tk 223
;; only relevant if one or more AOUT_LC modules are used:
224
;; define the resolution configuration here
225
;;   0: first channel 12bit, second channel 4bit
226
;;   1: first channel 8bit, second channel 8bit
227
;; all other values invalid!
228
#define AOUT_LC_RESOLUTION_OPTION_M1 1
229
#define AOUT_LC_RESOLUTION_OPTION_M2 1
230
#define AOUT_LC_RESOLUTION_OPTION_M3 1
231
#define AOUT_LC_RESOLUTION_OPTION_M4 1
97 tk 232
 
145 tk 233
 
1064 tk 234
;;
235
;; CV values can also be output via DOUT shift registers
236
;; This option is sufficient to control the "velocity" of drum instruments, and it's cheap as well!
237
;; We expect following connections:
238
;; 
239
;;   DOUT      ca. 160k
240
;;    D7 ---o---/\/\/\---*
241
;;              ca. 80k  |
242
;;    D6 ---o---/\/\/\---*
243
;;              ca. 40k  |
244
;;    D5 ---o---/\/\/\---*
245
;;              ca. 20k  |
246
;;    D4 ---o---/\/\/\---*
247
;;              ca. 10k  |
248
;;    D3 ---o---/\/\/\---*
249
;;              ca. 5k   |
250
;;    D2 ---o---/\/\/\---*----o CV Out
251
;;              220 Ohm
252
;;    D1 ---o---/\/\/\--------o free assignable trigger
253
;;              220 Ohm
254
;;    D0 ---o---/\/\/\--------o another free assignable trigger
255
;; 
256
;; The DOUTx channels are matching with the AOUT channels as specified in the DEFAULT_TRKINFO table above.
257
;; Allowed values: 1-16 (selects DOUT shift register) or 0 to disable
258
;; Ensure that DEFAULT_NUMBER_SR is high enough so that all DOUTs are updated.
259
#define DEFAULT_CV_DOUT_SR1  0
260
#define DEFAULT_CV_DOUT_SR2  0
261
#define DEFAULT_CV_DOUT_SR3  0
262
#define DEFAULT_CV_DOUT_SR4  0
263
#define DEFAULT_CV_DOUT_SR5  0
264
#define DEFAULT_CV_DOUT_SR6  0
265
#define DEFAULT_CV_DOUT_SR7  0
266
#define DEFAULT_CV_DOUT_SR8  0
267
#define DEFAULT_CV_DOUT_SR9  0
268
#define DEFAULT_CV_DOUT_SR10 0
269
#define DEFAULT_CV_DOUT_SR11 0
270
#define DEFAULT_CV_DOUT_SR12 0
271
#define DEFAULT_CV_DOUT_SR13 0
272
#define DEFAULT_CV_DOUT_SR14 0
273
#define DEFAULT_CV_DOUT_SR15 0
274
#define DEFAULT_CV_DOUT_SR16 0
275
 
276
 
1176 tk 277
;; Optional 909-like OH/CH selection pin.
278
;; In order to use this feature, set DEFAULT_909LIKE_HH_CONTROL_ENABLED to 1, and
279
;; select the tracks to which the OH and CH are assigned in DEFAULT_909LIKE_HH_TRACK_OH/CH.
280
;; Change the DEFAULT_TRKINFO table in the header of this file, so that both track triggers share the same pin!
281
;; Then define the DOUT pin which should select OH/CH in DEFAULT_909LIKE_HH_SWITCH_SR/PIN below
282
#define DEFAULT_909LIKE_HH_CONTROL_ENABLED  0  ; 0 to disable, 1 to enable
283
#define DEFAULT_909LIKE_HH_TRACK_OH        11  ; OH track number - this track will set the SWITCH pin to 0
284
#define DEFAULT_909LIKE_HH_TRACK_CH        12  ; CH track number - will set the SWITCH pin to 1
285
#define DEFAULT_909LIKE_HH_SWITCH_SR        4  ; DOUT shift register of the SWITCH (1..16, 0 disables the assignment)
286
#define DEFAULT_909LIKE_HH_SWITCH_PIN       2  ; switch pin (0..7 for D0..D7)
287
 
288
 
101 tk 289
;; 0: disables swing pot
290
;; 1: enables swing pot, connected to pin J5:A0
291
;;    NOTE: to avoid random swing values, set this #define to 0 when NO pot is connected!
292
;;    alternatively, you can clamp pin J5:A0 to ground
293
#ifndef DEFAULT_SWING_POT_CONNECTED
294
#define DEFAULT_SWING_POT_CONNECTED 0
295
#endif
97 tk 296
 
314 tk 297
;; define the page, which should be displayed after poweron, here
298
;; Examples: CS_MENU_PAGE_EDIT for edit page, CS_MENU_PAGE_PATTERN for pattern page
299
#define DEFAULT_STARTUP_PAGE CS_MENU_PAGE_EDIT
101 tk 300
 
314 tk 301
 
1176 tk 302
;; define the default Aux layer assignment:
303
;;   0: Accent
304
;;   1: Skip
305
;;   2: Flam1
306
;;   3: Flam2
307
;;   4: Flam3
308
;;   5: Flam4
309
;;   6: Random Gate
310
;;   7: Random Flam
311
;;   8: Delay1
312
;;   9: Delay2
313
;;  10: Delay3
314
;;  11: Delay4
315
;; 
316
;; Note: if BankSticks have already been formated, the previous default assignment will still be active.
317
;; The new default assignment will be taken when a pattern is cleared (Options page, GP button #10)
318
#define DEFAULT_AUX_LAYER_ASSIGN 2
319
 
320
 
97 tk 321
    org 0x3082      ; never change the origin!
322
; ==========================================================================
323
;  In this table all button functions are mapped to the DIN pins
324
;
325
;  The function name can be found on the left, the shift register and pin
326
;  number on the right side.
327
;
328
;  SR/pin numbers:
329
;     SR =  1 for the first DIN shift register
330
;     SR =  2 for the second DIN shift register
331
;     ...
332
;     SR = 16 for the last DIN shift register
333
;
334
;     Pin = 0 for the D0 input pin of the shift register
335
;     Pin = 1 for the D1 input pin of the shift register
336
;     ...
337
;     Pin = 7 for the last input pin (D7) of the shift register
338
;
339
;  Set the SR and pin number to 0 if a button function should not be used
340
;
341
;  The table must end with DIN_ENTRY_EOT!
342
; ==========================================================================
343
 
344
DIN_ENTRY MACRO function, sr, pin
345
    dw  function, (pin + 8*((sr-1)&0xff))
346
    ENDM
347
 
348
DIN_ENTRY_EOT MACRO
349
    dw  0x0000, 0x0000
350
    ENDM
351
 
352
SEQ_IO_TABLE_DIN
353
    ;;      Function name       SR# Pin#
354
    ;; NOTE: the pins of the 16 general purpose buttons are assigned above, search for DEFAULT_GP_DIN_SR_L (and _R)
355
    DIN_ENTRY   SEQ_BUTTON_Scrub,    0,  0
356
    DIN_ENTRY   SEQ_BUTTON_Metronome,    0,  0
357
 
358
    DIN_ENTRY   SEQ_BUTTON_Stop,     5,  5
359
    DIN_ENTRY   SEQ_BUTTON_Pause,    0,  0
360
    DIN_ENTRY   SEQ_BUTTON_Play,     5,  3
361
    DIN_ENTRY   SEQ_BUTTON_Rew,      5,  6
362
    DIN_ENTRY   SEQ_BUTTON_Fwd,      5,  2
118 tk 363
    DIN_ENTRY   SEQ_BUTTON_Live,     5,  1
97 tk 364
 
365
    DIN_ENTRY   SEQ_BUTTON_F1,       0,  0
366
    DIN_ENTRY   SEQ_BUTTON_F2,       0,  0
367
    DIN_ENTRY   SEQ_BUTTON_F3,       0,  0
368
    DIN_ENTRY   SEQ_BUTTON_F4,       0,  0
369
 
370
    DIN_ENTRY   SEQ_BUTTON_Shift,    2,  5
371
    DIN_ENTRY   SEQ_BUTTON_Alt,      2,  4
372
 
120 tk 373
    DIN_ENTRY   SEQ_BUTTON_SectionA,     1,  0
374
    DIN_ENTRY   SEQ_BUTTON_SectionB,     1,  5
375
    DIN_ENTRY   SEQ_BUTTON_SectionC,     1,  3
376
    DIN_ENTRY   SEQ_BUTTON_SectionD,     1,  4
97 tk 377
 
120 tk 378
    DIN_ENTRY   SEQ_BUTTON_LayerGate,    2,  0
379
    DIN_ENTRY   SEQ_BUTTON_LayerAux,     2,  1
97 tk 380
 
381
    DIN_ENTRY   SEQ_BUTTON_Edit,     6,  4
382
    DIN_ENTRY   SEQ_BUTTON_Mute,     5,  0
383
    DIN_ENTRY   SEQ_BUTTON_Pattern,  6,  7
384
    DIN_ENTRY   SEQ_BUTTON_Song,     6,  5
385
 
386
    DIN_ENTRY   SEQ_BUTTON_Solo,     0,  0
387
    DIN_ENTRY   SEQ_BUTTON_Fast,     0,  0
388
    DIN_ENTRY   SEQ_BUTTON_All,      0,  0
389
 
390
    ;; OPTIONAL! see CHANGELOG.txt
391
    DIN_ENTRY   SEQ_BUTTON_Group1,   0,  0
392
    DIN_ENTRY   SEQ_BUTTON_Group2,   0,  0
393
    DIN_ENTRY   SEQ_BUTTON_Group3,   0,  0
394
    DIN_ENTRY   SEQ_BUTTON_Group4,   0,  0
395
 
396
    DIN_ENTRY_EOT
397
 
398
 
399
; ==========================================================================
101 tk 400
;  Following statements are used to assign LED functions to DOUT pins
97 tk 401
;
101 tk 402
;  To enable a LED function, specify the shift register number SR (1-16),
403
;  and the pin number (0-7).
404
;  Note that Pin 0 is D7 of the DOUT register, Pin 1 is D6, ... Pin 7 is D0
97 tk 405
;
101 tk 406
;  With SR value = 0, the LED function will be disabled
97 tk 407
; ==========================================================================
408
 
101 tk 409
;;                         SR    ignore    Pin
120 tk 410
LED_SECTION_A   EQU ((( 2   -1)<<3)+    6)
411
LED_SECTION_B   EQU ((( 2   -1)<<3)+    5)
412
LED_SECTION_C   EQU ((( 2   -1)<<3)+    3)
413
LED_SECTION_D   EQU ((( 2   -1)<<3)+    1)
97 tk 414
 
101 tk 415
;;                         SR    ignore    Pin
120 tk 416
LED_LAYER_GATE  EQU ((( 2   -1)<<3)+    7)
417
LED_LAYER_AUX   EQU ((( 2   -1)<<3)+    0)
97 tk 418
 
101 tk 419
;;                         SR    ignore    Pin
420
LED_EDIT    EQU ((( 7   -1)<<3)+    3)
421
LED_MUTE    EQU ((( 6   -1)<<3)+    7)
422
LED_PATTERN EQU ((( 7   -1)<<3)+    1)
423
LED_SONG    EQU ((( 7   -1)<<3)+    2)
97 tk 424
 
101 tk 425
;;                         SR    ignore    Pin
426
LED_SOLO    EQU ((( 0   -1)<<3)+    0)
427
LED_FAST    EQU ((( 0   -1)<<3)+    0)
428
LED_ALL     EQU ((( 0   -1)<<3)+    0)
97 tk 429
 
101 tk 430
;;                         SR    ignore    Pin
431
LED_GROUP1  EQU ((( 0   -1)<<3)+    0)
432
LED_GROUP2  EQU ((( 0   -1)<<3)+    0)
433
LED_GROUP3  EQU ((( 0   -1)<<3)+    0)
434
LED_GROUP4  EQU ((( 0   -1)<<3)+    0)
97 tk 435
 
101 tk 436
;;                         SR    ignore    Pin
437
LED_SHIFT   EQU ((( 6   -1)<<3)+    2)
438
LED_ALT     EQU ((( 6   -1)<<3)+    1)
97 tk 439
 
101 tk 440
;;                         SR    ignore    Pin
441
LED_RECORD  EQU ((( 7   -1)<<3)+    4)
316 tk 442
LED_BEAT    EQU ((( 7   -1)<<3)+    5)
97 tk 443
 
101 tk 444
;;                         SR    ignore    Pin
445
LED_PLAY    EQU ((( 7   -1)<<3)+    0)
446
LED_STOP    EQU ((( 6   -1)<<3)+    6)
447
LED_PAUSE   EQU ((( 0   -1)<<3)+    0)
448
LED_FWD     EQU ((( 6   -1)<<3)+    5)
449
LED_REW     EQU ((( 6   -1)<<3)+    4)
118 tk 450
LED_LIVE    EQU ((( 6   -1)<<3)+    3)
97 tk 451
 
395 tk 452
;;                         SR    ignore    Pin
453
LED_MIDI_RX EQU (((0    -1)<<3)+    0) ; OPTIONAL! see CHANGELOG.txt
454
LED_MIDI_TX EQU (((0    -1)<<3)+    0) ; SR=0 -> disabled by default
97 tk 455
 
456
 
457
;; --------------------------------------------------------------------------
458
;; In this table DIN pins have to be assigned to rotary encoders for the
459
;; MIOS_ENC driver 
460
;; 
461
;; up to 64 entries are provided, for MIDIbox SEQ 17 entries are expected
462
;; 
463
;; The table must be terminated with an ENC_EOT entry. Unused entries should
464
;; be filled with ENC_EOT
465
;; 
466
;; ENC_ENTRY provides following parameters
467
;;    o first parameter: number of shift register - 1, 2, 3, ... 16
468
;;    o second parameter: number of pin; since two pins are necessary
469
;;      for each encoder, an even number is expected: 0, 2, 4 or 6
470
;;    o the third parameter contains the encoder mode:
471
;;      either MIOS_ENC_MODE_NON_DETENTED
826 tk 472
;;          or MIOS_ENC_MODE_DETENTED1
97 tk 473
;;          or MIOS_ENC_MODE_DETENTED2 (prefered for Encoders from Voti and SmashTV!)
474
;;          or MIOS_ENC_MODE_DETENTED3
826 tk 475
;;          or MIOS_ENC_MODE_DETENTED4
97 tk 476
;;      see also http://www.midibox.org/dokuwiki/doku.php?id=encoder_types
477
;;
478
;; Configuration Examples:
479
;;    ENC_ENTRY  1,  0,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 0 and 1 of SR 1
480
;;    ENC_ENTRY  1,  2,  MIOS_ENC_MODE_DETENTED        ; detented encoder at pin 2 and 3 of SR 1
481
;;    ENC_ENTRY  9,  6,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 6 and 7 of SR 9
482
;; --------------------------------------------------------------------------
483
    org 0x3280      ; never change the origin!
484
    ;; encoder entry structure
485
ENC_ENTRY MACRO sr, din_0, mode
486
    dw  (mode << 8) | (din_0 + 8*(sr-1))
487
    ENDM   
488
ENC_EOT MACRO
489
    dw  0xffff
490
    ENDM
491
 
492
MIOS_ENC_PIN_TABLE
493
    ;;        SR  Pin  Mode
494
    ENC_ENTRY  6,  2,  MIOS_ENC_MODE_DETENTED2  ; Tempo Encoder
495
    ENC_ENTRY  1,  6,  MIOS_ENC_MODE_DETENTED2  ; Instrument Encoder
496
 
497
    ;; don't remove this "end-of-table" entry!
498
    ENC_EOT        
499
 
500
 
501
;; include the rest of the application
502
#include "main.inc"