Commit Graph

2136 Commits

Author SHA1 Message Date
Volker Ruppert
f9ff6ece2d Applied some parts of the floppy patch by Ben Lunt.
- The "Read ID" command must return an error when reading with non-existant head.
- Some BX_DEBUG improvements and minor other changes.
2015-01-12 18:52:39 +00:00
Volker Ruppert
fe49c73a6b Some work on the lowlevel sound support.
- Define new structure bx_pcm_param_t and use it as a parameter for the method
  sendwavepacket(). The method startwavepacket() is now called from
  sendwavepacket() in case of a parameter change (temporary solution).
- soundsdl: Replaced waveready() call by some more accurate code for buffer
            space check in sendwavepacket().
- soundsdl: Moved code for reading from audio buffer to a new function.
- soundsdl: Temporarily increase the audio buffer size.
- Preparing the SB16 code for the OPL emulation port from DOSBox.
2015-01-11 20:13:50 +00:00
Volker Ruppert
7bd5eeaa87 Mix the wave input using SDL_MixAudio() (addition and clipping).
NOTE: This function is not correct in case of more than 2 active sources.
2015-01-11 07:57:35 +00:00
Volker Ruppert
15ccdef0d1 Fixed register/unregister wave callback (found while testing OPL code). 2015-01-10 19:36:50 +00:00
Volker Ruppert
fe953485b1 Some more work in the lowlevel sound code.
- Reworked wave callback code to support 2 input sources (no mixing yet).
- Fixed SDL sound output.
- Beep generator fixes.
- Prepared the SB16 code for FM OPL output support (to be ported from DOSBox).
2015-01-08 19:12:01 +00:00
Stanislav Shwartsman
055da948a0 fixed problems found by cppcheck tool (patch by Maxim Derbasov) - second round 2015-01-07 16:17:40 +00:00
Volker Ruppert
2ca192eef7 Some more work in the lowlevel sound code.
- Renamed wavedata callback type.
- Handle sample rate in the beep generator (TODO: handle data format).
- Don't call waveready() in the SB16 code.
- Attempt to fix SDL2 wave output using SDL_LockAudio() / SDL_UnlockAudio().
- SDL specific code in the beep thread no longer needed.
2015-01-05 22:07:03 +00:00
Volker Ruppert
0c205fce26 Some work in the lowlevel sound code.
- Added framework for polling wave data and use it for beep output in sdl.
- Some work in the beep thread code (to be continued).
- Moved macros required for multithreading to bochs.h.
2015-01-04 21:12:41 +00:00
Stanislav Shwartsman
1f4d3e7194 fixed problems found by cppcheck tool (patch by Maxim Derbasov) 2015-01-03 13:53:52 +00:00
Volker Ruppert
c7c92bb62b Fixed OPL chip detection.
- Increment timer counter before checking for overflow.
- Implemented ISA bus delay in the pc_system code and use it for the SB16.
  This makes OPL chip detection work at ips values > 4 Mips.
TODO: OPL chip should use wave output instead of MIDI (maybe port from DOSBox).
TODO: Use isa_bus_delay() for other legacy devices if required.
2014-12-31 12:27:32 +00:00
Volker Ruppert
ee5a416228 Now build rules for all gui and device plugins supported by MSVC nmake depend
on the related configure options.
2014-12-28 19:13:02 +00:00
Volker Ruppert
65d2bb11eb Release all pressed keys when the Bochs window gets back the keyboard focus.
- feature implemented in the wxWidgets gui
- feature not required for legacy SDL (releases keys on focus change)
- removed duplicate code in keyboard.cc
- TODO: implement feature in the win32 gui if required
2014-12-27 09:43:05 +00:00
Volker Ruppert
227da0c6de Release all pressed keys when the simulation window gets back the keyboard
focus. This change will fix some keyboard-related bug reports (DONE for the
x and sdl2 guis / TODO for all others).
2014-12-26 20:25:27 +00:00
Volker Ruppert
e5e535dad2 Fixed slirp compilation on OpenBSD.
TODO: fix slirp support compiled with VS2013.
2014-12-25 17:58:26 +00:00
Volker Ruppert
f0b38ff643 Restore VGA core before the PCI / VBE stuff to avoid crash due to wrong dimension. 2014-12-24 19:44:47 +00:00
Volker Ruppert
88d9ad57bf Attempt to fix the win32 raw serial receive support using a critical section
(untested - code should be enabled after successful testing).
2014-12-23 17:13:29 +00:00
Volker Ruppert
c3b025e224 Fixed possible crash when compiled with VS2013.
TODO: fix slirp support compiled with VS2013.
2014-12-22 14:26:47 +00:00
Volker Ruppert
2ec57b8a6b Fixed some more C++11 warnings. 2014-12-18 17:52:40 +00:00
Volker Ruppert
22665b3225 Re-enable "bulk I/O" repeat speedups extension that has been accidently disabled
about 3 years ago.
2014-12-16 02:26:55 +00:00
Volker Ruppert
3d228c4f61 Fixed some other overlapping memcpy() issues. 2014-12-16 02:26:00 +00:00
Volker Ruppert
f35b9b23c8 Bugfix: use memmove() if source and destination range can overlap (found with valgrind). 2014-12-14 18:53:16 +00:00
Volker Ruppert
c8ef526143 Fixed some warnings. 2014-12-01 17:06:00 +00:00
Volker Ruppert
fba9145f66 Moved sources of the sound lowlevel base class ('dummy' driver) to separate files. 2014-11-24 18:25:14 +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
Volker Ruppert
9805324c42 Minor changes in the sound lowlevel code. 2014-11-21 23:03:19 +00:00
Volker Ruppert
524ba46c3d Added the capability to select the operation mode of the VGA update timer.
The realtime mode is enabled by default (patch by Dawn Teschendorf).
2014-11-15 10:22:27 +00:00
Volker Ruppert
3a1bb1f476 Bugfix: sound driver 'sdl' wasn't available if Bochs was compiled with SDL2 gui.
FIXME: wave output doesn't work properly in case of SDL2.
2014-11-14 18:25:37 +00:00
Volker Ruppert
59f5a03af6 Rewrite of the virtual timer code to support both modes at the same timer.
The timers now have a new member 'realtime' and they are driven by the
selected engine. The VGA update timer and the status LED timer now always use
the realtime mode, but the PIT and CMOS RTC depend on the clock options.
2014-10-19 08:54:16 +00:00
Volker Ruppert
3393a17c8f Fixed crash when using a "fixed" type VPC image. 2014-10-14 21:39:05 +00:00
Volker Ruppert
63665aa773 Removed unused define.
TODO: improve virtual timer to make operate in both modes at the same time.
The vga update code should always use the realtime mode and the pit timing
should depend on the clock option.
2014-10-13 18:34:21 +00:00
Volker Ruppert
cebff45fef Fixed two fields in xmit_seg() 2014-10-13 17:09:14 +00:00
Volker Ruppert
bb1def0ad2 Fixed WinPCap function declaration and assignment for MSVC using CDECL and
now using typedefs similar to the niclist utility.
2014-10-04 17:31:57 +00:00
Volker Ruppert
c1e54bcfbf Added USB port specific option 'size' for VVFAT disks (range 128M ... 128G).
If the size is not specified or invalid, it defaults to 504M.
2014-09-29 17:48:30 +00:00
Volker Ruppert
d012670927 Applied the usb_xhci part of the USB patch by Ben Lunt.
Notes by Ben:
This emulates a NEC/Renesas uPD720202 2-port (2 socket, 4-port register sets)
Root Hub xHCI Host Controller.
Many, many thanks to Renesas for their work and effort in helping my research.

I have tested in with my own tests and WinXP Home Edition SP3.

Use port1 and port2 to emulate a Super-speed device, and use port3 and port4
to emulate Low-, Full-, or High-speed devices.

NOTE: The Windows driver for this device uses a proprietary detection
mechanism and we don't have the permission to implement it. That's why it only
works fine with non-Windows guests.
2014-09-28 14:21:22 +00:00
Volker Ruppert
b8a633d0db Setting cylinders to 0 fixes runtime connecting an USB disk with 'vvfat' mode
(disk size is always set to 504M / could be a vvfat specific option).
2014-09-25 19:31:01 +00:00
Volker Ruppert
50e96fa1cd - applied parts of the new USB patch by Ben Lunt
- removed max_packet_size member from USB device structure
- usb_uhci: improved speed info
- updated USB-related documentation
- TODO: review and test the main part of the xHCI changes by Ben
2014-09-22 19:49:39 +00:00
Volker Ruppert
4f3189d5e5 Updated xHCI files to match the latest spec version 1.10 (patch by Ben Lunt) 2014-09-07 18:18:41 +00:00
Volker Ruppert
9b3b792c73 Gui debugger: handle some more settings in INI file
Slirp: fixed copy-and-paste error
2014-08-30 07:14:19 +00:00
Volker Ruppert
7ba82cab9f Write enhanced debugger gui settings to config file on exit and read them in
the init code. Started with the SeeReg[] array values. Some other setting could
be added later. The parser code is based on the slirp config parser.
Slirp: fixed possible segfault if the value for a parameter is missing.
2014-08-24 14:28:42 +00:00
Volker Ruppert
73d5f6e626 Attempt to fix a compilation error on OSX. 2014-08-23 14:46:31 +00:00
Volker Ruppert
494ed30e95 Some fixes for plugin support with VS2013Ex
- creating extra manifest for bochs.exe no longer needed
- cleaning up temporary manifest files no longer necessary
2014-07-26 06:54:34 +00:00
Volker Ruppert
e44e9c57d6 Fixed possible crash on Windows (double free()) 2014-07-09 23:49:53 +00:00
Stanislav Shwartsman
e2e549c675 fixed MSVCPP warning 2014-07-09 15:39:47 +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
6f75ceadbc Removed sources of legacy tools bxcommit and bximage_old and updated MSVC workspaces 2014-06-19 08:57:28 +00:00
Volker Ruppert
e0ece92d06 Fixed hdimage mode 'dll' for MSVC with /Gr option set 2014-06-09 07:14:23 +00:00
Volker Ruppert
773ac518b3 Fixed broken MSVC plugins support (many CDECL additions required)
TODO: check for remaining CDECL issues (hdimage mode 'dll') and update project files
2014-06-08 08:40:08 +00:00
Stanislav Shwartsman
84bb623af8 speedup visual studio build by almost 20% by adding /Gr compiler option 2014-06-04 19:46:21 +00:00
Volker Ruppert
353e34f338 Fixed possible segfault when accessing BXPN_SOUND_WAVEIN with base argument
(patch by Dawn Teschendorf)
Added partial summary to CHANGES
2014-05-26 19:39:15 +00:00
Volker Ruppert
42afaef2ba Load floppy plugin after the display plugin and simplified related init gui code. 2014-05-26 17:04:02 +00:00