--- uae/src/include/options.h 2018/04/24 17:07:44 1.1.1.21 +++ uae/src/include/options.h 2018/04/24 17:22:39 1.1.1.28 @@ -7,11 +7,8 @@ * Copyright 1995-2001 Bernd Schmidt */ -#define UAEMAJOR 0 -#define UAEMINOR 8 -#define UAESUBREV 21 - -typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; +typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, + KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; extern long int version; @@ -22,14 +19,71 @@ struct strlist { char *str; }; +struct config_list { + const char *filename; + const char *description; + const char *sortstr; +}; + +extern struct config_list *predef_configs; +extern int n_predef_configs; + +struct uae_rect { + int w, h; +}; + +extern struct uae_rect *gfx_fullscreen_modes, *gfx_windowed_modes; +extern int n_fullscreen_modes, n_windowed_modes; + +#define FILTER_SOUND_OFF 0 +#define FILTER_SOUND_EMUL 1 +#define FILTER_SOUND_ON 2 + +#define FILTER_SOUND_TYPE_A500 0 +#define FILTER_SOUND_TYPE_A1200 1 + +/* maximum number native input devices supported (single type) */ +#define MAX_INPUT_DEVICES 6 +/* maximum number of native input device's buttons and axles supported */ +#define MAX_INPUT_DEVICE_EVENTS 256 +/* 4 different customization settings */ +#define MAX_INPUT_SETTINGS 4 +#define MAX_INPUT_SUB_EVENT 4 +#define MAX_INPUT_SIMULTANEOUS_KEYS 4 + +struct uae_input_device { + char *name; + uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; + char *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; + uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; + uae_s16 extra[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS]; + uae_u8 enabled; +}; + +typedef enum { DRV_NONE = -1, DRV_35_DD = 0, DRV_35_HD, DRV_525_SD, DRV_35_DD_ESCOM } drive_type; + +enum { CP_GENERIC = 1, CP_CDTV, CP_CD32, CP_A500, CP_A500P, CP_A600, CP_A1000, + CP_A1200, CP_A2000, CP_A3000, CP_A3000T, CP_A4000, CP_A4000T }; + +struct gfx_params { + int width; + int height; + int lores; + int linedbl; + int correct_aspect; + int xcenter; + int ycenter; + int leds_on_screen; +}; + struct uae_prefs { struct strlist *unknown_lines; char description[256]; + char sortstr[256]; char info[256]; int illegal_mem; - int no_xhair; int use_serial; int serial_demand; int parallel_demand; @@ -39,34 +93,25 @@ struct uae_prefs { int start_debugger; int start_gui; - int jport0; - int jport1; KbdLang keyboard_lang; int allow_save; int emul_accuracy; int test_drawing_speed; int produce_sound; - int stereo; - int mixed_stereo; - int sound_bits; + int sound_stereo; + int sound_stereo_separation; + int sound_mixed_stereo_delay; int sound_freq; - int sound_minbsiz; int sound_maxbsiz; - int sound_pri_time; - int sound_pri_cutoff; int sound_interpol; + int sound_filter; + int sound_filter_type; int gfx_framerate; - int gfx_width; - int gfx_height; - int gfx_lores; - int gfx_linedbl; - int gfx_correct_aspect; + struct gfx_params gfx_w, gfx_f; int gfx_afullscreen; int gfx_pfullscreen; - int gfx_xcenter; - int gfx_ycenter; int color_mode; int blits_32bit_enabled; @@ -74,10 +119,16 @@ struct uae_prefs { unsigned int chipset_mask; int ntscmode; int collision_level; - int fast_copper; + + int cs_rtc; + int cs_ide; + int cs_a1000ram; + int cs_fatgaryrev; + int cs_ramseyrev; char df[4][256]; char romfile[256]; + unsigned int rom_crc32; char romextfile[256]; char keyfile[256]; char prtname[256]; @@ -88,22 +139,25 @@ struct uae_prefs { char path_rom[256]; int m68k_speed; - int cpu_level; - int cpu_compatible; + int cpu_model; + int fpu_model; int address_space_24; uae_u32 z3fastmem_size; uae_u32 fastmem_size; uae_u32 chipmem_size; uae_u32 bogomem_size; - uae_u32 a3000mem_size; + uae_u32 mbresmem_low_size; + uae_u32 mbresmem_high_size; uae_u32 gfxmem_size; int kickshifter; struct uaedev_mount_info *mountinfo; + int bootrom; int nr_floppies; + drive_type dfxtype[4]; /* Target specific options */ int x11_use_low_bandwidth; @@ -119,25 +173,39 @@ struct uae_prefs { int win32_automount_drives; int curses_reverse_video; + + int jport0; + int jport1; + int input_selected_setting; + int input_joymouse_multiplier; + int input_joymouse_deadzone; + int input_joystick_deadzone; + int input_joymouse_speed; + int input_autofire_framecnt; + int input_mouse_speed; + struct uae_input_device joystick_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES]; + struct uae_input_device mouse_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES]; + struct uae_input_device keyboard_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES]; }; /* Contains the filename of .uaerc */ extern char optionsfile[]; -extern void save_options (FILE *, struct uae_prefs *); +extern void save_options (FILE *, const struct uae_prefs *); extern void default_prefs (struct uae_prefs *); extern void discard_prefs (struct uae_prefs *); -extern int parse_cmdline_option (char, char *); +extern int parse_cmdline_option (struct uae_prefs *, char, char *); -extern int cfgfile_yesno (char *option, char *value, char *name, int *location); -extern int cfgfile_intval (char *option, char *value, char *name, int *location, int scale); -extern int cfgfile_strval (char *option, char *value, char *name, int *location, const char *table[], int more); -extern int cfgfile_string (char *option, char *value, char *name, char *location, int maxsz); +extern int cfgfile_yesno (const char *option, const char *value, const char *name, int *location); +extern int cfgfile_uintval (const char *option, const char *value, const char *name, unsigned int *location, int scale); +extern int cfgfile_intval (const char *option, const char *value, const char *name, int *location, int scale); +extern int cfgfile_strval (const char *option, const char *value, const char *name, int *location, const char *table[], int more); +extern int cfgfile_string (const char *option, const char *value, const char *name, char *location, int maxsz); extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file); -extern int target_parse_option (struct uae_prefs *, char *option, char *value); -extern void target_save_options (FILE *, struct uae_prefs *); +extern int target_parse_option (struct uae_prefs *, const char *option, const char *value); +extern void target_save_options (FILE *, const struct uae_prefs *); extern int cfgfile_load (struct uae_prefs *, const char *filename); extern int cfgfile_save (struct uae_prefs *, const char *filename); @@ -146,25 +214,20 @@ extern int cfgfile_parse_option (struct extern int cfgfile_get_description (const char *filename, char *description); extern void cfgfile_show_usage (void); -extern void fixup_prefs_dimensions (struct uae_prefs *prefs); +extern int cstype_from_prefs (struct uae_prefs *p); +extern void built_in_chipset_prefs (struct uae_prefs *p, int); + +extern int fixup_prefs_dimensions (struct gfx_params *, struct uae_rect *, int); extern void check_prefs_changed_custom (void); extern void check_prefs_changed_cpu (void); extern void check_prefs_changed_audio (void); extern int check_prefs_changed_gfx (void); -#define JSEM_DECODEVAL(n,v) ((n) == 0 ? (v)->jport0 : (v)->jport1) -/* Determine how port n is configured */ -#define JSEM_ISJOY0(n,v) (JSEM_DECODEVAL(n,v) == 0) -#define JSEM_ISJOY1(n,v) (JSEM_DECODEVAL(n,v) == 1) -#define JSEM_ISMOUSE(n,v) (JSEM_DECODEVAL(n,v) == 2) -#define JSEM_ISNUMPAD(n,v) (JSEM_DECODEVAL(n,v) == 3) -#define JSEM_ISCURSOR(n,v) (JSEM_DECODEVAL(n,v) == 4) -#define JSEM_ISSOMEWHEREELSE(n,v) (JSEM_DECODEVAL(n,v) == 5) -extern const char *gameport_state (int n); - extern struct uae_prefs currprefs, changed_prefs; +extern struct gfx_params *curr_gfx; + extern void machdep_init (void); /* AIX doesn't think it is Unix. Neither do I. */