Commit Graph

2086 Commits

Author SHA1 Message Date
Volker Ruppert
92c6120d7a Some work on the seek latency feature
- rewrite of the logical sector handling code to make seek latency support possible
- implemented variable HD seek latency for seek and read commands
- TODO #1: CD-ROM seek command returns status immediately, but it clears the DSC bit
  and sets it at completion. Device should not accept ATAPI commands until DSC is set.
- TODO #2: clean up the seek latency code
2014-02-23 20:06:02 +00:00
Volker Ruppert
c7f57b5547 Some work on the seek latency feature
- temporarily disabled seek latency support for ATAPI command 0x2b until the
  seeking status is implemented correctly
- fix for the MSVC compilation fix (result was always 0.0)
2014-02-23 13:56:23 +00:00
Volker Ruppert
c0fc06b433 Fixed VS2013 compilation error and GCC warning
Still TODO: make HD seek latency variable
2014-02-23 08:49:44 +00:00
Volker Ruppert
93d9590f3b Some work on the ATA/ATAPI seek latency feature
- seek-only commands now using this feature
- fixed possible strange error message at hard disk DMA reads caused by wrong
  bmdma_start_transfer() call.
2014-02-21 21:37:33 +00:00
Volker Ruppert
6b39b6971f Slirp: reduce differences to latest Qemu sources 2014-02-18 20:34:14 +00:00
Volker Ruppert
8f3695aedf Some work on the builtin slirp support
- fixed Windows netmod plugin
- reduce differences to latest Qemu sources (to be continued)
2014-02-16 20:35:28 +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
7ec9adbb2d Switch to Winsock2 library for all Windows cases 2014-02-15 12:18:15 +00:00
Volker Ruppert
cf93269380 Define WIN32_LEAN_AND_MEAN to make using Winsock2 possible (for vncsrv and slirp).
TODO: change include statements to winsock2.h and link with ws2_32.dll.
2014-02-15 00:23:36 +00:00
Volker Ruppert
12ce16285c Moved seek timing calculation to a separate method
Improved CD-ROM save/restore support
TODO: variable seek latency for hard disk
2014-02-14 18:27:36 +00:00
Volker Ruppert
54138f294e Some work on the ATA/ATAPI seek feature and related changes
- now using the more accurate name "seek latency"
- fixed CD-ROM LBA address range checks and renamed limit to "max_lba"
- make the latency for CD-ROM access variable depending on the distance between
  current and new block address, Maximum value should only occur at first access
  or after media change.
- TODO: make hard disk seek timing variable, too.
- still TODO: seek latency for USB drives (requires asynchronus packet support).
2014-02-09 20:28:42 +00:00
Volker Ruppert
785b4bed1b Restore code for SCSI requests implemented.
Handle the CD-ROM drive lock status at save/restore.
2014-01-31 18:49:10 +00:00
Volker Ruppert
f5944a0b7c Another mouse detection fix: restart rx timer on detection request 2014-01-30 16:54:52 +00:00
Volker Ruppert
c217470150 Started implementing save/restore support for SCSI requests
- save function implemented using a dummy parameter that only receives the
  result of the save operation. The parameter's save/restore handlers doing
  the main job. The numerical values of the requests are saved in a separate
  text file. The data transfer buffers are saved as binary files.
- the request data buffers are now created dynamicly
- TODO: restore SCSI requests
2014-01-28 20:29:12 +00:00
Volker Ruppert
7475fbc4c9 Rewrite of the mouse data handling (similar to the bus / usb mouse code) 2014-01-26 13:48:10 +00:00
Volker Ruppert
e3574dabe0 Serial timer code rewritten (no functional changes)
Minor related cleanups
2014-01-25 21:05:49 +00:00
Volker Ruppert
b8d6862dfa Fixed some MSVC warnings 2014-01-25 17:07:10 +00:00
Volker Ruppert
a5984f7cd0 Some work on the USB MSD emulation
- prepared seek timer feature
- removed error handling that would cause a segfault
- better error handling for CD-ROM read errors
2014-01-24 19:07:51 +00:00
Volker Ruppert
a8f72a7575 Added support for multiple sector transfers to the 'concat' image mode.
Renamed 'flat' image mode C++ class.
2014-01-23 18:35:18 +00:00
Volker Ruppert
570a35a568 Fixed critical bug in the USB CD-ROM emulation: multiple block reads now working 2014-01-22 17:56:20 +00:00
Volker Ruppert
39890d308d Connecting USB CD-ROM without media present now supported
TODO #1: implement seek timing similar to ATA/ATAPI
TODO #2: implement asynchronus i/o in lowlevel cdrom
2014-01-21 20:56:50 +00:00
Volker Ruppert
fd86a060d5 Updated devices tree 2014-01-20 18:01:27 +00:00
Volker Ruppert
7cb5729365 Seek delay implemented for ATA/ATAPI DMA read commands
TODO: seek delay for write commands
2014-01-19 18:13:12 +00:00
Volker Ruppert
cdf3facaf4 ATAPI CD-ROM emulation fixes
- BSY status bit must be set during seek
- report active MDMA mode in 'identify' command
- improved a debug message
2014-01-19 14:15:43 +00:00
Volker Ruppert
78509d637b Implemented seek delay for hard disk and CD-ROM PIO read commands using fixed
values for the average access time (hd: 5 msec / cd: 80 msec). Hard disk write
and DMA mode commands are not affected yet.
2014-01-18 16:16:42 +00:00
Volker Ruppert
29d40bf9fe Added an optional device-specific Bit8u parameter to the timer structure.
A device can set it with setTimerParam() and read it in the timer handled using
triggeredTimerParam(). Simplified some timer handler by using these methods.
TODO: implement HD / CD seek timer
2014-01-17 18:25:13 +00:00
Volker Ruppert
dfae4b45de Voodoo vertical retrace fixes
- vertical retrace bit in status register must be inverted
- implemented registers vRetrace and hvRetrace (vSyncOff only)
2014-01-15 17:29:28 +00:00
Volker Ruppert
fc5c22d78f Implemented more accurate screen update timing calculation using the RAMDAC
video clock. Removed dependencies to the cpu / memory clock.
2014-01-07 22:32:22 +00:00
Volker Ruppert
0b43928f6a Fixed possible segfault caused by Voodoo2 control panel applet.
Added some reserved register names for debug output and minor code cleanup.
2014-01-05 14:01:10 +00:00
Volker Ruppert
35789633e8 Fixed some warnings 2014-01-04 15:42:17 +00:00
Volker Ruppert
23a2ded526 Fixed build process without libtool and plugins 2014-01-03 21:58:04 +00:00
Volker Ruppert
2a8a45748f Some fixes for the Voodoo emulation (Voodoo2 still not usable in Win95)
- fixed clock values (assigned to wrong model)
- LFB read/write: don't limit y values to 1023 (4MB now usable this way)
- additional Voodoo2 fbiInit* register writes now handled like the Voodoo1 ones
2014-01-03 16:42:31 +00:00
Volker Ruppert
7173b6ee0f Some work on the Voodoo emulation
- fixed behaviour of the initEnable register
- fixed some uninitialized variables
- some other small fixes and cleanups
2014-01-02 22:34:01 +00:00
Volker Ruppert
98634946e6 Set up the correct clock value for the selected Voodoo model. 2014-01-01 18:23:37 +00:00
Volker Ruppert
401321d500 Added symbol BX_NULL_PREFIX and fixed textconfig log options table.
If log module name not specified, use device log prefix converted to lower
case as the name and simplified setting up some short prefixes.
2013-12-31 09:20:08 +00:00
Volker Ruppert
c6dd095321 Added new method for the init of the readonly registers in the PCI config space
and cleaned up the PCI devices code.
2013-12-30 22:39:21 +00:00
Volker Ruppert
eced151cde Use data conversion macros based on bx_bswap* and remove temporary code 2013-12-30 17:13:18 +00:00
Volker Ruppert
ae659d14fd Changed initial value of the parameter "enabled" to 1 for network, sound and
usb device plugins. Loading the plugin means that the user wants to enable it.
Disabling the device on the command line and in the config interface is still
possible.
2013-12-30 14:37:04 +00:00
Volker Ruppert
e5ed796acf Some work on the Voodoo emulation
- destructor: free memory only when initialized
- parameter 'enabled' must be initialized with 1 (TODO: fix other plugins)
- PCI register fixes (Voodoo2 now detected, but not usable)
2013-12-30 12:50:34 +00:00
Volker Ruppert
443f04703c Added / modified device log prefixes 2013-12-29 12:56:52 +00:00
Volker Ruppert
fc4538a131 Some fixes / improvements in logging system
- fixed pluginlog init in non-plugin mode
- reduced logprefix length limit and use it for the related string parameter
- increase the device prefix size to 6
- TODO: change some more device prefixes
2013-12-29 10:41:11 +00:00
Volker Ruppert
98545762b6 Keyboard code cleanup
- BX_CPU_LEVEL < 3 doesn't exist in Bochs
- verbose debug output removed
- tab2space and minor coding style changes
2013-12-28 12:00:19 +00:00
Volker Ruppert
59faa4d3ae Rewrite of the MS busmouse support to make it work with DOS and Win95 drivers.
The device exists for some years now, but it was never functional and it is not
yet mentioned in the docs. After studying Linux kernel sources and a lot of
tests it is now usable. A configure option doesn't exist, so it must be enabled
in config.h. At runtime it is only loaded if the mouse type is set to 'bus'.
2013-12-27 17:47:44 +00:00
Volker Ruppert
2aa810012a Some work on the Voodoo Graphics emulation (Voodoo2 still not detected)
- assign the correct register access map for the Voodoo2 model
- improved debug and error message output
- minor coding style changes
2013-12-23 21:58:29 +00:00
Volker Ruppert
8f5408e653 Fixed some gcc 4.8.1 warnings 2013-12-23 11:31:32 +00:00
Volker Ruppert
ef7e02c12c Added bochsrc option for the Voodoo Graphics emulation. Some code for Voodoo2
model exists, but needs to be verified.
2013-12-22 19:50:29 +00:00
Volker Ruppert
3d93ca1b64 Fixed panic when using multiple CD-ROM drives (now using name cdrom1, cdrom2,...) 2013-12-22 08:11:35 +00:00
Volker Ruppert
85f548250e Added memsize mask to simplify code 2013-12-18 17:55:32 +00:00
Volker Ruppert
58019a1649 Renamed "ltdl.h" to "ltdl-bochs.h" to avoid conflicts with the include file
that is a part of the libtool package. Updated Makefile dependencies.
TODO: check if we can get rid of the ltdl*.* files (this would be possible if
the ltdl library is always available if libtool is present).
2013-12-17 19:57:40 +00:00
Volker Ruppert
acd0fe11b5 Added volume control support per channel for stereo samples
TODO: do the same for mono samples (requires data doubling in emulation)
2013-12-15 17:09:18 +00:00
Volker Ruppert
ea7997210d Some work on the wave volume control support
- ES1370: implemented CODEC registers (AK4531 mixer) and wave volume control
- Moved wave volume application code to new method pcm_apply_volume() and use
  it for both soundcards
- TODO: stereo support
2013-12-14 17:43:12 +00:00
Volker Ruppert
fe3196e260 Added basic volume control support for wave output
TODO #1: add stereo support (volume control per channel)
TODO #2: add volume control for the ES1370
2013-12-13 15:58:27 +00:00
Volker Ruppert
f008f0989f Simplified floppy parameter handling
wx floppy dialog now forces a media change by clicking OK (same as win32dialog)
wxdialog.cc: one more whitespace cleanup
wxdialog.h: removed unused members
2013-12-08 11:32:13 +00:00
Volker Ruppert
e141fbf848 Several parameter-related improvements in the serial and parallel code
- Open output file on demand (failure causes BX_ERROR)
- Simplified bochsrc options cleanup
- serial: improved parameter dependencies
2013-12-01 18:26:37 +00:00
Volker Ruppert
73b2402538 Fixed some runtime config issues
- es1370: fixed wave file parameter name
- wx cdrom dialog: use the first item of the cdrom runtime parameter list
- wx ParamDialog: always pause the simulation thread while setting parameters
- wx ParamDialog: call SIM->update_runtime_options() before continuing simulation
2013-12-01 16:02:31 +00:00
Volker Ruppert
3a22a7de61 Sound runtime options support completed
- SB16: log file name now also available as a runtime option
- SB16: changed order of the runtime options and minor other changes
- ES1370: changed the "wavemode" parameter type to bx_param_enum_c and set up
  more accurate dependencies (similar to SB16)
- ES1370: wave mode and file name now available as a runtime option
2013-11-28 20:47:34 +00:00
Volker Ruppert
f3a6fbd235 Simplified setup of special runtime menus / dialogs
- If the runtime flag of a bx_list_c object is set, all it's items are set up
  as runtime options.
- Set the runtime parameter for all top-level runtime-only lists. Setting up
  each single parameter is no longer needed.
2013-11-25 21:07:39 +00:00
Volker Ruppert
4edfc93ac2 - Added capability to change the wave output mode at runtime
- Always initialize the lowlevel sound driver (for wave input / recording)
- Wave input (recording) is now independent from the wave output mode
- Changed the "wavemode" parameter type to bx_param_enum_c and set up more
  accurate dependencies
- Minor related changes
2013-11-24 14:04:34 +00:00
Volker Ruppert
eed48eb69e - Added capability to change the midi output mode at runtime
- Some other related changes and cleanups
2013-11-22 18:28:21 +00:00
Volker Ruppert
4ea9e6d57e - Added capability to change the midi output device at runtime.
- Moved SB16 runtime options to a separate submenu
2013-11-20 21:37:43 +00:00
Volker Ruppert
bfc9748600 - Added capability to change the midi and wave output files at runtime.
- Some related fixes and cleanups
2013-11-19 19:04:21 +00:00
Volker Ruppert
299cec4907 Calculate VGA text cursor blink counter based on default frequency 1.875 Hz. 2013-11-16 12:10:28 +00:00
Volker Ruppert
c64dceadb4 Fixed MIDI output to file and some minor changes 2013-11-14 18:11:23 +00:00
Volker Ruppert
d75a04b48d Fixed segfault when writing to MIDI file. 2013-11-12 21:45:49 +00:00
Volker Ruppert
dfae141275 Added capability to specify the ID of the MIDI device to use. If not specified,
the default MIDI mapper will be used.
2013-11-11 20:44:38 +00:00
Volker Ruppert
9554a2133e Always enable the portable ISO image file support. The option --enable-cdrom now
only controls the presence of platform-specific code to access CDROM/DVD devices
2013-11-10 11:14:42 +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
b452803be5 Preparing lowlevel cdrom rewrite
- use #if BX_SUPPORT_CDROM instead of #ifdef LOWLEVEL_CDROM
- devices with cdrom support now use the base class cdrom_base_c
- cdrom count variable moved to cdrom.cc
- cdrom_misc.cc: don't use ioctl's for ISO files
2013-11-05 18:06:39 +00:00
Volker Ruppert
c2b1d9119d Added VMDK version 4 disk image creation support (ported from Qemu).
The 'vmware4' mode now also supported as conversion target and for resize.
2013-11-03 07:41:29 +00:00
Volker Ruppert
e29957cca2 Removed 'delete' (-d) option and added new 'backup' (-b) option.
In convert/resize mode a backup can be created if the new file name
is not specified or the same as the source file name. In commit mode
both base image and redolog file are affected by the backup switch.
Added Linux specific file copy code using '/bin/cp'.
2013-11-02 15:58:59 +00:00
Volker Ruppert
f8ea396a2c Several fixes for compiling Bochs successfully in Cygwin64 2013-11-01 18:19:52 +00:00
Volker Ruppert
5b9d937cc1 Make sure winsock.h is included in serial.cc and eth_win32.cc
Including winsock.h not needed in pc_system.cc
Don't specify architecture in gcc 4.7+ example
2013-11-01 16:26:59 +00:00
Volker Ruppert
57272ac32e Added sanity checks to the vmware4 and vvfat mode to avoid data corruption.
Some compilers need special options to pack structures correctly.
Added example for gcc 4.7+ on Windows to shortcut script.
2013-11-01 11:34:51 +00:00
Volker Ruppert
635774e1da Fixed fat_datetime() on Windows to take account of the daylight savings time.
Show expected modification date/time in case of a panic.
2013-10-29 20:52:38 +00:00
Volker Ruppert
2c779f60da bximage convert / resize: show source disk image mode
hdimage undoable / volatile: log base disk image mode
vmware4: fixed 'cylinders' calculation
2013-10-27 19:23:59 +00:00
Volker Ruppert
7f19435887 Fixed some gcc 4.8.1 warnings 2013-10-27 15:13:19 +00:00
Volker Ruppert
66b311a8a6 Some work on the new bximage utility
- added support to use 'concat' and 'dll' mode images as convert source.
  A prefix ("concat:" or "dll:") must be added to the path since autodetection
  doesn't work for these modes.
- create: fixed virtual disk size calculation based on C/H/S
- convert / resize (interactive mode): use original filename as the template for
  the new one if not specified on the command line
2013-10-25 19:10:09 +00:00
Volker Ruppert
1fb469e77f Started user doc update for bximage
Added legacy bximage and manual page to installation
Fixed some warnings
2013-10-23 15:22:09 +00:00
Volker Ruppert
bce8268c6f Added new redolog_t method commit() for the bximage commit mode, using the fast
algrithm of bxcommit.
2013-10-23 08:35:21 +00:00
Volker Ruppert
519b369f56 Removed obsolete ASPI cdrom access code for Win9x/ME 2013-10-22 19:46:46 +00:00
Volker Ruppert
4802fac2de bximage_new: Added VPC dynamic type image creation support (ported from Qemu).
The 'vpc' mode now also supported as conversion target and for resize.
2013-10-19 21:16:10 +00:00
Volker Ruppert
b5a57e7818 Some work on the new bximage utility
- added support to resize images (currently supported: flat, growing and sparse)
- added image file name check and renaming if necessary
- set minimum hard disk size to 10 MB
- vmware4: make header structure available for usage in bximage
2013-10-18 19:36:50 +00:00
Volker Ruppert
f622a042c4 Added initial version of a new bximage utility written in C++ for image
creation, conversion and rodolog commit. Image creation support is not
present yet and the executable has not been added to standard compile yet.
TODO #1: add floppy and hard disk image creation support (from bximage.c)
TODO #2: implement support for conversion to vmware and vpc formats
TODO #3: add MSVC (nmake and workspace) support
2013-10-13 20:30:51 +00:00
Volker Ruppert
6025e38333 preparing hdimage code for the the compilation with a new bximage utility
written in C++ supporting image creation, conversion and redolog commit
2013-10-13 14:33:55 +00:00
Volker Ruppert
ebdd3b4d38 slirp / vnet TFTP support: implemented timeout mechanism 2013-10-06 15:32:40 +00:00
Volker Ruppert
a4b1c2a654 slirp / vnet: increased TFTP buffer size (max. file size 64 MB with blksize=1024) 2013-09-29 09:08:24 +00:00
Volker Ruppert
a8f1834c38 slirp / vnet TFTP support:
Detect and reply all supported TFTP extension options for both read and write
operations. Use 'blksize' value if smaller than buffer size.
TODO: increase buffer size, implement timeout mechanism
2013-09-28 08:56:54 +00:00
Volker Ruppert
4b59e6b884 slirp / vnet: added support for multiple TFTP sessions
slirp: fixed minimum eth packet size for builtin replies
2013-09-27 11:47:59 +00:00
Stanislav Shwartsman
01c0f07e4e fixed compilation error under cygwin which defines WIN32 2013-09-26 19:51:30 +00:00
Volker Ruppert
ec4990a380 slirp / vnet: only one instance per Bochs session supported yet 2013-09-16 17:06:03 +00:00
Volker Ruppert
d943feaf8e panic if cirrus support is requested but not available to avoid segfault 2013-09-05 07:38:22 +00:00
Volker Ruppert
5ac2776cd0 Added IP and UDP header data structure definitions and related code cleanups 2013-08-22 11:53:40 +00:00
Volker Ruppert
7783e39b77 On Windows, the netmod plugin now must be linked with wsock32 2013-08-21 15:19:47 +00:00
Volker Ruppert
9ce849e742 Moved ARP processing to netmod.cc to reduce code duplication 2013-08-20 17:43:24 +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
Volker Ruppert
3e27308899 Allow to specify the platform-default sound driver directly
- driver names "oss", "osx" and "win" can now be used instead of "default"
- updated sound initialization messages
2013-07-25 18:47:11 +00:00
Volker Ruppert
1c7564b98e Fixed possible crash when using beep thread 2013-07-14 19:01:29 +00:00
Volker Ruppert
b84b0eed52 Moved ALSA sound support to a separate sound driver object
- ALSA stuff moved from soundlnx.* to new soundalsa.* files
- SB16 / ES1370: including specific sound driver headers not necessary
- updated dependencies
2013-07-14 15:14:53 +00:00
Volker Ruppert
9a1d889359 ES1370: implemented wave output to file (raw and VOC format)
- added parameters 'wavemode' and 'wavefile' to the 'es1370' option
- ES1370: added new method sendwavepacket() (similar to SB16)
- moved VOC file methods from sb16.cc to soundmod.cc and added macros for them
- SB16: minor fixes
2013-07-13 17:37:48 +00:00
Volker Ruppert
f91aa29f2b Fixed and simplified DMA timer value calculation 2013-07-07 19:19:59 +00:00