Annotation of uae/src/include/options.h, revision 1.1.1.26

1.1       root        1:  /*
                      2:   * UAE - The Un*x Amiga Emulator
                      3:   *
1.1.1.2   root        4:   * Stuff
1.1       root        5:   *
1.1.1.3   root        6:   * Copyright 1995, 1996 Ed Hanway
1.1.1.17  root        7:   * Copyright 1995-2001 Bernd Schmidt
1.1       root        8:   */
                      9: 
1.1.1.17  root       10: typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
1.1       root       11: 
1.1.1.5   root       12: extern long int version;
                     13: 
                     14: struct uaedev_mount_info;
1.1.1.3   root       15: 
1.1.1.7   root       16: struct strlist {
                     17:     struct strlist *next;
                     18:     char *str;
                     19: };
                     20: 
1.1.1.25  root       21: /* maximum number native input devices supported (single type) */
                     22: #define MAX_INPUT_DEVICES 6
                     23: /* maximum number of native input device's buttons and axles supported */
                     24: #define MAX_INPUT_DEVICE_EVENTS 256
                     25: /* 4 different customization settings */
                     26: #define MAX_INPUT_SETTINGS 4
                     27: #define MAX_INPUT_SUB_EVENT 4
                     28: #define MAX_INPUT_SIMULTANEOUS_KEYS 4
                     29: 
                     30: struct uae_input_device {
                     31:     char *name;
                     32:     uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
                     33:     char *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
                     34:     uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
                     35:     uae_s16 extra[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS];
                     36:     uae_u8 enabled;
                     37: };
                     38: 
1.1.1.26! root       39: struct gfx_params {
        !            40:     int width;
        !            41:     int height;
        !            42:     int lores;
        !            43:     int linedbl;
        !            44:     int correct_aspect;
        !            45:     int xcenter;
        !            46:     int ycenter;
        !            47: };
        !            48: 
1.1.1.3   root       49: struct uae_prefs {
1.1.1.7   root       50:     struct strlist *unknown_lines;
                     51: 
                     52:     char description[256];
1.1.1.18  root       53:     char info[256];
1.1.1.7   root       54: 
1.1.1.3   root       55:     int illegal_mem;
                     56:     int no_xhair;
                     57:     int use_serial;
                     58:     int serial_demand;
                     59:     int parallel_demand;
1.1.1.7   root       60:     int use_gfxlib;
1.1.1.9   root       61:     int socket_emu;
1.1.1.7   root       62: 
                     63:     int start_debugger;
                     64:     int start_gui;
1.1.1.3   root       65: 
                     66:     KbdLang keyboard_lang;
                     67:     int allow_save;
                     68:     int emul_accuracy;
                     69:     int test_drawing_speed;
                     70: 
                     71:     int produce_sound;
1.1.1.23  root       72:     int sound_stereo;
1.1.1.16  root       73:     int mixed_stereo;
1.1.1.3   root       74:     int sound_bits;
                     75:     int sound_freq;
                     76:     int sound_minbsiz;
                     77:     int sound_maxbsiz;
1.1.1.7   root       78:     int sound_pri_time;
                     79:     int sound_pri_cutoff;
1.1.1.10  root       80:     int sound_interpol;
1.1.1.3   root       81: 
1.1.1.9   root       82:     int gfx_framerate;
1.1.1.26! root       83:     struct gfx_params gfx_w, gfx_f;
1.1.1.5   root       84:     int gfx_afullscreen;
                     85:     int gfx_pfullscreen;
1.1.1.3   root       86:     int color_mode;
                     87: 
                     88:     int blits_32bit_enabled;
                     89:     int immediate_blits;
1.1.1.9   root       90:     unsigned int chipset_mask;
                     91:     int ntscmode;
1.1.1.15  root       92:     int collision_level;
1.1.1.24  root       93:     int leds_on_screen;
1.1.1.3   root       94: 
                     95:     char df[4][256];
1.1.1.7   root       96:     char romfile[256];
1.1.1.21  root       97:     char romextfile[256];
1.1.1.7   root       98:     char keyfile[256];
                     99:     char prtname[256];
1.1.1.18  root      100:     char sername[256];
1.1.1.7   root      101: 
                    102:     char path_floppy[256];
                    103:     char path_hardfile[256];
                    104:     char path_rom[256];
1.1.1.3   root      105: 
                    106:     int m68k_speed;
                    107:     int cpu_level;
                    108:     int cpu_compatible;
                    109:     int address_space_24;
1.1.1.9   root      110: 
1.1.1.5   root      111:     uae_u32 z3fastmem_size;
                    112:     uae_u32 fastmem_size;
                    113:     uae_u32 chipmem_size;
                    114:     uae_u32 bogomem_size;
                    115:     uae_u32 a3000mem_size;
                    116:     uae_u32 gfxmem_size;
1.1.1.7   root      117: 
1.1.1.19  root      118:     int kickshifter;
                    119: 
1.1.1.5   root      120:     struct uaedev_mount_info *mountinfo;
1.1.1.7   root      121: 
1.1.1.14  root      122:     int nr_floppies;
1.1.1.25  root      123:     int dfxtype[4];
1.1.1.14  root      124: 
1.1.1.7   root      125:     /* Target specific options */
                    126:     int x11_use_low_bandwidth;
                    127:     int x11_use_mitshm;
                    128:     int x11_use_dgamode;
                    129:     int x11_hide_cursor;
                    130:     int svga_no_linear;
1.1.1.9   root      131:     int win32_middle_mouse;
                    132:     int win32_logfile;
                    133:     int win32_iconified_nospeed;
                    134:     int win32_iconified_nosound;
1.1.1.19  root      135:     int win32_no_overlay; /* If this is set, we won't try and use any RGB overlays */
                    136:     int win32_automount_drives;
                    137: 
1.1.1.11  root      138:     int curses_reverse_video;
1.1.1.25  root      139: 
                    140:     int jport0;
                    141:     int jport1;
                    142:     int input_selected_setting;
                    143:     int input_joymouse_multiplier;
                    144:     int input_joymouse_deadzone;
                    145:     int input_joystick_deadzone;
                    146:     int input_joymouse_speed;
                    147:     int input_autofire_framecnt;
                    148:     int input_mouse_speed;
                    149:     struct uae_input_device joystick_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
                    150:     struct uae_input_device mouse_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
                    151:     struct uae_input_device keyboard_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
1.1.1.3   root      152: };
                    153: 
1.1.1.7   root      154: /* Contains the filename of .uaerc */
                    155: extern char optionsfile[];
                    156: extern void save_options (FILE *, struct uae_prefs *);
                    157: 
                    158: extern void default_prefs (struct uae_prefs *);
                    159: extern void discard_prefs (struct uae_prefs *);
                    160: 
1.1.1.10  root      161: extern int parse_cmdline_option (char, char *);
                    162: 
1.1.1.7   root      163: extern int cfgfile_yesno (char *option, char *value, char *name, int *location);
                    164: extern int cfgfile_intval (char *option, char *value, char *name, int *location, int scale);
                    165: extern int cfgfile_strval (char *option, char *value, char *name, int *location, const char *table[], int more);
                    166: extern int cfgfile_string (char *option, char *value, char *name, char *location, int maxsz);
                    167: extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file);
                    168: 
                    169: extern int target_parse_option (struct uae_prefs *, char *option, char *value);
                    170: extern void target_save_options (FILE *, struct uae_prefs *);
                    171: 
                    172: extern int cfgfile_load (struct uae_prefs *, const char *filename);
                    173: extern int cfgfile_save (struct uae_prefs *, const char *filename);
1.1.1.8   root      174: extern void cfgfile_parse_line (struct uae_prefs *p, char *);
                    175: extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value);
1.1.1.7   root      176: extern int cfgfile_get_description (const char *filename, char *description);
                    177: extern void cfgfile_show_usage (void);
                    178: 
1.1.1.26! root      179: extern void fixup_prefs_dimensions (struct gfx_params *);
1.1.1.5   root      180: 
                    181: extern void check_prefs_changed_custom (void);
                    182: extern void check_prefs_changed_cpu (void);
                    183: extern void check_prefs_changed_audio (void);
                    184: extern int check_prefs_changed_gfx (void);
                    185: 
1.1.1.3   root      186: extern struct uae_prefs currprefs, changed_prefs;
                    187: 
1.1.1.26! root      188: extern struct gfx_params *curr_gfx;
        !           189: 
1.1.1.3   root      190: extern void machdep_init (void);
1.1       root      191: 
                    192: /* AIX doesn't think it is Unix. Neither do I. */
                    193: #if defined(_ALL_SOURCE) || defined(_AIX)
                    194: #undef __unix
                    195: #define __unix
                    196: #endif
                    197: 
1.1.1.2   root      198: #define MAX_COLOR_MODES 5
1.1       root      199: 
                    200: /* #define NEED_TO_DEBUG_BADLY */
                    201: 
1.1.1.2   root      202: #if !defined(USER_PROGRAMS_BEHAVE)
                    203: #define USER_PROGRAMS_BEHAVE 0
                    204: #endif
                    205: 
1.1.1.3   root      206: /* Some memsets which know that they can safely overwrite some more memory
                    207:  * at both ends and use that knowledge to align the pointers. */
                    208: 
1.1.1.2   root      209: #define QUADRUPLIFY(c) (((c) | ((c) << 8)) | (((c) | ((c) << 8)) << 16))
                    210: 
                    211: /* When you call this routine, bear in mind that it rounds the bounds and
                    212:  * may need some padding for the array. */
                    213: 
                    214: #define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2)
1.1.1.10  root      215: STATIC_INLINE void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len)
1.1.1.2   root      216: {
1.1.1.3   root      217:     uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
1.1.1.2   root      218:     int a = len & 7;
                    219:     len >>= 3;
                    220:     switch (a) {
                    221:      case 7: p2--; goto l1;
                    222:      case 6: p2-=2; goto l2;
                    223:      case 5: p2-=3; goto l3;
                    224:      case 4: p2-=4; goto l4;
                    225:      case 3: p2-=5; goto l5;
                    226:      case 2: p2-=6; goto l6;
                    227:      case 1: p2-=7; goto l7;
1.1.1.3   root      228:      case 0: if (!--len) return; break;
1.1.1.2   root      229:     }
                    230: 
                    231:     for (;;) {
                    232:        p2[0] = c;
                    233:        l1:
                    234:        p2[1] = c;
                    235:        l2:
                    236:        p2[2] = c;
                    237:        l3:
                    238:        p2[3] = c;
                    239:        l4:
                    240:        p2[4] = c;
                    241:        l5:
                    242:        p2[5] = c;
                    243:        l6:
                    244:        p2[6] = c;
                    245:        l7:
                    246:        p2[7] = c;
1.1.1.3   root      247: 
1.1.1.2   root      248:        if (!len)
                    249:            break;
                    250:        len--;
                    251:        p2 += 8;
                    252:     }
                    253: }
                    254: 
1.1.1.9   root      255: /* This one knows it will never be asked to clear more than 32 bytes.  Make sure you call this with a
                    256:    constant for the length.  */
1.1.1.3   root      257: #define fuzzy_memset_le32(p, c, o, l) fuzzy_memset_le32_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 7) >> 2)
1.1.1.10  root      258: STATIC_INLINE void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len)
1.1.1.2   root      259: {
1.1.1.3   root      260:     uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
1.1.1.2   root      261: 
                    262:     switch (len) {
                    263:      case 9: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; p2[8] = c; break;
                    264:      case 8: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; break;
                    265:      case 7: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; break;
                    266:      case 6: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; break;
                    267:      case 5: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; break;
                    268:      case 4: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; break;
                    269:      case 3: p2[0] = c; p2[1] = c; p2[2] = c; break;
                    270:      case 2: p2[0] = c; p2[1] = c; break;
                    271:      case 1: p2[0] = c; break;
                    272:      case 0: break;
                    273:      default: printf("Hit the programmer.\n"); break;
                    274:     }
                    275: }
                    276: 
1.1.1.3   root      277: #if defined(AMIGA) && defined(__GNUC__)
                    278: #include "od-amiga/amiga-kludges.h"
                    279: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.