Several 286/386SX models can now have less than 1MB of RAM.

Memory remapping code restructured.
Patch from Greatpsycho.
This commit is contained in:
SarahW 2017-06-18 20:15:46 +01:00
commit 7234e2c3be
6 changed files with 100 additions and 64 deletions

View file

@ -684,8 +684,8 @@ void loadconfig(char *fn)
strncpy(hdd_controller_name, "none", sizeof(hdd_controller_name)-1);
mem_size = config_get_int(CFG_MACHINE, NULL, "mem_size", 4096);
if (mem_size < ((models[model].flags & MODEL_AT) ? models[model].min_ram*1024 : models[model].min_ram))
mem_size = ((models[model].flags & MODEL_AT) ? models[model].min_ram*1024 : models[model].min_ram);
if (mem_size < (((models[model].flags & MODEL_AT) && models[model].ram_granularity < 128) ? models[model].min_ram*1024 : models[model].min_ram))
mem_size = (((models[model].flags & MODEL_AT) && models[model].ram_granularity < 128) ? models[model].min_ram*1024 : models[model].min_ram);
cdrom_drive = config_get_int(CFG_MACHINE, NULL, "cdrom_drive", 0);
cdrom_enabled = config_get_int(CFG_MACHINE, NULL, "cdrom_enabled", 0);