mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 19:21:49 +01:00
93 lines
1.8 KiB
C
93 lines
1.8 KiB
C
|
|
#ifndef _CONFIG_H_
|
|
#define _CONFIG_H_
|
|
|
|
#define PATH_SIZE (0x100)
|
|
#define TOKEN_LIST_SIZE (0x20)
|
|
|
|
typedef struct
|
|
{
|
|
char *token;
|
|
int value;
|
|
}t_strint;
|
|
|
|
typedef struct
|
|
{
|
|
int video_width;
|
|
int video_height;
|
|
int video_depth;
|
|
int video_driver;
|
|
|
|
int autores;
|
|
int autores_w;
|
|
int autores_h;
|
|
|
|
int remap;
|
|
int blur;
|
|
int scanlines;
|
|
int scale;
|
|
|
|
int vsync;
|
|
int throttle;
|
|
int fps;
|
|
int skip;
|
|
|
|
int sound;
|
|
int sndcard;
|
|
int sndrate;
|
|
int swap;
|
|
|
|
int wave;
|
|
char wavpath[PATH_SIZE];
|
|
|
|
int joy_driver;
|
|
|
|
int split; /* 1= Split image at 2 megabit boundary */
|
|
int flip; /* 1= Bit-flip image */
|
|
int usa; /* 1= Set D6 of $1000 to indicate US machine */
|
|
int softres; /* 1= Allow RUN+SELECT */
|
|
} t_option;
|
|
|
|
typedef struct
|
|
{
|
|
double psg_preamp;
|
|
double fm_preamp;
|
|
uint8 boost;
|
|
uint8 hq_fm;
|
|
uint8 fm_core;
|
|
uint8 ssg_enabled;
|
|
int8 sram_auto;
|
|
int8 freeze_auto;
|
|
uint8 region_detect;
|
|
uint8 force_dtack;
|
|
uint8 bios_enabled;
|
|
int16 xshift;
|
|
int16 yshift;
|
|
int16 xscale;
|
|
int16 yscale;
|
|
uint8 tv_mode;
|
|
uint8 aspect;
|
|
uint8 overscan;
|
|
uint8 render;
|
|
uint8 sys_type[2];
|
|
uint8 crosshair;
|
|
} t_config;
|
|
|
|
/* Global variables */
|
|
extern t_option option;
|
|
extern t_config config;
|
|
extern t_strint video_driver_table[];
|
|
extern t_strint joy_driver_table[];
|
|
|
|
/* Function prototypes */
|
|
void do_config(char *file);
|
|
int parse_file(char *filename, int *argc, char **argv);
|
|
void parse_args(int argc, char **argv);
|
|
void print_options(void);
|
|
int check_bool(char *token);
|
|
void set_option_defaults(void);
|
|
void set_config_default(void);
|
|
|
|
#endif /* _CONFIG_H_ */
|
|
|