Subversion Repositories svn.mios

Rev

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

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