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

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

Started to rework include files.

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