void uic64cart_proc(WPARAM wparam, HWND hwnd) { switch (wparam & 0xffff) { case IDM_CART_ATTACH_CRT: case IDM_CART_ATTACH_8KB: case IDM_CART_ATTACH_16KB: case IDM_CART_ATTACH_AR: case IDM_CART_ATTACH_AR3: case IDM_CART_ATTACH_AR4: case IDM_CART_ATTACH_STARDOS: case IDM_CART_ATTACH_AT: case IDM_CART_ATTACH_EPYX: case IDM_CART_ATTACH_IEEE488: case IDM_CART_ATTACH_RR: case IDM_CART_ATTACH_IDE64: case IDM_CART_ATTACH_SS4: case IDM_CART_ATTACH_SS5: case IDM_CART_ATTACH_STB: case IDM_CART_ENABLE_EXPERT: uic64cart_attach(wparam, hwnd, c64_ui_cartridges); break; case IDM_CART_SET_DEFAULT: cartridge_set_default(); break; case IDM_CART_DETACH: cartridge_detach_image(); break; case IDM_CART_FREEZE: keyboard_clear_keymatrix(); cartridge_trigger_freeze(); break; } }
static UI_MENU_CALLBACK(set_c64_cart_default_callback) { if (activated) { cartridge_set_default(); } return NULL; }
void uic64cart_proc(video_canvas_t *canvas, int idm) { switch (idm) { case IDM_CART_ATTACH_CRT: case IDM_CART_ATTACH_8KB: case IDM_CART_ATTACH_16KB: case IDM_CART_ATTACH_AR: case IDM_CART_ATTACH_AR3: case IDM_CART_ATTACH_AR4: case IDM_CART_ATTACH_STARDOS: case IDM_CART_ATTACH_AT: case IDM_CART_ATTACH_EPYX: case IDM_CART_ATTACH_IEEE488: case IDM_CART_ATTACH_RR: case IDM_CART_ATTACH_IDE64: case IDM_CART_ATTACH_SS4: case IDM_CART_ATTACH_SS5: case IDM_CART_ATTACH_STB: case IDM_CART_ENABLE_EXPERT: uic64cart_attach(canvas, idm, c64_ui_cartridges); break; case IDM_CART_SET_DEFAULT: cartridge_set_default(); break; case IDM_CART_DETACH: cartridge_detach_image(); break; case IDM_CART_FREEZE: keyboard_clear_keymatrix(); cartridge_trigger_freeze(); break; } }
static TUI_MENU_CALLBACK(cartridge_set_default_callback) { if (been_activated) { cartridge_set_default(); } return NULL; }
void uic64cart_proc(WPARAM wparam, HWND hwnd, int min_id, int max_id) { if ((wparam & 0xffff) >= (unsigned int)min_id && (wparam & 0xffff) <= (unsigned int)max_id) { uic64cart_attach(wparam, hwnd, built_cartridges); } switch (wparam & 0xffff) { case IDM_CART_ATTACH_CRT: uic64cart_attach(wparam, hwnd, c64_ui_cartridges); break; case IDM_CART_SET_DEFAULT: cartridge_set_default(); break; case IDM_CART_DETACH: cartridge_detach_image(-1); break; case IDM_CART_FREEZE: keyboard_clear_keymatrix(); cartridge_trigger_freeze(); break; } }
/* Probably one should simply remove the size numbers from the IDM_* stuff */ static void vic20_ui_specific(WPARAM wparam, HWND hwnd) { TCHAR *st_name; switch (wparam) { case IDM_VIC20MODEL_SETTINGS: ui_vic20model_settings_dialog(hwnd); break; case IDM_CART_VIC20_GENERIC: uicart_attach_special(hwnd, translate_text(IDS_SELECT_GENERIC), UILIB_FILTER_ALL, CARTRIDGE_VIC20_GENERIC); break; case IDM_CART_VIC20_UM: uicart_attach_special(hwnd, translate_text(IDS_SELECT_UM), UILIB_FILTER_ALL, CARTRIDGE_VIC20_UM); break; case IDM_CART_VIC20_FP: uicart_attach_special(hwnd, translate_text(IDS_SELECT_FP), UILIB_FILTER_ALL, CARTRIDGE_VIC20_FP); break; case IDM_CART_VIC20_MEGACART: uicart_attach_special(hwnd, translate_text(IDS_SELECT_MEGACART), UILIB_FILTER_ALL, CARTRIDGE_VIC20_MEGACART); break; case IDM_CART_VIC20_FINAL_EXPANSION: uicart_attach_special(hwnd, translate_text(IDS_SELECT_FINAL_EXPANSION), UILIB_FILTER_ALL, CARTRIDGE_VIC20_FINAL_EXPANSION); break; case IDM_CART_SMART_ATTACH: uicart_attach_special(hwnd, translate_text(IDS_SELECT_CARTRIDGE_IMAGE), UILIB_FILTER_ALL, CARTRIDGE_VIC20_DETECT); break; case IDM_CART_VIC20_8KB_2000: case IDM_CART_VIC20_16KB_4000: case IDM_CART_VIC20_8KB_6000: case IDM_CART_VIC20_8KB_A000: case IDM_CART_VIC20_4KB_B000: uicart_attach(wparam, hwnd, vic20_ui_cartridges); break; case IDM_CART_SET_DEFAULT: cartridge_set_default(); break; case IDM_VIC_SETTINGS: ui_vic_settings_dialog(hwnd); break; case IDM_CART_DETACH: cartridge_detach_image(-1); break; case IDM_VIC20_SETTINGS: ui_vic20_settings_dialog(hwnd); break; case IDM_SIDCART_SETTINGS: ui_sidcart_settings_dialog(hwnd); break; case IDM_ACIA_SETTINGS: ui_acia_settings_dialog(hwnd); break; case IDM_GEORAM_SETTINGS: ui_georam_settings_dialog(hwnd); break; case IDM_DIGIMAX_SETTINGS: ui_digimax_settings_dialog(hwnd); break; case IDM_DS12C887RTC_SETTINGS: ui_ds12c887rtc_settings_dialog(hwnd); break; #ifdef HAVE_TFE case IDM_TFE_SETTINGS: ui_tfe_settings_dialog(hwnd); break; #endif case IDM_SFX_SE_SETTINGS: ui_soundexpander_settings_dialog(hwnd); break; case IDM_SFX_SS_SETTINGS: ui_soundsampler_settings_dialog(hwnd); break; #ifdef HAVE_MIDI case IDM_MIDI_SETTINGS: ui_midi_settings_dialog(hwnd); break; #endif case IDM_JOYPORT_SETTINGS: ui_joyport_settings_dialog(hwnd, 1, 0, 1, 1, 0); break; case IDM_JOY_SETTINGS: ui_joystick_settings_dialog(hwnd); break; case IDM_EXTRA_JOY_SETTINGS: ui_extra_joystick_settings_dialog(hwnd); break; case IDM_MOUSE_SETTINGS: ui_mouse_settings_dialog(hwnd, 1); break; case IDM_ROM_SETTINGS: uirom_settings_dialog(hwnd, IDD_VIC20ROM_SETTINGS_DIALOG, IDD_VIC20DRIVEROM_SETTINGS_DIALOG, uirom_settings, vic20_main_trans, vic20_drive_trans, vic20_generic_trans, vic20_main_left_group, vic20_main_middle_group, vic20_main_right_group, vic20_drive_left_group, vic20_drive_middle_group, vic20_drive_right_group); break; case IDM_VIDEO_SETTINGS: ui_video_settings_dialog(hwnd, UI_VIDEO_CHIP_VIC, UI_VIDEO_CHIP_NONE); break; case IDM_DRIVE_SETTINGS: uidrivevic20_settings_dialog(hwnd); break; case IDM_RS232USER_SETTINGS: ui_rs232user_settings_dialog(hwnd); break; case IDM_KEYBOARD_SETTINGS: uikeyboard_settings_dialog(hwnd, &uikeyboard_config); break; case IDM_MEGACART_WRITEBACK_FILE: if ((st_name = uilib_select_file(hwnd, translate_text(IDS_MI_MEGACART_WRITEBACK_FILE), UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_SAVE, UILIB_SELECTOR_STYLE_DEFAULT)) != NULL) { char *name; name = system_wcstombs_alloc(st_name); resources_set_string("MegaCartNvRAMfilename", name); system_wcstombs_free(name); lib_free(st_name); } break; case IDM_SAMPLER_SETTINGS: ui_sampler_settings_dialog(hwnd); break; case IDM_USERPORT_RTC_58321A_SETTINGS: ui_userport_rtc_58321a_settings_dialog(hwnd); break; case IDM_USERPORT_RTC_DS1307_SETTINGS: ui_userport_rtc_ds1307_settings_dialog(hwnd); break; } }
/* Probably one should simply remove the size numbers from the IDM_* stuff */ static int vic20_ui_specific(video_canvas_t *canvas, int idm) { char *fname = NULL; switch (idm) { case IDM_VIC_SETTINGS: ui_vic_settings_dialog(); break; case IDM_VIC20_MODEL_VIC20_PAL: vic20model_set(VIC20MODEL_VIC20_PAL); break; case IDM_VIC20_MODEL_VIC20_NTSC: vic20model_set(VIC20MODEL_VIC20_NTSC); break; case IDM_VIC20_MODEL_VIC21: vic20model_set(VIC20MODEL_VIC21); break; case IDM_PALETTE_SETTINGS: ui_video_palette_settings_dialog(canvas, "VICExternalPalette", "VICPaletteFile", translate_text(IDS_VIC_PALETTE_FILENAME)); break; case IDM_COLOR_SETTINGS: ui_video_color_settings_dialog(canvas, "VICColorGamma", "VICColorTint", "VICColorSaturation", "VICColorContrast", "VICColorBrightness"); break; case IDM_RENDER_FILTER: ui_video_render_filter_settings_dialog(canvas, "VICFilter"); break; case IDM_CRT_EMULATION_SETTINGS: ui_video_crt_settings_dialog(canvas, "VICPALScanLineShade", "VICPALBlur", "VICPALOddLinePhase", "VICPALOddLineOffset"); break; case IDM_CART_VIC20_8KB_2000: case IDM_CART_VIC20_16KB_4000: case IDM_CART_VIC20_8KB_6000: case IDM_CART_VIC20_8KB_A000: case IDM_CART_VIC20_4KB_B000: uicart_attach(canvas, idm, vic20_ui_cartridges); break; case IDM_CART_VIC20_GENERIC: uicart_attach_special(canvas, translate_text(IDS_SELECT_GENERIC), UILIB_FILTER_ALL, CARTRIDGE_VIC20_GENERIC); break; case IDM_CART_VIC20_FP: uicart_attach_special(canvas, translate_text(IDS_SELECT_FP), UILIB_FILTER_ALL, CARTRIDGE_VIC20_FP); break; case IDM_CART_VIC20_MEGACART: uicart_attach_special(canvas, translate_text(IDS_SELECT_MEGACART), UILIB_FILTER_ALL, CARTRIDGE_VIC20_MEGACART); break; case IDM_CART_VIC20_FINAL_EXPANSION: uicart_attach_special(canvas, translate_text(IDS_SELECT_FINAL_EXPANSION), UILIB_FILTER_ALL, CARTRIDGE_VIC20_FINAL_EXPANSION); break; case IDM_CART_VIC20_SMART_ATTACH: uicart_attach_special(canvas, translate_text(IDS_SELECT_CARTRIDGE_IMAGE), UILIB_FILTER_ALL, CARTRIDGE_VIC20_DETECT); break; case IDM_CART_SET_DEFAULT: cartridge_set_default(); break; case IDM_CART_DETACH: cartridge_detach_image(-1); break; case IDM_VIC20_SETTINGS: ui_vic20_settings_dialog(); break; case IDM_COMPUTER_ROM_SETTINGS: ui_vic20_computer_rom_settings_dialog(canvas); break; case IDM_DRIVE_ROM_SETTINGS: ui_vic20_drive_rom_settings_dialog(canvas); break; case IDM_DRIVE_SETTINGS: uidrivevic20_settings_dialog(); break; case IDM_PRINTER_SETTINGS: ui_printer_settings_dialog(canvas, 0, 1); break; case IDM_RS232USER_SETTINGS: ui_rs232user_settings_dialog(); break; case IDM_SIDCART_SETTINGS: ui_sidcart_settings_dialog("$9800", "$9C00", "VIC20", 0x9800, 0x9c00); break; #ifdef AMIGA_OS4 case IDM_JOY_SETTINGS: ui_joystick_settings_vic20_dialog(); break; #else case IDM_JOY_DEVICE_SELECTION: ui_joystick_device_vic20_dialog(); break; case IDM_JOY_FIRE_SELECTION: ui_joystick_fire_vic20_dialog(); break; #endif case IDM_MEGACART_WRITEBACK_FILE: fname = BrowseFile(translate_text(IDMS_MEGACART_WRITEBACK_FILE), "#?", canvas); if (fname != NULL) { resources_set_string("MegaCartNvRAMfilename", fname); } break; case IDM_ACIA_SETTINGS: ui_acia20_settings_dialog(); break; case IDM_DIGIMAX_SETTINGS: ui_digimax_vic20_settings_dialog(); break; case IDM_DS12C887RTC_SETTINGS: ui_ds12c887rtc_vic20_settings_dialog(canvas); break; case IDM_GEORAM_SETTINGS: ui_georam_vic20_settings_dialog(canvas); break; case IDM_SFX_SE_SETTINGS: ui_soundexpander_vic20_settings_dialog(canvas); break; case IDM_SFX_SS_SETTINGS: ui_soundsampler_settings_dialog(canvas); break; case IDM_KEYBOARD_SETTINGS: // uikeyboard_settings_dialog(hwnd, &uikeyboard_config); break; } return 0; }
static UI_CALLBACK(default_cartridge) { cartridge_set_default(); }