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

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: 
                     10: #define UAEMAJOR 0
1.1.1.5   root       11: #define UAEMINOR 8
1.1.1.25! root       12: #define UAESUBREV 25
1.1       root       13: 
1.1.1.17  root       14: 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       15: 
1.1.1.5   root       16: extern long int version;
                     17: 
                     18: struct uaedev_mount_info;
1.1.1.3   root       19: 
1.1.1.7   root       20: struct strlist {
                     21:     struct strlist *next;
                     22:     char *str;
                     23: };
                     24: 
1.1.1.25! root       25: /* maximum number native input devices supported (single type) */
        !            26: #define MAX_INPUT_DEVICES 6
        !            27: /* maximum number of native input device's buttons and axles supported */
        !            28: #define MAX_INPUT_DEVICE_EVENTS 256
        !            29: /* 4 different customization settings */
        !            30: #define MAX_INPUT_SETTINGS 4
        !            31: #define MAX_INPUT_SUB_EVENT 4
        !            32: #define MAX_INPUT_SIMULTANEOUS_KEYS 4
        !            33: 
        !            34: struct uae_input_device {
        !            35:     char *name;
        !            36:     uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
        !            37:     char *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
        !            38:     uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
        !            39:     uae_s16 extra[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS];
        !            40:     uae_u8 enabled;
        !            41: };
        !            42: 
1.1.1.3   root       43: struct uae_prefs {
1.1.1.7   root       44:     struct strlist *unknown_lines;
                     45: 
                     46:     char description[256];
1.1.1.18  root       47:     char info[256];
1.1.1.7   root       48: 
1.1.1.3   root       49:     int illegal_mem;
                     50:     int no_xhair;
                     51:     int use_serial;
                     52:     int serial_demand;
                     53:     int parallel_demand;
1.1.1.7   root       54:     int use_gfxlib;
1.1.1.9   root       55:     int socket_emu;
1.1.1.7   root       56: 
                     57:     int start_debugger;
                     58:     int start_gui;
1.1.1.3   root       59: 
                     60:     KbdLang keyboard_lang;
                     61:     int allow_save;
                     62:     int emul_accuracy;
                     63:     int test_drawing_speed;
                     64: 
                     65:     int produce_sound;
1.1.1.23  root       66:     int sound_stereo;
1.1.1.16  root       67:     int mixed_stereo;
1.1.1.3   root       68:     int sound_bits;
                     69:     int sound_freq;
                     70:     int sound_minbsiz;
                     71:     int sound_maxbsiz;
1.1.1.7   root       72:     int sound_pri_time;
                     73:     int sound_pri_cutoff;
1.1.1.10  root       74:     int sound_interpol;
1.1.1.3   root       75: 
1.1.1.9   root       76:     int gfx_framerate;
1.1.1.3   root       77:     int gfx_width;
                     78:     int gfx_height;
                     79:     int gfx_lores;
                     80:     int gfx_linedbl;
                     81:     int gfx_correct_aspect;
1.1.1.5   root       82:     int gfx_afullscreen;
                     83:     int gfx_pfullscreen;
1.1.1.3   root       84:     int gfx_xcenter;
                     85:     int gfx_ycenter;
                     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.5   root      179: extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
                    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: 
                    188: extern void machdep_init (void);
1.1       root      189: 
                    190: /* AIX doesn't think it is Unix. Neither do I. */
                    191: #if defined(_ALL_SOURCE) || defined(_AIX)
                    192: #undef __unix
                    193: #define __unix
                    194: #endif
                    195: 
1.1.1.2   root      196: #define MAX_COLOR_MODES 5
1.1       root      197: 
                    198: /* #define NEED_TO_DEBUG_BADLY */
                    199: 
1.1.1.2   root      200: #if !defined(USER_PROGRAMS_BEHAVE)
                    201: #define USER_PROGRAMS_BEHAVE 0
                    202: #endif
                    203: 
1.1.1.3   root      204: /* Some memsets which know that they can safely overwrite some more memory
                    205:  * at both ends and use that knowledge to align the pointers. */
                    206: 
1.1.1.2   root      207: #define QUADRUPLIFY(c) (((c) | ((c) << 8)) | (((c) | ((c) << 8)) << 16))
                    208: 
                    209: /* When you call this routine, bear in mind that it rounds the bounds and
                    210:  * may need some padding for the array. */
                    211: 
                    212: #define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2)
1.1.1.10  root      213: STATIC_INLINE void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len)
1.1.1.2   root      214: {
1.1.1.3   root      215:     uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
1.1.1.2   root      216:     int a = len & 7;
                    217:     len >>= 3;
                    218:     switch (a) {
                    219:      case 7: p2--; goto l1;
                    220:      case 6: p2-=2; goto l2;
                    221:      case 5: p2-=3; goto l3;
                    222:      case 4: p2-=4; goto l4;
                    223:      case 3: p2-=5; goto l5;
                    224:      case 2: p2-=6; goto l6;
                    225:      case 1: p2-=7; goto l7;
1.1.1.3   root      226:      case 0: if (!--len) return; break;
1.1.1.2   root      227:     }
                    228: 
                    229:     for (;;) {
                    230:        p2[0] = c;
                    231:        l1:
                    232:        p2[1] = c;
                    233:        l2:
                    234:        p2[2] = c;
                    235:        l3:
                    236:        p2[3] = c;
                    237:        l4:
                    238:        p2[4] = c;
                    239:        l5:
                    240:        p2[5] = c;
                    241:        l6:
                    242:        p2[6] = c;
                    243:        l7:
                    244:        p2[7] = c;
1.1.1.3   root      245: 
1.1.1.2   root      246:        if (!len)
                    247:            break;
                    248:        len--;
                    249:        p2 += 8;
                    250:     }
                    251: }
                    252: 
1.1.1.9   root      253: /* This one knows it will never be asked to clear more than 32 bytes.  Make sure you call this with a
                    254:    constant for the length.  */
1.1.1.3   root      255: #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      256: STATIC_INLINE void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len)
1.1.1.2   root      257: {
1.1.1.3   root      258:     uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
1.1.1.2   root      259: 
                    260:     switch (len) {
                    261:      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;
                    262:      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;
                    263:      case 7: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; break;
                    264:      case 6: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; break;
                    265:      case 5: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; break;
                    266:      case 4: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; break;
                    267:      case 3: p2[0] = c; p2[1] = c; p2[2] = c; break;
                    268:      case 2: p2[0] = c; p2[1] = c; break;
                    269:      case 1: p2[0] = c; break;
                    270:      case 0: break;
                    271:      default: printf("Hit the programmer.\n"); break;
                    272:     }
                    273: }
                    274: 
1.1.1.3   root      275: #if defined(AMIGA) && defined(__GNUC__)
                    276: #include "od-amiga/amiga-kludges.h"
                    277: #endif

unix.superglobalmegacorp.com

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