Commit Graph

44 Commits

Author SHA1 Message Date
Stanislav Shwartsman
00981cd7a6 Adding Id and Rev property to all files 2011-02-24 22:05:47 +00:00
Volker Ruppert
a5634f2e38 - gui configuration fixes
* cpu msrs: parameter type changed to filename (for "browse" button)
  * usb: box title no longer needed, since we have now a tab window
2011-01-22 16:49:00 +00:00
Volker Ruppert
9b89f19d79 - improved USB configuration with gui
- fixed device change flag handling
2011-01-16 17:17:28 +00:00
Volker Ruppert
168efb7710 - re-implemented USB port options parameter to assign specific options to the
connected device. For now this feature is only used by the 'disk' device to
  specify an alternative redolog filename of some image modes.
- added new methods set_option() and timer() to the base class usb_device_c.
  The timer() method is periodicly called from the HC's frame timer code.
- moved runtime device change stuff from the parameter handler to the end of
  timer() methods of all hubs. This makes sure that all parameters for the
  device have been set at connect time. TODO: this technique could also be used
  for the floppy and cdrom media change.
2011-01-16 12:46:48 +00:00
Volker Ruppert
3ef57e9f7e - fixed some format warnings in the devices code 2011-01-02 16:51:08 +00:00
Volker Ruppert
99eb027531 - modified usb_common plugin implementation to make Windows DLL plugins compile
* added new "pseudo device" for the USB device control (init, send message)
  * moved register_state() call from the hubs to the common device init code
- fixed unresolved symbols in usb_msd code
2010-12-14 21:20:37 +00:00
Volker Ruppert
c214fffa5e - created a separate plugin that contains the USB devices, the devices init
code and the generic USB stuff. Up to now, in plugin mode each host controller
  staticly links all this stuff with the plugin library. So it existed twice and
  e.g. it wasn't possible to create a unique serial number for disks/cdroms
  connected to different HCs. Some other sanity checks could be added now, too.
- Added a register mechanism for the USB device init function in the main
  devices code.
- TODO: Some other device plugins could be fixed the same way: network devices
        (sharing ethernet modules), harddrive & usb_msd (sharing hdimage and
        cdrom)
2010-12-06 18:51:13 +00:00
Volker Ruppert
cd7b703a5b - init() method added to the USB device class
- new USB device class method get_info() for improved device connect BX_INFOs
- USB printer: output file creation failure now causes BX_ERROR and disconnect
  instead of BX_PANIC (similar to usb_msd)
- removed obsolete include statements
2010-12-05 13:09:41 +00:00
Stanislav Shwartsman
9aa503cb9d fixed warnings for win64 compilation 2010-11-23 14:59:36 +00:00
Volker Ruppert
94a4710c5c - fixed crossing of the 4k boundary (USB disk on OHCI now works in Win98SE) 2009-04-29 18:16:31 +00:00
Volker Ruppert
4d98a816ad - for OUT transfers don't set the completion condition until all data is sent
to the device and process TD repeatedly until CC is modified (fixes MSD
  connected to OHCI with Linux guest)
- fixed CBP calculation and split transfer to memory when crossing the 4k
  boundary (makes 8k transfers work according to the specs: fixes Win98 guest crash)
- don't enable the status bar i/o indicator if it's ID is not valid (no space
  left in status bar)
- minor debug message fixes
2009-04-28 22:57:06 +00:00
Volker Ruppert
c85367fe80 - simplified PCI config space write debug messages for the current i/o length
- removed full device name from debug messages, since the device is specified
  by it's prefix. Full name is only required in a BX_INFO() in init().
- removed BX_PANIC messages that will never happen
2009-04-23 15:52:53 +00:00
Stanislav Shwartsman
e52cff7da3 remove very ugly and unsafe code (string functions are evil!) - new code is also 10 times faster. 2009-04-22 19:11:01 +00:00
Volker Ruppert
6a78f0d769 - removed extended debug output in some PCI config space read handlers
- small changes in some debug messages to make the log better readable
2009-04-22 18:37:06 +00:00
Volker Ruppert
def1553ab5 - removed a bunch of unnecessary io_len checks 2009-04-21 17:53:29 +00:00
Volker Ruppert
455e7730f0 - don't turn on status bar leds for empty packets 2009-04-07 10:56:19 +00:00
Volker Ruppert
b7842a169a - the status bar indicators for the USB HCs now show the data transfer 2009-04-06 09:30:26 +00:00
Volker Ruppert
365fa7fa35 - another bugfix by Ben Lunt 2009-04-01 07:27:34 +00:00
Volker Ruppert
ef901c0b0d - minor bugfixes 2009-03-31 20:05:30 +00:00
Volker Ruppert
ee131a7471 - new implementation of the win32 runtime dialog based on the start menu dialog
* removed old win32 runtime config dialog since the property sheet isn't
    compatible with the win32 ParamDialog
  * reorganized runtime parameter lists (usb and cdrom setup in device init)
  * renamed win32 StartMenuDialog() to MainMenuDialog() and some related name
    changes
  * added runtime support to the MainMenuDialog
- win32 start/runtime menu: set keyboard focus to the start/continue button
- win32paramdlg: SetParamList() now checks for list size changes to avoid crash
2009-03-29 20:48:17 +00:00
Volker Ruppert
773b0ab8c2 - fixed debug output (max. 16 hex bytes per line) 2009-03-29 07:56:28 +00:00
Volker Ruppert
8c605c029d - store options for all parameter types in a Bit32u value instead of bx_param_num_c
- added file extension support for bx_param_filname_c
- fixed showing of tab control child lists
- added special disk menu for the win32 ParamDialog
- on win32 use the ParamDialog instead of textconfig submenus (TODO: gui dialog
  replacement for the start menus
2009-03-15 21:16:17 +00:00
Volker Ruppert
2b6ba5e44c - definition of the number of USB ports moved to bochs.h
- create config parameters for USB depending of the defined number of ports
- removed obsolete comment
- bx_param_num_c flag USE_SPIN_CONTROL now available for all config interfaces
2009-03-15 12:54:59 +00:00
Volker Ruppert
8987188a8e - new method get_frame_remaining() calculates register value from the difference
between the current time and the "start-of-frame" time
- removed 1 usec interval timer
- simplified calculation of the PPCM reset value
2009-03-09 23:18:52 +00:00
Volker Ruppert
d909d7a8dd - prepared USB cdrom support in the usb_set_connect_status() methods
- added 2 missing request types in the usb_msd code
2009-03-09 14:44:06 +00:00
Volker Ruppert
9549d7ece6 - preparing USB cdrom support (not yet complete)
* added cdrom support in the usb_msd code (already present in the SCSI code)
  * added code for deferring packets in usb_msd and the common USB code (TODO:
    cancel packets by the host controller)
  * added SCSI cdrom drive lock flag
- clean up SCSI request queues in destructor
- changed type of cdrom path/device parameter to const char
- moved the shared init device code to a common function
- reset hub count if the last external hub has been removed
2009-03-09 12:18:40 +00:00
Volker Ruppert
dee8eef320 - added external USB hub
* ported generic hub code from Qemu
  * devices can be connected at runtime only with textconfig
  * FIXME: wx ParamDialog doesn't like removing runtime parameters on disconnect
  * TODO #1: dynanamic runtime dialog for USB on Windows
  * TODO #2: code cleanup: USB code should have one static function only for
    most of the init_device() code
2009-03-07 16:57:17 +00:00
Volker Ruppert
82b9d9ec81 - ported packet broadcast mechanism from Qemu (required to support devices
connected to an external hub)
- accept empty strings for device disconnect in parameter handler
2009-03-05 21:35:00 +00:00
Volker Ruppert
ad68d37b2a - small fixes to make devices connected to OHCI work with Linux guests
- changed some BX_INFO messages to BX_DEBUG
2009-03-05 17:29:09 +00:00
Volker Ruppert
de9f1dcce9 - rewrite of the USB runtime configuration code (for textconfig only)
* USB runtime options moved to a new dynamic menu
  * USB host controllers create own submenus in init()
  * USB runtime parameter handlers simplified
  * TODO: related changes in the wx and win32dialog code
2009-03-04 18:20:50 +00:00
Volker Ruppert
90aa30fde9 - added register/unregister methods for removable keyboard devices and updated
keyboard and usb_hid code to use them
- removed keyboard handling from the USB host controller code
- removed no longer needed USB stubs from the devices code
- converted removable mouse variables to a structure
2009-03-03 18:29:51 +00:00
Volker Ruppert
3c21d494cb - added register/unregister methods for removable mouse devices and updated
usb_hid code to use them
- removed mouse handling from the USB host controller code
- TODO: add similar code for keyboard devices
2009-03-02 21:21:16 +00:00
Volker Ruppert
7f9717dd10 - OHCI packet handling code rewritten (Win98 original now detects the mouse)
- moved usb_send_msg() to the common USB devices code
- simplified USB MSD devices handling
2009-03-01 19:29:36 +00:00
Volker Ruppert
69452184d8 - completed save/restore code
- CSC bit must be set on a connect change
- debug message fixed
2009-03-01 10:17:21 +00:00
Volker Ruppert
15aec6efee - add new method remove_device() for device cleanup
- some more registers converted from struct to Bit16u / Bit32u
- some progress with save/restore support
- small interrupt handling rewrite
- report misaligned read/write access
2009-02-26 18:43:11 +00:00
Volker Ruppert
f8bceae4e9 - improved device cleanup in destructor
- initialize device pointers in init()
- only connect devices in reset() if not NULL
- don't delete devices in reset_hc() to avoid segfault (update connect status
  instead)
- fixed port number calculation in read handler
- fixed enabling interrupts
2009-02-25 18:18:57 +00:00
Volker Ruppert
8cfd6b85aa - now using Bit32u values instead of structures for some registers
- interrupt handling rewritten based on the Qemu implementation
- HcRhPortStatus now belongs to the usb_port structure
- partial save/restore support
2009-02-24 17:15:27 +00:00
Volker Ruppert
bf92a5ea04 - removed duplicate code from reset_hc(), since the init of connected devices
is already done in reset()
- init_device(): check for device connected to port before creating a new one
  (OHCI and UHCI)
- update irq level after clearing status and masking interrupt (same behaviour
  as the Qemu implementation)
2009-02-15 14:06:55 +00:00
Volker Ruppert
f10e0a08af - applied latest version of the USB OHCI support by Ben Lunt (WIN98SE can use
the USB mouse now)
- minor fixes in the USB common and devices code
2009-02-14 10:06:20 +00:00
Volker Ruppert
e5eac65b59 - removed wrong character from FSF address (converted invisible and useless
2-byte character)
- updated FSF address in some files
- added license to some files
2009-02-08 09:05:52 +00:00
Stanislav Shwartsman
dd03e043a3 Updated FSF address 2009-02-07 21:05:31 +00:00
Volker Ruppert
141d69eadf - applied current version of the USB OHCI support by Ben Lunt (communication
between guest OS and USB device still not working correctly)
2009-02-05 16:53:44 +00:00
Volker Ruppert
cfa759cd57 - fixed parameter name for save/restore of connected devices
- moved configuration subtree 'usb' back to the 'ports' list to make it
  accessible again by the config interface
- delete s.scsi_dev only if not NULL
2009-01-19 21:39:03 +00:00
Volker Ruppert
b5aabf8848 - applied patch for initial USB OHCI support written by Ben Lunt (Win98 detects
the controller, connecting devices is not implemented yet)
2009-01-19 17:18:57 +00:00