Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
configdb.c
Go to the documentation of this file.
1 /* Test-case for simple, work-in-progress Commodore 65 emulator.
2 
3  Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
4  Copyright (C)2016-2021 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19 
20 #include "xemu/emutools.h"
21 #include "xemu/emutools_config.h"
22 #include "configdb.h"
23 #include "commodore_65.h"
24 #include "xemu/emutools_hid.h"
25 #include "vic3.h"
26 
27 /* Important WARNING:
28  * This is a trap! If you have something here with '#ifdef', it's quite possible that the macro is
29  * not defined here, but defined elsewhere, thus the emulator sees totally different structs for
30  * real but the problem is hidden! That is, be very careful at configdb_st (the type definition
31  * itself also at the usage!) that should be only dependent on macros defined in xemu-target.h,
32  * since that header file is always included by the build system, at command line level. */
33 
35 
37 {
39  { "8", NULL, "Path of the D81 disk image to be attached as drive-8", &configdb.disk8 },
40  { "9", NULL, "Path of the D81 disk image to be attached as drive-9", &configdb.disk9 },
41  { "hostfsdir", NULL, "Path of the directory to be used as Host-FS base", &configdb.hostfsdir },
42  { "rom", DEFAULT_ROM_FILE, "Override system ROM path to be loaded", &configdb.rom },
43  { "keymap", KEYMAP_USER_FILENAME, "Set keymap configuration file to be used", &configdb.keymap },
44  { "gui", NULL, "Select GUI type for usage. Specify some insane str to get a list", &configdb.gui },
45  { "dumpmem", NULL, "Save memory content on exit", &configdb.dumpmem },
46 #ifdef XEMU_SNAPSHOT_SUPPORT
47  { "snapload", NULL, "Load a snapshot from the given file", &configdb.snapload },
48  { "snapsave", NULL, "Save a snapshot into the given file before Xemu would exit", &configdb.snapsave },
49 #endif
50  { "prg", NULL, "Load a PRG file directly into the memory (/w C64/65 auto-detection on load address)", &configdb.prg }
51  );
53  { "allowmousegrab", "Allow auto mouse grab with left-click", &allow_mouse_grab },
54  { "d81ro", "Force read-only status for image specified with -8 option", &configdb.d81ro },
55  { "driveled", "Render drive LED at the top right corner of the screen", &show_drive_led },
56  { "fullscreen", "Start in fullscreen mode", &configdb.fullscreen },
57  //{xemucfg_define_switch_option("noaudio", "Disable audio");
58 #ifdef FAKE_TYPING_SUPPORT
59  { "go64", "Go into C64 mode after start", &configdb.go64 },
60  { "autoload", "Load and start the first program from disk", &configdb.autoload },
61 #endif
62  { "syscon", "Keep system console open (Windows-specific effect only)", &configdb.syscon },
63  { "besure", "Skip asking \"are you sure?\" on RESET or EXIT", &i_am_sure_override }
64  );
66  { "sdlrenderquality", RENDER_SCALE_QUALITY, "Setting SDL hint for scaling method/quality on rendering (0, 1, 2)", &configdb.sdlrenderquality, 0, 2 },
67  { "dmarev", 2, "Revision of the DMAgic chip (0/1=F018A/B, 2=rom_auto, +512=modulo))", &configdb.dmarev, 0, 1000 },
68  { "prgmode", 0, "Override auto-detect option for -prg (64 or 65 for C64/C65 modes, 0 = default, auto detect)", &configdb.prgmode, 0, 65 }
69  );
70 }
show_drive_led
int show_drive_led
Definition: vic3.c:60
XEMUCFG_DEFINE_SWITCH_OPTIONS
#define XEMUCFG_DEFINE_SWITCH_OPTIONS(...)
Definition: emutools_config.h:123
emutools.h
configdb_st::prg
char * prg
Definition: configdb.h:33
vic3.h
i_am_sure_override
int i_am_sure_override
Definition: emutools.c:74
configdb_st::gui
char * gui
Definition: configdb.h:32
configdb_st::go64
int go64
Definition: configdb.h:34
configdb_st::rom
char * rom
Definition: configdb.h:32
configdb_st::disk8
char * disk8
Definition: configdb.h:30
configdb_st::snapsave
char * snapsave
Definition: configdb.h:33
configdb_st::keymap
char * keymap
Definition: configdb.h:32
configdb_st::d81ro
int d81ro
Definition: configdb.h:34
configdb_st::sdlrenderquality
int sdlrenderquality
Definition: configdb.h:35
configdb_define_emulator_options
void configdb_define_emulator_options(void)
Definition: configdb.c:36
allow_mouse_grab
int allow_mouse_grab
Definition: emutools.c:118
configdb.h
configdb_st::hostfsdir
char * hostfsdir
Definition: configdb.h:32
configdb_st::autoload
int autoload
Definition: configdb.h:34
emutools_config.h
configdb
struct configdb_st configdb
Definition: configdb.c:34
commodore_65.h
configdb_st::syscon
int syscon
Definition: configdb.h:34
configdb_st::fullscreen
int fullscreen
Definition: configdb.h:34
XEMUCFG_DEFINE_STR_OPTIONS
#define XEMUCFG_DEFINE_STR_OPTIONS(...)
Definition: emutools_config.h:119
RENDER_SCALE_QUALITY
#define RENDER_SCALE_QUALITY
Definition: commodore_65.h:27
XEMUCFG_DEFINE_NUM_OPTIONS
#define XEMUCFG_DEFINE_NUM_OPTIONS(...)
Definition: emutools_config.h:120
emutools_hid.h
configdb_st::snapload
char * snapload
Definition: configdb.h:33
configdb_st::disk9
char * disk9
Definition: configdb.h:31
configdb_st::dmarev
int dmarev
Definition: configdb.h:35
configdb_st::prgmode
int prgmode
Definition: configdb.h:35
DEFAULT_ROM_FILE
#define DEFAULT_ROM_FILE
Definition: commodore_65.h:35
configdb_st::dumpmem
char * dumpmem
Definition: configdb.h:32
configdb_st
Definition: configdb.h:29