--- uae/src/cfgfile.c 2018/04/24 16:53:03 1.1.1.5 +++ uae/src/cfgfile.c 2018/04/24 16:56:46 1.1.1.7 @@ -84,8 +84,10 @@ static const char *csmode[] = { "ocs", " static const char *linemode1[] = { "none", "double", "scanlines", 0 }; static const char *linemode2[] = { "n", "d", "s", 0 }; static const char *speedmode[] = { "max", "real", 0 }; -static const char *cpumode[] = { "68000", "68000", "68010", "68010", - "68ec020", "68020", "68ec020/68881", "68020/68881", 0 }; +static const char *cpumode[] = { + "68000", "68000", "68010", "68010", "68ec020", "68020", "68ec020/68881", "68020/68881", + "68040", 0 +}; static const char *portmode[] = { "joy0", "joy1", "mouse", "kbd1", "kbd2", "kbd3", 0 }; static const char *colormode1[] = { "8bit", "15bit", "16bit", "8bit_dither", "4bit_dither", "32bit", 0 }; static const char *colormode2[] = { "8", "15", "16", "8d", "4d", "32", 0 }; @@ -158,6 +160,7 @@ void save_options (FILE *f, struct uae_p fprintf (f, "floppy%d=%s\n", i, str); free (str); } + fprintf (f, "nr_floppies=%d\n", p->nr_floppies); fprintf (f, "parallel_on_demand=%s\n", p->parallel_demand ? "true" : "false"); fprintf (f, "serial_on_demand=%s\n", p->serial_demand ? "true" : "false"); @@ -273,8 +276,10 @@ int cfgfile_strval (char *option, char * return 0; val = match_string (table, value); if (val == -1) { - if (! more) - write_log ("Unknown value for option `%s'.\n", option); + if (more) + return 0; + + write_log ("Unknown value for option `%s'.\n", option); return 1; } *location = val; @@ -378,7 +383,8 @@ int cfgfile_parse_option (struct uae_pre || cfgfile_intval (option, value, "z3mem_size", &p->z3fastmem_size, 0x100000) || cfgfile_intval (option, value, "bogomem_size", &p->bogomem_size, 0x40000) || cfgfile_intval (option, value, "gfxcard_size", &p->gfxmem_size, 0x100000) - || cfgfile_intval (option, value, "chipmem_size", &p->chipmem_size, 0x80000)) + || cfgfile_intval (option, value, "chipmem_size", &p->chipmem_size, 0x80000) + || cfgfile_intval (option, value, "nr_floppies", &p->nr_floppies, 1)) return 1; if (cfgfile_strval (option, value, "sound_output", &p->produce_sound, soundmode, 0) || cfgfile_strval (option, value, "sound_channels", &p->stereo, stereomode1, 1) @@ -412,9 +418,9 @@ int cfgfile_parse_option (struct uae_pre set_chipset_mask (p, tmpval); return 1; } - + if (cfgfile_strval (option, value, "cpu_type", &p->cpu_level, cpumode, 0)) { - p->address_space_24 = !(p->cpu_level & 1); + p->address_space_24 = p->cpu_level < 8 && !(p->cpu_level & 1); p->cpu_level >>= 1; return 1; } @@ -783,8 +789,8 @@ static void parse_hardfile_spec (char *s static void parse_cpu_specs (char *spec) { - if (*spec < '0' || *spec > '3') { - fprintf (stderr, "CPU parameter string must begin with '0', '1', '2' or '3'.\n"); + if (*spec < '0' || *spec > '4') { + fprintf (stderr, "CPU parameter string must begin with '0', '1', '2', '3' or '4'.\n"); return; } @@ -796,6 +802,8 @@ static void parse_cpu_specs (char *spec) case 'a': if (currprefs.cpu_level < 2) fprintf (stderr, "In 68000/68010 emulation, the address space is always 24 bit.\n"); + else if (currprefs.cpu_level >= 4) + fprintf (stderr, "In 68040 emulation, the address space is always 32 bit.\n"); else currprefs.address_space_24 = 1; break;