--- uae/src/cfgfile.c 2018/04/24 16:46:16 1.1.1.2 +++ uae/src/cfgfile.c 2018/04/24 16:47:29 1.1.1.3 @@ -17,6 +17,7 @@ #include "threaddep/penguin.h" #include "uae.h" #include "autoconf.h" +#include "custom.h" /* @@@ need to get rid of this... just cut part of the manual and print that * as a help text. */ @@ -79,6 +80,7 @@ static struct cfg_lines opttable[] = {"filesystem", "access,'Amiga volume-name':'host directory path' - where 'access' can be 'read-only' or 'read-write'" } }; +static const char *csmode[] = { "ocs", "ecs_agnus", "ecs_denise", "ecs", "aga" }; static const char *linemode1[] = { "none", "double", "scanlines", 0 }; static const char *linemode2[] = { "n", "d", "s", 0 }; static const char *speedmode[] = { "max", "real", 0 }; @@ -171,8 +173,9 @@ void save_options (FILE *f, struct uae_p fprintf (f, "joyport0=%s\n", portmode[p->jport0]); fprintf (f, "joyport1=%s\n", portmode[p->jport1]); - fprintf (f, "framerate=%d\n", p->framerate); + fprintf (f, "bsdsocket_emu=%s\n", p->socket_emu ? "true" : "false"); + fprintf (f, "gfx_framerate=%d\n", p->gfx_framerate); fprintf (f, "gfx_width=%d\n", p->gfx_width); fprintf (f, "gfx_height=%d\n", p->gfx_height); fprintf (f, "gfx_lores=%s\n", p->gfx_lores ? "true" : "false"); @@ -186,6 +189,17 @@ void save_options (FILE *f, struct uae_p fprintf (f, "32bit_blits=%s\n", p->blits_32bit_enabled ? "true" : "false"); fprintf (f, "immediate_blits=%s\n", p->immediate_blits ? "true" : "false"); + fprintf (f, "ntsc=%s\n", p->ntscmode ? "true" : "false"); + if (p->chipset_mask & CSMASK_AGA) + fprintf (f, "chipset=aga\n"); + else if ((p->chipset_mask & CSMASK_ECS_AGNUS) && (p->chipset_mask & CSMASK_ECS_AGNUS)) + fprintf (f, "chipset=ecs\n"); + else if (p->chipset_mask & CSMASK_ECS_AGNUS) + fprintf (f, "chipset=ecs_agnus\n"); + else if (p->chipset_mask & CSMASK_ECS_DENISE) + fprintf (f, "chipset=ecs_denise\n"); + else + fprintf (f, "chipset=ocs\n"); fprintf (f, "fastmem_size=%d\n", p->fastmem_size / 0x100000); fprintf (f, "a3000mem_size=%d\n", p->a3000mem_size / 0x100000); @@ -194,7 +208,7 @@ void save_options (FILE *f, struct uae_p fprintf (f, "gfxcard_size=%d\n", p->gfxmem_size / 0x100000); fprintf (f, "chipmem_size=%d\n", p->chipmem_size / 0x80000); - if (currprefs.m68k_speed > 0) + if (p->m68k_speed > 0) fprintf (f, "cpu_speed=%d\n", p->m68k_speed); else fprintf (f, "cpu_speed=%s\n", p->m68k_speed == -1 ? "max" : "real"); @@ -299,8 +313,10 @@ static int getintval (char **p, int *res int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value) { + int tmpval; char *section = 0; char *tmpp; + for (tmpp = option; *tmpp != '\0'; tmpp++) if (isupper (*tmpp)) *tmpp = tolower (*tmpp); @@ -321,12 +337,14 @@ int cfgfile_parse_option (struct uae_pre } if (cfgfile_yesno (option, value, "use_debugger", &p->start_debugger) || cfgfile_yesno (option, value, "use_gui", &p->start_gui) + || cfgfile_yesno (option, value, "bsdsocket_emu", &p->socket_emu) || cfgfile_yesno (option, value, "immediate_blits", &p->immediate_blits) || cfgfile_yesno (option, value, "32bit_blits", &p->blits_32bit_enabled) || cfgfile_yesno (option, value, "gfx_lores", &p->gfx_lores) || cfgfile_yesno (option, value, "gfx_correct_aspect", &p->gfx_correct_aspect) || cfgfile_yesno (option, value, "gfx_fullscreen_amiga", &p->gfx_afullscreen) || cfgfile_yesno (option, value, "gfx_fullscreen_picasso", &p->gfx_pfullscreen) + || cfgfile_yesno (option, value, "ntsc", &p->ntscmode) || cfgfile_yesno (option, value, "cpu_compatible", &p->cpu_compatible) || cfgfile_yesno (option, value, "cpu_24bit_addressing", &p->address_space_24) || cfgfile_yesno (option, value, "autoconfig", &p->automount_uaedev) @@ -341,7 +359,7 @@ int cfgfile_parse_option (struct uae_pre || cfgfile_intval (option, value, "sound_bits", &p->sound_bits, 1) || cfgfile_intval (option, value, "sound_pri_cutoff", &p->sound_pri_cutoff, 1) || cfgfile_intval (option, value, "sound_pri_time", &p->sound_pri_time, 1) - || cfgfile_intval (option, value, "framerate", &p->framerate, 1) + || cfgfile_intval (option, value, "gfx_framerate", &p->gfx_framerate, 1) || cfgfile_intval (option, value, "gfx_width", &p->gfx_width, 1) || cfgfile_intval (option, value, "gfx_height", &p->gfx_height, 1) || cfgfile_intval (option, value, "fastmem_size", &p->fastmem_size, 0x100000) @@ -378,6 +396,15 @@ int cfgfile_parse_option (struct uae_pre return 1; /* Tricky ones... */ + if (cfgfile_strval (option, value, "chipset", &tmpval, csmode, 0)) { + p->chipset_mask = (tmpval == 0 ? 0 + : tmpval == 1 ? CSMASK_ECS_AGNUS + : tmpval == 2 ? CSMASK_ECS_DENISE + : tmpval == 3 ? CSMASK_ECS_DENISE | CSMASK_ECS_AGNUS + : CSMASK_AGA | CSMASK_ECS_DENISE | CSMASK_ECS_AGNUS); + return 1; + } + if (cfgfile_strval (option, value, "cpu_type", &p->cpu_level, cpumode, 0)) { p->address_space_24 = !(p->cpu_level & 1); p->cpu_level >>= 1;