Subversion Repositories svn.mios

Rev

Rev 52 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
53 tk 1
; $Id: mios_tables.inc 53 2008-01-30 22:52:41Z tk $
1 tk 2
;
3
; Configuration Tables for MIOS Applications
4
;
5
; ==========================================================================
6
;
7
;  Copyright 1998-2006 Thorsten Klose (tk@midibox.org)
8
;  Licensed for personal non-commercial use only.
9
;  All other rights reserved.
10
;
11
; ==========================================================================
12
 
13
	;; never change the origin or the order of entries!
14
	org	0x3080
15
 
16
;; --------------------------------------------------------------------------
17
;; The MIDI Trigger table maps incoming MIDI events to control elements
18
;; (pots/faders, encoders, buttons, LEDs, ...)
19
;;
20
;; After the MIOS MIDI processor (MPROC) has received a complete event, it
21
;; searches in this table for a matching entry and calls USER_MPROC_NotifyFoundEvent
22
;; with the table index in WREG and the MIDI event in MIOS_PARAMETER[123]
23
;;
24
;; Note also that the MIDI processor stops scanning the table after
25
;; the first MT_EOT entry
26
;;
27
;; Note2: never change the origin (memory location) of this table!
28
;;
29
;; Optionally this table can also be used to define events, which should be
30
;; transmitted (Example: see example_ain64_din128_dout128), so that incoming
31
;; and outgoing events are located at one place
32
;;
33
;; The table *must* contain 256 entries. Unused entries should be filled with
34
;; MT_EOT.
35
;; --------------------------------------------------------------------------
36
 
37
	;; MIDI Trigger entry structure
38
MT_ENTRY MACRO event_0, event_1
39
	dw	(event_1 << 8) | event_0
40
	ENDM
41
 
42
MT_EOT	MACRO
43
	dw	0xffff
44
	ENDM
45
 
46
 
47
MIOS_MPROC_EVENT_TABLE
48
	;; entry 0x00-0x0f
49
	MT_EOT
50
	MT_EOT
51
	MT_EOT
52
	MT_EOT
53
	MT_EOT
54
	MT_EOT
55
	MT_EOT
56
	MT_EOT
57
	MT_EOT
58
	MT_EOT
59
	MT_EOT
60
	MT_EOT
61
	MT_EOT
62
	MT_EOT
63
	MT_EOT
64
	MT_EOT
65
 
66
	;; entry 0x10-0x1f
67
	MT_EOT
68
	MT_EOT
69
	MT_EOT
70
	MT_EOT
71
	MT_EOT
72
	MT_EOT
73
	MT_EOT
74
	MT_EOT
75
	MT_EOT
76
	MT_EOT
77
	MT_EOT
78
	MT_EOT
79
	MT_EOT
80
	MT_EOT
81
	MT_EOT
82
	MT_EOT
83
 
84
	;; entry 0x20-0x2f
85
	MT_EOT
86
	MT_EOT
87
	MT_EOT
88
	MT_EOT
89
	MT_EOT
90
	MT_EOT
91
	MT_EOT
92
	MT_EOT
93
	MT_EOT
94
	MT_EOT
95
	MT_EOT
96
	MT_EOT
97
	MT_EOT
98
	MT_EOT
99
	MT_EOT
100
	MT_EOT
101
 
102
	;; entry 0x30-0x3f
103
	MT_EOT
104
	MT_EOT
105
	MT_EOT
106
	MT_EOT
107
	MT_EOT
108
	MT_EOT
109
	MT_EOT
110
	MT_EOT
111
	MT_EOT
112
	MT_EOT
113
	MT_EOT
114
	MT_EOT
115
	MT_EOT
116
	MT_EOT
117
	MT_EOT
118
	MT_EOT
119
 
120
	;; entry 0x40-0x4f
121
	MT_EOT
122
	MT_EOT
123
	MT_EOT
124
	MT_EOT
125
	MT_EOT
126
	MT_EOT
127
	MT_EOT
128
	MT_EOT
129
	MT_EOT
130
	MT_EOT
131
	MT_EOT
132
	MT_EOT
133
	MT_EOT
134
	MT_EOT
135
	MT_EOT
136
	MT_EOT
137
 
138
	;; entry 0x50-0x5f
139
	MT_EOT
140
	MT_EOT
141
	MT_EOT
142
	MT_EOT
143
	MT_EOT
144
	MT_EOT
145
	MT_EOT
146
	MT_EOT
147
	MT_EOT
148
	MT_EOT
149
	MT_EOT
150
	MT_EOT
151
	MT_EOT
152
	MT_EOT
153
	MT_EOT
154
	MT_EOT
155
 
156
	;; entry 0x60-0x6f
157
	MT_EOT
158
	MT_EOT
159
	MT_EOT
160
	MT_EOT
161
	MT_EOT
162
	MT_EOT
163
	MT_EOT
164
	MT_EOT
165
	MT_EOT
166
	MT_EOT
167
	MT_EOT
168
	MT_EOT
169
	MT_EOT
170
	MT_EOT
171
	MT_EOT
172
	MT_EOT
173
 
174
	;; entry 0x70-0x7f
175
	MT_EOT
176
	MT_EOT
177
	MT_EOT
178
	MT_EOT
179
	MT_EOT
180
	MT_EOT
181
	MT_EOT
182
	MT_EOT
183
	MT_EOT
184
	MT_EOT
185
	MT_EOT
186
	MT_EOT
187
	MT_EOT
188
	MT_EOT
189
	MT_EOT
190
	MT_EOT
191
 
192
	;; entry 0x80-0x8f
193
	MT_EOT
194
	MT_EOT
195
	MT_EOT
196
	MT_EOT
197
	MT_EOT
198
	MT_EOT
199
	MT_EOT
200
	MT_EOT
201
	MT_EOT
202
	MT_EOT
203
	MT_EOT
204
	MT_EOT
205
	MT_EOT
206
	MT_EOT
207
	MT_EOT
208
	MT_EOT
209
 
210
	;; entry 0x90-0x9f
211
	MT_EOT
212
	MT_EOT
213
	MT_EOT
214
	MT_EOT
215
	MT_EOT
216
	MT_EOT
217
	MT_EOT
218
	MT_EOT
219
	MT_EOT
220
	MT_EOT
221
	MT_EOT
222
	MT_EOT
223
	MT_EOT
224
	MT_EOT
225
	MT_EOT
226
	MT_EOT
227
 
228
	;; entry 0xa0-0xaf
229
	MT_EOT
230
	MT_EOT
231
	MT_EOT
232
	MT_EOT
233
	MT_EOT
234
	MT_EOT
235
	MT_EOT
236
	MT_EOT
237
	MT_EOT
238
	MT_EOT
239
	MT_EOT
240
	MT_EOT
241
	MT_EOT
242
	MT_EOT
243
	MT_EOT
244
	MT_EOT
245
 
246
	;; entry 0xb1-0xbf
247
	MT_EOT
248
	MT_EOT
249
	MT_EOT
250
	MT_EOT
251
	MT_EOT
252
	MT_EOT
253
	MT_EOT
254
	MT_EOT
255
	MT_EOT
256
	MT_EOT
257
	MT_EOT
258
	MT_EOT
259
	MT_EOT
260
	MT_EOT
261
	MT_EOT
262
	MT_EOT
263
 
264
	;; entry 0xc0-0xcf
265
	MT_EOT
266
	MT_EOT
267
	MT_EOT
268
	MT_EOT
269
	MT_EOT
270
	MT_EOT
271
	MT_EOT
272
	MT_EOT
273
	MT_EOT
274
	MT_EOT
275
	MT_EOT
276
	MT_EOT
277
	MT_EOT
278
	MT_EOT
279
	MT_EOT
280
	MT_EOT
281
 
282
	;; entry 0xd0-0xdf
283
	MT_EOT
284
	MT_EOT
285
	MT_EOT
286
	MT_EOT
287
	MT_EOT
288
	MT_EOT
289
	MT_EOT
290
	MT_EOT
291
	MT_EOT
292
	MT_EOT
293
	MT_EOT
294
	MT_EOT
295
	MT_EOT
296
	MT_EOT
297
	MT_EOT
298
	MT_EOT
299
 
300
	;; entry 0xe0-0xef
301
	MT_EOT
302
	MT_EOT
303
	MT_EOT
304
	MT_EOT
305
	MT_EOT
306
	MT_EOT
307
	MT_EOT
308
	MT_EOT
309
	MT_EOT
310
	MT_EOT
311
	MT_EOT
312
	MT_EOT
313
	MT_EOT
314
	MT_EOT
315
	MT_EOT
316
	MT_EOT
317
 
318
	;; entry 0xf0-0xff
319
	MT_EOT
320
	MT_EOT
321
	MT_EOT
322
	MT_EOT
323
	MT_EOT
324
	MT_EOT
325
	MT_EOT
326
	MT_EOT
327
	MT_EOT
328
	MT_EOT
329
	MT_EOT
330
	MT_EOT
331
	MT_EOT
332
	MT_EOT
333
	MT_EOT
334
	MT_EOT
335
 
336
 
337
 
338
; ==========================================================================
339
 
340
	org	0x3280		; never change the origin!
341
 
342
;; --------------------------------------------------------------------------
343
;; In this table DIN pins have to be assigned to rotary encoders for the
344
;; MIOS_ENC driver
345
;;
346
;; up to 64 entries are provided
347
;;
348
;; The table must be terminated with an ENC_EOT entry. Unused entries should
349
;; be filled with ENC_EOT
350
;;
351
;; ENC_ENTRY provides following parameters
352
;;    o first parameter: number of shift register - 1, 2, 3, ... 16
353
;;    o second parameter: number of pin; since two pins are necessary
354
;;      for each encoder, an even number is expected: 0, 2, 4 or 6
355
;;    o the third parameter contains the encoder mode:
356
;;      either MIOS_ENC_MODE_NON_DETENTED
357
;;          or MIOS_ENC_MODE_DETENTED1
358
;;          or MIOS_ENC_MODE_DETENTED2
359
;;          or MIOS_ENC_MODE_DETENTED3
360
;;
361
;; Configuration Examples:
362
;;    ENC_ENTRY  1,  0,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 0 and 1 of SR 1
363
;;    ENC_ENTRY  1,  2,  MIOS_ENC_MODE_DETENTED        ; detented encoder at pin 2 and 3 of SR 1
364
;;    ENC_ENTRY  9,  6,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 6 and 7 of SR 9
365
;; --------------------------------------------------------------------------
366
 
367
	;; encoder entry structure
368
ENC_ENTRY MACRO sr, din_0, mode
369
	dw	(mode << 8) | (din_0 + 8*(sr-1))
370
	ENDM
371
ENC_EOT	MACRO
372
	dw	0xffff
373
	ENDM
374
 
375
MIOS_ENC_PIN_TABLE
376
	;; entry 0x00-0x0f
377
	ENC_EOT
378
	ENC_EOT
379
	ENC_EOT
380
	ENC_EOT
381
	ENC_EOT
382
	ENC_EOT
383
	ENC_EOT
384
	ENC_EOT
385
	ENC_EOT
386
	ENC_EOT
387
	ENC_EOT
388
	ENC_EOT
389
	ENC_EOT
390
	ENC_EOT
391
	ENC_EOT
392
	ENC_EOT
393
 
394
	;; entry 0x10-0x1f
395
	ENC_EOT
396
	ENC_EOT
397
	ENC_EOT
398
	ENC_EOT
399
	ENC_EOT
400
	ENC_EOT
401
	ENC_EOT
402
	ENC_EOT
403
	ENC_EOT
404
	ENC_EOT
405
	ENC_EOT
406
	ENC_EOT
407
	ENC_EOT
408
	ENC_EOT
409
	ENC_EOT
410
	ENC_EOT
411
 
412
	;; entry 0x20-0x2f
413
	ENC_EOT
414
	ENC_EOT
415
	ENC_EOT
416
	ENC_EOT
417
	ENC_EOT
418
	ENC_EOT
419
	ENC_EOT
420
	ENC_EOT
421
	ENC_EOT
422
	ENC_EOT
423
	ENC_EOT
424
	ENC_EOT
425
	ENC_EOT
426
	ENC_EOT
427
	ENC_EOT
428
	ENC_EOT
429
 
430
	;; entry 0x30-0x3f
431
	ENC_EOT
432
	ENC_EOT
433
	ENC_EOT
434
	ENC_EOT
435
	ENC_EOT
436
	ENC_EOT
437
	ENC_EOT
438
	ENC_EOT
439
	ENC_EOT
440
	ENC_EOT
441
	ENC_EOT
442
	ENC_EOT
443
	ENC_EOT
444
	ENC_EOT
445
	ENC_EOT
446
	ENC_EOT
447
 
448
	org	0x3300		; never change the origin!