--- uae/src/include/options.h 2018/04/24 17:00:37 1.1.1.17 +++ uae/src/include/options.h 2018/04/24 17:17:05 1.1.1.26 @@ -7,10 +7,6 @@ * Copyright 1995-2001 Bernd Schmidt */ -#define UAEMAJOR 0 -#define UAEMINOR 8 -#define UAESUBREV 17 - 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,10 +18,39 @@ struct strlist { char *str; }; +/* 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; +}; + +struct gfx_params { + int width; + int height; + int lores; + int linedbl; + int correct_aspect; + int xcenter; + int ycenter; +}; + struct uae_prefs { struct strlist *unknown_lines; char description[256]; + char info[256]; int illegal_mem; int no_xhair; @@ -38,15 +63,13 @@ 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 sound_stereo; int mixed_stereo; int sound_bits; int sound_freq; @@ -57,15 +80,9 @@ struct uae_prefs { int sound_interpol; 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; @@ -73,12 +90,14 @@ struct uae_prefs { unsigned int chipset_mask; int ntscmode; int collision_level; - int fast_copper; + int leds_on_screen; char df[4][256]; char romfile[256]; + char romextfile[256]; char keyfile[256]; char prtname[256]; + char sername[256]; char path_floppy[256]; char path_hardfile[256]; @@ -96,9 +115,12 @@ struct uae_prefs { uae_u32 a3000mem_size; uae_u32 gfxmem_size; + int kickshifter; + struct uaedev_mount_info *mountinfo; int nr_floppies; + int dfxtype[4]; /* Target specific options */ int x11_use_low_bandwidth; @@ -107,12 +129,26 @@ struct uae_prefs { int x11_hide_cursor; int svga_no_linear; int win32_middle_mouse; - int win32_sound_style; - int win32_sound_tweak; int win32_logfile; int win32_iconified_nospeed; int win32_iconified_nosound; + int win32_no_overlay; /* If this is set, we won't try and use any RGB overlays */ + 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 */ @@ -140,30 +176,16 @@ 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 void fixup_prefs_dimensions (struct gfx_params *); 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; -#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 6 -extern void write_log (const char *, ...) __attribute__ ((format (printf, 1, 2))); -#else -extern void write_log (const char *, ...); -#endif +extern struct gfx_params *curr_gfx; extern void machdep_init (void); @@ -173,23 +195,8 @@ extern void machdep_init (void); #define __unix #endif -extern char romfile[], keyfile[], prtname[], sername[]; - -extern int cloanto_rom; - #define MAX_COLOR_MODES 5 -extern int fast_memcmp(const void *foo, const void *bar, int len); -extern int memcmpy(void *foo, const void *bar, int len); - -/* - * You can specify numbers from 0 to 5 here. It is possible that higher - * numbers will make the CPU emulation slightly faster, but if the setting - * is too high, you will run out of memory while compiling. - * Best to leave this as it is. - */ -#define CPU_EMU_SIZE 0 - /* #define NEED_TO_DEBUG_BADLY */ #if !defined(USER_PROGRAMS_BEHAVE) @@ -270,18 +277,3 @@ STATIC_INLINE void fuzzy_memset_le32_1 ( #if defined(AMIGA) && defined(__GNUC__) #include "od-amiga/amiga-kludges.h" #endif - -/* Every Amiga hardware clock cycle takes this many "virtual" cycles. This - used to be hardcoded as 1, but using higher values allows us to time some - stuff more precisely. - 512 is the official value from now on - it can't change, unless we want - _another_ config option "finegrain2_m68k_speed". - - We define this value here rather than in events.h so that gencpu.c sees - it. */ -#define CYCLE_UNIT 512 - -/* This one is used by cfgfile.c. We could reduce the CYCLE_UNIT back to 1, - I'm not 100% sure this code is bug free yet. */ -#define OFFICIAL_CYCLE_UNIT 512 -