diff --git a/bochs/config.h.in b/bochs/config.h.in index 350ba2843..c20da7732 100644 --- a/bochs/config.h.in +++ b/bochs/config.h.in @@ -279,6 +279,7 @@ #endif #define BX_SUPPORT_SB16 0 +#define BX_SUPPORT_GAME 0 #if BX_SUPPORT_SB16 // Use virtual methods for the sound output functions diff --git a/bochs/configure.in b/bochs/configure.in index a73efceae..10c2dd25a 100644 --- a/bochs/configure.in +++ b/bochs/configure.in @@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(bochs.h) -AC_REVISION([[$Id: configure.in,v 1.234 2003-12-25 21:46:07 sshwarts Exp $]]) +AC_REVISION([[$Id: configure.in,v 1.235 2003-12-26 13:53:39 vruppert Exp $]]) AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(ltdlconf.h) @@ -1577,12 +1577,14 @@ AC_SUBST(CDROM_OBJS) AC_MSG_CHECKING(for Sound Blaster 16 support) +SB16_OBJS='' +SOUNDLOW_OBJS='' +GAME_OBJS='' +gameport_present=0 AC_ARG_ENABLE(sb16, [ --enable-sb16=xxx Sound Blaster 16 Support (xxx=dummy|win|linux|freebsd)], [if test "$enableval" = no; then AC_MSG_RESULT(no) - SB16_OBJS='' - SOUNDLOW_OBJS='' AC_DEFINE(BX_SUPPORT_SB16, 0) else case "$enableval" in @@ -1610,12 +1612,12 @@ AC_ARG_ENABLE(sb16, esac SB16_OBJS='sb16.o' AC_DEFINE(BX_SUPPORT_SB16, 1) + GAME_OBJS='gameport.o' + gameport_present=1 fi], [ AC_MSG_RESULT(no) - SB16_OBJS='' - SOUNDLOW_OBJS='' AC_DEFINE(BX_SUPPORT_SB16, 0) ] ) @@ -1623,6 +1625,33 @@ AC_SUBST(SB16_OBJS) AC_SUBST(SOUNDLOW_OBJS) +AC_MSG_CHECKING(for standard PC gameport support) +AC_ARG_ENABLE(gameport, + [ --enable-gameport enable standard PC gameport support], + [if test "$enableval" = yes; then + AC_MSG_RESULT(yes) + if test "$gameport_present" = 0; then + GAME_OBJS='gameport.o' + case $target in + *-cygwin* | *-mingw32*) + DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm" + ;; + esac + fi + else + AC_MSG_RESULT(no) + GAME_OBJS='' + fi], + [ + if test "$gameport_present" = 1; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi] + ) +AC_SUBST(GAME_OBJS) + + AC_MSG_CHECKING(for gdb stub enable) AC_ARG_ENABLE(gdb-stub, [ --enable-gdb-stub enable gdb stub support], diff --git a/bochs/iodev/devices.cc b/bochs/iodev/devices.cc index fe6dee0b2..266575312 100644 --- a/bochs/iodev/devices.cc +++ b/bochs/iodev/devices.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: devices.cc,v 1.57 2003-08-19 00:10:38 cbothamy Exp $ +// $Id: devices.cc,v 1.58 2003-12-26 13:53:39 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -94,7 +94,7 @@ bx_devices_c::init(BX_MEM_C *newmem) { unsigned i; - BX_DEBUG(("Init $Id: devices.cc,v 1.57 2003-08-19 00:10:38 cbothamy Exp $")); + BX_DEBUG(("Init $Id: devices.cc,v 1.58 2003-12-26 13:53:39 vruppert Exp $")); mem = newmem; /* no read / write handlers defined */ @@ -148,7 +148,9 @@ bx_devices_c::init(BX_MEM_C *newmem) if (is_parallel_enabled ()) PLUG_load_plugin(parallel, PLUGTYPE_OPTIONAL); PLUG_load_plugin(extfpuirq, PLUGTYPE_OPTIONAL); +#if BX_SUPPORT_GAME PLUG_load_plugin(gameport, PLUGTYPE_OPTIONAL); +#endif // Start with registering the default (unmapped) handler pluginUnmapped->init (); diff --git a/bochs/iodev/gameport.cc b/bochs/iodev/gameport.cc index 850089a4a..13abb6c15 100644 --- a/bochs/iodev/gameport.cc +++ b/bochs/iodev/gameport.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: gameport.cc,v 1.3 2003-12-21 17:24:45 vruppert Exp $ +// $Id: gameport.cc,v 1.4 2003-12-26 13:53:40 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2003 MandrakeSoft S.A. @@ -208,7 +208,7 @@ bx_gameport_c::read(Bit32u address, unsigned io_len) } } } else { - BX_INFO(("read: joystick not present")); + BX_DEBUG(("read: joystick not present")); } return BX_GAMEPORT_THIS port; }