Commit Graph

78 Commits

Author SHA1 Message Date
Volker Ruppert
2dbfae1b1c Fixes and improvements for the USB cdrom runtime options.
- Add a special list to the MSD state and add pointers to the runtime-only
  options for the cdrom. The restore handler of this list calls runtime_config()
  to make sure the media path and status are correctly updated.
- Registering a runtime config handler for the USB cdrom is not necessary since
  runtime_config() is always called from the hub it is connected to.
- Restore a string parameter value only if it's different from the initial one.
2015-08-29 14:02:13 +00:00
Volker Ruppert
946a6bf50e Fixed USB device disconnect: clear save/restore list before deleting device
(bug found with valgrind).
2015-08-28 18:52:54 +00:00
Volker Ruppert
7da8cfa4b0 Fixed save/restore support of the USB subsystem when using an external hub
with devices conected at runtime.
- Added restore handler support for the bx_list_c class. If a handler is
  registered, it will be called after restoring all of the list's members.
- USB hub: add special lists to the port state and add pointers to the
  runtime-only options for each port. The restore handler of this list calls
  init_device() to make sure all connected devices can be restored.
- Call restore_logopts() after restoring hardware to make sure all saved
  modules have been created.
- TODO: the USB cdrom also needs a fix for it's runtime-only options.
2015-08-28 17:37:38 +00:00
Volker Ruppert
cc3020ab53 Added support for connecting USB floppy without media present.
Fixed status indicator activity.
TODO: add media change support without disconnect.
2015-08-24 20:26:08 +00:00
Volker Ruppert
38fbdaa7e8 Added runtime config handler for the USB cdrom and modified parameter handling
similar to the ATAPI implementation (including locked tray case).
Fixed status indicator activity and minor other changes.
2015-08-23 16:09:24 +00:00
Volker Ruppert
1df014a8ae Implemented unregister mechanism for runtime config handlers.
TODO: use it for removable devices with removable media (USB floppy / cdrom).
2015-08-23 07:04:56 +00:00
Volker Ruppert
792c5bdec2 Set default device speed for floppy, cdrom and disk to 'full'. 2015-08-16 16:15:46 +00:00
Volker Ruppert
823ba769fb Some work on the USB floppy emulation.
- Removed USB device type handling from constructor and init code, since we
  only the 'floppy' type here.
- Write commands now using the device buffer for one sector.
TODO: support for starting without media and runtime media change.
2015-08-16 06:44:16 +00:00
Volker Ruppert
5bc1717adc Removed the data tranfer limit for read/write commands.
- The read buffer is now limited to 16 sectors and the read commands can fill
  it multiple times until all sectors have been read.
- The write commands are currently not using the device buffer, so no panic
  should happen here.
2015-08-14 17:43:25 +00:00
Volker Ruppert
8a1e31ef08 Added common USB device option "debug" to turn on BX_DEBUG reporting at
connection time.
Fixed USB floppy capacity entries for 1.44 MB (last LBA, not LBA count).
2015-07-31 19:01:09 +00:00
Volker Ruppert
46d2c0adad Started implementing save/restore support for the USB floppy.
Fixed status indicator handling in case of connect failure.
2015-07-28 18:44:08 +00:00
Volker Ruppert
5e714cdd34 Handle illegal and unimplemented cases of the 'verify' command. 2015-07-26 06:48:55 +00:00
Volker Ruppert
87d40fe673 Some work on the status LED support for removable devices.
- Force a status bar update after unregistering an item.
- Added status indicators for USB disk and cdrom.
- Handle USB device disconnect in the runtime config handler, too.
2015-07-13 21:57:09 +00:00
Volker Ruppert
3986a0b703 Extended status bar LED feature to support dynamic indicators for removable
devices like USB disk, cdrom or floppy. Using this feature for the new USB
floppy. Removed static indicators for port activity from the USB HC code.
TODO: Implement status LEDs for USB disk and cdrom.
2015-07-13 16:56:06 +00:00
Volker Ruppert
6161ffea73 Added initial version of UFI/CBI floppy disk storage device support written
by Ben Lunt. To connect a USB floppy you can use the 'floppy' device with the
path to the image separated with a colon. VVFAT is also supported.
FIXME: The device detection fails on some recent Linux distributions.
FIXME: Only 1.44M media format is currently supported.
TODO: Media change without disconnect is not implemented yet.
2015-07-13 08:37:45 +00:00
Volker Ruppert
16358f9c54 Added missing hdimage->close() in destructor. 2015-07-12 14:45:34 +00:00
Volker Ruppert
98bc3bdf16 Small OHCI fix by Ben Lunt. 2015-07-12 06:53:01 +00:00
Volker Ruppert
3b87e71346 Minor bugfix and small additions by Ben Lunt. 2015-06-29 20:32:56 +00:00
Volker Ruppert
dcae254157 The Device Qualifier request must fail on non high-speed devices (patch by Ben Lunt). 2015-06-17 20:15:53 +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
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
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
c8ef526143 Fixed some warnings. 2014-12-01 17:06:00 +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
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
Stanislav Shwartsman
e2e549c675 fixed MSVCPP warning 2014-07-09 15:39:47 +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
Volker Ruppert
ed41df332a Support for compiling plugin version of Bochs with MSVC nmake now complete.
- embedding combined manifest makes BOCHS.EXE usable
- list of DLL plugins now depends on the pci and debugger options
- 'make clean' now removes the generated manifest files
- renamed variable for external rules
- documentation update
2014-05-03 10:58:10 +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
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
2777ac0dc5 Added separate target for MSVC plugins (causing an error for now) 2014-04-06 07:22:16 +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
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
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
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
23a2ded526 Fixed build process without libtool and plugins 2014-01-03 21:58:04 +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
443f04703c Added / modified device log prefixes 2013-12-29 12:56:52 +00:00
Volker Ruppert
8f5408e653 Fixed some gcc 4.8.1 warnings 2013-12-23 11:31: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
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