source: buchla-68k/ram/etires.c@ dade7a0

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 =============================================================================
3 etires.c -- instrument editor - resonance field handlers
4 Version 2 -- 1988-05-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#define DEBUGIT 0
9
10#include "ram.h"
11
12int16_t rsntab[] = { /* resonance table */
13
14 0, /* 0 = 0.00 */
15 (110 << 5), /* 1 = 1.10 */
16 (220 << 5), /* 2 = 2.20 */
17 (330 << 5), /* 3 = 3.30 */
18 (440 << 5), /* 4 = 4.40 */
19 (550 << 5), /* 5 = 5.50 */
20 (660 << 5), /* 6 = 6.60 */
21 (770 << 5), /* 7 = 7.70 */
22 (880 << 5), /* 8 = 8.80 */
23 (1000 << 5) /* 9 = 10.00 */
24};
25
26/*
27 =============================================================================
28 et_ires() -- load the edit buffer
29 =============================================================================
30*/
31
32int16_t et_ires(int16_t n)
33{
34 (void)n;
35
36 if (curfunc NE 4)
37 return(FAILURE);
38
39 ebuf[0] = '0' + vbufs[curvce].idhfnc[4].idfprm;
40 ebuf[1] = '\0';
41 ebflag = TRUE;
42 return(SUCCESS);
43}
44
45/*
46 =============================================================================
47 ef_ires() -- parse (unload) the edit buffer
48 =============================================================================
49*/
50
51int16_t ef_ires(int16_t n)
52{
53 register int16_t tmpval;
54
55 (void)n;
56
57 if (curfunc NE 4)
58 return(FAILURE);
59
60 ebuf[1] = '\0';
61 ebflag = FALSE;
62 tmpval = ebuf[0] - '0';
63 vbufs[curvce].idhfnc[4].idfprm = tmpval;
64 sendval(curvce, 6, rsntab[tmpval]);
65 modinst();
66 return(SUCCESS);
67}
68
69/*
70 =============================================================================
71 rd_ires() -- (re)display the point number
72 =============================================================================
73*/
74
75int16_t rd_ires(int16_t n)
76{
77 register struct idfnhdr *fp;
78
79 fp = &vbufs[curvce].idhfnc[4];
80
81 if (curfunc NE 4)
82 return(FAILURE);
83
84 dspbuf[0] = '0' + fp->idfprm;
85 dspbuf[1] = '\0';
86
87 if (v_regs[5] & 0x0180)
88 vbank(0);
89
90 vcputsv(instob, 64, ((fp->idftmd & I_TM_KEY) ? idbox[n][4] : ID_INST),
91 idbox[n][5], idbox[n][6] + 1, idbox[n][7] + 8, dspbuf, 14);
92
93 return(SUCCESS);
94}
95
96/*
97 =============================================================================
98 nd_ires() -- handle new data entry
99 =============================================================================
100*/
101
102int16_t nd_ires(int16_t n, int16_t k)
103{
104 if (curfunc NE 4)
105 return(FAILURE);
106
107 dspbuf[0] = ebuf[0] = k + '0';
108 dspbuf[1] = ebuf[1] = '\0';
109
110 if (v_regs[5] & 0x0180)
111 vbank(0);
112
113 vcputsv(instob, 64, ID_ENTRY, idbox[n][5], stcrow, stccol, dspbuf, 14);
114 return(SUCCESS);
115}
116
Note: See TracBrowser for help on using the repository browser.