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:
30
src/serial.c
30
src/serial.c
@@ -1,8 +1,10 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include "86box.h"
|
||||
#include "machine/machine.h"
|
||||
#include "io.h"
|
||||
@@ -26,6 +28,26 @@ SERIAL serial1, serial2;
|
||||
int serial_do_log = 0;
|
||||
|
||||
|
||||
#ifdef ENABLE_SERIAL_LOG
|
||||
int serial_do_log = ENABLE_SERIAL_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
serial_log(const char *format, ...)
|
||||
{
|
||||
#ifdef ENABLE_SERIAL_LOG
|
||||
va_list ap;
|
||||
|
||||
if (serial_do_log) {
|
||||
va_start(ap, format);
|
||||
pclog_ex(format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void serial_reset()
|
||||
{
|
||||
serial1.iir = serial1.ier = serial1.lcr = 0;
|
||||
@@ -279,7 +301,7 @@ void serial_remove(int port)
|
||||
return;
|
||||
}
|
||||
|
||||
/* pclog("Removing serial port %i at %04X...\n", port, base_address[port - 1]); */
|
||||
serial_log("Removing serial port %i at %04X...\n", port, base_address[port - 1]);
|
||||
|
||||
switch(port)
|
||||
{
|
||||
@@ -296,7 +318,7 @@ void serial_remove(int port)
|
||||
|
||||
void serial_setup(int port, uint16_t addr, int irq)
|
||||
{
|
||||
/* pclog("Adding serial port %i at %04X...\n", port, addr); */
|
||||
serial_log("Adding serial port %i at %04X...\n", port, addr);
|
||||
|
||||
switch(port)
|
||||
{
|
||||
@@ -345,7 +367,7 @@ void serial_init(void)
|
||||
|
||||
if (serial_enabled[0])
|
||||
{
|
||||
/* pclog("Adding serial port 1...\n"); */
|
||||
serial_log("Adding serial port 1...\n");
|
||||
memset(&serial1, 0, sizeof(serial1));
|
||||
io_sethandler(0x3f8, 0x0008, serial_read, NULL, NULL, serial_write, NULL, NULL, &serial1);
|
||||
serial1.irq = 4;
|
||||
@@ -354,7 +376,7 @@ void serial_init(void)
|
||||
}
|
||||
if (serial_enabled[1])
|
||||
{
|
||||
/* pclog("Adding serial port 2...\n"); */
|
||||
serial_log("Adding serial port 2...\n");
|
||||
memset(&serial2, 0, sizeof(serial2));
|
||||
io_sethandler(0x2f8, 0x0008, serial_read, NULL, NULL, serial_write, NULL, NULL, &serial2);
|
||||
serial2.irq = 3;
|
||||
|
||||
Reference in New Issue
Block a user