-
Notifications
You must be signed in to change notification settings - Fork 4
/
clem_adb.c
2750 lines (2612 loc) · 76.4 KB
/
clem_adb.c
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "clem_debug.h"
#include "clem_device.h"
#include "clem_locale.h"
#include "clem_mmio_defs.h"
#include "clem_util.h"
#include <string.h>
/*
* ADB will be implemented in phases based on need
*
* General Pattern:
* - From Emulator Host (OS) to Emulated Device
* - From Emulator Device to GLU (ADB)
* - From GLU to Machine Host (MMIO/CPU)
*
* The 'GLU' here isn't an accurate emulation of the on-board GLU. This GLU
* just implements the ADB commands used by the machine, and forwards input
* from the emulator host OS into our keyboard and mouse data structures.
*
* The GLU layer also provides keyboard/mouse data in its 'raw' form.
* The GLU layer has an 'autopoll' mode, which updates the mega2 IO registers
* with keyboard and mouse data automatically.
* - if autopoll is not enabled for these devices, the ADB host (machine)
* must have an ISR that handles SRQ events and will issue 'TALK' commands
* to the GLU
* - the TALK commands return data from the GLU logical registers
*
* References:
* IIgs Hardware Reference
* IIgs Firmware Reference
* "Inside the Apple IIgs ADB Controller
* https://llx.com/Neil/a2/adb.html
* "ADB - The Untold Story: Space Aliens Ate My Mouse"
* https://developer.apple.com/library/archive/technotes/hw/hw_01.html
* https://developer.apple.com/library/archive/documentation/mac/pdf/Devices/ADB_Manager.pdf
*
* and some eyeballing/reassurance from... KEGS.
*
* SRQ: p 138-39 HWRef
* - Mouse SRQ issuance prohibited, meaning we only support keyboard SRQs
* for now
*
* Key strobe/Any key (c010 vs c010-1f):
* - More contradictions, but both the IIgs Firmware and Apple //e tech
* references call out only C010 as the IO addr, versus the HW Ref p129,
* Table 6-4, bit 7 (writing anwehere to C010-1F). If there's an app
* that breaks because HW Ref was right vs the other docs, then make
* that change accordingly for writes.
*/
/* ADB emulated GLU/Controller is ready for a command with a write to C026 */
#define CLEM_ADB_STATE_READY 0
/* GLU/controller will receive command data from the host via writes to C026 */
#define CLEM_ADB_STATE_CMD_DATA 1
/* GLU/controller will send data to the host, read by the host via C026 */
#define CLEM_ADB_STATE_RESULT_DATA 2
#define CLEM_ADB_CMD_ABORT 0x01
#define CLEM_ADB_CMD_SET_MODES 0x04
#define CLEM_ADB_CMD_CLEAR_MODES 0x05
#define CLEM_ADB_CMD_SET_CONFIG 0x06
#define CLEM_ADB_CMD_SYNC 0x07
#define CLEM_ADB_CMD_WRITE_RAM 0x08
#define CLEM_ADB_CMD_READ_MEM 0x09
#define CLEM_ADB_CMD_READ_MODES 0x0A
#define CLEM_ADB_CMD_VERSION 0x0d
#define CLEM_ADB_CMD_SYSTEM_RESET 0x10
#define CLEM_ADB_CMD_SEND_ADB_KEYCODE 0x11
#define CLEM_ADB_CMD_UNDOCUMENTED_12 0x12
#define CLEM_ADB_CMD_UNDOCUMENTED_13 0x13
#define CLEM_ADB_CMD_DEVICE_ENABLE_SRQ 0x50
#define CLEM_ADB_CMD_DEVICE_FLUSH 0x60
#define CLEM_ADB_CMD_DEVICE_DISABLE_SRQ 0x70
#define CLEM_ADB_CMD_DEVICE_XMIT_2_R0 0x80
#define CLEM_ADB_CMD_DEVICE_XMIT_2_R1 0x90
#define CLEM_ADB_CMD_DEVICE_XMIT_2_R2 0xA0
#define CLEM_ADB_CMD_DEVICE_XMIT_2_R3 0xB0
#define CLEM_ADB_CMD_DEVICE_POLL_0 0xc0
#define CLEM_ADB_CMD_DEVICE_POLL_1 0xd0
#define CLEM_ADB_CMD_DEVICE_POLL_2 0xe0
#define CLEM_ADB_CMD_DEVICE_POLL_3 0xf0
/* c026 status flags */
#define CLEM_ADB_C026_RECV_READY 0x80
#define CLEM_ADB_C026_DESK_MGR 0x20
#define CLEM_ADB_C026_SRQ 0x08
#define CLEM_ADB_C026_RECV_CNT 0x07
/* c027 status flags */
#define CLEM_ADB_C027_CMD_FULL 0x01
/* HWRef says this is X, firmware ref and testing say this is Y */
#define CLEM_ADB_C027_MOUSE_Y 0x02
/* 0x04 - keyboard interrupts not supported */
#define CLEM_ADB_C027_KEY_IRQ 0x04
#define CLEM_ADB_C027_KEY_FULL 0x08
#define CLEM_ADB_C027_DATA_IRQ 0x10
#define CLEM_ADB_C027_DATA_FULL 0x20
#define CLEM_ADB_C027_MOUSE_IRQ 0x40
#define CLEM_ADB_C027_MOUSE_FULL 0x80
/* This version is returned by the ADB microcontroller based on ROM type */
#define CLEM_ADB_ROM_3 0x06
/* GLU Device addresses */
#define CLEM_ADB_DEVICE_KEYBOARD 0x02
#define CLEM_ADB_DEVICE_MOUSE 0x03
#define CLEM_ADB_DEVICE_ID_APPLE_KEYB 0x02
/* ADB Mode Flags */
#define CLEM_ADB_MODE_AUTOPOLL_KEYB 0x00000001
#define CLEM_ADB_MODE_AUTOPOLL_MOUSE 0x00000002
#define CLEM_ADB_MODE_BUFFER_KEYB 0x00000010
/**
* SRQs are disabled for all devices on reset
* Autopoll enabled for all devices on reset
*/
void clem_adb_reset(struct ClemensDeviceADB *adb) {
int i;
adb->version = CLEM_ADB_ROM_3; /* TODO - input to reset? */
adb->mode_flags = CLEM_ADB_MODE_AUTOPOLL_KEYB | CLEM_ADB_MODE_AUTOPOLL_MOUSE;
adb->irq_dispatch = 0;
adb->irq_line = 0;
adb->cmd_status = 0;
adb->cmd_flags = 0;
adb->clipboard.tail = 0;
// See ADB_Manager.pdf, 5-12 for the source of these values
adb->keyb_reg[3] = (CLEM_ADB_DEVICE_KEYBOARD << 8) | CLEM_ADB_DEVICE_ID_APPLE_KEYB;
adb->keyb.reset_key = false;
adb->keyb.size = 0;
adb->keyb.last_a2_key_down = 0xff;
// TODO: total guess for mouse device ID - maybe not needed?????
adb->mouse_reg[3] = (CLEM_ADB_DEVICE_MOUSE << 8) | 0x01;
adb->mouse.size = 0;
adb->mouse.tracking_enabled = false;
adb->mouse.valid_clamp_box = false;
adb->gameport.ann_mask = 0;
adb->gameport.btn_mask[0] = adb->gameport.btn_mask[1] = 0;
for (i = 0; i < 4; ++i) {
adb->gameport.paddle[i] = CLEM_GAMEPORT_PADDLE_AXIS_VALUE_INVALID;
adb->gameport.paddle_timer_ns[i] = 0;
adb->gameport.paddle_timer_state[i] = 0;
}
}
static inline void _clem_adb_irq_dispatch(struct ClemensDeviceADB *adb, uint32_t irq) {
// Mouse SRQs are not supported per HW Reference
// Keyboard Interrupts (not SRQs) are also not supported per HW Reference
if ((irq & CLEM_IRQ_ADB_DATA) && (adb->cmd_status & CLEM_ADB_C027_DATA_IRQ)) {
adb->irq_dispatch |= CLEM_IRQ_ADB_DATA;
}
if ((irq & CLEM_IRQ_ADB_KEYB_SRQ) && (adb->keyb_reg[3] & CLEM_ADB_GLU_REG3_MASK_SRQ)) {
adb->irq_dispatch |= CLEM_IRQ_ADB_KEYB_SRQ;
}
if ((irq & CLEM_IRQ_ADB_MOUSE_EVT) && (adb->cmd_status & CLEM_ADB_C027_MOUSE_IRQ)) {
adb->irq_dispatch |= CLEM_IRQ_ADB_MOUSE_EVT;
}
}
static void _clem_adb_expect_data(struct ClemensDeviceADB *adb, uint8_t data_limit) {
adb->state = CLEM_ADB_STATE_CMD_DATA;
adb->cmd_data_sent = 0;
adb->cmd_data_recv = 0;
adb->cmd_data_limit = data_limit;
}
static void _clem_adb_add_data(struct ClemensDeviceADB *adb, uint8_t value) {
CLEM_ASSERT(adb->state == CLEM_ADB_STATE_CMD_DATA);
if (adb->cmd_data_sent >= adb->cmd_data_limit) {
CLEM_ASSERT(false);
/* TODO: should do some kind of error handling? */
return;
}
adb->cmd_data[adb->cmd_data_sent++] = value;
}
static void _clem_adb_glu_command_done(struct ClemensDeviceADB *adb) {
adb->state = CLEM_ADB_STATE_READY;
adb->cmd_data_sent = 0;
adb->cmd_data_recv = 0;
adb->cmd_data_limit = 0;
}
static void _clem_adb_glu_result_init(struct ClemensDeviceADB *adb, uint8_t data_limit) {
adb->state = CLEM_ADB_STATE_RESULT_DATA;
adb->cmd_data_sent = 0;
adb->cmd_data_recv = 0;
adb->cmd_data_limit = data_limit;
}
static void _clem_adb_glu_result_data(struct ClemensDeviceADB *adb, uint8_t value) {
if (adb->cmd_data_sent >= adb->cmd_data_limit) {
CLEM_ASSERT(false);
/* TODO: should do some kind of error handling? */
return;
}
adb->cmd_data[adb->cmd_data_sent++] = value;
adb->cmd_status |= CLEM_ADB_C027_DATA_FULL;
_clem_adb_irq_dispatch(adb, CLEM_IRQ_ADB_DATA);
}
static void _clem_adb_glu_device_response(struct ClemensDeviceADB *adb, uint8_t len) {
adb->state = CLEM_ADB_STATE_READY;
adb->cmd_data_sent = 0;
adb->cmd_data_recv = 0;
adb->cmd_data_limit = len;
adb->cmd_flags |= CLEM_ADB_C026_RECV_READY;
adb->cmd_flags &= ~CLEM_ADB_C026_RECV_CNT;
if (len > 1) { // should never be 1
adb->cmd_flags |= ((len - 1) & CLEM_ADB_C026_RECV_CNT);
}
}
/*
* Keyboard Support
*
* Autopolling: at regular intervals, look at registers and update
*
* From Emulator Host (OS) to Emulator Device
* - Input from the emulator app is converted to simple events representing
* an ADB device.
*
* From Emulated Device to Emulated ADB GLU/Microcontroller
* - during GLU update/sync, sync() will refresh the SRQ line if there is
* data available for the device (and SRQ is enabled for the device)
*
* GLU listen/talk
* - during sync(),
* autopoll ready? then acquire data from the device, clear srq
* if autopoll off, rely on manual talk commands, clear srq
* either way, update MMIO registers
*
*
* References:
* Apple IIgs Hardware Reference
* https://developer.apple.com/library/archive/technotes/hw/hw_01.html
*/
#define CLEM_ADB_KEY_MOD_SHIFT 0x01
#define CLEM_ADB_KEY_MOD_CTRL 0x02
#define CLEM_ADB_KEY_MOD_CAPS 0x04
#define CLEM_ADB_KEY_MOD_CAPITAL 0x08 /* capitalized if caps lock on */
#define CLEM_ADB_KEY_MOD_KEYPAD 0x10
#define CLEM_ADB_KEY_MOD_OPTION 0x40
#define CLEM_ADB_KEY_MOD_APPLE 0x80
/* { default, ctl, shift, ctrl+shift, extra }
* Apple //e Technical Reference p 14-16
* Apple IIgs Hardware Reference p 262-266
* Extra keys (keypad = )
* other bytes are for padding or later use
*
* No later ADB keyboard support for
* - function keys at this time (later ADB keyboards)
* - home, pageup, end, pagedown, etc
*/
static uint8_t g_a2_to_ascii[CLEM_ADB_KEY_CODE_LIMIT][8] = {
/* 0x00 */ {
'a',
0x01,
'A',
0x01,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x01 */
{
's',
0x13,
'S',
0x13,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x02 */
{
'd',
0x04,
'D',
0x04,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x03 */
{
'f',
0x06,
'F',
0x06,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x04 */
{
'h',
0x08,
'H',
0x08,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x05 */
{
'g',
0x07,
'G',
0x07,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x06 */
{
'z',
0x1a,
'Z',
0x1a,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x07 */
{
'x',
0x18,
'X',
0x18,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x08 */
{
'c',
0x03,
'C',
0x03,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x09 */
{
'v',
0x16,
'V',
0x16,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x0A */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x0B */
{
'b',
0x02,
'B',
0x02,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x0C */
{
'q',
0x11,
'Q',
0x11,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x0D */
{
'w',
0x17,
'W',
0x17,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x0E */
{
'e',
0x05,
'E',
0x05,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x0F */
{
'r',
0x12,
'R',
0x12,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x10 */
{
't',
0x14,
'T',
0x14,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x11 */
{
'y',
0x19,
'Y',
0x19,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x12 */
{
'1',
'1',
'!',
'!',
0x00,
},
/* 0x13 */
{
'2',
0x00,
'@',
0x00,
0x00,
},
/* 0x14 */
{
'3',
'3',
'#',
'#',
0x00,
},
/* 0x15 */
{
'4',
'4',
'$',
'$',
0x00,
},
/* 0x16 */
{
'6',
0x1e,
'^',
0x1e,
0x00,
},
/* 0x17 */
{
'5',
'5',
'%',
'%',
0x00,
},
/* 0x18 */
{
'=',
'=',
'+',
'+',
0x00,
},
/* 0x19 */
{
'9',
'9',
'(',
'(',
0x00,
},
/* 0x1A */
{
'7',
'7',
'&',
'&',
0x00,
},
/* 0x1B */
{
'-',
0x1f,
'_',
0x1f,
0x00,
},
/* 0x1C */
{
'8',
'8',
'*',
'*',
0x00,
},
/* 0x1D */
{
'0',
'0',
')',
')',
0x00,
},
/* 0x1E */
{
']',
0x1d,
'}',
0x1d,
0x00,
},
/* 0x1F */
{
'o',
0x0f,
'O',
0x0f,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x20 */
{
'u',
0x15,
'U',
0x15,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x21 */
{
'[',
0x1b,
'{',
0x1b,
0x00,
},
/* 0x22 */
{
'i',
0x09,
'I',
0x09,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x23 */
{
'p',
0x10,
'P',
0x10,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x24 */
{
0x0d,
0xff,
0x0d,
0xff,
0x00,
}, /* CR */
/* 0x25 */
{
'l',
0x0c,
'L',
0x0c,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x26 */
{
'j',
0x0a,
'J',
0x0a,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x27 */
{
0x27,
0xff,
0x22,
0xff,
0x00,
}, /* apostrophe */
/* 0x28 */
{
'k',
0x0b,
'K',
0x0b,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x29 */
{
';',
';',
':',
':',
0x00,
},
/* 0x2A */
{
'\\',
0x1c,
'|',
0x1c,
0x00,
},
/* 0x2B */
{
',',
',',
'<',
'<',
0x00,
},
/* 0x2C */
{
'/',
'/',
'?',
'?',
0x00,
},
/* 0x2D */
{
'n',
0x0e,
'N',
0x0e,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x2E */
{
'm',
0x0d,
'M',
0x0d,
CLEM_ADB_KEY_MOD_CAPITAL,
},
/* 0x2F */
{
'.',
'.',
'>',
'>',
0x00,
},
/* 0x30 */
{
0x09,
0x09,
0x09,
0x09,
0x00,
}, /* TAB */
/* 0x31 */
{
0x20,
0x20,
0x20,
0x20,
0x00,
}, /* SPACE */
/* 0x32 */
{
'`',
'`',
'~',
'~',
0x00,
},
/* 0x33 */
{
0x7f,
0x7f,
0x7f,
0x7f,
0x00,
}, /* DELETE */
/* 0x34 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x35 */
{
0x1b,
0x1b,
0x1b,
0x1b,
0x00,
}, /* ESCAPE */
/* 0x36 */
{
0xff,
0xff,
0xff,
0xff,
CLEM_ADB_KEY_MOD_CTRL,
},
/* 0x37 */
{
0xff,
0xff,
0xff,
0xff,
CLEM_ADB_KEY_MOD_APPLE,
},
/* 0x38 */
{
0xff,
0xff,
0xff,
0xff,
CLEM_ADB_KEY_MOD_SHIFT,
},
/* 0x39 */
{
0xff,
0xff,
0xff,
0xff,
CLEM_ADB_KEY_MOD_CAPS,
},
/* 0x3A */
{
0xff,
0xff,
0xff,
0xff,
CLEM_ADB_KEY_MOD_OPTION,
},
/* 0x3B */
{
0x08,
0x08,
0x08,
0x08,
0x00,
}, /* LEFT */
/* 0x3C */
{
0x15,
0x15,
0x15,
0x15,
0x00,
}, /* RIGHT */
/* 0x3D */
{
0x0a,
0x0a,
0x0a,
0x0a,
0x00,
}, /* DOWN */
/* 0x3E */
{
0x0b,
0x0b,
0x0b,
0x0b,
0x00,
}, /* UP */
/* 0x3F */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x40 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x41 */
{
'.',
'.',
'.',
'.',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x42 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x43 */
{
'*',
'*',
'*',
'*',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x44 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x45 */
{
'+',
'+',
'+',
'+',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x46 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x47 */
{
0x18,
0x18,
0x18,
0x18,
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x48 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x49 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x4A */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x4B */
{
'/',
'/',
'/',
'/',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x4C */
{
0x0d,
0x0d,
0x0d,
0x0d,
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x4D */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x4E */
{
'-',
'-',
'-',
'-',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x4F */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x50 */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x51 */
{
'=',
'=',
'=',
'=',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x52 */
{
'0',
'0',
'0',
'0',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x53 */
{
'1',
'1',
'1',
'1',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x54 */
{
'2',
'2',
'2',
'2',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x55 */
{
'3',
'3',
'3',
'3',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x56 */
{
'4',
'4',
'4',
'4',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x57 */
{
'5',
'5',
'5',
'5',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x58 */
{
'6',
'6',
'6',
'6',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x59 */
{
'7',
'7',
'7',
'7',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x5A */
{
0xff,
0xff,
0xff,
0xff,
0x00,
},
/* 0x5B */
{
'8',
'8',
'8',
'8',
CLEM_ADB_KEY_MOD_KEYPAD,
},
/* 0x5C */
{