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

@@ -9,7 +9,7 @@
* Implementation of the generic device interface to handle
* all devices attached to the emulator.
*
* Version: @(#)device.c 1.0.7 2018/04/26
* Version: @(#)device.c 1.0.8 2018/04/29
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -37,10 +37,12 @@
* Boston, MA 02111-1307
* USA.
*/
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#define HAVE_STDARG_H
#include "86box.h"
#include "cpu/cpu.h"
#include "config.h"
@@ -57,6 +59,26 @@ static device_t *devices[DEVICE_MAX];
static device_t *device_current;
#ifdef ENABLE_DEVICE_LOG
int device_do_log = ENABLE_DEVICE_LOG;
#endif
static void
device_log(const char *format, ...)
{
#ifdef ENABLE_DEVICE_LOG
va_list ap;
if (device_do_log) {
va_start(ap, format);
pclog_ex(format, ap);
va_end(ap);
}
#endif
}
void
device_init(void)
{
@@ -72,7 +94,7 @@ device_add(const device_t *d)
for (c=0; c<256; c++) {
if (devices[c] == (device_t *)d) {
pclog("DEVICE: device already exists!\n");
device_log("DEVICE: device already exists!\n");
return(NULL);
}
if (devices[c] == NULL) break;
@@ -88,9 +110,9 @@ device_add(const device_t *d)
priv = d->init(d);
if (priv == NULL) {
if (d->name)
pclog("DEVICE: device '%s' init failed\n", d->name);
device_log("DEVICE: device '%s' init failed\n", d->name);
else
pclog("DEVICE: device init failed\n");
device_log("DEVICE: device init failed\n");
device_priv[c] = NULL;