1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
//=======================================================================================
//
// ArSid_Chars - The ArSid_Chars Library
//
// All Self-defined Characters are here (exept those, used in the Intro-Screen).
// Included is a Function to store one in the Lcd Memory.
//
//=======================================================================================
#ifndef ARSID_CHARS_CPP
#define ARSID_CHARS_CPP
#include "Arduino.h"
#include "ArSid_Chars.h"
#include "ArSid_Lcd.h"
//=====================================================================================
// 333333 33 33 33 33333333 333333
// 33 33 33 33 33 33 33 33 33 33
// 33 33 33 33 33 33 33 33
// 33 3333333333 3333333333 33333333 333333
// 33 33 33 33 33 33 33 33
// 33 33 33 33 33 33 33 33 33 33
// 333333 33 33 33 33 33 33 333333
// The Self-defined chars.
// Some chars are self-defined because of two purposed.
// 1) It gives an easier way to show some functionality, than it would by text-only
// e.q. The Filter and The Waveform and The Modulation.
// 2) It gives the display a nicer look, like in the Intro and in the Help-screens.
// All self-defined chars are defined in one big array. Drawing the chars was easy,
// because numbers can be inputted binairy, so there is no need to draw chars on a
// sheet of paper and calculate the dots into an other format of numbers (decimal
// or hexadecimal).
// The usage of one array means also that each self-defined character has one place
// in the array (one specific index-number, which is used somewhere in the big
// program).
// And thus there is one big warning, when changing them. DON'T INSERT a character
// into the array, only APPEND them. Also DON'T DELETE a character from the array.
// The back-fire (with INSERTING and DELETING) is to search for the index-number into
// the whole program (and all the Libraries) to correct the index-numbers and to
// check on every screen if all chagements are done correctly. That is very much
// work, which you are not waiting for to do ...
const word Max_Bitmap = 82 ; // Number of Self-defined Characters
static const byte Char_BitMap [Max_Bitmap][8] PROGMEM = // = [000..(not known yet)][0..7]
{ // All Self-defined Characters.
// 0 [0] WaveForm -none- -none- -none- -none-
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b11111, 0b00000 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b11111, 0b00000 },
// 2 [1] WaveForm -none- -none- -none- Triangle
{ 0b00000, 0b00000, 0b00001, 0b00010, 0b00100, 0b01000, 0b10000, 0b00000 },
{ 0b00000, 0b00000, 0b10000, 0b01000, 0b00100, 0b00010, 0b00001, 0b00000 },
// 4 [2] WaveForm -none- -none- Sawtooth -none-
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00011, 0b01100, 0b10000, 0b00000 },
{ 0b00000, 0b00011, 0b01101, 0b10001, 0b00001, 0b00001, 0b00001, 0b00000 },
// 6 [3] WaveForm -none- -none- Sawtooth Triangle
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 8 [4] WaveForm -none- Square -none- -none-
{ 0b00000, 0b00001, 0b00001, 0b00001, 0b00001, 0b00001, 0b11111, 0b00000 },
{ 0b00000, 0b11111, 0b00001, 0b00001, 0b00001, 0b00001, 0b00001, 0b00000 },
// 10 [5] WaveForm -none- Square -none- Triangle
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 12 [6] WaveForm -none- Square Sawtooth -none-
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 14 [7] WaveForm -none- Square Sawtooth Triangle
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 16 [8] WaveForm Noise -none- -none- -none-
{ 0b00000, 0b00001, 0b00001, 0b01001, 0b01001, 0b01101, 0b10010, 0b00000 },
{ 0b00000, 0b00010, 0b00011, 0b10101, 0b10101, 0b01101, 0b01000, 0b00000 },
// 18 [9] WaveForm Noise -none- -none- Triangle
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 20 [A] WaveForm Noise -none- Sawtooth -none-
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 22 [B] WaveForm Noise -none- Sawtooth Triangle
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 24 [C] WaveForm Noise Square -none- -none-
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 26 [D] WaveForm Noise Square -none- Triangle
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 28 [E] WaveForm Noise Square Sawtooth -none-
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 30 [F] WaveForm Noise Square Sawtooth Triangle
{ 0b01010, 0b10111, 0b10000, 0b00000, 0b01111, 0b01001, 0b11001, 0b00000 },
{ 0b00011, 0b01101, 0b10001, 0b00000, 0b00100, 0b01010, 0b10001, 0b00000 },
// 32 [0] Filter -none- -none- -none-
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b11111, 0b00000 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b11111, 0b00000 },
// 34 [1] Filter -none- -none- -Low-
{ 0b00000, 0b11100, 0b00010, 0b00010, 0b00001, 0b00001, 0b00001, 0b00001 },
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 36 [2] Filter -none- -Band- -none-
{ 0b00000, 0b00001, 0b00010, 0b00010, 0b00100, 0b00100, 0b00100, 0b00100 },
{ 0b00000, 0b10000, 0b01000, 0b01000, 0b00100, 0b00100, 0b00100, 0b00100 },
// 38 [3] Filter -none- -Band- -Low-
{ 0b00000, 0b11101, 0b00010, 0b00010, 0b00101, 0b00101, 0b00101, 0b00101 },
{ 0b00000, 0b10000, 0b01000, 0b01000, 0b00100, 0b00100, 0b00100, 0b00100 },
// 40 [4] Filter -High- -none- -none-
{ 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
{ 0b00000, 0b00111, 0b01000, 0b01000, 0b10000, 0b10000, 0b10000, 0b10000 },
// 42 [5] Filter -High- -none- -Low-
{ 0b00000, 0b11100, 0b00010, 0b00010, 0b00001, 0b00001, 0b00001, 0b00001 },
{ 0b00000, 0b00111, 0b01000, 0b01000, 0b10000, 0b10000, 0b10000, 0b10000 },
// 44 [6] Filter -Hign- -Band- -none-
{ 0b00000, 0b00001, 0b00010, 0b00010, 0b00100, 0b00100, 0b00100, 0b00100 },
{ 0b00000, 0b10111, 0b01000, 0b01000, 0b10100, 0b10100, 0b10100, 0b10100 },
// 46 [7] Filter -High- -Band- -Low-
{ 0b00000, 0b11101, 0b00010, 0b00010, 0b00101, 0b00101, 0b00101, 0b00101 },
{ 0b00000, 0b10111, 0b01000, 0b01000, 0b10100, 0b10100, 0b10100, 0b10100 },
// 48 [8] Filter -xxxx- -xxxx- -xxx- OFF
{ 0b00000, 0b11111, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
{ 0b00000, 0b11111, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 50 [0] 2 Check Arrow Down
{ 0b00000, 0b00100, 0b00100, 0b00100, 0b10101, 0b01110, 0b00100, 0b00000 },
// 51 [1] 3 Check Schak Up
{ 0b00100, 0b01110, 0b01010, 0b01010, 0b01010, 0b01110, 0b11111, 0b00000 },
// 52 [2] 4 Check Schak Down
{ 0b11111, 0b01110, 0b01010, 0b01010, 0b01010, 0b01110, 0b00100, 0b00000 },
// 53 [3] 5 Check Potmeter
{ 0b00000, 0b01110, 0b10001, 0b10101, 0b01001, 0b10110, 0b00000, 0b00000 },
// 54 [0] 6 Help Music Note (1)
{ 0b00000, 0b00100, 0b00110, 0b00101, 0b00100, 0b01000, 0b11100, 0b01000 },
// 55 [1] 7 Help Music Note (2)
{ 0b00100, 0b00110, 0b00101, 0b00100, 0b01000, 0b11100, 0b01000, 0b00000 },
// 56 [0] 8 Help v-shape Up
{ 0b00100, 0b01010, 0b10001, 0b10001, 0b10001, 0b00000, 0b00000, 0b00000 },
// 57 [1] 9 Help Schak Up
{ 0b00100, 0b01110, 0b01010, 0b01010, 0b01010, 0b01110, 0b11111, 0b00000 },
// 58 [2] : Help Schak Down
{ 0b11111, 0b01110, 0b01010, 0b01010, 0b01010, 0b01110, 0b00100, 0b00000 },
// 59 [3] ; Help Potmeter
{ 0b00000, 0b01110, 0b10001, 0b10101, 0b01001, 0b10110, 0b00000, 0b00000 },
// 60 [4] < Help Led
{ 0b00000, 0b01110, 0b11011, 0b10101, 0b11011, 0b01110, 0b00000, 0b00000 },
// 61 [5] = Help Schak <
{ 0b00000, 0b00001, 0b01111, 0b10011, 0b01111, 0b00001, 0b00000, 0b00000 },
// 62 [6] > Help Schak >
{ 0b00000, 0b10000, 0b11110, 0b10011, 0b11110, 0b10000, 0b00000, 0b00000 },
// 63 [7] ? Help Arc \ Up Right
{ 0b10000, 0b10000, 0b01000, 0b00111, 0b00000, 0b00000, 0b00000, 0b00000 },
// 64 [8] @ Help Arc / Up Left
{ 0b00001, 0b00001, 0b00010, 0b11100, 0b00000, 0b00000, 0b00000, 0b00000 },
// 65 [9] A Help Arc / Down Right
{ 0b00000, 0b00000, 0b00000, 0b00111, 0b01000, 0b10000, 0b10000, 0b00000 },
// 66 [10] B Help Arc \ Down Left
{ 0b00000, 0b00000, 0b00000, 0b11100, 0b00010, 0b00001, 0b00001, 0b00000 },
// 67 [11] C Help Sid-knop Links
{ 0b00111, 0b01000, 0b01000, 0b01001, 0b01010, 0b00100, 0b01011, 0b00000 },
// 68 [12] D Help Sid-Knop Rechts
{ 0b11100, 0b00010, 0b00010, 0b00010, 0b00010, 0b00010, 0b11100, 0b00000 },
// 69 [13] E Help Stip tussen Leds Links
{ 0b00000, 0b00000, 0b00000, 0b00001, 0b00000, 0b00000, 0b00000, 0b00000 },
// 70 [14] F Help Stip tussen Leds Rechts
{ 0b00000, 0b00000, 0b00000, 0b10000, 0b00000, 0b00000, 0b00000, 0b00000 },
// 71 [15] G Help Din Plug Links
{ 0b00110, 0b01111, 0b11111, 0b10111, 0b11111, 0b01101, 0b00111, 0b00000 } ,
// 72 [16] H Help Din Plug Rechts
{ 0b01100, 0b11110, 0b11111, 0b11101, 0b11111, 0b10110, 0b11100, 0b00000 },
// 73 [17] I Help Audio Plug
{ 0b00000, 0b01110, 0b10001, 0b10101, 0b10001, 0b01110, 0b00000, 0b00000 },
// 74 [18] J Help Dip Switch Up
{ 0b11111, 0b10001, 0b10001, 0b11111, 0b11111, 0b11111, 0b11111, 0b00000 },
// 75 [19] K Help Dip Switch Down
{ 0b11111, 0b11111, 0b11111, 0b11111, 0b10001, 0b10001, 0b11111, 0b00000 },
// 76 [0] L Ctrl-Reg Sync
{ 0b00000, 0b01110, 0b10000, 0b10001, 0b00001, 0b01110, 0b00000, 0b00000 },
// 77 [1] M Ctrl-Reg Ring Modulator
{ 0b00000, 0b01110, 0b11011, 0b10101, 0b11011, 0b01110, 0b00000, 0b00000 },
// 78 [2] N Volume Triangle
{ 0b00000, 0b00000, 0b00001, 0b00011, 0b00111, 0b01111, 0b11111, 0b00000 },
// 79 [3] O Sid Chip Graphic
{ 0b11011, 0b01110, 0b11111, 0b01110, 0b11111, 0b01110, 0b11111, 0b00000 },
// 80 [0] P +/- char
{ 0b00100, 0b00100, 0b11111, 0b00100, 0b00100, 0b00000, 0b11111, 0b00000 },
// 81 [0] Q micro-teken 'u'
{ 0b00000, 0b00000, 0b10001, 0b10001, 0b10001, 0b10011, 0b11101, 0b10000 }
// 82 [x] R next-char
};
void Poke_Char (word offset, word char_num, byte lcd_char)
{ // Store one Charcter into the memory of the Lcd Display
// Character CHARS_NUM will be stored at character LCD_CHAR
char_num = (offset + char_num);
Lcd_Out(0, 64 + ( (lcd_char & 0x07) << 3 )); // Set to Char Ram
byte bb = 0;
for (byte qq=0; qq<= 7; qq=qq+1)
{ // Store one bitmap into the Lcd
bb = pgm_read_byte_near( &(Char_BitMap[char_num][qq]) );
Lcd_Out(1,bb);
}
Lcd_Out(0, B10000000); // Set back to Display
}
void Poke_2Char (word offset, word char_num, byte lcd_char)
{ // Store two Charcter into the memory of the Lcd Display
// Character CHARS_NUM will be stored at character LCD_CHAR
char_num = (offset + char_num);
Lcd_Out(0, 64 + ( (lcd_char & 0x07) << 3 )); // Set to Char Ram
byte bb = 0;
for (byte qq=0; qq<=15; qq=qq+1)
{ // Store one bitmap into the Lcd
bb = pgm_read_byte_near( &(Char_BitMap[char_num][qq]) );
Lcd_Out(1,bb);
}
Lcd_Out(0, B10000000); // Set back to Display
}
//=====================================================================================
#endif // ARSID_CHARS_CPP
|