FDC DOR handler now does a sanity check when setting drive select, fixes OS/2 Setup fataling the emulator when reading Disk 2;

FDC SEEK command now no longer incorrectly times out when seeking to the track the FDC thinks it's already at, fixes floppies in NT 3.1;
Emulator now correctly saves configuration changes to the configuration files it was loaded with rather than always the default;
Default path for NVR's can now be overridden by adding the nvr_path option to the cfg file.
This commit is contained in:
OBattler
2016-09-27 21:38:29 +02:00
parent af57860340
commit a3e6c4eeb3
9 changed files with 178 additions and 111 deletions

View File

@@ -49,6 +49,9 @@
uint8_t ethif;
int inum;
char nvr_path[260];
int path_len;
int window_w, window_h, window_x, window_y, window_remember;
int start_in_fullscreen = 0;
@@ -239,7 +242,14 @@ void initpc(int argc, char *argv[])
joystick_init();
midi_init();
append_filename(config_file_default, pcempath, "86box.cfg", 511);
if (config_file == NULL)
{
append_filename(config_file_default, pcempath, "86box.cfg", 511);
}
else
{
append_filename(config_file_default, pcempath, config_file, 511);
}
loadconfig(config_file);
pclog("Config loaded\n");
@@ -725,6 +735,28 @@ void loadconfig(char *fn)
}
}
}
memset(nvr_path, 0, 260);
p = (char *)config_get_string(NULL, "nvr_path", "nvr");
if (p) {
if (strlen(p) <= 228) strcpy(nvr_path, p);
else strcpy(nvr_path, "nvr");
}
else strcpy(nvr_path, "nvr");
if (nvr_path[strlen(nvr_path)] != '/')
{
nvr_path[strlen(nvr_path)] = '/';
}
path_len = strlen(nvr_path);
}
char *nvr_concat(char *to_concat)
{
memset(nvr_path + path_len, 0, 260 - path_len);
strcpy(nvr_path + path_len, to_concat);
return nvr_path;
}
void saveconfig()