Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port; Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX); Finished the 586MC1; Added 8087 emulation; Moved Cyrix 6x86'es to the Dev branch; Sanitized/cleaned up memregs.c/h and intel.c/h; Split the chipsets from machines and sanitized Port 92 emulation; Added support for the 15bpp mode to the Compaq ATI 28800; Moved the MR 386DX and 486 machines to the Dev branch; Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00; Ported the new timer code from PCem; Cleaned up the CPU table of unused stuff and better optimized its structure; Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch; Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem; Added the AHA-1540A and the BusTek BT-542B; Moved the Sumo SCSI-AT to the Dev branch; Minor IDE, FDC, and floppy drive code clean-ups; Made NCR 5380/53C400-based cards' BIOS address configurable; Got rid of the legacy romset variable; Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit; Added the Amstead PPC512 per PCem patch by John Elliott; Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages); Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing; Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem; Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit; Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement; Amstrad MegaPC does now works correctly with non-internal graphics card; The SLiRP code no longer casts a packed struct type to a non-packed struct type; The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present; The S3 Virge on BeOS is no longer broken (was broken by build #1591); OS/2 2.0 build 6.167 now sees key presses again; Xi8088 now work on CGA again; 86F images converted from either the old or new variants of the HxC MFM format now work correctly; Hardware interrupts with a vector of 0xFF are now handled correctly; OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct; Fixed VNC keyboard input bugs; Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver; Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly; Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4; Compaq Portable now works with all graphics cards; Fixed various MDSI Genius bugs; Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly; Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355; OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400. Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391. Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389. Fixed a minor IDE timing bug, fixes #388. Fixed Toshiba T1000 RAM issues, fixes #379. Fixed EGA/(S)VGA overscan border handling, fixes #378; Got rid of the now long useless IDE channel 2 auto-removal, fixes #370; Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366; Ported the Unicode CD image file name fix from VARCem, fixes #365; Fixed high density floppy disks on the Xi8088, fixes #359; Fixed some bugs in the Hercules emulation, fixes #346, fixes #358; Fixed the SCSI hard disk mode sense pages, fixes #356; Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349; Fixed bugs in the serial mouse emulation, fixes #344; Compiled 86Box binaries now include all the required .DLL's, fixes #341; Made some combo boxes in the Settings dialog slightly wider, fixes #276.
This commit is contained in:
147
src/config.c
147
src/config.c
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Configuration file handler.
|
||||
*
|
||||
* Version: @(#)config.c 1.0.60 2019/01/13
|
||||
* Version: @(#)config.c 1.0.61 2019/03/03
|
||||
*
|
||||
* Authors: Sarah Walker,
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -16,10 +16,10 @@
|
||||
* Overdoze,
|
||||
* David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
*
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
* Copyright 2018 David Hrdlička.
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2018,2019 David Hrdlička.
|
||||
*
|
||||
* NOTE: Forcing config files to be in Unicode encoding breaks
|
||||
* it on Windows XP, and possibly also Vista. Use the
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "86box.h"
|
||||
#include "cpu/cpu.h"
|
||||
#include "device.h"
|
||||
#include "timer.h"
|
||||
#include "nvr.h"
|
||||
#include "config.h"
|
||||
#include "isamem.h"
|
||||
@@ -517,7 +518,6 @@ load_machine(void)
|
||||
if (machine >= machine_count())
|
||||
machine = machine_count() - 1;
|
||||
|
||||
romset = machine_getromset();
|
||||
cpu_manufacturer = config_get_int(cat, "cpu_manufacturer", 0);
|
||||
cpu = config_get_int(cat, "cpu", 0);
|
||||
cpu_waitstates = config_get_int(cat, "cpu_waitstates", 0);
|
||||
@@ -565,7 +565,7 @@ load_video(void)
|
||||
char *cat = "Video";
|
||||
char *p;
|
||||
|
||||
if (machines[machine].fixed_gfxcard) {
|
||||
if (machines[machine].flags & MACHINE_VIDEO_FIXED) {
|
||||
config_delete_var(cat, "gfxcard");
|
||||
gfxcard = VID_INTERNAL;
|
||||
} else {
|
||||
@@ -726,28 +726,30 @@ load_ports(void)
|
||||
{
|
||||
char *cat = "Ports (COM & LPT)";
|
||||
char *p;
|
||||
char temp[512];
|
||||
int c, d;
|
||||
|
||||
serial_enabled[0] = !!config_get_int(cat, "serial1_enabled", 1);
|
||||
serial_enabled[1] = !!config_get_int(cat, "serial2_enabled", 1);
|
||||
lpt_enabled = !!config_get_int(cat, "lpt_enabled", 1);
|
||||
for (c = 0; c < 2; c++) {
|
||||
sprintf(temp, "serial%d_enabled", c + 1);
|
||||
serial_enabled[c] = !!config_get_int(cat, temp, 1);
|
||||
}
|
||||
|
||||
p = (char *)config_get_string(cat, "lpt1_device", NULL);
|
||||
if (p != NULL)
|
||||
strcpy(lpt_device_names[0], p);
|
||||
else
|
||||
strcpy(lpt_device_names[0], "none");
|
||||
for (c = 0; c < 3; c++) {
|
||||
sprintf(temp, "lpt%d_enabled", c + 1);
|
||||
lpt_ports[c].enabled = !!config_get_int(cat, temp, (c == 0) ? 1 : 0);
|
||||
|
||||
p = (char *)config_get_string(cat, "lpt2_device", NULL);
|
||||
if (p != NULL)
|
||||
strcpy(lpt_device_names[1], p);
|
||||
else
|
||||
strcpy(lpt_device_names[1], "none");
|
||||
sprintf(temp, "lpt%d_device", c + 1);
|
||||
p = (char *) config_get_string(cat, temp, "none");
|
||||
lpt_ports[c].device = lpt_device_get_from_internal_name(p);
|
||||
}
|
||||
|
||||
p = (char *)config_get_string(cat, "lpt3_device", NULL);
|
||||
if (p != NULL)
|
||||
strcpy(lpt_device_names[2], p);
|
||||
else
|
||||
strcpy(lpt_device_names[2], "none");
|
||||
/* Legacy config compatibility. */
|
||||
d = config_get_int(cat, "lpt_enabled", 2);
|
||||
if (d < 2) {
|
||||
for (c = 0; c < 3; c++)
|
||||
lpt_ports[c].enabled = d;
|
||||
}
|
||||
config_delete_var(cat, "lpt_enabled");
|
||||
}
|
||||
|
||||
|
||||
@@ -757,8 +759,8 @@ load_other_peripherals(void)
|
||||
{
|
||||
char *cat = "Other peripherals";
|
||||
char *p;
|
||||
char temp[512];
|
||||
int c;
|
||||
char temp[512];
|
||||
int c;
|
||||
|
||||
p = config_get_string(cat, "scsicard", NULL);
|
||||
if (p != NULL)
|
||||
@@ -776,7 +778,14 @@ load_other_peripherals(void)
|
||||
strcpy(p, "none");
|
||||
}
|
||||
}
|
||||
hdc_current = hdc_get_from_internal_name(p);
|
||||
if (!strcmp(p, "mfm_xt"))
|
||||
hdc_current = hdc_get_from_internal_name("st506_xt");
|
||||
else if (!strcmp(p, "mfm_xt_dtc5150x"))
|
||||
hdc_current = hdc_get_from_internal_name("st506_xt_dtc5150x");
|
||||
else if (!strcmp(p, "mfm_at"))
|
||||
hdc_current = hdc_get_from_internal_name("st506_at");
|
||||
else
|
||||
hdc_current = hdc_get_from_internal_name(p);
|
||||
|
||||
ide_ter_enabled = !!config_get_int(cat, "ide_ter", 0);
|
||||
ide_qua_enabled = !!config_get_int(cat, "ide_qua", 0);
|
||||
@@ -789,7 +798,7 @@ load_other_peripherals(void)
|
||||
p = config_get_string(cat, temp, "none");
|
||||
isamem_type[c] = isamem_get_from_internal_name(p);
|
||||
}
|
||||
|
||||
|
||||
p = config_get_string(cat, "isartc_type", "none");
|
||||
isartc_type = isartc_get_from_internal_name(p);
|
||||
}
|
||||
@@ -823,7 +832,7 @@ load_hard_disks(void)
|
||||
break;
|
||||
|
||||
case HDD_BUS_MFM:
|
||||
max_spt = 17; /* 26 for RLL */
|
||||
max_spt = 26; /* 26 for RLL */
|
||||
max_hpc = 15;
|
||||
max_tracks = 1023;
|
||||
break;
|
||||
@@ -1069,8 +1078,11 @@ load_other_removable_devices(void)
|
||||
if (cdrom[c].ide_channel > 7)
|
||||
cdrom[c].ide_channel = 7;
|
||||
} else {
|
||||
sprintf(temp, "cdrom_%02i_scsi_id", c+1);
|
||||
if (cdrom[c].bus_type == CDROM_BUS_SCSI) {
|
||||
if (cdrom[c].bus_type == CDROM_BUS_SCSI_CHINON)
|
||||
sprintf(temp, "cdrom_%02i_scsi_id_chinon", c+1);
|
||||
else
|
||||
sprintf(temp, "cdrom_%02i_scsi_id", c+1);
|
||||
if (cdrom[c].bus_type == CDROM_BUS_SCSI || cdrom[c].bus_type == CDROM_BUS_SCSI_CHINON) {
|
||||
cdrom[c].scsi_device_id = config_get_int(cat, temp, c+2);
|
||||
|
||||
if (cdrom[c].scsi_device_id > 15)
|
||||
@@ -1121,6 +1133,9 @@ load_other_removable_devices(void)
|
||||
|
||||
sprintf(temp, "cdrom_%02i_scsi_id", c+1);
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "cdrom_%02i_scsi_id_chinon", c+1);
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "cdrom_%02i_image_path", c+1);
|
||||
config_delete_var(cat, temp);
|
||||
@@ -1240,7 +1255,9 @@ config_load(void)
|
||||
hdc_current = hdc_get_from_internal_name("none");
|
||||
serial_enabled[0] = 1;
|
||||
serial_enabled[1] = 1;
|
||||
lpt_enabled = 1;
|
||||
lpt_ports[0].enabled = 1;
|
||||
lpt_ports[1].enabled = 0;
|
||||
lpt_ports[2].enabled = 0;
|
||||
for (i = 0; i < FDD_NUM; i++) {
|
||||
if (i < 2)
|
||||
fdd_set_type(i, 2);
|
||||
@@ -1586,36 +1603,32 @@ static void
|
||||
save_ports(void)
|
||||
{
|
||||
char *cat = "Ports (COM & LPT)";
|
||||
char temp[512];
|
||||
int c, d;
|
||||
|
||||
if (serial_enabled[0])
|
||||
config_delete_var(cat, "serial1_enabled");
|
||||
else
|
||||
config_set_int(cat, "serial1_enabled", serial_enabled[0]);
|
||||
for (c = 0; c < 2; c++) {
|
||||
sprintf(temp, "serial%d_enabled", c + 1);
|
||||
if (serial_enabled[c])
|
||||
config_delete_var(cat, temp);
|
||||
else
|
||||
config_set_int(cat, temp, serial_enabled[c]);
|
||||
}
|
||||
|
||||
if (serial_enabled[1])
|
||||
config_delete_var(cat, "serial2_enabled");
|
||||
else
|
||||
config_set_int(cat, "serial2_enabled", serial_enabled[1]);
|
||||
for (c = 0; c < 3; c++) {
|
||||
sprintf(temp, "lpt%d_enabled", c + 1);
|
||||
d = (c == 0) ? 1 : 0;
|
||||
if (lpt_ports[c].enabled == d)
|
||||
config_delete_var(cat, temp);
|
||||
else
|
||||
config_set_int(cat, temp, lpt_ports[c].enabled);
|
||||
|
||||
if (lpt_enabled)
|
||||
config_delete_var(cat, "lpt_enabled");
|
||||
else
|
||||
config_set_int(cat, "lpt_enabled", lpt_enabled);
|
||||
|
||||
if (!strcmp(lpt_device_names[0], "none"))
|
||||
config_delete_var(cat, "lpt1_device");
|
||||
else
|
||||
config_set_string(cat, "lpt1_device", lpt_device_names[0]);
|
||||
|
||||
if (!strcmp(lpt_device_names[1], "none"))
|
||||
config_delete_var(cat, "lpt2_device");
|
||||
else
|
||||
config_set_string(cat, "lpt2_device", lpt_device_names[1]);
|
||||
|
||||
if (!strcmp(lpt_device_names[2], "none"))
|
||||
config_delete_var(cat, "lpt3_device");
|
||||
else
|
||||
config_set_string(cat, "lpt3_device", lpt_device_names[2]);
|
||||
sprintf(temp, "lpt%d_device", c + 1);
|
||||
if (lpt_ports[c].device == 0)
|
||||
config_delete_var(cat, temp);
|
||||
else
|
||||
config_set_string(cat, temp,
|
||||
(char *) lpt_device_get_internal_name(lpt_ports[c].device));
|
||||
}
|
||||
|
||||
delete_section_if_empty(cat);
|
||||
}
|
||||
@@ -1626,8 +1639,8 @@ static void
|
||||
save_other_peripherals(void)
|
||||
{
|
||||
char *cat = "Other peripherals";
|
||||
char temp[512];
|
||||
int c;
|
||||
char temp[512];
|
||||
int c;
|
||||
|
||||
if (scsi_card_current == 0)
|
||||
config_delete_var(cat, "scsicard");
|
||||
@@ -1827,9 +1840,13 @@ save_other_removable_devices(void)
|
||||
cdrom[c].ide_channel & 1);
|
||||
config_set_string(cat, temp, tmp2);
|
||||
}
|
||||
|
||||
sprintf(temp, "cdrom_%02i_scsi_id", c + 1);
|
||||
if (cdrom[c].bus_type != CDROM_BUS_SCSI) {
|
||||
|
||||
if (cdrom[c].bus_type == CDROM_BUS_SCSI_CHINON)
|
||||
sprintf(temp, "cdrom_%02i_scsi_id_chinon", c + 1);
|
||||
else
|
||||
sprintf(temp, "cdrom_%02i_scsi_id", c + 1);
|
||||
|
||||
if (cdrom[c].bus_type != CDROM_BUS_SCSI && cdrom[c].bus_type != CDROM_BUS_SCSI_CHINON) {
|
||||
config_delete_var(cat, temp);
|
||||
} else {
|
||||
config_set_int(cat, temp, cdrom[c].scsi_device_id);
|
||||
|
||||
Reference in New Issue
Block a user