Changes to logging - nothing (other than some parts of pc.c) uses the global pclog anymore (and logs will be almost empty (until the base set logging flags is agreed upon);

Fixes to various hard disk controllers;
Added the Packard Bell PB640;
Fixed the InPort mouse emulation - now it works correctly on Windows NT 3.1;
Removed the status window and the associated variables;
Completely removed the Green B 486 machine;
Fixed the MDSI Genius;
Fixed the single-sided 5.25" floppy drive;
Ported a CPU-related commit from VARCem.
This commit is contained in:
OBattler
2018-05-21 19:04:05 +02:00
parent 534ed6ea32
commit 5d8deea63b
130 changed files with 5062 additions and 3262 deletions

View File

@@ -8,7 +8,7 @@
*
* Configuration file handler.
*
* Version: @(#)config.c 1.0.47 2018/03/26
* Version: @(#)config.c 1.0.47 2018/04/29
*
* Authors: Sarah Walker,
* Miran Grca, <mgrca8@gmail.com>
@@ -23,12 +23,14 @@
* it on Windows XP, and possibly also Vista. Use the
* -DANSI_CFG for use on these systems.
*/
#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include <inttypes.h>
#define HAVE_STDARG_H
#include "86box.h"
#include "cpu/cpu.h"
#include "device.h"
@@ -103,6 +105,26 @@ typedef struct {
static list_t config_head;
#ifdef ENABLE_CONFIG_LOG
int config_do_log = ENABLE_CONFIG_LOG;
#endif
static void
config_log(const char *format, ...)
{
#ifdef ENABLE_CONFIG_LOG
va_list ap;
if (config_do_log) {
va_start(ap, format);
pclog_ex(format, ap);
va_end(ap);
}
#endif
}
static section_t *
find_section(char *name)
{
@@ -963,7 +985,7 @@ load_floppy_drives(void)
wcsncpy(floppyfns[c], wp, sizeof_w(floppyfns[c]));
/* if (*wp != L'\0')
pclog("Floppy%d: %ls\n", c, floppyfns[c]); */
config_log("Floppy%d: %ls\n", c, floppyfns[c]); */
sprintf(temp, "fdd_%02i_writeprot", c+1);
ui_writeprot[c] = !!config_get_int(cat, temp, 0);
sprintf(temp, "fdd_%02i_turbo", c + 1);
@@ -1201,7 +1223,7 @@ config_load(void)
{
int i;
pclog("Loading config file '%ls'..\n", cfg_path);
config_log("Loading config file '%ls'..\n", cfg_path);
memset(hdd, 0, sizeof(hard_disk_t));
memset(cdrom_drives, 0, sizeof(cdrom_drive_t) * CDROM_NUM);
@@ -1244,7 +1266,7 @@ config_load(void)
mem_size = 640;
opl_type = 0;
pclog("Config file not present or invalid!\n");
config_log("Config file not present or invalid!\n");
return;
}
@@ -1263,7 +1285,7 @@ config_load(void)
/* Mark the configuration as changed. */
config_changed = 1;
pclog("Config loaded.\n\n");
config_log("Config loaded.\n\n");
}
@@ -1894,11 +1916,11 @@ config_dump(void)
entry_t *ent;
if (sec->name && sec->name[0])
pclog("[%s]\n", sec->name);
config_log("[%s]\n", sec->name);
ent = (entry_t *)sec->entry_head.next;
while (ent != NULL) {
pclog("%s = %ls\n", ent->name, ent->wdata);
config_log("%s = %ls\n", ent->name, ent->wdata);
ent = (entry_t *)ent->list.next;
}