Commit Graph

2132 Commits

Author SHA1 Message Date
Volker Ruppert
95585bf719 Initial version of nmake DLL plugin support in iodev. The plugin DLL set is now
complete and usable with the BOCHS.EXE built with the IDE.
TODO #1: fix BOCHS.EXE built with nmake (manifest issue)
TODO #2: make the currently fixed DLL plugin list variable
2014-05-02 17:14:16 +00:00
Volker Ruppert
9c8e43b75c Added failure handling to beep_on() and the ALSA PCM output methods (patch by
Dawn Teschendorf)
2014-05-02 06:38:49 +00:00
Volker Ruppert
c7a72484c8 Execute this code only if the wx gui is selected. 2014-05-01 08:42:04 +00:00
Volker Ruppert
900c0fddc4 Temporarily added targets for MSVC nmake plugins in network, sound and usb
sections. A better solution must be found for the basic set of device plugins
in iodev that don't require special rules.
Switched back to the original gui macro naming for linking plugins.
2014-04-27 07:46:33 +00:00
Volker Ruppert
95346323af Added MSVC nmake support for the gui plugins nogui, rfb and win32.
Updated comments about DLL plugins in makefiles
2014-04-25 16:07:26 +00:00
Volker Ruppert
92b529ee75 The floppy plugin needs a special rule for MSVC nmake
Temporarily added a voodoo plugin rule to have the iodev/display section complete.
2014-04-24 20:10:55 +00:00
Volker Ruppert
1169076fc0 Fixed possible floating point exception in the beep thread. Instead of setting
'beep_bytes' to 0, now using new 'beep_control' variable (2 = run beep loop,
1 = request beep loop exit, 0 = beep loop has ended).
2014-04-24 17:36:13 +00:00
Volker Ruppert
04d1cae754 Fixed "nmake clean" for the slirp stuff.
Added *.exp and *.lib to "clean" targets.
2014-04-22 16:50:11 +00:00
Volker Ruppert
eb484919fe Next step for plugin support with MSVC nmake: device plugins that need special
rules can be built now (keyboard, pit, gameport, serial, vga, svga_cirrus,
hdimage, netmod, soundmod, usb_common). The generated DLLs are usable with the
BOCHS.EXE built with the IDE, but the nmake won't work at all yet.
2014-04-21 18:43:22 +00:00
Volker Ruppert
87b6149ed0 First step for compiling plugin DLLs with MSVC nmake. The hdimage plugin
(bx_hdimage.dll) can be built now. All plugins that require special rules
could be fixed for nmake in a similar way.
TODO: find a way to compile plugins with standard rules (GNU make uses bx_%.dll
in that case, but MSVC nmake doesn't support this syntax).
2014-04-21 06:58:15 +00:00
Volker Ruppert
2d63afca12 Slirp: added support for up to 5 'hostfwd' redirection rules.
Fixed MSVC compilation error.
2014-04-18 17:14:32 +00:00
Volker Ruppert
a5c687dfb0 Slirp: added host forwarding feature for host-to-guest access.
TODO: add support for multiple port redirections
2014-04-18 09:27:48 +00:00
Volker Ruppert
16e0130753 Switch back to the original 'vnet' ARP implementation.
Improved Slirp documentation.
2014-04-13 13:32:52 +00:00
Volker Ruppert
2777ac0dc5 Added separate target for MSVC plugins (causing an error for now) 2014-04-06 07:22:16 +00:00
Volker Ruppert
777fcd8372 Fixed timestamp of "growing" mode base images with an "undoable" redolog. 2014-04-04 19:14:32 +00:00
Volker Ruppert
fcc6d01a18 Removed default constructor and initialize member in the specific one (fixes
possible segfault found on Windows).
2014-04-04 18:44:57 +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
892cb61dc7 Some work on the Slirp DHCP support
- removed obsolete local variables that made the hostname and bootfile options fail
- store requested hostname as a string to simplify the code
- check free space while processing the parameter list
- setting the max. DHCP message size is not supported yet (send error to log)
2014-03-31 20:58:29 +00:00
Volker Ruppert
061339b57b Rewrite of the DHCP option handling including support for a parameter list,
host name, lease time and other options (ported from Bochs 'vnet' DHCP server).
2014-03-30 18:54:50 +00:00
Volker Ruppert
3e280ae594 Fixed MSVC warnings 2014-03-29 15:23:49 +00:00
Volker Ruppert
31e10bb527 TFTP session handling now using pointers for allocate and find. 2014-03-28 20:08:56 +00:00
Volker Ruppert
6b8d425a7f Some work on the Slirp TFTP server
- copied some defines from osdep.h to fix compilation on all Windows build systems
- ported TFTP option handling from the Bochs 'vnet' TFTP server
2014-03-27 21:09:09 +00:00
Volker Ruppert
5257e253ae Added broadcast IP address and server name "slirp" to DHCP reply.
TODO: port more features from the Bochs 'vnet' DHCP server to Slirp.
2014-03-26 17:01:07 +00:00
Stanislav Shwartsman
ae936e086f fixed compilation err under cygwin 2014-03-25 20:09:48 +00:00
Volker Ruppert
eb3f567f4a Added basic write support to the Slirp TFTP server.
TODO #1: implement all features of the existing (vnet) TFTP support in Slirp.
TODO #2: make the slirp DHCP server work like the vnet one.
TODO #3: finally remove the slirp backend and rename the new one to "slirp".
2014-03-24 20:36:50 +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
8159a00b3e Added access() check before detecting image mode to get an accurate panic
message in case of failure.
2014-03-23 09:19:44 +00:00
Volker Ruppert
9052c65049 Added support to specify the IP address of the SMB server.
Handle special value "none" for the slirp.conf to avoid error message.
2014-03-21 18:47:14 +00:00
Volker Ruppert
159228db5d Slirp: added SMB support for non-Windows platforms. The new slirp.conf option
'smb_export' can be used to set up shared folder. TODO: the location of 'smbd'
and IP address of the SMB server is currently hardcoded.
2014-03-20 18:02:44 +00:00
Volker Ruppert
798596c4c0 Slirp: added sanity check for correctly packed networking structures.
Cygwin shortcut script: option -mno-cygwin is obsolete and -mno-ms-bitfields is
required for Bochs as of GCC version 4.7.
2014-03-16 12:13:52 +00:00
Volker Ruppert
4a78dffb24 Cleaned up disk sector offset variables used for the seek latency feature. Now
using names similar to the cdrom ones.
2014-03-11 18:29:32 +00:00
Volker Ruppert
76a03aa1f0 Networking-related fixes
- bx_param_string_c method isempty() didn't work for raw byte strings. Now using
  it to check whether or not the current value matches the initial one. The
  parameter handling of the network adapters now use this method to check if
  the MAC address is already initialized to avoid incorrect BX_ERRORs.
- small documentation update
2014-03-10 19:05:46 +00:00
Volker Ruppert
aad090d03c Slirp dnssearch: added support for comma-separated list of DNS suffixes 2014-03-09 16:41:36 +00:00
Volker Ruppert
46037ee5f5 Slirp: added basic 'dnssearch' option (currently only 1 entry supported).
TODO: 'dnssearch' option should accept a comma-separated list of suffixes.
Other slirp TODOs: SMB support on Linux, reduce code duplication (ARP, DHCP, TFTP)
2014-03-08 08:54:33 +00:00
Volker Ruppert
0c4e5eb6c5 Renamed slirp option 'dhcp' to 'dhcpstart' (similar to Qemu)
Ignore case when checking for slirp options
Improved slirp documentation
2014-03-04 18:58:51 +00:00
Volker Ruppert
25f9b4346a Added support for the bootfile option in the slirp config file.
Moved slirp config parameters to the ethernet module object.
Added initial documentation for the built-in slirp support
2014-03-03 16:32:11 +00:00
Volker Ruppert
f62c8f158f Some work on the "Bochs side" of the new slirp module
- added support for a separate slirp config file specified with the "script"
  parameter. Added sample config in the "misc" subdirectory.
- now creating one logfunctions object per slirp instance and added new function
  slirp_warning() to send error messages to the Bochs log.
- regenerated dependencies for the iodev/network Makefile and updated command
  line example for generating them.
2014-03-02 20:24:26 +00:00
Volker Ruppert
c1fa1a4b32 vVFAT: use path relative to the vVFAT root folder when saving file attributes.
This is required when sharing one folder between different guest installations.
2014-03-02 11:30:03 +00:00
Volker Ruppert
479d0477cf Slirp: added symbols required for win32 plugin DLLs.
Updated workspace files after adding slirp and avx sources
Updated slirp TODO list:
- reduce code duplication with 'vnet' module (DHCP, TFTP, ARP)
- add separate config file for slirp to make it more flexible (using the
  'script' parameter)
- add SMB support on Linux
- remove slirp backend module after next Bochs release
2014-03-02 09:53:42 +00:00
Volker Ruppert
6bfc3e4bd8 Slirp: added SVN Id on top of each source file 2014-03-02 07:42:24 +00:00
Volker Ruppert
2d4d3aaa56 Slirp: fixed MSVC warnings 2014-03-01 23:52:08 +00:00
Volker Ruppert
3f5d670384 Some work on the new slirp module
- applied remaining updates from Qemu slirp
- add #if blocks to all slirp .cc files for conditional compilation
- fixed some uninitialized variable warnings
2014-02-27 21:15:31 +00:00
Volker Ruppert
5ea6e8c941 Some work on the new slirp module
- added dnssearch sources from latest Qemu slirp (currently unused feature)
- minor other updates from Qemu slirp
- add #if blocks around already up-to-date slirp sources for conditional compilation
- TODO: finish updating from Qemu and start fixing compiler warnings
2014-02-27 19:11:18 +00:00
Volker Ruppert
e62076e53d Somw work to make the new slirp module compile and work with MSVC
- added container_of() macro replacement
- fixed unresolved symbol in netmod.cc
- added MSVC-style structure packing pragmas
- check for the presence of min / max macros
- enabled slirp_new for MSVC in configure script
TODO list:
- check for more updates from Qemu
- fix lots of compiler warnings
- reduce code duplication with 'vnet' module (DHCP, TFTP, ARP)
- add separate config file for slirp to make it more flexible (using the
  'script' parameter)
- update MSVC workspace files
- add SMB support on Linux
- remove slirp backend module after next Bochs release
2014-02-25 19:44:14 +00:00
Volker Ruppert
c4f722cd28 Improved CD-ROM save/restore support
Set current LBA value after seek completion (faked)
2014-02-24 18:16:21 +00:00
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