source: buchla-68k/include/midas.h@ 5fa506d

Last change on this file since 5fa506d was 5fa506d, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Include file cleanup.

  • Property mode set to 100644
File size: 4.4 KB
Line 
1/*
2 =============================================================================
3 midas.h -- MIDAS 700 global definitions
4 Version 38 -- 1989-12-19 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#pragma once
9
10#include "graphdef.h"
11#include "stdint.h"
12#include "vsdd.h"
13
14typedef void (*LPF)(int16_t _1, int16_t _2); /* pointer to a LCD panel function */
15
16#define SM_SCALE(x) (((x) * 252) & 0x7fe0)
17#define ART_VAL(x) (((((x) - 5) > 100) ? 100 : (((x) - 5) < 0 ? 0 : ((x) - 5))) * 320)
18
19#define CWORD(x) ((int16_t)((x) | ((x) << 4) | ((x) << 8) | ((x) << 12)))
20
21#define CTOX(C) ((C) << 3) /* column to x pixel value */
22#define RTOY(R) ((R) * 14) /* row to y pixel value */
23#define XTOC(X) ((X) >> 3) /* x pixel value to column */
24#define YTOR(Y) ((Y) / 14) /* y pixel value to row */
25
26#define AMP_TIME 200 /* amplitude pot interpolate time */
27
28#define GCPRI 15 /* graphic cursor priority */
29#define GCURS 0 /* graphic cursor object number */
30
31#define BIT2 V_RES2 /* graphics - 2 bit pixels */
32#define BIT3 V_RES3 /* graphics - 4 bit pixels */
33#define CHR2 0 /* characters - no attributes */
34#define CHR3 (V_FAD | V_HCR) /* characters - full attributes */
35
36#define OBFL_00 (BIT3 | V_TDE) /* cursor - arrow */
37
38#define LIBRFL V_RES3 /* librarian display object flags */
39
40#define TTCURS 2 /* typewriter cursor object */
41#define TTCPRI 14 /* typewriter cursor priority */
42#define TTCCFL (V_RES3 | V_OBL | V_TDE)
43
44#define XYCENTRE 50 /* center of range of cursor pots */
45
46#define SMYRATE 4 /* smooth scroll vertical rate */
47
48#define HCWVAL 30 /* graphics cursor x wait time */
49#define VCWVAL 30 /* graphics cursor y wait time */
50#define THCWVAL 60 /* text cursor h wait time */
51#define TVCWVAL 120 /* text cursor v wait time */
52#define CURHOLD 300 /* cursor motion startup delay */
53
54#define CXMAX XMAX /* cursor x maximum */
55#define CYMAX YMAX /* cursor y maximum */
56
57#define FN_NULL 0L /* null for address entries */
58
59/*
60
61*/
62
63#define NASGS 100 /* number of assignments in memory */
64#define NASGLIB 99 /* number of assignments on disk */
65
66#define NTUNS 10 /* number of tunings in memory */
67#define NTUNSLIB 9 /* number of tunings on disk */
68
69#define NINST 41 /* number of instruments in memory */
70#define NINORC 20 /* number of instruments on disk */
71#define NIPNTS 128 /* maximum number of points in the instrument */
72#define MAXIDLN 16 /* maximum length of function ID strings */
73#define NFINST 13 /* number of functions in an instrument */
74#define NUMCFG 12 /* number of oscillator configurations */
75
76#define NUMWAVS 20 /* number of waveshapes in memory or on disk*/
77#define NUMWIDS 8 /* number of waveshape cursor widths */
78#define NUMHARM 32 /* number of waveshape harmonics */
79#define NUMWPNT 254 /* number of waveshape points stored */
80#define NUMWPCAL 256 /* number of waveshape points calculated */
81
82#define VID_EI 0 /* IPL to enable video */
83#define VID_DI 1 /* IPL to disable video */
84#define FPU_EI 1 /* IPL to enable FPU */
85#define FPU_DI 2 /* IPL to disable FPU */
86#define TIM_DI 4 /* IPL to disable timer */
87
88#define NTRIGS 6144 /* number of trigger related entries */
89#define NCTRLS 6144 /* number of controller related entries */
90#define NPFENTS 336 /* number of pendant function list entries */
91#define NLSTENTS 48 /* number of last note entry table entries */
92
93#define NMPORTS 2 /* number of MIDI ports */
94
95#define MASENSCT 500 /* active sensing timeout count */
96
97#define MIDISUS 64 /* MIDI damper (sustain) controller number */
98#define MIDIHLD 66 /* MIDI sustenuto (hold) controller number */
99
100#define MSW_ON 0x3F /* MIDI switch on threshold */
101#define MSW_OFF 0x40 /* MIDI switch off threshold */
102
103#define M_KSTATE 0x01 /* MIDI key status */
104#define M_LCLSUS 0x04 /* MIDI local sustain status */
105#define M_CHNSUS 0x08 /* MIDI channel sustain status */
106#define M_LCLHLD 0x40 /* MIDI local hold status */
107#define M_CHNHLD 0x80 /* MIDI channel hold status */
108#define MKEYHELD (M_CHNHLD | M_LCLHLD)
109 /* key held */
110
111#define PITCHMIN 320 /* C0 in 1/2 cents (160 cents) */
112#define PITCHMAX 21920 /* C9 in 1/2 cents (10960 cents) */
113
114#define GTAG1 0x0100
115#define GTAG2 0x0200
116#define GTAG3 0x0400
117#define GTAG4 0x0800
118#define GTAG5 0x1000
119#define GTAG6 0x2000
120#define GTAG7 0x4000
121#define GTAG8 0x8000
122
123#define CTAG1 0x0100
124#define CTAG2 0x0200
125#define CTAG3 0x0400
126#define CTAG4 0x0800
127#define CTAG5 0x1000
128#define CTAG6 0x2000
129#define CTAG7 0x4000
130#define CTAG8 0x8000
Note: See TracBrowser for help on using the repository browser.