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

« back to all changes in this revision

Viewing changes to src/arch/riscos/petui.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2010-02-11 18:30:16 UTC
  • mfrom: (1.1.8 upstream) (9.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100211183016-f6n8usn3tzp0u6dp
Tags: 2.2.dfsg-1
* New upstream release, C64 DTV is included so update package description
  and add it to the menu.
* Drop patch fixing build failure with gcc-4.4 , applied upstream.
* Fix some lintian problems and clean up debian/rules .

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#include "pet/pets.h"
40
40
 
41
 
 
42
 
 
43
 
 
44
41
static const char Rsrc_PetCrt[] = "Crtc";
45
42
static const char Rsrc_PetRAM9[] = "Ram9";
46
43
static const char Rsrc_PetRAMA[] = "RamA";
47
44
static const char Rsrc_PetDiag[] = "DiagPin";
48
45
static const char Rsrc_PetSuper[] = "SuperPET";
49
46
 
50
 
 
51
47
/* Modified PET keymap */
52
48
static unsigned char PETnormBusiness[KEYMAP_ENTRIES] = {
53
 
  0x60, 0x20, 0xff, 0x60,       /* 0 */
54
 
  0x20, 0xff, 0x66, 0x20,       /* 4 */
55
 
  0xff, 0xff, 0xff, 0xff,       /* 8 */
56
 
  0xff, 0xff, 0xff, 0xff,       /* 12 */
57
 
  0x50, 0x91, 0x11, 0x01,       /* 16 */
58
 
  0xff, 0x02, 0xff, 0x03,       /* 20 */
59
 
  0x92, 0x05, 0x37, 0x14,       /* 24 */
60
 
  0xff, 0xff, 0xff, 0xff,       /* 28 */
61
 
  0xff, 0x41, 0x51, 0x52,       /* 32 */
62
 
  0x12, 0x45, 0x93, 0x13,       /* 36 */
63
 
  0x03, 0x54, 0x04, 0x17,       /* 40 */
64
 
  0x94, 0x90, 0xff, 0x47,       /* 44 */
65
 
  0x10, 0x00, 0x31, 0x42,       /* 48 */
66
 
  0x92, 0x53, 0x55, 0x46,       /* 52 */
67
 
  0x36, 0x54, 0x26, 0x03,       /* 56 */
68
 
  0x34, 0x47, 0x84, 0xff,       /* 60 */
69
 
  0xff, 0x30, 0x81, 0x22,       /* 64 */
70
 
  0x43, 0x33, 0x25, 0x00,       /* 68 */
71
 
  0x26, 0x34, 0xff, 0xff,       /* 72 */
72
 
  0x64, 0xff, 0xff, 0x95,       /* 76 */
73
 
  0xff, 0x21, 0x61, 0x32,       /* 80 */
74
 
  0x23, 0x72, 0x35, 0x26,       /* 84 */
75
 
  0x95, 0x47, 0xff, 0x95,       /* 88 */
76
 
  0xff, 0x03, 0xff, 0xff,       /* 92 */
77
 
  0x40, 0x70, 0x82, 0x71,       /* 96 */
78
 
  0x62, 0x83, 0x73, 0x64,       /* 100 */
79
 
  0x86, 0xff, 0x74, 0x87,       /* 104 */
80
 
  0x67, 0xff, 0xff, 0xff,       /* 108 */
81
 
  0x94, 0xff, 0xff, 0xff,       /* 112 */
82
 
  0xff, 0xff, 0xff, 0xff,       /* 116 */
83
 
  0x15, 0x05, 0x57, 0x27,       /* 120 */
84
 
  0x77, 0xff, 0xff, 0xff        /* 124 */
 
49
    0x60, 0x20, 0xff, 0x60,     /* 0 */
 
50
    0x20, 0xff, 0x66, 0x20,     /* 4 */
 
51
    0xff, 0xff, 0xff, 0xff,     /* 8 */
 
52
    0xff, 0xff, 0xff, 0xff,     /* 12 */
 
53
    0x50, 0x91, 0x11, 0x01,     /* 16 */
 
54
    0xff, 0x02, 0xff, 0x03,     /* 20 */
 
55
    0x92, 0x05, 0x37, 0x14,     /* 24 */
 
56
    0xff, 0xff, 0xff, 0xff,     /* 28 */
 
57
    0xff, 0x41, 0x51, 0x52,     /* 32 */
 
58
    0x12, 0x45, 0x93, 0x13,     /* 36 */
 
59
    0x03, 0x54, 0x04, 0x17,     /* 40 */
 
60
    0x94, 0x90, 0xff, 0x47,     /* 44 */
 
61
    0x10, 0x00, 0x31, 0x42,     /* 48 */
 
62
    0x92, 0x53, 0x55, 0x46,     /* 52 */
 
63
    0x36, 0x54, 0x26, 0x03,     /* 56 */
 
64
    0x34, 0x47, 0x84, 0xff,     /* 60 */
 
65
    0xff, 0x30, 0x81, 0x22,     /* 64 */
 
66
    0x43, 0x33, 0x25, 0x00,     /* 68 */
 
67
    0x26, 0x34, 0xff, 0xff,     /* 72 */
 
68
    0x64, 0xff, 0xff, 0x95,     /* 76 */
 
69
    0xff, 0x21, 0x61, 0x32,     /* 80 */
 
70
    0x23, 0x72, 0x35, 0x26,     /* 84 */
 
71
    0x95, 0x47, 0xff, 0x95,     /* 88 */
 
72
    0xff, 0x03, 0xff, 0xff,     /* 92 */
 
73
    0x40, 0x70, 0x82, 0x71,     /* 96 */
 
74
    0x62, 0x83, 0x73, 0x64,     /* 100 */
 
75
    0x86, 0xff, 0x74, 0x87,     /* 104 */
 
76
    0x67, 0xff, 0xff, 0xff,     /* 108 */
 
77
    0x94, 0xff, 0xff, 0xff,     /* 112 */
 
78
    0xff, 0xff, 0xff, 0xff,     /* 116 */
 
79
    0x15, 0x05, 0x57, 0x27,     /* 120 */
 
80
    0x77, 0xff, 0xff, 0xff      /* 124 */
85
81
};
86
82
 
87
83
static unsigned char PETshiftBusiness[KEYMAP_ENTRIES];
88
 
static unsigned char PETnormB_sflags[KEYMAP_ENTRIES/8];
89
 
static unsigned char PETshiftB_sflags[KEYMAP_ENTRIES/8];
 
84
static unsigned char PETnormB_sflags[KEYMAP_ENTRIES / 8];
 
85
static unsigned char PETshiftB_sflags[KEYMAP_ENTRIES / 8];
90
86
static const char IBarIconName[] = "!vicepet";
91
87
static const char PETnormfile[] = "Vice:PET.RObusi/vkm";
92
88
 
93
89
static kbd_keymap_t PETkeysBusiness = {
94
 
  PETnormfile,
95
 
  PETnormBusiness,
96
 
  PETshiftBusiness,
97
 
  PETnormB_sflags,
98
 
  PETshiftB_sflags
 
90
    PETnormfile,
 
91
    PETnormBusiness,
 
92
    PETshiftBusiness,
 
93
    PETnormB_sflags,
 
94
    PETshiftB_sflags
99
95
};
100
96
 
101
 
 
102
97
static unsigned char PETnormGraphic[KEYMAP_ENTRIES] = {
103
 
  0x80, 0x94, 0xff, 0x80,       /* 0 */
104
 
  0x94, 0xff, 0x85, 0x94,       /* 4 */
105
 
  0xff, 0xff, 0xff, 0xff,       /* 8 */
106
 
  0xff, 0xff, 0xff, 0xff,       /* 12 */
107
 
  0x20, 0x67, 0x46, 0x56,       /* 16 */
108
 
  0xff, 0x36, 0xff, 0x87,       /* 20 */
109
 
  0x47, 0x07, 0x47, 0x26,       /* 24 */
110
 
  0xff, 0xff, 0xff, 0xff,       /* 28 */
111
 
  0xff, 0x30, 0x21, 0x22,       /* 32 */
112
 
  0x26, 0x33, 0x27, 0x86,       /* 36 */
113
 
  0x87, 0x16, 0x36, 0x27,       /* 40 */
114
 
  0x94, 0x81, 0x13, 0x17,       /* 44 */
115
 
  0x66, 0x76, 0x41, 0x31,       /* 48 */
116
 
  0x47, 0x23, 0x24, 0x34,       /* 52 */
117
 
  0x04, 0x16, 0x77, 0x87,       /* 56 */
118
 
  0x65, 0x17, 0x06, 0xff,       /* 60 */
119
 
  0xff, 0x40, 0x70, 0x51,       /* 64 */
120
 
  0x32, 0x43, 0x53, 0x76,       /* 68 */
121
 
  0x54, 0x65, 0xff, 0xff,       /* 72 */
122
 
  0xff, 0xff, 0xff, 0x64,       /* 76 */
123
 
  0xff, 0x50, 0x61, 0x42,       /* 80 */
124
 
  0x52, 0x72, 0x44, 0x54,       /* 84 */
125
 
  0x14, 0x17, 0xff, 0xff,       /* 88 */
126
 
  0xff, 0x97, 0xff, 0xff,       /* 92 */
127
 
  0x90, 0x60, 0x92, 0x71,       /* 96 */
128
 
  0x62, 0x63, 0x73, 0x96,       /* 100 */
129
 
  0x37, 0xff, 0xff, 0xff,       /* 104 */
130
 
  0xff, 0xff, 0xff, 0xff,       /* 108 */
131
 
  0x94, 0xff, 0xff, 0xff,       /* 112 */
132
 
  0xff, 0xff, 0xff, 0xff,       /* 116 */
133
 
  0x13, 0x07, 0xff, 0xff,       /* 120 */
134
 
  0xff, 0xff, 0xff, 0xff        /* 124 */
 
98
    0x80, 0x94, 0xff, 0x80,     /* 0 */
 
99
    0x94, 0xff, 0x85, 0x94,     /* 4 */
 
100
    0xff, 0xff, 0xff, 0xff,     /* 8 */
 
101
    0xff, 0xff, 0xff, 0xff,     /* 12 */
 
102
    0x20, 0x67, 0x46, 0x56,     /* 16 */
 
103
    0xff, 0x36, 0xff, 0x87,     /* 20 */
 
104
    0x47, 0x07, 0x47, 0x26,     /* 24 */
 
105
    0xff, 0xff, 0xff, 0xff,     /* 28 */
 
106
    0xff, 0x30, 0x21, 0x22,     /* 32 */
 
107
    0x26, 0x33, 0x27, 0x86,     /* 36 */
 
108
    0x87, 0x16, 0x36, 0x27,     /* 40 */
 
109
    0x94, 0x81, 0x13, 0x17,     /* 44 */
 
110
    0x66, 0x76, 0x41, 0x31,     /* 48 */
 
111
    0x47, 0x23, 0x24, 0x34,     /* 52 */
 
112
    0x04, 0x16, 0x77, 0x87,     /* 56 */
 
113
    0x65, 0x17, 0x06, 0xff,     /* 60 */
 
114
    0xff, 0x40, 0x70, 0x51,     /* 64 */
 
115
    0x32, 0x43, 0x53, 0x76,     /* 68 */
 
116
    0x54, 0x65, 0xff, 0xff,     /* 72 */
 
117
    0xff, 0xff, 0xff, 0x64,     /* 76 */
 
118
    0xff, 0x50, 0x61, 0x42,     /* 80 */
 
119
    0x52, 0x72, 0x44, 0x54,     /* 84 */
 
120
    0x14, 0x17, 0xff, 0xff,     /* 88 */
 
121
    0xff, 0x97, 0xff, 0xff,     /* 92 */
 
122
    0x90, 0x60, 0x92, 0x71,     /* 96 */
 
123
    0x62, 0x63, 0x73, 0x96,     /* 100 */
 
124
    0x37, 0xff, 0xff, 0xff,     /* 104 */
 
125
    0xff, 0xff, 0xff, 0xff,     /* 108 */
 
126
    0x94, 0xff, 0xff, 0xff,     /* 112 */
 
127
    0xff, 0xff, 0xff, 0xff,     /* 116 */
 
128
    0x13, 0x07, 0xff, 0xff,     /* 120 */
 
129
    0xff, 0xff, 0xff, 0xff      /* 124 */
135
130
};
136
131
 
137
132
static unsigned char PETshiftGraphic[KEYMAP_ENTRIES];
138
 
static unsigned char PETnormG_sflags[KEYMAP_ENTRIES/8];
139
 
static unsigned char PETshiftG_sflags[KEYMAP_ENTRIES/8];
 
133
static unsigned char PETnormG_sflags[KEYMAP_ENTRIES / 8];
 
134
static unsigned char PETshiftG_sflags[KEYMAP_ENTRIES / 8];
140
135
static const char PETgrphfile[] = "Vice:PET.ROgrph/vkm";
141
136
 
142
137
static kbd_keymap_t PETkeysGraphic = {
143
 
  PETgrphfile,
144
 
  PETnormGraphic,
145
 
  PETshiftGraphic,
146
 
  PETnormG_sflags,
147
 
  PETshiftG_sflags
 
138
    PETgrphfile,
 
139
    PETnormGraphic,
 
140
    PETshiftGraphic,
 
141
    PETnormG_sflags,
 
142
    PETshiftG_sflags
148
143
};
149
144
 
150
145
static const conf_iconid_t conf_grey_xpet[] = {
151
 
  ICON_LIST_CART64
152
 
  ICON_LIST_VIC
153
 
  ICON_LIST_SYS64
154
 
  ICON_LIST_SYSTEM
155
 
  ICON_LIST_DEVICES
156
 
  ICON_LIST_SID
157
 
  {0xff, 0xff}
 
146
    ICON_LIST_CART64
 
147
    ICON_LIST_VIC
 
148
    ICON_LIST_SYS64
 
149
    ICON_LIST_SYSTEM
 
150
    ICON_LIST_DEVICES
 
151
    ICON_LIST_SID
 
152
    { 0xff, 0xff }
158
153
};
159
154
 
160
 
 
161
155
static const char Rsrc_CrtcCache[] = "CrtcVideoCache";
162
156
 
163
157
static struct MenuVideoCache {
164
 
  RO_MenuHead head;
165
 
  RO_MenuItem item[1];
 
158
    RO_MenuHead head;
 
159
    RO_MenuItem item[1];
166
160
} MenuVideoCache = {
167
 
  MENU_HEADER("\\MenVCaT", 200),
168
 
  {
169
 
    MENU_ITEM_LAST("\\MenVCaCrt")
170
 
  }
 
161
    MENU_HEADER("\\MenVCaT", 200),
 
162
    {
 
163
        MENU_ITEM_LAST("\\MenVCaCrt")
 
164
    }
171
165
};
172
166
 
173
167
static struct MenuDisplayVideoCache {
174
 
  disp_desc_t dd;
175
 
  const char *values[1];
 
168
    disp_desc_t dd;
 
169
    const char *values[1];
176
170
} MenuDisplayVideoCache = {
177
 
  {NULL, {CONF_WIN_VIDEO, 0},
178
 
    (RO_MenuHead*)&MenuVideoCache, 1, DISP_DESC_BITFIELD, 0},
179
 
  {Rsrc_CrtcCache}
 
171
    { NULL, { CONF_WIN_VIDEO, 0 },
 
172
    (RO_MenuHead*)&MenuVideoCache, 1, DISP_DESC_BITFIELD, 0 },
 
173
    { Rsrc_CrtcCache }
180
174
};
181
175
 
182
 
 
183
176
static config_item_t PETdependconf[] = {
184
 
  {Rsrc_PetCrt, CONFIG_SELECT, {CONF_WIN_PET, Icon_ConfPET_PetCrt}},
185
 
  {Rsrc_PetRAM9, CONFIG_SELECT, {CONF_WIN_PET, Icon_ConfPET_PetRAM9}},
186
 
  {Rsrc_PetRAMA, CONFIG_SELECT, {CONF_WIN_PET, Icon_ConfPET_PetRAMA}},
187
 
  {Rsrc_PetDiag, CONFIG_SELECT, {CONF_WIN_PET, Icon_ConfPET_PetDiagPin}},
188
 
  {Rsrc_PetSuper, CONFIG_SELECT, {CONF_WIN_PET, Icon_ConfPET_PetSuper}},
189
 
  {NULL, 0, {0, 0}}
 
177
    { Rsrc_PetCrt, CONFIG_SELECT, { CONF_WIN_PET, Icon_ConfPET_PetCrt } },
 
178
    { Rsrc_PetRAM9, CONFIG_SELECT, { CONF_WIN_PET, Icon_ConfPET_PetRAM9 } },
 
179
    { Rsrc_PetRAMA, CONFIG_SELECT, { CONF_WIN_PET, Icon_ConfPET_PetRAMA } },
 
180
    { Rsrc_PetDiag, CONFIG_SELECT, { CONF_WIN_PET, Icon_ConfPET_PetDiagPin } },
 
181
    { Rsrc_PetSuper, CONFIG_SELECT, { CONF_WIN_PET, Icon_ConfPET_PetSuper } },
 
182
    { NULL, 0, { 0, 0 } }
190
183
};
191
184
 
192
 
 
193
185
/* PET keyboard names */
194
186
static char PETkeyBusinessName[] = "Business";
195
187
static char PETkeyGraphicName[] = "Graphic";
196
188
static char *PetModelName = NULL;
197
189
 
198
 
 
199
190
static void petui_grey_out_machine_icons(void)
200
191
{
201
 
  ui_set_icons_grey(NULL, conf_grey_xpet, 0);
 
192
    ui_set_icons_grey(NULL, conf_grey_xpet, 0);
202
193
}
203
194
 
204
195
static void petui_bind_video_cache_menu(void)
205
196
{
206
 
  ConfigMenus[CONF_MENU_VIDCACHE].menu = (RO_MenuHead*)&MenuVideoCache;
207
 
  ConfigMenus[CONF_MENU_VIDCACHE].desc = (disp_desc_t*)&MenuDisplayVideoCache;
 
197
    ConfigMenus[CONF_MENU_VIDCACHE].menu = (RO_MenuHead*)&MenuVideoCache;
 
198
    ConfigMenus[CONF_MENU_VIDCACHE].desc = (disp_desc_t*)&MenuDisplayVideoCache;
208
199
}
209
200
 
210
201
static const char *petui_get_machine_ibar_icon(void)
211
202
{
212
 
  return IBarIconName;
 
203
    return IBarIconName;
213
204
}
214
205
 
215
206
static const char *pet_get_keyboard_name(void)
216
207
{
217
 
  int idx;
 
208
    int idx;
218
209
 
219
 
  if (resources_get_int("KeymapIndex", &idx) != 0) idx = 0;
220
 
  if ((idx & 2) == 0) return PETkeyBusinessName;
221
 
  return PETkeyGraphicName;
 
210
    if (resources_get_int("KeymapIndex", &idx) != 0) {
 
211
        idx = 0;
 
212
    }
 
213
    if ((idx & 2) == 0) {
 
214
        return PETkeyBusinessName;
 
215
    }
 
216
    return PETkeyGraphicName;
222
217
}
223
218
 
224
219
static int set_pet_model_by_name(const char *name, const char *val)
225
220
{
226
 
  util_string_set(&PetModelName, val);
227
 
  return pet_set_model(PetModelName, NULL);
 
221
    util_string_set(&PetModelName, val);
 
222
    return pet_set_model(PetModelName, NULL);
228
223
}
229
224
 
230
225
 
231
226
static int petui_setup_config_window(int wnum)
232
227
{
233
 
  if (wnum == CONF_WIN_PET)
234
 
  {
235
 
    wimp_window_write_icon_text(ConfWindows[CONF_WIN_PET], Icon_ConfPET_PetKbd, pet_get_keyboard_name());
236
 
    return 0;
237
 
  }
238
 
  return -1;
 
228
    if (wnum == CONF_WIN_PET) {
 
229
        wimp_window_write_icon_text(ConfWindows[CONF_WIN_PET], Icon_ConfPET_PetKbd, pet_get_keyboard_name());
 
230
        return 0;
 
231
    }
 
232
    return -1;
239
233
}
240
234
 
241
235
static int petui_menu_select_config(int *block, int wnum)
242
236
{
243
 
  if (wnum == CONF_MENU_PETMODEL)
244
 
  {
245
 
    int i;
 
237
    if (wnum == CONF_MENU_PETMODEL) {
 
238
        int i;
246
239
 
247
 
    ui_set_menu_display_core_string(ConfigMenus[CONF_MENU_PETMODEL].desc, set_pet_model_by_name, block[0]);
248
 
    ui_setup_menu_display(ConfigMenus[CONF_MENU_PETMEM].desc);
249
 
    ui_setup_menu_display(ConfigMenus[CONF_MENU_PETIO].desc);
250
 
    ui_setup_menu_display(ConfigMenus[CONF_MENU_PETVIDEO].desc);
251
 
    wimp_window_write_icon_text(ConfWindows[CONF_WIN_PET], Icon_ConfPET_PetKbd, pet_get_keyboard_name());
252
 
    ui_update_rom_names();
253
 
    for (i=0; PETdependconf[i].resource != NULL; i++)
254
 
    {
255
 
      ui_setup_config_item(PETdependconf + i);
 
240
        ui_set_menu_display_core_string(ConfigMenus[CONF_MENU_PETMODEL].desc, set_pet_model_by_name, block[0]);
 
241
        ui_setup_menu_display(ConfigMenus[CONF_MENU_PETMEM].desc);
 
242
        ui_setup_menu_display(ConfigMenus[CONF_MENU_PETIO].desc);
 
243
        ui_setup_menu_display(ConfigMenus[CONF_MENU_PETVIDEO].desc);
 
244
        wimp_window_write_icon_text(ConfWindows[CONF_WIN_PET], Icon_ConfPET_PetKbd, pet_get_keyboard_name());
 
245
        ui_update_rom_names();
 
246
        for (i = 0; PETdependconf[i].resource != NULL; i++) {
 
247
            ui_setup_config_item(PETdependconf + i);
 
248
        }
 
249
        return 0;
256
250
    }
257
 
    return 0;
258
 
  }
259
 
  return -1;
 
251
    return -1;
260
252
}
261
253
 
262
254
static void petui_init_callbacks(void)
263
255
{
264
 
  ViceMachineCallbacks.setup_config_window = petui_setup_config_window;
265
 
  ViceMachineCallbacks.menu_select_config_main = petui_menu_select_config;
 
256
    ViceMachineCallbacks.setup_config_window = petui_setup_config_window;
 
257
    ViceMachineCallbacks.menu_select_config_main = petui_menu_select_config;
266
258
}
267
259
 
268
260
int petui_init(void)
269
261
{
270
 
  wimp_msg_desc *msg;
 
262
    wimp_msg_desc *msg;
271
263
 
272
 
  WimpTaskName = "Vice PET";
273
 
  petui_init_callbacks();
274
 
  petui_bind_video_cache_menu();
275
 
  msg = ui_emulator_init_prologue(petui_get_machine_ibar_icon());
276
 
  if (msg != NULL)
277
 
  {
278
 
    util_string_set(&PetModelName, "8032");
279
 
    ui_load_template("PetConfig", ConfWindows + CONF_WIN_PET, msg);
280
 
    ui_emulator_init_epilogue(msg);
281
 
    petui_grey_out_machine_icons();
282
 
    return 0;
283
 
  }
284
 
  return -1;
 
264
    WimpTaskName = "Vice PET";
 
265
    petui_init_callbacks();
 
266
    petui_bind_video_cache_menu();
 
267
    msg = ui_emulator_init_prologue(petui_get_machine_ibar_icon());
 
268
    if (msg != NULL) {
 
269
        util_string_set(&PetModelName, "8032");
 
270
        ui_load_template("PetConfig", ConfWindows + CONF_WIN_PET, msg);
 
271
        ui_emulator_init_epilogue(msg);
 
272
        petui_grey_out_machine_icons();
 
273
        return 0;
 
274
    }
 
275
    return -1;
285
276
}
286
277
 
287
278
void petui_shutdown(void)
290
281
 
291
282
int pet_kbd_init(void)
292
283
{
293
 
  kbd_default_keymap(&PETkeysBusiness);
294
 
  kbd_default_keymap(&PETkeysGraphic);
295
 
  kbd_init_keymap(4);
296
 
  kbd_add_keymap(&PETkeysBusiness, 0); kbd_add_keymap(&PETkeysBusiness, 1);
297
 
  kbd_add_keymap(&PETkeysGraphic, 2); kbd_add_keymap(&PETkeysGraphic, 3);
298
 
  kbd_load_keymap(NULL, 0);
299
 
  kbd_load_keymap(NULL, 2);
300
 
  return kbd_init();
 
284
    kbd_default_keymap(&PETkeysBusiness);
 
285
    kbd_default_keymap(&PETkeysGraphic);
 
286
    kbd_init_keymap(4);
 
287
    kbd_add_keymap(&PETkeysBusiness, 0); kbd_add_keymap(&PETkeysBusiness, 1);
 
288
    kbd_add_keymap(&PETkeysGraphic, 2); kbd_add_keymap(&PETkeysGraphic, 3);
 
289
    kbd_load_keymap(NULL, 0);
 
290
    kbd_load_keymap(NULL, 2);
 
291
    return kbd_init();
301
292
}