2
* raster-cmdline-options.c - Raster-based video chip emulation helper,
3
* command line options.
6
* Andreas Boose <viceteam@t-online.de>
8
* This file is part of VICE, the Versatile Commodore Emulator.
9
* See README for copyright notice.
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
34
#include "raster-cmdline-options.h"
39
static const char *cname_chip[] = { "-", "vcache", "VideoCache",
40
"+", "vcache", "VideoCache",
43
static cmdline_option_t cmdline_options_chip[] =
45
{ NULL, SET_RESOURCE, 0, NULL, NULL, NULL,
46
(void *)1, NULL, "Enable the video cache" },
47
{ NULL, SET_RESOURCE, 0, NULL, NULL, NULL,
48
(void *)0, NULL, "Disable the video cache" },
52
int raster_cmdline_options_chip_init(const char *chipname,
53
struct video_chip_cap_s *video_chip_cap)
57
for (i = 0; cname_chip[i * 3] != NULL; i++) {
58
cmdline_options_chip[i].name = util_concat(cname_chip[i * 3], chipname,
59
cname_chip[i * 3 + 1], NULL);
60
cmdline_options_chip[i].resource_name = util_concat(chipname,
61
cname_chip[i * 3 + 2], NULL);
64
if (cmdline_register_options(cmdline_options_chip) < 0)
67
for (i = 0; cname_chip[i * 3] != NULL; i++) {
68
lib_free((char *)cmdline_options_chip[i].name);
69
lib_free((char *)cmdline_options_chip[i].resource_name);
72
if (video_cmdline_options_chip_init(chipname, video_chip_cap) < 0)