--- uae/src/include/options.h 2018/04/24 16:42:32 1.1.1.5 +++ uae/src/include/options.h 2018/04/24 16:57:09 1.1.1.15 @@ -9,7 +9,7 @@ #define UAEMAJOR 0 #define UAEMINOR 8 -#define UAESUBREV 5 +#define UAESUBREV 15 typedef enum { KBD_LANG_US, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; @@ -17,16 +17,30 @@ extern long int version; struct uaedev_mount_info; +struct strlist { + struct strlist *next; + char *str; +}; + struct uae_prefs { - int framerate; + struct strlist *unknown_lines; + + char description[256]; + int illegal_mem; int no_xhair; int use_serial; int serial_demand; int parallel_demand; int automount_uaedev; + int use_gfxlib; + int socket_emu; + + int start_debugger; + int start_gui; - int fake_joystick; + int jport0; + int jport1; KbdLang keyboard_lang; int allow_save; int emul_accuracy; @@ -38,7 +52,11 @@ struct uae_prefs { int sound_freq; int sound_minbsiz; int sound_maxbsiz; + int sound_pri_time; + int sound_pri_cutoff; + int sound_interpol; + int gfx_framerate; int gfx_width; int gfx_height; int gfx_lores; @@ -50,31 +68,77 @@ struct uae_prefs { int gfx_ycenter; int color_mode; - /* X11 specific options */ - int use_low_bandwidth; - int use_mitshm; - int use_dgamode; - int blits_32bit_enabled; int immediate_blits; + unsigned int chipset_mask; + int ntscmode; + int collision_level; char df[4][256]; + char romfile[256]; + char keyfile[256]; + char prtname[256]; + + char path_floppy[256]; + char path_hardfile[256]; + char path_rom[256]; int m68k_speed; int cpu_level; int cpu_compatible; 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 gfxmem_size; - + struct uaedev_mount_info *mountinfo; + + int nr_floppies; + + /* Target specific options */ + int x11_use_low_bandwidth; + int x11_use_mitshm; + int x11_use_dgamode; + 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 curses_reverse_video; }; +/* Contains the filename of .uaerc */ +extern char optionsfile[]; +extern void save_options (FILE *, 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 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 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 cfgfile_load (struct uae_prefs *, const char *filename); +extern int cfgfile_save (struct uae_prefs *, const char *filename); +extern void cfgfile_parse_line (struct uae_prefs *p, char *); +extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value); +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 check_prefs_changed_custom (void); @@ -82,8 +146,8 @@ extern void check_prefs_changed_cpu (voi extern void check_prefs_changed_audio (void); extern int check_prefs_changed_gfx (void); -#define JSEM_DECODEVAL(n,v) (((v) >> (n*8)) & 255) -/* Determine how port n is configured with the value v in fake_joystick */ +#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) @@ -91,10 +155,6 @@ extern int check_prefs_changed_gfx (void #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 int parse_joy_spec (char *spec); - -/* These preferences make sense only at startup. */ -extern int no_gui, use_debugger, use_gfxlib; extern struct uae_prefs currprefs, changed_prefs; @@ -144,7 +204,7 @@ extern int memcmpy(void *foo, const void * may need some padding for the array. */ #define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2) -static __inline__ void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len) +STATIC_INLINE void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len) { uae_u32 *p2 = (uae_u32 *)((char *)p + offset); int a = len & 7; @@ -184,8 +244,10 @@ static __inline__ void fuzzy_memset_1 (v } } +/* This one knows it will never be asked to clear more than 32 bytes. Make sure you call this with a + constant for the length. */ #define fuzzy_memset_le32(p, c, o, l) fuzzy_memset_le32_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 7) >> 2) -static __inline__ void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len) +STATIC_INLINE void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len) { uae_u32 *p2 = (uae_u32 *)((char *)p + offset);