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:
@@ -1,8 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include "../86box.h"
|
||||
#include "../io.h"
|
||||
#include "../mca.h"
|
||||
@@ -12,6 +14,26 @@
|
||||
#include "snd_opl.h"
|
||||
|
||||
|
||||
#ifdef ENABLE_ADLIB_LOG
|
||||
int adlib_do_log = ENABLE_ADLIB_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
adlib_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_ADLIB_LOG
|
||||
va_list ap;
|
||||
|
||||
if (adlib_do_log) {
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
typedef struct adlib_t
|
||||
{
|
||||
opl_t opl;
|
||||
@@ -37,7 +59,7 @@ uint8_t adlib_mca_read(int port, void *p)
|
||||
{
|
||||
adlib_t *adlib = (adlib_t *)p;
|
||||
|
||||
pclog("adlib_mca_read: port=%04x\n", port);
|
||||
adlib_log("adlib_mca_read: port=%04x\n", port);
|
||||
|
||||
return adlib->pos_regs[port & 7];
|
||||
}
|
||||
@@ -49,7 +71,7 @@ void adlib_mca_write(int port, uint8_t val, void *p)
|
||||
if (port < 0x102)
|
||||
return;
|
||||
|
||||
pclog("adlib_mca_write: port=%04x val=%02x\n", port, val);
|
||||
adlib_log("adlib_mca_write: port=%04x val=%02x\n", port, val);
|
||||
|
||||
switch (port)
|
||||
{
|
||||
@@ -68,7 +90,7 @@ void *adlib_init(const device_t *info)
|
||||
adlib_t *adlib = malloc(sizeof(adlib_t));
|
||||
memset(adlib, 0, sizeof(adlib_t));
|
||||
|
||||
pclog("adlib_init\n");
|
||||
adlib_log("adlib_init\n");
|
||||
opl2_init(&adlib->opl);
|
||||
io_sethandler(0x0388, 0x0002, opl2_read, NULL, NULL, opl2_write, NULL, NULL, &adlib->opl);
|
||||
sound_add_handler(adlib_get_buffer, adlib);
|
||||
|
||||
Reference in New Issue
Block a user