Commit Graph

2209 Commits

Author SHA1 Message Date
Volker Ruppert
7e86e7956f Fixed PCI IDE controller DMA start (found with a recent Linux version:
"mode sense" command executed in DMA mode).
Updated output of "mode sense" page 0x2a (still reporting CD-ROM drive).
2015-05-05 20:10:43 +00:00
Volker Ruppert
fd690a3a31 Fixed compilation errors found on Cygwin64
- The 'Bits' type used in the opl files is incompatible with Bit64s. Modified
  typedef to fix this issue.
- On Windows use Sleep() directly, since msleep() doesn't exist in Cygwin.
2015-05-05 18:06:05 +00:00
Volker Ruppert
9d4ef351e7 Preparing Bochs release 2.6.8 2015-05-03 06:36:30 +00:00
Volker Ruppert
29d54ac8b8 Fixed some compilation errors / warnings found on Mac OSX (SF bug #1371). 2015-05-02 08:42:44 +00:00
Volker Ruppert
722274fd09 Enabling non-blocking mode can cause socket connection failures (at least when
compiled with VS2013).
TODO: slirp should use separate threads for input and output.
2015-05-01 19:41:08 +00:00
Volker Ruppert
a76a232115 Fixed crash on exit caused by physical drive without media present. Now setting
fd to -1 if there is no readable media found.
2015-04-28 17:01:41 +00:00
Volker Ruppert
506dd623f6 Using "read toc" to get the media size doesn't work correctly for DVDs on Linux.
Now using BLKGETSIZE64 ioctl seems to fix the reported capacity.
2015-04-26 15:59:08 +00:00
Volker Ruppert
a32bc18d9e Renamed SB16 parameters "midi" to "midifile" and "wave" to "wavefile" (same
as ES1370). Legacy parameter names are still supported.
2015-04-17 18:37:51 +00:00
Volker Ruppert
d416daf51b SB16 register_state(): we have to use a constant here. 2015-04-17 11:58:15 +00:00
Volker Ruppert
92f48fa92f Implemented MIDI output support for the ES1370 soundcard. Data written to the
UART data port is sent to file or device similar to the SB16.
Minor cleanups in the SB16 code.
2015-04-16 21:18:42 +00:00
Volker Ruppert
091e01d96c Fixed UART register address in condition and added default status return value. 2015-04-12 10:48:02 +00:00
Volker Ruppert
035b133bac Improved error messages for unsupported internal memory access.
ES1370 is no longer "experimental".
2015-04-11 09:03:17 +00:00
Volker Ruppert
d8ca04c79f The current frame count registers are readable as word (not mentioned in specs).
This fixes the Win98 explorer crash.
Added BX_ERROR for the still unsupported dual output mode.
2015-04-10 21:31:44 +00:00
Volker Ruppert
bad6c96fc7 Fixed possible compilation failure caused by container_of definition (part of
the mixing6 patch by Dawn Teschendorf).
2015-04-10 20:40:25 +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
a52bcdfa88 Minor fixes and cleanups in the SB16 code (no functional changes).
- the "remaplist" has 256 entries, but the limit was too high (4096).
- the "patchtable" had 4096 entries, but the index was never > 15.
- removed disabled / outdated code.
2015-04-06 16:03:04 +00:00
Volker Ruppert
72dfda5ee9 Fixed frame register writes (bug in rev. 12705) using QEMU-like code.
TODO: Win98 guest crash after wave output still not fixed.
2015-04-06 12:18:52 +00:00
Volker Ruppert
a256414d32 Some work on the ES1370 emulation.
- Undocumented "legacy" register at offset 0x1b is used to probe for the ES1370
  interrupt by the Win9x driver. Using bit #0 to control the IRQ line fixes
  driver installation.
- Added more detailed BX_ERROR messages for the UART registers.
- Small code cleanup in the write handler.
- TODO: fix possible bluescreen in Win98 guest after wave playback.
2015-04-05 11:48:44 +00:00
Volker Ruppert
79278be63f Volume control fixes and improvements
- OPL3: apply FM volume control to the output data.
- SB16: fixed missing volume update after mixer reset.
- soundlow: fixed application of the volume control to the PCM output.
2015-04-03 12:18:53 +00:00
Volker Ruppert
7ce7c70f6d Adjust DAC output timer interval depending on real packet size (fixes output
with XP guest).
2015-04-02 23:21:04 +00:00
Volker Ruppert
10d79f2e9a SB16: fixed output volume calculation.
ES1370: fixed and improved output volume calculation similar to SB16.
TODO: apply volume control to the FM output.
2015-03-31 18:01:52 +00:00
Volker Ruppert
72cbbe9e8b Fixed incorrect calls of virtual functions in constructor/destructor.
- Removed useless set_pcm_params() call in base class contructor.
- SDL waveout destructor needs to call the unregister_wave_callback() method
  of the SDL stuff, since the base class destructor doesn't do that.
2015-03-29 15:53:56 +00:00
Volker Ruppert
3e54ff2e36 Added Oracle(tm) VM VirtualBox image support (VDI version 1.1). Patch written
by Ben Lunt plus some additions (bximage fixes, big endian support).
TODO: update MSVC workspace files.
2015-03-29 14:27:32 +00:00
Volker Ruppert
601493c89a Moved output volume calculation to a separate method and prepared volume
control for the FM output.
TODO #1: handle volume control in the opl code.
TODO #2: check if the output level calculation is correct.
2015-03-27 15:49:40 +00:00
Volker Ruppert
422a06652d Fixed bximage compilation on big endian hosts. 2015-03-20 18:01:52 +00:00
Volker Ruppert
49e265f5f8 Added save/restore support for the OPL3 waveform selection. 2015-03-19 16:47:25 +00:00
Volker Ruppert
3ab5b052a1 Sound driver 'win': changed output rate to 20 packets per second. 2015-03-17 20:55:51 +00:00
Volker Ruppert
927e55f077 Improved mixer thread mutex handling.
- Moved BX_INIT_MUTEX() call to start_mixer_thread() to reduce code duplication.
- Call BX_FINI_MUTEX() only when the mixer thread and mutex was really used.
2015-03-16 19:02:31 +00:00
Volker Ruppert
8bf10dc15c Fixed compilation error caused by #endif location. 2015-03-16 18:28:29 +00:00
Volker Ruppert
7c351a16dc Cleaned up speaker output mode handling (no functional changes). 2015-03-15 06:58:59 +00:00
Volker Ruppert
924201f694 Added capability to handle floating point values with save/restore.
Improved OPL3 save/restore support.
2015-03-13 21:28:40 +00:00
Volker Ruppert
8fe902686c Separated sound lowlevel base class from dummy driver. The base class returns
NULL for all services and the dummy driver provides the stubs. Now falling
back to the dummy driver if the wavein or midiout services are not provided
by the selected driver.
2015-03-10 20:56:44 +00:00
Volker Ruppert
327f987a18 Added the capability to set up the sound driver per service. The global
sound option for setting up one driver for all services is still available.
2015-03-06 22:54:30 +00:00
Volker Ruppert
cbfbaaacb7 Added BX_HAVE_SOUND_* definitions to simplify code. 2015-02-23 21:32:34 +00:00
Volker Ruppert
3135e6a4eb Changed sound driver parameter type to bx_param_enum_c.
TODO: Add sound driver selection per service (waveout, wavein, midiout).
2015-02-22 20:29:58 +00:00
Volker Ruppert
9493a63e7a Fixes and updates in the lowlevel sound code and related stuff.
- soundlow: fixed possible segfault on exit.
- soundfile: added symbol required for win32 DLL plugins.
- bochsrc sample: fixed typo.
- VS2013Ex workspaces: partial update (sound stuff only).
2015-02-20 22:39:55 +00:00
Volker Ruppert
27c773d8b5 Fixed possible segfault on exit. 2015-02-20 22:33:06 +00:00
Volker Ruppert
46b21a8373 Some failure case fixes and cleanups in the sound code.
- sound 'file' driver: added failure handling in the file open methods.
- soundmod: initialize default driver with NULL to avoid crash on failure.
- SB16: Fixed crash if no driver is present / removed unused members.
2015-02-20 16:36:26 +00:00
Volker Ruppert
16d2957cd4 Rewrite of the ES1370 wave output code and related changes.
- Implemented wave output using the 'soundfile' driver including dual wave
  output in wavemode 3. Removed now obsolete output file handling and other
  cleanups. The wave input (recording) feature is not affected by the
  wavemode setting.
- Moved VOC file handling to the soundfile code.
- Updated iodev makefile dependencies.
2015-02-19 21:31:18 +00:00
Volker Ruppert
050795ac44 Rewrite of the SB16 midi and wave output code.
- Implemented wave and midi output using the 'soundfile' driver.
- Implemented dual midi/wave output in midimode/wavemode 3.
- Removed now obsolete output file handling and other cleanups.
- The wave input (recording) and OPL3 output features are not affected by
  the wavemode setting.
- TODO: Similar rewrite of ES1370 wave output and related cleanups.
2015-02-19 18:45:43 +00:00
Volker Ruppert
b052ddcc32 Prepared lowlevel sound code for the usage with the 'wavemode' parameter.
- soundlow: use direct output if no PCM callback is registered.
- soundlow/soundfile: re-implemented openwaveoutput() method to support
  runtime changes of wave mode or file (only implemented in the 'file'
  driver, stub for others).
- soundfile: don't initialize mixer thread and PCM callback if thread is
  already running / no output() delay in that case.
2015-02-18 16:34:53 +00:00
Volker Ruppert
b1e8a6369c Some work on the sound module handling and the SB16 midi file output.
- Added the capability to load up to 4 sound drivers and added methods to
  get pointers to the waveout, wavein and midiout services of a driver.
- Rewrite of the SB16 midi file output code. In midimode 2 and 3 the midiout
  service of the 'file' driver is used. Removed obsolete midi file handling.
- Re-implemented the closemidioutput() method to make runtime changes of the
  midi setup work with the new code.
2015-02-17 18:28:25 +00:00
Volker Ruppert
c8207c7a10 Some work on the soundfile 'driver' and the sound configuration.
- waveout: added support for RIFF WAVE format and raw output. The formats
  'voc' and 'wav' are detected by file extension, raw output is used otherwise.
- midiout: added support for raw midi output (no header, no deltatime).
  The 'mid' format is detected by file extension, raw output is used otherwise.
- Added 'midiout' parameter to the global sound option to specify the device
  if necessary. The related SB16 parameter now only specifies the output file.
- TODO: Rewrite of the sound configuration and output code to support dual
  output (device and file).
2015-02-17 08:33:07 +00:00
Volker Ruppert
de08a6ba55 Added initial version of a sound "driver" that writes to file(s).
- New code is based on the dummy sound driver and file output code from SB16.
- The midiout feature supports the MIDI file format.
- The waveout feature currently only supports the VOC format.
TODO:
- Add support for a more detailed sound configuration (waveout to device,
  midiout to a file.
- The waveout feature should support WAV and RAW file formats.
- Move VOC file handling from soundmod.cc to soundfile.cc.
- Finally remove file handling code from sound devices.
2015-02-16 15:47:17 +00:00
Volker Ruppert
f19e91e2f5 Moved speaker beep generator to the speaker code. 2015-02-16 08:48:11 +00:00
Volker Ruppert
3ac8362523 Bugfix for the 'dummy' sound driver: don't add wave packet to the buffer queue
if PCM callback is not active.
2015-02-16 07:36:32 +00:00
Volker Ruppert
79058610d7 Moved midi output support to a separate C++ class. The lowlevel sound module
creates the object and returns a pointer to it. TODO: Rewrite of the sound
configuration to support a more detailed setup (e.g. waveout with alsa,
dummy wavein, midiout to a file).
2015-02-15 18:32:36 +00:00
Volker Ruppert
f84439f8e8 Moved wave input support to a separate C++ class. The lowlevel sound module
creates the object and returns a pointer to it. TODO: Do the same with the
midiout feature.
2015-02-14 17:25:39 +00:00
Volker Ruppert
0e73185efd Moved wave output support to a separate C++ class. The lowlevel sound module
creates the object and returns a pointer to it. TODO: The wavein and midiout
components should also move to separate classes. When finished, it should be
possible to configure the sound support more detailed (e.g. waveout with sdl,
midiout with alsa and the dummy driver for wavein). Creating a separate
module for the output to file(s) is also possible.
2015-02-13 11:30:46 +00:00
Volker Ruppert
52b4c20992 Fixed allocated memory and some cleanup after latest changes. 2015-02-08 10:33:12 +00:00