2
* uidigimax.c - DIGIMAX cartridge UI interface for MS-DOS.
5
* Marco van den Heuvel <blackystardust68@yahoo.com>
7
* This file is part of VICE, the Versatile Commodore Emulator.
8
* See README for copyright notice.
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.
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.
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
31
#include "resources.h"
34
#include "uidigimax.h"
36
TUI_MENU_DEFINE_TOGGLE(DIGIMAX)
37
TUI_MENU_DEFINE_RADIO(DIGIMAXbase)
39
static TUI_MENU_CALLBACK(digimax_base_submenu_callback)
44
resources_get_int("DIGIMAXbase", &value);
46
sprintf(s, "Userport");
48
sprintf(s, "$%X", value);
52
static tui_menu_item_def_t digimax_base_submenu[] = {
53
{ "Userport", NULL, radio_DIGIMAXbase_callback,
54
(void *)0xdd00, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
55
{ "$DE00", NULL, radio_DIGIMAXbase_callback,
56
(void *)0xde00, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
57
{ "$DE20", NULL, radio_DIGIMAXbase_callback,
58
(void *)0xde20, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
59
{ "$DE40", NULL, radio_DIGIMAXbase_callback,
60
(void *)0xde40, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
61
{ "$DE60", NULL, radio_DIGIMAXbase_callback,
62
(void *)0xde60, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
63
{ "$DE80", NULL, radio_DIGIMAXbase_callback,
64
(void *)0xde80, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
65
{ "$DEA0", NULL, radio_DIGIMAXbase_callback,
66
(void *)0xdea0, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
67
{ "$DEC0", NULL, radio_DIGIMAXbase_callback,
68
(void *)0xdec0, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
69
{ "$DEE0", NULL, radio_DIGIMAXbase_callback,
70
(void *)0xdee0, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
71
{ "$DF00", NULL, radio_DIGIMAXbase_callback,
72
(void *)0xdf00, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
73
{ "$DF20", NULL, radio_DIGIMAXbase_callback,
74
(void *)0xdf20, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
75
{ "$DF40", NULL, radio_DIGIMAXbase_callback,
76
(void *)0xdf40, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
77
{ "$DF60", NULL, radio_DIGIMAXbase_callback,
78
(void *)0xdf60, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
79
{ "$DF80", NULL, radio_DIGIMAXbase_callback,
80
(void *)0xdf80, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
81
{ "$DFA0", NULL, radio_DIGIMAXbase_callback,
82
(void *)0xdfa0, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
83
{ "$DFC0", NULL, radio_DIGIMAXbase_callback,
84
(void *)0xdfc0, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
85
{ "$DFE0", NULL, radio_DIGIMAXbase_callback,
86
(void *)0xdfe0, 7, TUI_MENU_BEH_CLOSE, NULL, NULL },
90
static tui_menu_item_def_t digimax_menu_items[] = {
91
{ "_Enable Digimax:", "Emulate Digimax Cartridge",
92
toggle_DIGIMAX_callback, NULL, 3,
93
TUI_MENU_BEH_CONTINUE, NULL, NULL },
94
{ "Digimax _base:", "Select the base of the Digimax Cartridge",
95
digimax_base_submenu_callback, NULL, 11,
96
TUI_MENU_BEH_CONTINUE, digimax_base_submenu,
101
void uidigimax_init(struct tui_menu *parent_submenu)
103
tui_menu_t ui_digimax_submenu;
105
ui_digimax_submenu = tui_menu_create("Digimax settings", 1);
107
tui_menu_add(ui_digimax_submenu, digimax_menu_items);
109
tui_menu_add_submenu(parent_submenu, "_Digimax settings...",
111
ui_digimax_submenu, NULL, 0,
112
TUI_MENU_BEH_CONTINUE);