Commit Graph

353 Commits

Author SHA1 Message Date
Volker Ruppert
8006ec9fa3 Fixes and updates for wxWidgets 3.0
- wxMSW unicode: define UNICODE before including windows.h via bochs.h.
- Fixed compilation error (wxNode usage).
- Fixed deprecation warnings at toolbar creation.
2017-06-04 09:32:58 +00:00
Volker Ruppert
e1d8bedbb5 Added symbol BX_LOAD32BITOSHACK to disable this legacy feature. With the
latest BIOS images 32-bit and even 64-bit guest OS's are known to boot inside
of Bochs without hacking. This legacy hack could be removed after next release
if nobody complains.
2017-04-17 13:26:44 +00:00
Volker Ruppert
d6166344eb Added ethernet module 'socket'. designed to connect two Bochs instances with
external program 'bxhub' (simulating a two port ethernet hub). It is based on
an old SF patch and it has been updated and extended:
- Windows support (tested with MinGW/MSYS and MSVC nmake).
- Command line arguments for 'bxhub' (base port number, MAC address, TFTP).
- Added support for DHCP, TFTP, ARP and ICMP echo (ping). It uses parts of the
  code for the 'vnet' module with some additions from the former "slirp backend".
- TODO: code cleanup to reduce duplication, rewrite of the networking plugins
  stuff similar to the work done with the sound drivers.
2017-02-27 22:26:43 +00:00
Volker Ruppert
f971dccddb Implemented SDL2 "wavein" service (Audio capture support is new in SDL 2.0.5
and does not yet work on all platforms).
2017-02-08 18:48:49 +00:00
Volker Ruppert
f844e846b7 Added PCM output data resampling in a separate thread. The resampler requires
either libsamplerate or the SoX resampler library installed. If not installed,
the data is only copied to the output buffer and sample rate of the output
driver is changed similar to legacy code. Related changes:
- Added check for libsamplerate or SoX resampler header files in configure
  script.
- Added functions for converting source format to float (requied by resampler)
  and float to output format.
- Added support for float type data in the audio buffer code. Buffer chain #0
  receives float data from sendwavepacket() and buffer #1 receives data for
  mixing and output in format "16-bit signed little endian stereo".
- ALSA: Disable builtin resampling feature if resampler is present to avoid
  doing it twice.
2017-02-05 08:33:03 +00:00
Volker Ruppert
f18bb743be Added new symbol BX_USE_GUI_CONSOLE and set it to 1 for all guis with support
for the VGA to be used for textconfig at runtime.
2017-01-13 15:57:36 +00:00
Stanislav Shwartsman
956eb6e990 add missing PKEYS define into config.h.in 2016-03-17 19:29:34 +00:00
Stanislav Shwartsman
9557cafcef revertng commit #12854 because it broke MT simulation with debugger enabled. Until investigted. 2015-12-20 22:44:54 +00:00
Volker Ruppert
0ba744b9fe Started implementing USB EHCI support. The PCI and MMIO register behaviour is
almost implemented, the port owner handling and the UHCI companion controllers
are present. High speed devices are not yet supported, since the EHCI scheduler
code has not been written yet (e.g. porting from Qemu). Low and full speed
devices should be detected correctly and work after port ownership change to
UHCI. 6 ports are available and the bochsrc syntax is similar to other HCs.
2015-12-06 20:03:42 +00:00
Stanislav Shwartsman
9f77a6c3b0 full debugger support together with handler-chaining speedups optimization enabled (experimental)
should speedup emulation with debugger enabled
2015-10-09 05:28:47 +00:00
Stanislav Shwartsman
8804fb624b Clear definition of BX_CPP_INLINE in Visual Studio case 2015-05-14 11:49:28 +00:00
Volker Ruppert
696c1a6e55 Some Bochs features are still called "experimental". The bus mouse, USB OHCI,
USB UHCI and the E1000 NIC are known to work fine on some guest systems, so
it's safe to remove this attribute.
TODO: Some other Bochs features need to be reviewed for this.
2015-04-07 16:57:36 +00:00
Volker Ruppert
cbfbaaacb7 Added BX_HAVE_SOUND_* definitions to simplify code. 2015-02-23 21:32:34 +00:00
Stanislav Shwartsman
e16c6eb30c preparations and interface definition for memory type support 2015-02-19 20:23:08 +00:00
Volker Ruppert
1e52f0cbe0 Implemented simple mixing support (addition and clipping).
Fixed minimum value of signed data types.
TODO: Use the mixer thread support in the sound modules (alsa, oss, osx, win).
2015-02-02 21:11:31 +00:00
Volker Ruppert
7330f3a61c Changed to way to determine the default lowlevel sound driver (part of the
mixing3.patch by Dawn Teschendorf).
2014-11-22 11:43:40 +00:00
Stanislav Shwartsman
f8267ec3a7 rework in CPUID code (fixed code duplication). Re-enable perfmon reporting in CPUID because Win8/Win10 installation doesn't want to start without perfmon reported. TODO: implement basic perfmon support (at least only fixed counters) because win7-64 doesn't install with perfmon reported but not implemented 2014-10-15 08:04:38 +00:00
Stanislav Shwartsman
206c19116d fixed diagnostic message 2014-10-15 05:15:58 +00:00
Stanislav Shwartsman
8d1e3b2ac1 Added statistics collection infrastructure in Bochs and
implemented important CPU statistics which were used for Bochs CPU model performance analysis.
old statistics code from paging.cc and cpu.cc is replaced with new infrastructure.

In order to enale statitics collection in Bochs CPU:

- Enable statistics @ compilation time in cpu/cpustats.h
- Dump statistics periodically by adding -dumpstats N into Bochs command line
2014-10-14 15:59:10 +00:00
Volker Ruppert
3e2acd21ac Fixes for the SDL2 gui on Windows 2014-06-28 23:49:10 +00:00
Volker Ruppert
3c0ad43092 Continued preparing Bochs for SDL2 support
- added new symbol BX_WITH_SDL2 and prepared build system
- TODO #1: add new option --with-sdl2 to configure script
- TODO #2: add new file sdl2.cc (porting seems hard to do - writing from scratch
  might be better)
2014-06-23 19:37:58 +00:00
Volker Ruppert
5602e1b676 Added new symbol BX_USE_WIN32CONFIG in config.h and cleaned up related code 2014-06-20 09:31:56 +00:00
Stanislav Shwartsman
2fe0aaa472 added configure option for trace linking optimization and mention it in CHANGES 2014-05-01 18:30:23 +00:00
Stanislav Shwartsman
e03134d964 add likely/unlikely macros from linux kernel for future use 2014-04-21 20:06:32 +00:00
Volker Ruppert
64385beaa4 Renamed "slirp_new" to "slirp" (source file, symbols, classes, docs) 2014-04-02 17:38:09 +00:00
Volker Ruppert
fee79a2837 Removed the "slirp backend" networking module from the Bochs sources. It had
required an external binary and it couldn't be ported to Windows. Now the new
builtin and portable slirp support based on Qemu's implementation is almost
stable and all the 'vnet' DHCP and TFTP features have been ported to the new
slirp module.
TODO: rename all the "slirp_new" stuff to "slirp"
2014-04-01 18:18:04 +00:00
Volker Ruppert
5ca0a003b6 Configure script and config.h.in reorganization: put all device-related config
options in one section and added busmouse option.
2014-03-23 12:00:58 +00:00
Volker Ruppert
dfc71f8ae4 Applied patch for builtin "slirp" (user-mode networking) support. This version
is almost a port of the Qemu 1.1.2 implementation. It has been tested successfully
on Linux and Windows (MinGW/MSYS). The networking module is currently called
"slirp_new", since the "slirp" backend module still exists.

TODO list:
  - MSVC support (requires container_of() macro replacement)
  - apply fixes and improvements from recent Qemu releases
  - use our TFTP implementation to reduce code duplication
  - check if we can share ARP and DHCP support with "vnet"
  - add SMB support on Linux
  - finally remove the slirp backend module support
2014-02-16 13:31:53 +00:00
Volker Ruppert
fb70da3e3e Added check for type ssize_t
List the supported ethernet modules
2013-12-04 17:04:15 +00:00
Volker Ruppert
b9944b43b5 Some small fixes
- bochs.h:     fixed gcc 4.8 warning
- config.h.in: fixed newline
- extplugin.h: fixed VS2008Ex plugins compilation
- gui.cc:      fixed tooltip
2013-11-07 19:38:23 +00:00
Volker Ruppert
b1d4a96983 Rewrite of the lowlevel cdrom code
- class cdrom_base_c now provides portable ISO image access methods
- platform specific classes implement access to cdrom/dvd devices
2013-11-06 11:15:22 +00:00
Volker Ruppert
08b66534aa bximage fixes for compiling with VS2008Ex DLL plugins 2013-10-28 20:31:34 +00:00
Stanislav Shwartsman
7790e994eb do not touch inline definition under C++ - added issue #1 in SF bug 1342 2013-10-17 19:22:16 +00:00
Volker Ruppert
51688143aa Some work on the lowlevel sound support
- ALSA driver is now default on Linux (if present)
- SDL sound driver is now default if no platform-specific driver is available
  and the SDL gui is enabled
- soundlnx.cc: sendwavepacket() now exits with error if device is not opened
- soundmod.cc: exit beep loop if sendwavepacket() returns error
2013-08-04 14:35:06 +00:00
Stanislav Shwartsman
2dbe81db51 first infrastructure changes to support EVEX prefix and AVX-512 extensions recently published by Intel 2013-07-26 12:50:56 +00:00
Volker Ruppert
17b7b87a61 Added new experimental gui 'vncsrv" using the LibVNCServer library. It supports
higher resolutions and > 8 bpp graphics modes. The RFB gui with limited
capabilities is still available.
TODO:
- fix random segfaults in dimension_update()
- Windows (MinGW) support
- fixes for clients not supporting 'rfbEncodingNewFBSize'
- fix cursor shape after dimension update()
2013-05-30 17:18:30 +00:00
Stanislav Shwartsman
ce2751a13c move misaligned_sse from compile time to .bochsrc option 2012-12-20 19:43:11 +00:00
Stanislav Shwartsman
744001e35e Implemented VMX APIC Registers Virtualization and VMX Virtual Interrupt Delivery emulation
Bugfix: VMX: VmEntry should do TPR Virtualization (TPR Shadow + APIC Access Virtualization case is affected) and even could possibly cause TPR Threshold VMEXIT
2012-10-26 18:43:53 +00:00
Volker Ruppert
5f5d8e2c33 Applied initial version of the 3dfx Voodoo Graphics emulation. The Voodoo core
is based on a patch originally designed for DOSBox. Currently only the Voodoo1
adapter model can be emulation. The emulation is currently slow, but we intend
to clean up and optimize the code. Running the 3D engine in a separate thread
is also planned. To compile with Voodoo support the configure option
"--enable-voodoo" must be used. Then the device can be activated with
"plugin_ctrl: voodoo=1" in bochsrc or on the command line. The device will be
assigned automatically to a PCI slot unless you do that manually. A specific bochsrc
option to select the adapter model will be added when the code has support for it.
2012-09-14 21:50:50 +00:00
Volker Ruppert
fb0e05e36c - fixed compilation with large ramfile support present on MSVC 2012-08-26 14:43:14 +00:00
Stanislav Shwartsman
4d03b57291 Allow larger quantum value for SMP simulations (up to 32)
Update CHANGES
2012-08-02 20:48:27 +00:00
Stanislav Shwartsman
85e30bd410 remove unused configure check for struct timeval 2012-06-04 20:26:00 +00:00
Volker Ruppert
ca2e44c0c4 - moved the pcivga code to vga.cc and removed the now obsolete plugin device 2012-01-26 16:35:38 +00:00
Stanislav Shwartsman
75bda1d5cd implemented SVM emulation support for Bochs (incomplete yet)
I am merging the code in order to start making shortcuts between VMX emulation and SVM emulation.
Of course SVM emulation is incomplete, completely untested and not expected to work.
But someone could already take a look one the code and give some suggestions.

Also looking for anybody with existing SVM kernels - as simple as possible - for testing.

Status:
 - exceptions intercept is not implemented yet
 - IO intercept is not implemented yet
 - MSR intercept is not implemented yet
 - virtual interrupts are not implemented yet
 - CPUID is not implemented yet

No advanced SVM featurez planned - I am implementing the very basic 'Pacifica' document from 2005 using QEMU code as reference.
2011-12-25 19:35:29 +00:00
Volker Ruppert
5045a241e8 - ported Intel(R) 82540EM Gigabit Ethernet adapter emulation from Qemu
- TODO: add save/restore support, use Bochs function for host to little endian
  data conversion, timers of networking modules 'vnet' and 'slirp' should use
  the device speed instead of fixed 10 MBit
2011-12-13 20:53:44 +00:00
Stanislav Shwartsman
01f27e3a0c this should fix bug report 3422638 large ramfile support broken on anything but Linux 2011-10-15 19:29:42 +00:00
Stanislav Shwartsman
1b9f286945 - New way of CPUs scheduling in SMP mode brings up to 50% speedup to the
SMP emulation. New implementation uses dynamic CPU quantum value and takes
   full advantage of the trace cache. Each emulated processor will execute
   the whole trace before switching to the next processor.
 * It is also safe to use large (up to 16 instructions) quantum values for
   the SMP emulation now and improve performance even further.

The same merge also completely fixes SF bug :
  [3312237] stepN command might be not working properly

Handlers chaining speedups are also supported with SMP emulation now.
2011-09-22 19:38:52 +00:00
Stanislav Shwartsman
cb261c45d3 removed non-working code for z-unodable and z-volatile images.
our priority is to implement support for std disk image formats (VMDK, VDI) instead.
2011-09-11 16:27:56 +00:00
Stanislav Shwartsman
1e2e3c8b0e forgot to merge file 2011-08-21 14:38:33 +00:00
Stanislav Shwartsman
13feb0772a - 10% emulation speedup with handlers chaining optimization implemented. The
feature is enabled by default when configure with --enable-all-optimizations
    option, to disable handlers chaining speedups configure with
        --disable-handlers-chaining
2011-08-21 14:31:08 +00:00