~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/arch/msdos/c610kbd.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-03-27 13:06:04 UTC
  • mfrom: (4 hoary)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050327130604-zodmv0i60dbbmcik
Tags: 1.16-3
Apply patch from Andreas Jochens <aj@andaco.de> to correct building on
AMD64 and GCC 4.x (closes: #300936)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * c610kbd.c - C610 keyboard implementation.
3
 
 *
4
 
 * Written by
5
 
 *  Ettore Perazzoli <ettore@comm2000.it>
6
 
 *
7
 
 * This file is part of VICE, the Versatile Commodore Emulator.
8
 
 * See README for copyright notice.
9
 
 *
10
 
 *  This program is free software; you can redistribute it and/or modify
11
 
 *  it under the terms of the GNU General Public License as published by
12
 
 *  the Free Software Foundation; either version 2 of the License, or
13
 
 *  (at your option) any later version.
14
 
 *
15
 
 *  This program is distributed in the hope that it will be useful,
16
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 *  GNU General Public License for more details.
19
 
 *
20
 
 *  You should have received a copy of the GNU General Public License
21
 
 *  along with this program; if not, write to the Free Software
22
 
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23
 
 *  02111-1307  USA.
24
 
 *
25
 
 */
26
 
 
27
 
#include "kbd.h"
28
 
 
29
 
static keyconv c610_keyboard[256] = {
30
 
    { -1, -1, 0 },              /*           (no key)           */
31
 
    { 8, 1, 0 },                /*          ESC -> ESC          */
32
 
    { 9, 1, 0 },                /*            1 -> 1            */
33
 
    { 10, 1, 0 },               /*            2 -> 2            */
34
 
    { 11, 1, 0 },               /*            3 -> 3            */
35
 
    { 12, 1, 0 },               /*            4 -> 4            */
36
 
    { 13, 1, 0 },               /*            5 -> 5            */
37
 
    { 13, 2, 0 },               /*            6 -> 6            */
38
 
    { 14, 1, 0 },               /*            7 -> 7            */
39
 
    { 15, 1, 0 },               /*            8 -> 8            */
40
 
    { 0, 1, 0 },                /*            9 -> 9            */
41
 
    { 1, 1, 0 },                /*            0 -> 0            */
42
 
    { 1, 2, 0 },                /*        Minus -> Minus        */
43
 
    { 2, 1, 0 },                /*        Equal -> Equal        */
44
 
    { 3, 3, 0 },                /*    Backspace -> Del          */
45
 
    { 8, 2, 0 },                /*          TAB -> TAB          */
46
 
    { 9, 2, 0 },                /*            Q -> Q            */
47
 
    { 10, 2, 0 },               /*            W -> W            */
48
 
    { 11, 2, 0 },               /*            E -> E            */
49
 
    { 12, 2, 0 },               /*            R -> R            */
50
 
    { 12, 3, 0 },               /*            T -> T            */
51
 
    { 13, 3, 0 },               /*            Y -> Y            */
52
 
    { 14, 2, 0 },               /*            U -> U            */
53
 
    { 15, 2, 0 },               /*            I -> I            */
54
 
    { 0, 2, 0 },                /*            O -> O            */
55
 
    { 1, 3, 0 },                /*            P -> P            */
56
 
    { 1, 4, 0 },                /*            [ -> [            */
57
 
    { 2, 3, 0 },                /*            ] -> ]            */
58
 
    { 2, 4, 0 },                /*       Return -> Return       */
59
 
    { 8, 5, 0 },                /*    Left Ctrl -> CTRL         */
60
 
    { 9, 3, 0 },                /*            A -> A            */
61
 
    { 10, 3, 0 },               /*            S -> S            */
62
 
    { 11, 3, 0 },               /*            D -> D            */
63
 
    { 11, 4, 0 },               /*            F -> F            */
64
 
    { 12, 4, 0 },               /*            G -> G            */
65
 
    { 13, 4, 0 },               /*            H -> H            */
66
 
    { 14, 3, 0 },               /*            J -> J            */
67
 
    { 15, 3, 0 },               /*            K -> K            */
68
 
    { 0, 3, 0 },                /*            L -> L            */
69
 
    { 0, 4, 0 },                /*            ; -> ;            */
70
 
    { 1, 5, 0 },                /*            ' -> '            */
71
 
    { 8, 1, 0 },                /*            ` -> ESC          */
72
 
    { 8, 4, 1 },                /*   Left Shift -> Left Shift   */
73
 
    { -1, -1, 0 },              /*            \ -> (no key)     */
74
 
    { 9, 4, 0 },                /*            Z -> Z            */
75
 
    { 10, 4, 0 },               /*            X -> X            */
76
 
    { 10, 5, 0 },               /*            C -> C            */
77
 
    { 11, 5, 0 },               /*            V -> V            */
78
 
    { 12, 5, 0 },               /*            B -> B            */
79
 
    { 13, 5, 0 },               /*            N -> N            */
80
 
    { 14, 4, 0 },               /*            M -> M            */
81
 
    { 15, 4, 0 },               /*            , -> ,            */
82
 
    { 15, 5, 0 },               /*            . -> .            */
83
 
    { 0, 5, 0 },                /*            / -> /            */
84
 
    { 8, 3, 0 },                /*  Right Shift -> Right Shift  */
85
 
    { 6, 1, 0 },                /*       Grey * -> *            */
86
 
    { -1, -1, 0 },              /*     Left Alt -> (no key)     */
87
 
    { 14, 5, 0 },               /*        Space -> Space        */
88
 
    { 7, 0, 0 },                /*    Caps Lock -> Run/Stop     */
89
 
    { 8, 0, 0 },                /*           F1 -> F1           */
90
 
    { 9, 0, 0 },                /*           F2 -> F2           */
91
 
    { 10, 0, 0 },               /*           F3 -> F3           */
92
 
    { 11, 0, 0 },               /*           F4 -> F4           */
93
 
    { 12, 0, 0 },               /*           F5 -> F5           */
94
 
    { 13, 0, 0 },               /*           F6 -> F6           */
95
 
    { 14, 0, 0 },               /*           F7 -> F7           */
96
 
    { 15, 0, 0 },               /*           F8 -> F8           */
97
 
    { 0, 0, 0 },                /*           F9 -> F9           */
98
 
    { 1, 0, 0 },                /*          F10 -> F10          */
99
 
    { -1, -1, 0 },              /*     Num Lock -> (no key)     */
100
 
    { -1, -1, 0 },              /*  Scroll Lock -> (no key)     */
101
 
    { 4, 2, 0 },                /*     Numpad 7 -> Numpad 7     */
102
 
    { 5, 2, 0 },                /*     Numpad 8 -> Numpad 8     */
103
 
    { 6, 2, 0 },                /*     Numpad 9 -> Numpad 9     */
104
 
    { 7, 2, 0 },                /*     Numpad - -> Numpad -     */
105
 
    { 4, 3, 0 },                /*     Numpad 4 -> Numpad 4     */
106
 
    { 5, 3, 0 },                /*     Numpad 5 -> Numpad 5     */
107
 
    { 6, 3, 0 },                /*     Numpad 6 -> Numpad 6     */
108
 
    { 7, 3, 0 },                /*     Numpad + -> Numpad +     */
109
 
    { 4, 4, 0 },                /*     Numpad 1 -> Numpad 1     */
110
 
    { 5, 4, 0 },                /*     Numpad 2 -> Numpad 2     */
111
 
    { 6, 4, 0 },                /*     Numpad 3 -> Numpad 3     */
112
 
    { 4, 5, 0 },                /*     Numpad 0 -> Numpad 0     */
113
 
    { 5, 5, 0 },                /*     Numpad . -> Numpad .     */
114
 
    { -1, -1, 0 },              /*       SysReq -> (no key)     */
115
 
    { -1, -1, 0 },              /*           85 -> (no key)     */
116
 
    { -1, -1, 0 },              /*           86 -> (no key)     */
117
 
    { -1, -1, 0 },              /*          F11 -> (no key)     */
118
 
    { -1, -1, 0 },              /*          F12 -> (no key)     */
119
 
    { 4, 0, 0 },                /*         Home -> CLR/HOME     */
120
 
    { 3, 0, 0 },                /*           Up -> CRSR UP      */
121
 
    { 5, 0, 0 },                /*         PgUp -> Rev/Off      */
122
 
    { 3, 1, 0 },                /*         Left -> CRSR LEFT    */
123
 
    { 3, 2, 0 },                /*        Right -> CRSR RIGHT   */
124
 
    { 5, 1, 0 },                /*          End -> CE           */
125
 
    { 2, 0, 0 },                /*         Down -> CRSR DOWN    */
126
 
    { 6, 0, 0 },                /*       PgDown -> Norm/Graph   */
127
 
    { 2, 2, 0 },                /*          Ins -> Pound        */
128
 
    { 4, 1, 0 },                /*          Del -> ?            */
129
 
    { 7, 4, 0 },                /* Numpad Enter -> Numpad Enter */
130
 
    { 3, 4, 0 },                /*   Right Ctrl -> C=           */
131
 
    { 2, 5, 0 },                /*        Pause -> Pi           */
132
 
    { -1, -1, 0 },              /*       PrtScr -> (no key)     */
133
 
    { 7, 1, 0 },                /*     Numpad / -> Numpad /     */
134
 
    { -1, -1, 0 },              /*    Right Alt -> (no key)     */
135
 
    { -1, -1, 0 },              /*        Break -> (no key)     */
136
 
    { -1, -1, 0 },              /*   Left Win95 -> (no key)     */
137
 
    { -1, -1, 0 },              /*  Right Win95 -> (no key)     */
138
 
};
139
 
 
140
 
int c610_kbd_init(void)
141
 
{
142
 
    return kbd_init(1, 8, 4, c610_keyboard, sizeof(c610_keyboard));
143
 
}
144