~ubuntu-branches/ubuntu/maverick/vice/maverick

« back to all changes in this revision

Viewing changes to src/arch/unix/vic20ui.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-02-01 11:30:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050201113026-3eyakzsmmheclvjg
Tags: 1.16-1
* New upstream version
* Fixes crash on 64-bit architectures (closes: #287640)
* x128 working again (closes: #286767)
* Works fine with /dev/dsp in use (not in the main changelog, but tested
  on my local machine as working).  Presumably, this also takes care of
  the issue with dsp being held.  I'm not sure if this is because I'm
  testing it on a 2.6 kernel now -- if you are still having problems
  with /dev/dsp, please reopen the bugs. (closes: #152952, #207942)
* Don't kill Makefile.in on clean

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * Written by
5
5
 *  Ettore Perazzoli <ettore@comm2000.it>
 
6
 *  Andreas Boose <viceteam@t-online.de>
6
7
 *
7
8
 * This file is part of VICE, the Versatile Commodore Emulator.
8
9
 * See README for copyright notice.
37
38
#include "lib.h"
38
39
#include "machine-video.h"
39
40
#include "resources.h"
 
41
#include "uiattach.h"
40
42
#include "uicommands.h"
41
43
#include "uidatasette.h"
42
44
#include "uidrive.h"
43
45
#include "uidrivec64vic20.h"
 
46
#include "uikeyboard.h"
 
47
#include "uimenu.h"
44
48
#include "uiperipheraliec.h"
45
 
#include "uimenu.h"
 
49
#include "uiromset.h"
46
50
#include "uirs232.h"
 
51
#include "uirs232user.h"
47
52
#include "uiscreenshot.h"
48
53
#include "uisettings.h"
49
54
#include "uisound.h"
111
116
    vsync_suspend_speed_eval();
112
117
}
113
118
 
114
 
static ui_menu_entry_t vic20_romset_submenu[] = {
115
 
    { N_("Load default ROMs"),
116
 
      (ui_callback_t)ui_set_romset, (ui_callback_data_t)"default.vrs", NULL },
117
 
    { "--" },
 
119
static ui_menu_entry_t vic20ui_main_romset_submenu[] = {
118
120
    { N_("Load new Kernal ROM"),
119
121
      (ui_callback_t)ui_load_rom_file,
120
122
      (ui_callback_data_t)"KernalName", NULL },
124
126
    { N_("Load new Character ROM"),
125
127
      (ui_callback_t)ui_load_rom_file,
126
128
      (ui_callback_data_t)"ChargenName", NULL },
 
129
    { NULL }
 
130
};
 
131
 
 
132
static ui_menu_entry_t vic20_romset_submenu[] = {
 
133
    { N_("Load default ROMs"),
 
134
      (ui_callback_t)ui_set_romset, (ui_callback_data_t)"default.vrs", NULL },
127
135
    { "--" },
 
136
    { N_("Load new computer ROM"),
 
137
      NULL, NULL, vic20ui_main_romset_submenu },
128
138
    { N_("Load new drive ROM"),
129
139
      NULL, NULL, ui_drivec64vic20_romset_submenu },
130
140
    { "--" },
131
 
    { N_("Load custom ROM set from file"),
132
 
      (ui_callback_t)ui_load_romset, NULL, NULL },
133
 
    { N_("Dump ROM set definition to file"),
134
 
      (ui_callback_t)ui_dump_romset, NULL, NULL },
 
141
    { N_("ROM set type"),
 
142
      NULL, NULL, uiromset_type_submenu },
 
143
    { "--" },
 
144
    { N_("ROM set archive"),
 
145
      NULL, NULL, uiromset_archive_submenu },
 
146
    { N_("ROM set file"),
 
147
      NULL, NULL, uiromset_file_submenu },
135
148
    { NULL }
136
149
};
137
150
 
309
322
      (ui_callback_t)set_joystick_device,
310
323
      (ui_callback_data_t)JOYDEV_DIGITAL_1, NULL },
311
324
#endif
 
325
#ifdef HAS_USB_JOYSTICK
 
326
    { N_("*USB Joystick 0"),
 
327
      (ui_callback_t)set_joystick_device,
 
328
      (ui_callback_data_t)JOYDEV_USB_0, NULL },
 
329
    { N_("*USB Joystick 1"),
 
330
      (ui_callback_t)set_joystick_device,
 
331
      (ui_callback_data_t)JOYDEV_USB_1, NULL },
 
332
#endif
312
333
#endif
313
334
    { NULL }
314
335
};
321
342
 
322
343
/*------------------------------------------------------------*/
323
344
 
324
 
UI_MENU_DEFINE_RADIO(RsUser)
 
345
UI_MENU_DEFINE_TOGGLE(RsUserEnable)
325
346
 
326
347
static ui_menu_entry_t vic20_rs232_submenu[] = {
327
 
    { N_("*No Userport RS232 emulation"),
328
 
      (ui_callback_t)radio_RsUser, (ui_callback_data_t)0, NULL },
329
 
    { N_("*Userport 300 baud RS232 emulation"),
330
 
      (ui_callback_t)radio_RsUser, (ui_callback_data_t)300, NULL },
331
 
    { N_("*Userport 1200 baud RS232 emulation"),
332
 
      (ui_callback_t)radio_RsUser, (ui_callback_data_t)1200, NULL },
 
348
    { N_("*Userport RS232 emulation"),
 
349
      (ui_callback_t)toggle_RsUserEnable, NULL, NULL },
 
350
    { N_("Userport RS232 baud rate"),
 
351
      NULL, NULL, rs232user_baudrate_submenu },
333
352
    { N_("Userport RS232 device"),
334
 
      NULL, NULL, rsuser_device_submenu },
 
353
      NULL, NULL, rs232user_device_submenu },
335
354
    { "--" },
336
355
    { N_("Serial 1 device..."), (ui_callback_t)set_rs232_device_file,
337
356
      (ui_callback_data_t)"RsDevice1", NULL },
421
440
    ui_set_application_icon(vic20_icon_data);
422
441
    vic20ui_dynamic_menu_create();
423
442
    ui_set_left_menu(ui_menu_create("LeftMenu",
424
 
                                    ui_disk_commands_menu,
 
443
                                    uiattach_disk_menu,
425
444
                                    ui_menu_separator,
426
 
                                    ui_tape_commands_menu,
 
445
                                    uiattach_tape_menu,
427
446
                                    ui_datasette_commands_menu,
428
447
                                    ui_menu_separator,
429
 
                                    ui_smart_attach_commands_menu,
 
448
                                    uiattach_smart_attach_menu,
430
449
                                    ui_menu_separator,
431
450
                                    vic20_cartridge_commands_menu,
432
451
                                    ui_menu_separator,
448
467
    ui_set_right_menu(ui_menu_create("RightMenu",
449
468
                                     ui_performance_settings_menu,
450
469
                                     ui_menu_separator,
451
 
                                     ui_keyboard_settings_menu,
 
470
                                     uikeyboard_settings_menu,
452
471
                                     ui_sound_settings_menu,
453
472
                                     ui_drivec64vic20_settings_menu,
454
473
                                     ui_peripheraliec_settings_menu,
468
487
                                     NULL));
469
488
 
470
489
    ui_set_tape_menu(ui_menu_create("TapeMenu",
471
 
                                    ui_tape_commands_menu,
 
490
                                    uiattach_tape_menu,
472
491
                                    ui_menu_separator,
473
492
                                    datasette_control_submenu,
474
493
                                    NULL));
475
494
    ui_set_topmenu("TopLevelMenu",
476
495
                   _("File"),
477
496
                   ui_menu_create("File",
478
 
                                  ui_smart_attach_commands_menu,
479
 
                                  ui_menu_separator,
480
 
                                  ui_disk_commands_menu,
481
 
                                  ui_menu_separator,
482
 
                                  ui_tape_commands_menu,
 
497
                                  uiattach_smart_attach_menu,
 
498
                                  ui_menu_separator,
 
499
                                  uiattach_disk_menu,
 
500
                                  ui_menu_separator,
 
501
                                  uiattach_tape_menu,
483
502
                                  ui_datasette_commands_menu,
484
503
                                  ui_menu_separator,
485
504
                                  vic20_cartridge_commands_menu,
507
526
                                  NULL),
508
527
                   _("Settings"),
509
528
                   ui_menu_create("Settings",
510
 
                                  ui_keyboard_settings_menu,
 
529
                                  uikeyboard_settings_menu,
511
530
                                  ui_sound_settings_menu,
512
531
                                  ui_drivec64vic20_settings_menu,
513
532
                                  ui_peripheraliec_settings_menu,