OpenCores
URL https://opencores.org/ocsvn/zx_ula/zx_ula/trunk

Subversion Repositories zx_ula

[/] [zx_ula/] [branches/] [xilinx/] [spectrum_48k_spartan3a_for_gameduino_mod_vga_timex_hicolor_ulaplus/] [mapa_es.inc] - Blame information for rev 29

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 mcleod_ide
// Teclas con scancode simple
2
`define KEY_ESC                 8'h76
3
`define KEY_F1          8'h05
4
`define KEY_F2          8'h06
5
`define KEY_F3          8'h04
6
`define KEY_F4          8'h0C
7
`define KEY_F5          8'h03
8
`define KEY_F6          8'h0B
9
`define KEY_F7          8'h83
10
`define KEY_F8          8'h0A
11
`define KEY_F9          8'h01
12
`define KEY_F10                 8'h09
13
`define KEY_F11                 8'h78
14
`define KEY_F12                 8'h07
15
 
16
`define KEY_BL          8'h0E
17
`define KEY_1                   8'h16
18
`define KEY_2                   8'h1E
19
`define KEY_3                   8'h26
20
`define KEY_4                   8'h25
21
`define KEY_5                   8'h2E
22
`define KEY_6                   8'h36
23
`define KEY_7                   8'h3D
24
`define KEY_8                   8'h3E
25
`define KEY_9                   8'h46
26
`define KEY_0                   8'h45
27
`define KEY_APOS                8'h4E
28
`define KEY_AEXC                8'h55
29
`define KEY_BKSP                8'h66
30
 
31
`define KEY_TAB                 8'h0D
32
`define KEY_Q                   8'h15
33
`define KEY_W                   8'h1D
34
`define KEY_E                   8'h24
35
`define KEY_R                   8'h2D
36
`define KEY_T                   8'h2C
37
`define KEY_Y                   8'h35
38
`define KEY_U                   8'h3C
39
`define KEY_I                   8'h43
40
`define KEY_O                   8'h44
41
`define KEY_P                   8'h4D
42
`define KEY_CORCHA      8'h54
43
`define KEY_CORCHC      8'h5B
44
`define KEY_ENTER       8'h5A
45
 
46
`define KEY_CPSLK       8'h58
47
`define KEY_A                   8'h1C
48
`define KEY_S                   8'h1B
49
`define KEY_D                   8'h23
50
`define KEY_F                   8'h2B
51
`define KEY_G                   8'h34
52
`define KEY_H                   8'h33
53
`define KEY_J                   8'h3B
54
`define KEY_K                   8'h42
55
`define KEY_L                   8'h4B
56
`define KEY_NT          8'h4C
57
`define KEY_LLAVA       8'h52
58
`define KEY_LLAVC       8'h5D
59
 
60
`define KEY_LSHIFT      8'h12
61
`define KEY_LT          8'h61
62
`define KEY_Z                   8'h1A
63
`define KEY_X                   8'h22
64
`define KEY_C                   8'h21
65
`define KEY_V                   8'h2A
66
`define KEY_B                   8'h32
67
`define KEY_N                   8'h31
68
`define KEY_M                   8'h3A
69
`define KEY_COMA                8'h41
70
`define KEY_PUNTO       8'h49
71
`define KEY_MENOS       8'h4A
72
`define KEY_RSHIFT      8'h59
73
 
74
`define KEY_CTRLI       8'h14
75
`define KEY_ALTI                8'h11
76
`define KEY_SPACE       8'h29
77
 
78
`define KEY_KP0                 8'h70
79
`define KEY_KP1                 8'h69
80
`define KEY_KP2                 8'h72
81
`define KEY_KP3                 8'h7A
82
`define KEY_KP4                 8'h6B
83
`define KEY_KP5                 8'h73
84
`define KEY_KP6                 8'h74
85
`define KEY_KP7                 8'h6C
86
`define KEY_KP8                 8'h75
87
`define KEY_KP9                 8'h7D
88
`define KEY_KPPUNTO     8'h71
89
`define KEY_KPMAS       8'h79
90
`define KEY_KPMENOS     8'h7B
91
`define KEY_KPASTER     8'h7C
92
 
93
`define KEY_BLKNUM      8'h77
94
`define KEY_BLKSCR      8'h7E
95
 
96
// Teclas con E0 + scancode
97
`define KEY_WAKEUP      8'h5E
98
`define KEY_SLEEP       8'h3F
99
`define KEY_POWER       8'h37
100
`define KEY_INS                 8'h70
101
`define KEY_SUP                 8'h71
102
`define KEY_HOME                8'h6C
103
`define KEY_END                 8'h69
104
`define KEY_PGU                 8'h7D
105
`define KEY_PGD                 8'h7A
106
`define KEY_UP          8'h75
107
`define KEY_DOWN                8'h72
108
`define KEY_LEFT                8'h6B
109
`define KEY_RIGHT       8'h74
110
`define KEY_CTRLD       8'h14
111
`define KEY_ALTGR       8'h11
112
`define KEY_KPENTER     8'h5A
113
`define KEY_KPSLASH     8'h4A
114
`define KEY_PRTSCR      8'h7C
115
 
116
// Matriz del ZX Spectrum
117
`define SP_CS                   {3'b000,5'b11110}
118
`define SP_Z                    {3'b000,5'b11101}
119
`define SP_X                    {3'b000,5'b11011}
120
`define SP_C                    {3'b000,5'b10111}
121
`define SP_V                    {3'b000,5'b01111}
122
 
123
`define SP_A                    {3'b001,5'b11110}
124
`define SP_S                    {3'b001,5'b11101}
125
`define SP_D                    {3'b001,5'b11011}
126
`define SP_F                    {3'b001,5'b10111}
127
`define SP_G                    {3'b001,5'b01111}
128
 
129
`define SP_Q                    {3'b010,5'b11110}
130
`define SP_W                    {3'b010,5'b11101}
131
`define SP_E                    {3'b010,5'b11011}
132
`define SP_R                    {3'b010,5'b10111}
133
`define SP_T                    {3'b010,5'b01111}
134
 
135
`define SP_1                    {3'b011,5'b11110}
136
`define SP_2                    {3'b011,5'b11101}
137
`define SP_3                    {3'b011,5'b11011}
138
`define SP_4                    {3'b011,5'b10111}
139
`define SP_5                    {3'b011,5'b01111}
140
 
141
`define SP_0                    {3'b100,5'b11110}
142
`define SP_9                    {3'b100,5'b11101}
143
`define SP_8                    {3'b100,5'b11011}
144
`define SP_7                    {3'b100,5'b10111}
145
`define SP_6                    {3'b100,5'b01111}
146
 
147
`define SP_P                    {3'b101,5'b11110}
148
`define SP_O                    {3'b101,5'b11101}
149
`define SP_I                    {3'b101,5'b11011}
150
`define SP_U                    {3'b101,5'b10111}
151
`define SP_Y                    {3'b101,5'b01111}
152
 
153
`define SP_ENT                  {3'b110,5'b11110}
154
`define SP_L                    {3'b110,5'b11101}
155
`define SP_K                    {3'b110,5'b11011}
156
`define SP_J                    {3'b110,5'b10111}
157
`define SP_H                    {3'b110,5'b01111}
158
 
159
`define SP_SPC                  {3'b111,5'b11110}
160
`define SP_SS                   {3'b111,5'b11101}
161
`define SP_M                    {3'b111,5'b11011}
162
`define SP_N                    {3'b111,5'b10111}
163
`define SP_B                    {3'b111,5'b01111}
164
 
165
`define SP_NOKEY                {3'b111,5'b11111}
166
`define NADA                    {`SP_NOKEY,`SP_NOKEY}
167
 
168
integer relleno;
169
initial begin
170
        // Relleno inicial. Luego será sobreescrito...
171
        for (relleno=0;relleno<=131; relleno=relleno+1)
172
        begin
173
                mapa_noshift_noext[relleno]={`NADA};
174
                mapa_noshift_ext[relleno]={`NADA};
175
                mapa_shift_noext[relleno]={`NADA};
176
                mapa_shift_ext[relleno]={`NADA};
177
        end
178
 
179
 
180
        /* TRADUCCION DE TECLAS SIN SHIFT PULSADO */
181
 
182
        // Fila de teclas de funcion (13 teclas)
183
        mapa_noshift_noext[`KEY_ESC]    ={`SP_CS,`SP_SPC};
184
        mapa_noshift_noext[`KEY_F2]     ={`SP_CS,`SP_1};
185
 
186
        // Fila de números (14 teclas)
187
        mapa_noshift_noext[`KEY_BL]     ={`SP_SS,`SP_D};
188
        mapa_noshift_noext[`KEY_1]              ={`SP_1,`SP_NOKEY};
189
        mapa_noshift_noext[`KEY_2]              ={`SP_2,`SP_NOKEY};
190
        mapa_noshift_noext[`KEY_3]              ={`SP_3,`SP_NOKEY};
191
        mapa_noshift_noext[`KEY_4]              ={`SP_4,`SP_NOKEY};
192
        mapa_noshift_noext[`KEY_5]              ={`SP_5,`SP_NOKEY};
193
        mapa_noshift_noext[`KEY_6]              ={`SP_6,`SP_NOKEY};
194
        mapa_noshift_noext[`KEY_7]              ={`SP_7,`SP_NOKEY};
195
        mapa_noshift_noext[`KEY_8]              ={`SP_8,`SP_NOKEY};
196
        mapa_noshift_noext[`KEY_9]              ={`SP_9,`SP_NOKEY};
197
        mapa_noshift_noext[`KEY_0]              ={`SP_0,`SP_NOKEY};
198
        mapa_noshift_noext[`KEY_APOS]   ={`SP_SS,`SP_7};
199
        mapa_noshift_noext[`KEY_BKSP]   ={`SP_CS,`SP_0};
200
 
201
        // Fila Q-P (14 teclas)
202
        mapa_noshift_noext[`KEY_TAB]    ={`SP_CS,`SP_SS};
203
        mapa_noshift_noext[`KEY_Q]              ={`SP_Q,`SP_NOKEY};
204
        mapa_noshift_noext[`KEY_W]              ={`SP_W,`SP_NOKEY};
205
        mapa_noshift_noext[`KEY_E]              ={`SP_E,`SP_NOKEY};
206
        mapa_noshift_noext[`KEY_R]              ={`SP_R,`SP_NOKEY};
207
        mapa_noshift_noext[`KEY_T]              ={`SP_T,`SP_NOKEY};
208
        mapa_noshift_noext[`KEY_Y]              ={`SP_Y,`SP_NOKEY};
209
        mapa_noshift_noext[`KEY_U]              ={`SP_U,`SP_NOKEY};
210
        mapa_noshift_noext[`KEY_I]              ={`SP_I,`SP_NOKEY};
211
        mapa_noshift_noext[`KEY_O]              ={`SP_O,`SP_NOKEY};
212
        mapa_noshift_noext[`KEY_P]              ={`SP_P,`SP_NOKEY};
213
        mapa_noshift_noext[`KEY_CORCHA]={`SP_SS,`SP_H};
214
        mapa_noshift_noext[`KEY_CORCHC]={`SP_SS,`SP_K};
215
        mapa_noshift_noext[`KEY_ENTER]={`SP_ENT,`SP_NOKEY};
216
 
217
        // Fila A-L (13 teclas)
218
        mapa_noshift_noext[`KEY_CPSLK]={`SP_CS,`SP_2};
219
        mapa_noshift_noext[`KEY_A]              ={`SP_A,`SP_NOKEY};
220
        mapa_noshift_noext[`KEY_S]              ={`SP_S,`SP_NOKEY};
221
        mapa_noshift_noext[`KEY_D]              ={`SP_D,`SP_NOKEY};
222
        mapa_noshift_noext[`KEY_F]              ={`SP_F,`SP_NOKEY};
223
        mapa_noshift_noext[`KEY_G]              ={`SP_G,`SP_NOKEY};
224
        mapa_noshift_noext[`KEY_H]              ={`SP_H,`SP_NOKEY};
225
        mapa_noshift_noext[`KEY_J]              ={`SP_J,`SP_NOKEY};
226
        mapa_noshift_noext[`KEY_K]              ={`SP_K,`SP_NOKEY};
227
        mapa_noshift_noext[`KEY_L]              ={`SP_L,`SP_NOKEY};
228
        mapa_noshift_noext[`KEY_LLAVA]={`SP_SS,`SP_F};
229
        mapa_noshift_noext[`KEY_LLAVC]={`SP_SS,`SP_P};
230
 
231
        // Fila Z-M (13 teclas)
232
        mapa_noshift_noext[`KEY_LT]     ={`SP_SS,`SP_R};
233
        mapa_noshift_noext[`KEY_Z]              ={`SP_Z,`SP_NOKEY};
234
        mapa_noshift_noext[`KEY_X]              ={`SP_X,`SP_NOKEY};
235
        mapa_noshift_noext[`KEY_C]              ={`SP_C,`SP_NOKEY};
236
        mapa_noshift_noext[`KEY_V]              ={`SP_V,`SP_NOKEY};
237
        mapa_noshift_noext[`KEY_B]              ={`SP_B,`SP_NOKEY};
238
        mapa_noshift_noext[`KEY_N]              ={`SP_N,`SP_NOKEY};
239
        mapa_noshift_noext[`KEY_M]              ={`SP_M,`SP_NOKEY};
240
        mapa_noshift_noext[`KEY_COMA]   ={`SP_SS,`SP_N};
241
        mapa_noshift_noext[`KEY_PUNTO]={`SP_SS,`SP_M};
242
        mapa_noshift_noext[`KEY_MENOS]={`SP_SS,`SP_J};
243
 
244
        // Fila CTRL-SPACE (3 teclas)
245
        mapa_noshift_noext[`KEY_CTRLI]={`SP_CS,`SP_NOKEY};
246
        mapa_noshift_noext[`KEY_SPACE]={`SP_SPC,`SP_NOKEY};
247
 
248
        // Keypad (14 teclas)
249
        mapa_noshift_noext[`KEY_KP0]    ={`SP_0,`SP_NOKEY};
250
        mapa_noshift_noext[`KEY_KP1]    ={`SP_1,`SP_NOKEY};
251
        mapa_noshift_noext[`KEY_KP2]    ={`SP_2,`SP_NOKEY};
252
        mapa_noshift_noext[`KEY_KP3]    ={`SP_3,`SP_NOKEY};
253
        mapa_noshift_noext[`KEY_KP4]    ={`SP_4,`SP_NOKEY};
254
        mapa_noshift_noext[`KEY_KP5]    ={`SP_5,`SP_NOKEY};
255
        mapa_noshift_noext[`KEY_KP6]    ={`SP_6,`SP_NOKEY};
256
        mapa_noshift_noext[`KEY_KP7]    ={`SP_7,`SP_NOKEY};
257
        mapa_noshift_noext[`KEY_KP8]    ={`SP_8,`SP_NOKEY};
258
        mapa_noshift_noext[`KEY_KP9]    ={`SP_9,`SP_NOKEY};
259
        mapa_noshift_noext[`KEY_KPPUNTO]        ={`SP_SS,`SP_M};
260
        mapa_noshift_noext[`KEY_KPMAS]  ={`SP_SS,`SP_K};
261
        mapa_noshift_noext[`KEY_KPMENOS]        ={`SP_SS,`SP_J};
262
        mapa_noshift_noext[`KEY_KPASTER]        ={`SP_SS,`SP_B};
263
 
264
 
265
        /* TRADUCCION DE TECLAS CON SHIFT PULSADO */
266
 
267
        // Fila de teclas de funcion (13 teclas)
268
        mapa_shift_noext[`KEY_ESC]              ={`SP_CS,`SP_SPC};
269
        mapa_shift_noext[`KEY_F2]               ={`SP_CS,`SP_1};
270
 
271
        // Fila de números (14 teclas)
272
        mapa_shift_noext[`KEY_1]                ={`SP_1,`SP_SS};
273
        mapa_shift_noext[`KEY_2]                ={`SP_P,`SP_SS};
274
        mapa_shift_noext[`KEY_3]                ={`SP_3,`SP_SS};
275
        mapa_shift_noext[`KEY_4]                ={`SP_4,`SP_SS};
276
        mapa_shift_noext[`KEY_5]                ={`SP_5,`SP_SS};
277
        mapa_shift_noext[`KEY_6]                ={`SP_6,`SP_SS};
278
        mapa_shift_noext[`KEY_7]                ={`SP_V,`SP_SS};
279
        mapa_shift_noext[`KEY_8]                ={`SP_8,`SP_SS};
280
        mapa_shift_noext[`KEY_9]                ={`SP_9,`SP_SS};
281
        mapa_shift_noext[`KEY_0]                ={`SP_L,`SP_SS};
282
        mapa_shift_noext[`KEY_APOS]     ={`SP_C,`SP_SS};
283
        mapa_shift_noext[`KEY_BKSP]     ={`SP_CS,`SP_0};
284
 
285
        // Fila Q-P (14 teclas)
286
        mapa_shift_noext[`KEY_TAB]              ={`SP_CS,`SP_SS};
287
        mapa_shift_noext[`KEY_Q]                ={`SP_Q,`SP_CS};
288
        mapa_shift_noext[`KEY_W]                ={`SP_W,`SP_CS};
289
        mapa_shift_noext[`KEY_E]                ={`SP_E,`SP_CS};
290
        mapa_shift_noext[`KEY_R]                ={`SP_R,`SP_CS};
291
        mapa_shift_noext[`KEY_T]                ={`SP_T,`SP_CS};
292
        mapa_shift_noext[`KEY_Y]                ={`SP_Y,`SP_CS};
293
        mapa_shift_noext[`KEY_U]                ={`SP_U,`SP_CS};
294
        mapa_shift_noext[`KEY_I]                ={`SP_I,`SP_CS};
295
        mapa_shift_noext[`KEY_O]                ={`SP_O,`SP_CS};
296
        mapa_shift_noext[`KEY_P]                ={`SP_P,`SP_CS};
297
        mapa_shift_noext[`KEY_CORCHA]   ={`SP_SS,`SP_H};
298
        mapa_shift_noext[`KEY_CORCHC]   ={`SP_SS,`SP_B};
299
        mapa_shift_noext[`KEY_ENTER]    ={`SP_ENT,`SP_NOKEY};
300
 
301
        // Fila A-L (13 teclas)
302
        mapa_shift_noext[`KEY_CPSLK]    ={`SP_CS,`SP_2};
303
        mapa_shift_noext[`KEY_A]                ={`SP_A,`SP_CS};
304
        mapa_shift_noext[`KEY_S]                ={`SP_S,`SP_CS};
305
        mapa_shift_noext[`KEY_D]                ={`SP_D,`SP_CS};
306
        mapa_shift_noext[`KEY_F]                ={`SP_F,`SP_CS};
307
        mapa_shift_noext[`KEY_G]                ={`SP_G,`SP_CS};
308
        mapa_shift_noext[`KEY_H]                ={`SP_H,`SP_CS};
309
        mapa_shift_noext[`KEY_J]                ={`SP_J,`SP_CS};
310
        mapa_shift_noext[`KEY_K]                ={`SP_K,`SP_CS};
311
        mapa_shift_noext[`KEY_L]                ={`SP_L,`SP_CS};
312
        mapa_shift_noext[`KEY_LLAVA]    ={`SP_SS,`SP_F};
313
        mapa_shift_noext[`KEY_LLAVC]    ={`SP_SS,`SP_G};
314
 
315
        // Fila Z-M (13 teclas)
316
        mapa_shift_noext[`KEY_LT]               ={`SP_SS,`SP_T};
317
        mapa_shift_noext[`KEY_Z]                ={`SP_Z,`SP_CS};
318
        mapa_shift_noext[`KEY_X]                ={`SP_X,`SP_CS};
319
        mapa_shift_noext[`KEY_C]                ={`SP_C,`SP_CS};
320
        mapa_shift_noext[`KEY_V]                ={`SP_V,`SP_CS};
321
        mapa_shift_noext[`KEY_B]                ={`SP_B,`SP_CS};
322
        mapa_shift_noext[`KEY_N]                ={`SP_N,`SP_CS};
323
        mapa_shift_noext[`KEY_M]                ={`SP_M,`SP_CS};
324
        mapa_shift_noext[`KEY_COMA]     ={`SP_SS,`SP_O};
325
        mapa_shift_noext[`KEY_PUNTO]={`SP_SS,`SP_Z};
326
        mapa_shift_noext[`KEY_MENOS]={`SP_SS,`SP_0};
327
 
328
        // Fila CTRL-SPACE (3 teclas)
329
        mapa_shift_noext[`KEY_CTRLI]={`SP_CS,`SP_NOKEY};
330
        mapa_shift_noext[`KEY_SPACE]={`SP_SPC,`SP_NOKEY};
331
 
332
        // Keypad (14 teclas)
333
        mapa_shift_noext[`KEY_KP0]      ={`SP_0,`SP_NOKEY};
334
        mapa_shift_noext[`KEY_KP1]      ={`SP_1,`SP_NOKEY};
335
        mapa_shift_noext[`KEY_KP2]      ={`SP_2,`SP_NOKEY};
336
        mapa_shift_noext[`KEY_KP3]      ={`SP_3,`SP_NOKEY};
337
        mapa_shift_noext[`KEY_KP4]      ={`SP_4,`SP_NOKEY};
338
        mapa_shift_noext[`KEY_KP5]      ={`SP_5,`SP_NOKEY};
339
        mapa_shift_noext[`KEY_KP6]      ={`SP_6,`SP_NOKEY};
340
        mapa_shift_noext[`KEY_KP7]      ={`SP_7,`SP_NOKEY};
341
        mapa_shift_noext[`KEY_KP8]      ={`SP_8,`SP_NOKEY};
342
        mapa_shift_noext[`KEY_KP9]      ={`SP_9,`SP_NOKEY};
343
        mapa_shift_noext[`KEY_KPPUNTO]  ={`SP_SS,`SP_M};
344
        mapa_shift_noext[`KEY_KPMAS]    ={`SP_SS,`SP_K};
345
        mapa_shift_noext[`KEY_KPMENOS]  ={`SP_SS,`SP_J};
346
        mapa_shift_noext[`KEY_KPASTER]  ={`SP_SS,`SP_B};
347
 
348
 
349
        /* TRADUCCION DE TECLAS EXTENDIDAS SIN SHIFT PULSADO */
350
 
351
        mapa_noshift_ext[`KEY_UP]                       ={`SP_7,`SP_CS};
352
        mapa_noshift_ext[`KEY_DOWN]             ={`SP_6,`SP_CS};
353
        mapa_noshift_ext[`KEY_LEFT]             ={`SP_5,`SP_CS};
354
        mapa_noshift_ext[`KEY_RIGHT]            ={`SP_8,`SP_CS};
355
        mapa_noshift_ext[`KEY_CTRLD]            ={`SP_SS,`SP_NOKEY};
356
        mapa_noshift_ext[`KEY_KPENTER]  ={`SP_ENT,`SP_NOKEY};
357
        mapa_noshift_ext[`KEY_KPSLASH]  ={`SP_V,`SP_SS};
358
 
359
end
360
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.