From 83d6b619cad4bb704b79c00f5137d47f80d25bd9 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 30 Jul 2004 01:41:10 +0000 Subject: [PATCH] Doing Stuff some people don't seem to care about. Added Directserial to makefile (else it will not be in the source archive and thus not in the builds) Enabled it on win32 hosts. Made it only compilable for win32 target hosts. dosbox.cpp: Added help for the configfile for directserial! (Users don't read the source.) ifdef some more stuff enable MPU-intelligent-mode by default. disable Directserial by default. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1897 --- configure.in | 1 + src/dosbox.cpp | 36 ++++++++++++++++++++++------- src/hardware/Makefile.am | 3 ++- src/hardware/directserial_win32.cpp | 10 +++++++- src/platform/visualc/config.h | 4 +++- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index 3f04af1e..10a097bc 100644 --- a/configure.in +++ b/configure.in @@ -182,6 +182,7 @@ case "$target" in *-*-cygwin* | *-*-mingw32*) LIBS="$LIBS -lwinmm" AC_CHECK_HEADERS(ddraw.h) + AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32 only).]) ;; *-*-darwin*) dnl We have a problem here: both MacOS X and Darwin report diff --git a/src/dosbox.cpp b/src/dosbox.cpp index 49f9c819..cfa235cb 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dosbox.cpp,v 1.71 2004-07-04 20:59:38 harekiet Exp $ */ +/* $Id: dosbox.cpp,v 1.72 2004-07-30 01:41:10 qbix79 Exp $ */ #include #include @@ -58,9 +58,11 @@ void DOS_Init(Section*); void CPU_Init(Section*); + #if C_FPU void FPU_Init(Section*); #endif + void DMA_Init(Section*); void MIXER_Init(Section*); void MIDI_Init(Section*); @@ -77,9 +79,18 @@ void PCSPEAKER_Init(Section*); void TANDYSOUND_Init(Section*); void DISNEY_Init(Section*); void SERIAL_Init(Section*); + +#if C_MODEM void MODEM_Init(Section*); +#endif + +#if C_IPX void IPX_Init(Section*); +#endif + +#if C_DIRECTSERIAL void DIRECTSERIAL_Init(Section* sec); +#endif void PIC_Init(Section*); void TIMER_Init(Section*); @@ -188,7 +199,7 @@ void DOSBOX_Init(void) { /* Setup all the different modules making up DOSBox */ secprop=control->AddSection_prop("dosbox",&DOSBOX_RealInit); - secprop->Add_string("language",""); + secprop->Add_string("language",""); secprop->Add_string("machine","vga"); secprop->Add_string("captures","capture"); @@ -267,7 +278,7 @@ void DOSBOX_Init(void) { secprop=control->AddSection_prop("midi",&MIDI_Init); secprop->AddInitFunction(&MPU401_Init); secprop->Add_bool("mpu401",true); - secprop->Add_bool("intelligent",false); + secprop->Add_bool("intelligent",true); secprop->Add_string("device","default"); secprop->Add_string("config",""); @@ -284,7 +295,7 @@ void DOSBOX_Init(void) { #endif secprop=control->AddSection_prop("sblaster",&SBLASTER_Init); secprop->Add_string("type","sb16"); - secprop->Add_hex("base",0x220); + secprop->Add_hex("base",0x220); secprop->Add_int("irq",7); secprop->Add_int("dma",1); secprop->Add_int("hdma",5); @@ -306,7 +317,7 @@ void DOSBOX_Init(void) { secprop=control->AddSection_prop("gus",&GUS_Init); secprop->Add_bool("gus",true); secprop->Add_int("rate",22050); - secprop->Add_hex("base",0x240); + secprop->Add_hex("base",0x240); secprop->Add_int("irq1",5); secprop->Add_int("irq2",5); secprop->Add_int("dma1",3); @@ -333,7 +344,7 @@ void DOSBOX_Init(void) { secprop->AddInitFunction(&DISNEY_Init); secprop->Add_bool("disney",true); - MSG_Add("SPEAKER_CONFIGFILE_HELP", + MSG_Add("SPEAKER_CONFIGFILE_HELP", "pcspeaker -- Enable PC-Speaker emulation.\n" "pcrate -- Sample rate of the PC-Speaker sound generation.\n" "tandy -- Enable Tandy 3-Voice emulation.\n" @@ -350,7 +361,7 @@ void DOSBOX_Init(void) { secprop->Add_bool("xms",true); secprop->AddInitFunction(&EMS_Init); secprop->Add_bool("ems",true); - MSG_Add("DOS_CONFIGFILE_HELP", + MSG_Add("DOS_CONFIGFILE_HELP", "xms -- Enable XMS support.\n" "ems -- Enable EMS support.\n" ); @@ -370,13 +381,22 @@ void DOSBOX_Init(void) { #endif #if C_DIRECTSERIAL secprop=control->AddSection_prop("directserial",&DIRECTSERIAL_Init); - secprop->Add_bool("directserial", true); + secprop->Add_bool("directserial", false); secprop->Add_hex("comport",1); secprop->Add_string("realport", "COM1"); secprop->Add_int("defaultbps", 1200); secprop->Add_string("parity", "N"); // Could be N, E, O secprop->Add_int("bytesize", 8); // Could be 5 to 8 secprop->Add_int("stopbit", 1); // Could be 1 or 2 + MSG_Add("DIRECTSERIAL_CONFIGFILE_HELP", + "directserial -- Enable serial passthrough support.\n" + "comport -- COM Port inside DOSBox.\n" + "realport -- COM Port on the Host.\n" + "defaultbps -- Default BPS.\n" + "parity -- Parity of the packets. This can be N, E or O.\n" + "bytesize -- Size of each packet. This can be 5 or 8.\n" + "stopbit -- The number of stopbits. This can be 1 or 2.\n" + ); #endif #if C_IPX secprop=control->AddSection_prop("ipx",&IPX_Init); diff --git a/src/hardware/Makefile.am b/src/hardware/Makefile.am index c4201d96..f51dc2a0 100644 --- a/src/hardware/Makefile.am +++ b/src/hardware/Makefile.am @@ -8,7 +8,8 @@ libhardware_a_SOURCES = adlib.cpp dma.cpp gameblaster.cpp hardware.cpp iohandler memory.cpp mixer.cpp pcspeaker.cpp pic.cpp sblaster.cpp tandy_sound.cpp timer.cpp \ vga.cpp vga_attr.cpp vga_crtc.cpp vga_dac.cpp vga_draw.cpp vga_gfx.cpp vga_other.cpp \ vga_memory.cpp vga_misc.cpp vga_seq.cpp vga_xga.cpp cmos.cpp disney.cpp \ - gus.cpp mpu401.cpp serialport.cpp softmodem.cpp ipx.cpp ipxserver.cpp + gus.cpp mpu401.cpp serialport.cpp softmodem.cpp ipx.cpp ipxserver.cpp \ + directserial_win32.cpp diff --git a/src/hardware/directserial_win32.cpp b/src/hardware/directserial_win32.cpp index 83efd464..14bd0d99 100644 --- a/src/hardware/directserial_win32.cpp +++ b/src/hardware/directserial_win32.cpp @@ -16,10 +16,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $Id: directserial_win32.cpp,v 1.2 2004-07-30 01:41:10 qbix79 Exp $ */ + #include "dosbox.h" #if C_DIRECTSERIAL +/* Windows version */ +#ifdef __WIN32__ + #include #include #include @@ -186,5 +191,8 @@ void DIRECTSERIAL_Init(Section* sec) { seriallist.push_back(cds); } +#else /*linux and others oneday maybe */ + +#endif +#endif -#endif \ No newline at end of file diff --git a/src/platform/visualc/config.h b/src/platform/visualc/config.h index 55025203..d03023f9 100644 --- a/src/platform/visualc/config.h +++ b/src/platform/visualc/config.h @@ -2,7 +2,6 @@ #define VERSION "0.61" -#define C_DIRECTSERIAL 1 /* Define to 1 to enable internal debugger, requires libcurses */ #define C_DEBUG 1 @@ -43,6 +42,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_DDRAW_H 1 +/* Define to 1 if you want serial passthrough support (Win32 only). */ +#define C_DIRECTSERIAL 1 + #define GCC_ATTRIBUTE(x) /* attribute not supported */ typedef double Real64;