Commit Graph

10951 Commits

Author SHA1 Message Date
Volker Ruppert
23ea69f1b2 Rewrite of the audio buffer handling and small code reorganization. 2015-01-25 20:03:11 +00:00
Volker Ruppert
10cf06afbd Added pcm format conversion support to the win32 and OSX sound modules.
Changed name of the pcm conversion method and minor cleanups.
2015-01-25 11:45:13 +00:00
Volker Ruppert
2c621601cb Moved wave format conversion code to the sound lowlevel base class and added
format conversion support to the ALSA and OSS sound modules.
2015-01-24 21:01:45 +00:00
Volker Ruppert
e37498025e Some small changes in the SDL sound module.
- Store conversion multiplier in the C++ class.
- Moved wave callback structure to soundlow.h for future use.
- Removed unused methods.
2015-01-23 19:10:49 +00:00
Volker Ruppert
add5b1e61d Some work on the Bochs sound support.
- OPL3: Added support to change the samplerate of the generator.
- SDL sound: convert wave packet to 16 Bit signed stereo format.
- Increased the maximum size of a single wave packet for playbck/recording.
2015-01-22 20:28:14 +00:00
Volker Ruppert
55f7c7542b Implemented yes/no dialog for SDL2 (e.g. for VVFAT commit). 2015-01-19 20:32:20 +00:00
Volker Ruppert
3dca0bd8cf Some work in the soundmod beep code and multithreading improvements.
- Beep thread now only started one per simulation.
- Added some more multithreading macros and use them in rfb, vncsrv and soundmod.
- TODO: implement mixer thread and remove beep thread.
2015-01-17 19:53:03 +00:00
Volker Ruppert
dd56a4d1d3 OPL3: improved save/restore support and added SVN Id line. 2015-01-16 18:55:25 +00:00
Stanislav Shwartsman
271f06026d fixed compilation err with SVM without VMX 2015-01-16 06:15:47 +00:00
Volker Ruppert
cf888edf81 Removed most of the incomplete legacy FM OPL emulation part of the SB16.
Only keep the OPL timer code required for chip detection. Started implementing
save/restore support in the OPL3 code ported from DOSBox.
2015-01-15 20:25:27 +00:00
Volker Ruppert
fb265dc532 Ported OPL3 emulation from DOSBox.
The code currently only works with the SDL sound output module and at 44100 Hz,
with 16 bit stereo signed little endian format. FM volume control and
save/restore support are not implemented yet. The legacy code for generating
MIDI notes still works and will be removed when mixing support is implemented
in all sound modules.
2015-01-12 21:20:18 +00:00
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
Stanislav Shwartsman
63c3ed3f70 update (c) and fix instrumentation stub 2015-01-11 20:50:26 +00:00
Stanislav Shwartsman
3b237df41d Added far branch origin to bx_instr_far_branch instrumentation callback by user request
Updated instrumentation examples
Fixed code duplication
2015-01-11 20:45: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
Volker Ruppert
2357175d79 Show mouse messages only if capture status changes. 2015-01-03 17:13:54 +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
33a633cbd2 Partial rewrite of the win32 mouse motion handling.
- If the mouse is captured, use ClipCursor() to keep the cursor in the window.
- After handling mouse motion event in relative mode, move the cursor back to
  the window center (similar to other guis).
2014-12-30 16:31:17 +00:00
Volker Ruppert
2f893a76ff Small code cleanup 2014-12-29 18:50:03 +00:00
Volker Ruppert
ba6f2f5c24 Fixed 2 typos. 2014-12-28 23:57:53 +00:00
Volker Ruppert
8272ce1b9f Now build rules for all gui and device plugins supported by MSVC nmake depend
on the related configure options.
2014-12-28 19:13:16 +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
e50a0c517a Key auto-release feature changed: now release the pressed keys when the Bochs
window is losing the keyboard focus. This feature is now also supported by the
win32 gui.
2014-12-27 15:57:30 +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
d01a6176a8 Fixed keyboard scancode processing after keyboard intercept using stack
manipulation (SF bug report #1193).
2014-12-26 10:32:26 +00:00
Volker Ruppert
4cd8b284c0 Fixed keyboard scancode processing after keyboard intercept using stack
manipulation (SF bug report #1193).
2014-12-26 10:31:39 +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
b18ed8e2b1 Applied Debian patch for wxWidgets 3.0 compatibility. 2014-12-23 19:30:03 +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
5abc3e647f Fixed some MSVC warnings in the debugger code. 2014-12-23 11:53:35 +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
795a7929f1 Fixed link failure if GTK debugger is present, but no other Bochs facilty
using the pthreads library (SF patch #531 by Dawn Teschendorf fixing SF bug
#1364).
2014-12-20 07:51:11 +00:00
Volker Ruppert
f2c9a503d1 Added debugger support for the term gui using a pseudo-terminal. The command-line
debugger appears on main terminal and Bochs screen on pseudo-terminal connected
to minicom (based on SF patch #522).
2014-12-18 20:29:37 +00:00
Stanislav Shwartsman
6fd2d32180 fixed exception error code for debugger and instrumentation 2014-12-18 19:45:03 +00:00
Volker Ruppert
2ec57b8a6b Fixed some more C++11 warnings. 2014-12-18 17:52:40 +00:00
Stanislav Shwartsman
fea4d47830 fixed spelling in comments 2014-12-16 20:11:08 +00:00
Volker Ruppert
19b3d52934 Fixed possible crash when the GTK+ debugger is enabled (based on SF patch by
Dawn Teschendorf).
2014-12-16 19:48:50 +00:00
Stanislav Shwartsman
6700a3f5e6 fix cpuid patch merged 2014-12-16 06:52:24 +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