Commit Graph

710 Commits

Author SHA1 Message Date
Volker Ruppert
9415313a49 Two configure script changes for the USB debugger.
- Only use GTK 2.0 if needed by wxWidgets, otherwise use GTK 3.0.
- Set minimum GTK version for the USB debug dialog to 3.0.
2024-07-14 21:12:32 +02:00
Volker Ruppert
b4f6a4a828 Added stub for the GTK version of the USB debugger.
- For now showing a warning message box with "OK" and "Cancel" button.
- Prepared SDL2 and X guis to use it.
- Modified code to make sure win32 specific stuff is only present in win32usb.cc.
2024-07-07 18:05:24 +02:00
Volker Ruppert
938c2ba307 USB debugger: Renamed configure option and config.h macro.
Now --enable-usb-debugger turns on USB debugger if not already done with Bochs debugger.
Now using BX_USB_DEBUGGER macro to prepare the code for implementations other than win32.
2024-07-06 18:48:14 +02:00
Volker Ruppert
2717e90d58 USB debugger: Moved platform independant stuff to separate files. 2024-07-05 23:53:00 +02:00
Volker Ruppert
69215cb1e0 Some changes for wxBochs.
- Read configuration: set working directory to path of selected bochsrc.
- Don't link with readline library if Bochs with debugger is compiled with wx only.
- Set initial window size to 640x480 to make all toolbar buttons visible.
2024-06-29 17:47:05 +02:00
Volker Ruppert
dc05bec7e3 Improved USB debugger toolbar handling.
- Added XPM bitmap for the "trigger" state.
- Init toolbar with USB debugger disabled state and switch to enabled when
  setting up the USB debug type.
- USB debugger is now available with plugins enabled.
2024-06-28 22:04:14 +02:00
Volker Ruppert
f3e2cbff5c Fixed GTK library version check for the gui debugger. 2024-06-03 22:18:47 +02:00
Volker Ruppert
c5fd56558f Builtin slirp: compilation fixes for VS2019 and Cygwin.
- VS2019 needs C++20 standard to be set.
- Some Cygwin related additions in util.cc.
- slirp_ssize_t definition and usage fixed.
- changed include position of compat.h in slirp.h.
2024-04-25 21:10:48 +02:00
Volker Ruppert
0ff2905998 Added support for using external slirp library instead of builtin one.
- Added configure option --enable-using-libslirp to turn on the search for the
  library. In config.h BX_HAVE_LIBSLIRP is set to 1 if found. The network Makefile
  is set up accordingly. If not enabled or not found, the builtin slirp code is used.
- Moved samba server code and host forwarding code to eth_slirp.cc.
- Modified builtin slirp API to reduce differences.
- NOTE: IPv6 support present in libslirp is not yet enabled (needs more testing).
- TODO: Update builtin slirp code based on libslirp 4.7.0 code.
2024-04-07 19:57:25 +02:00
Volker Ruppert
d345dc85dd Enable PulseAudio support for more platforms, but not yet for Windows.
On Windows PulseAudio uses pthreads which seem to be in conflict with the native
Windows threads used by Bochs.
2024-04-01 00:23:23 +02:00
Volker Ruppert
6ac761894c Added lowlevel sound output support using the PulseAudio simple API.
TODO: PulseAudio also supports sound recording and it's portable (Windows).
2024-03-31 13:19:43 +02:00
Volker Ruppert
ba1a0441ab Setting GTK version number in config.h fixes GTK3 compilation.
GTK3 forbids to include gtkversion.h directly.
2024-03-30 16:59:06 +01:00
Volker Ruppert
e9c66051bd Fixes from Debian package of Bochs 2.8.
- Use macro PKG_PROG_PKG_CONFIG to detect pkg-config.
- Removed obsolete file from Makefile.in.
2024-03-24 19:49:22 +01:00
Volker Ruppert
b9c0cb6d6f Check for GTK3 if GTK2 is not found.
This is required by the GTK-based enhanced debugger gui.
2024-03-24 09:38:12 +01:00
Volker Ruppert
21428f1abb Fixed some warnings when running autoconf 2.71. 2024-03-23 15:39:25 +01:00
Volker Ruppert
7cd532db9a Removed legacy libltdl code and force using system libltdl instead. 2024-03-23 12:02:56 +01:00
Volker Ruppert
8a81eebedb Don't enable USB debugger automatically if plugin support is enabled.
The current code of the USB debugger doesn't meet the requirements for compiling
with plugins present. It should not access devices directly but use the parameter
tree instead.
Don't include USB debugger resources if not present.
2024-03-23 07:32:50 +01:00
Shwartsman
3fa94f758a PR "check for both UHCI and OHCI when enabling EHCI #291" with configure support 2024-03-19 22:11:49 +02:00
Volker Ruppert
a3ff473642 Modified softfloat3e Makefile to fix compüilation with MSVC nmake.
Since GNU make and MSVC nmake need special rules for compiling this module that
causes failure with the other 'make' variant, the configure script needs to
comment out incompatible rules. Using symbols GNU_MAKE_ONLY and NMAKE_ONLY to
enable only one of the rulesets only.
Since one of the MSVC nmake rules uses curly brackets the shortcut script
.conf.win64-vcpp needs to be modified to exclude cpu/softfloat3e/Makefile
from removal of these usually unwanted characters.
2024-03-15 18:55:18 +01:00
Volker Ruppert
57ea1bad99 Fixed compilation outside of the source tree.
To implement this, softfloat3e needs a Makefile created by configure script
to set up the real SOURCE_DIR.
TODO: Fix compilation with MSVC nmake (Makefile line 278 fails).
2024-03-11 21:46:12 +01:00
Vort
f31b115e20
Add static link support for bxhub and bximage (#277) 2024-03-10 17:23:13 +02:00
Stanislav Shwartsman
d350c008e2
add softfloat3e library to Bochs to replace old softfloat2 (to get fp… (#259)
…16 support)

with a lot of my updates, cleanups and extensions for x86 features like
denormal and/or undeflow/overflow handling

---------

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2024-03-10 17:10:55 +02:00
Benjamin David Lunt
557976bee1
Initial start of the USB Debugger (#165)
This is the start of the Experimental USB Debugger (currently for the
Windows platform only).

Currently only supports the UHCI and xHCI controllers. The remaining
function of these two controllers and the two remaining controllers are
in the works and will be added to when time allows.

The User.dbk has been updated with (temporary) html files at
https://www.fysnet.net/bochs/user/index.html showing the process to
invoke and use the USB debugger (Section 5.8).

In its completion, this debugger will allow you to view and modify most
aspects of the specified USB controller. For example, currently you can
view and modify a TRB listed in the xHCI's Command or Event Ring. Other
aspects will be added.

I do not use and am not fluent in the use of `configure`,
`configure.ac`, and associated configuration files. I also don't use the
`gui/Makefile.in` file.

Someone that is more fluent in the way these files work, please add the
necessary items to successfully compile this PR.

---------

Co-authored-by: Shwartsman <stanislav.shwartsman@intel.com>
2024-03-10 13:05:41 +02:00
Volker Ruppert
09778e275d Updated version number after release. 2024-03-10 09:45:03 +01:00
Volker Ruppert
9177c93e4e Preparing Bochs release 2.8. 2024-03-10 07:59:37 +01:00
Volker Ruppert
ead3c2e3f6 Renamed flag VER_SVN to VER_DEV and related changes. 2024-03-09 20:18:25 +01:00
Stanislav Shwartsman
cc87b23738 regen configure after AMX added 2024-01-10 20:23:55 +02:00
Vort
5147c20eaa
Enable static library linking for MinGW builds (#152)
This change allows to build Windows binaries without dependencies on
toolchain-specific libraries (like `libc++.dll`).
It allows to perform version updates by copying of single `bochs.exe`,
without the need for searching and distribution of linked DLLs.

---------

Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2023-12-03 09:00:23 +02:00
Volker Ruppert
af47384d96 Regenerated configure script and updated CHANGES. 2023-12-02 15:13:39 +01:00
Stanislav Shwartsman
ffc722f4e8
Porting #SF patch #565 Real Time Clock /CMOS fix (#4)
by Michele Giacomone

Detailed description:

  -Observed issues

   Due to some limitations only dates between 1980 and 2038 can be
   used in a reliable way.
   Also, bochs incorrectly assumes a linear correspondence between
   the data returned by the <time.h> functions localtime() and
   mktime(), and isn't setting the latter properly.
   Bochs keeps its internal time value dependent to these functions
   after setup, assuming that their internal settings won't change
   on the go - which is not the case.
   In my OS, and in my timezone, this leads to incorrect startup values
   for 5 months each year and unreliable values if the simulation is
   kept going for a long time. (a feedback between localtime() and
   mktime() is created which keeps shifting back the time)
   Also, the RTC simulation is not realistic since the clock fixes
   itself across DST changes, without updating any DST related flag,
   a behavior that no guest OS expects.

  -Proposed fix

   This is implemented in such way that no bochs' previous behavior
   is changed, a part from the broken ones, with legacy in mind
   == the user can keep using bochs exactly as before knowing nothing
      of this patch

   +Make the internal s.timeval variable a Bit64s, so it can fit all
    values that the cmos can correctly represent, reported below:
    MIN     setting  -62167219200 =>  0000/01/01 SAT  0:00:00
    MAX BCD setting  253402300799 =>  9999/12/31 FRI 23:59:59
    MAX BIN setting  745690751999 => 25599/12/31 FRI 23:59:59
    And then fix each reference to these so it can handle such values
    And make bochs correctly wrap around for under/overflows, so that
    only the most significant bits of the century are lost.

   +Do the same thing to the bochs time0 parameter, so all the above
    values can be chosen at startup (despite being now legal values,
    1 and 2 will still be treated as "local" and "utc"). Note that
    normally only BCD settings are valid since bochs' CMOS defaults
    to such operating mode - the only way to use the binary range
    is by loading a cmos memory map.

   +Make the internal s.timeval variable independent from external
    factors. This means providing a small set of time handling
    functions, contained in "iodev/utctime.h", which must work in
    any environment in which bochs compiles, accessing no external
    resource. This also means that after startup, s.timeval will only
    be changed internally, and no call to the OS time functions will
    be made.

   +Make the internal s.timeval variable timezone independent, to
    have a linear correlation between its values and valid CMOS
    settings. To make it easier, s.timeval is gonna be treated as
    if the current timezone was UTC: so,
     - if the user selects UTC as time0, s.timeval will become current
       time(NULL)
     - if the user selects localtime, s.timeval will be computed as
       the value which will display the same broken down time as
       localtime(&now)
     - if the user inputs a time formatted string the proper s.timeval
       to displayed will be easily calculated,
     - if the user inputs a starting time value, s.timeval will be
       computed as the value which will display the same broken down
       time as localtime(&user_input) to ensure the same operation as
       before.
    A "tz=utc" is displayed when bochs prints out the current time
    value, to warn users about the difference in meaning between the
    internally kept time value and the value they can set through
    the "time0=" parameter. This might be changed to communicate
    instead the time value they can input to get the same setting,
    but performing such calculation (except for the startup time)
    suffers from all the mktime()/localtime() problems listed above
    so I did not do it.
    The range of "time0" is automatically adjusted so all users in
    all time zones can set any legal value despite "time0=" having a
    local meaning.

  A thorough explanation of what I did and why can be found in the
  "iodev/utctime.h" library header.

---------

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2023-12-01 22:55:35 +01:00
Stanislav Shwartsman
280303d76c
initial code for UINTR implementation (#138)
First step into implementing UINTR - User Level Interrupts ISA extension
To be continued

---------

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-11-25 16:43:47 +02:00
Volker Ruppert
04941fd511 Added support for cross-compiling for win64 with plugins enabled. 2023-11-12 20:15:51 +01:00
Stanislav Shwartsman
fe53752ddf
rename USE_RAW_SERIAL -> BX_USE_RAW_SERIAL (#70) 2023-09-04 20:21:37 +03:00
Florian Weimer
10c5ff3f82 configure: Improve compatibility with strict(er) C99 compilers
C99 removed implicit function declarations from the language.  All
functions must be declared before they can be called.  There are a
few places in the configure script where the exit function is called
without including <stdlib.h>.  Instead, return from the main
function, avoiding the exit declaration issue.
2022-11-27 23:12:58 +01:00
Stanislav Shwartsman
cee5e6de4b update configure.in for autoconf 2.71
it also required configure.in to be renamed to configure.ac
2022-08-26 21:20:51 +03:00
Volker Ruppert
d684c5cd57 Added missing updates after release. 2021-08-08 16:03:16 +00:00
Volker Ruppert
c9c3416098 Regenerated configure script. 2021-08-01 21:45:35 +00:00
Volker Ruppert
50b0ab2895 Regenerated configure script and recompiled BIOS images for release. 2021-08-01 08:12:28 +00:00
Volker Ruppert
bf8dda4e06 Regenerated configure script. 2021-07-12 19:06:38 +00:00
Volker Ruppert
2eca0db8fd Fixed setting up BOCHS_BITS symbol (currently only used by NSIS installer). 2021-06-20 13:37:23 +00:00
Volker Ruppert
06894e5b5e Updates after pre-release, partly updated Bochs URL usage. 2021-06-13 08:02:33 +00:00
Volker Ruppert
426408cca6 Regenerated configure script for pre-release. 2021-06-13 05:16:36 +00:00
Volker Ruppert
9426ba987b Converted the win32config module to a plugin (using PLUGTYPE_CORE for now). 2021-03-26 19:12:09 +00:00
Volker Ruppert
de0a844b75 Regenerated configure script. 2021-03-23 10:06:13 +00:00
Volker Ruppert
4966843c90 Converted the textconfig module into a plugin, using PLUGTYPE_CORE for now.
It has been compiled and tested on Linux, with MinGW/MSYS and MSVC nmake.
TODO: Check whether or not the config interface choice "win32config" can be
a plugin, too. Possibly add a new plugin type for config interfaces.
2021-03-18 19:50:12 +00:00
Volker Ruppert
1f583e6e7f Regenerated configure script. 2021-02-09 08:24:20 +00:00
Volker Ruppert
81ecfcb10f Improved cross compiling support on Linux for Windows.
- In case of cross compiling of the win32 gui, use the environment variable
  WINDRES for the name of the resource compiler.
- Added example shortcut script for cross compiling on Linux for Windows.
2021-01-17 10:54:18 +00:00
Volker Ruppert
2ee6a0b0bf Regenerated configure script. 2021-01-02 20:50:37 +00:00
Stanislav Shwartsman
154c06b11b regen configure script 2021-01-02 13:48:17 +00:00
Volker Ruppert
c99bd49f34 Some work on the hdimage plugin support.
- Renamed vpc-img.* files to vpc.* and removed hack for image mode name conversion.
- Added suffix "_img" to all disk image mode plugin base names. This is important
  for the future implementation of a plugin enumeration at Bochs startup.
2020-12-30 17:56:27 +00:00