Commit Graph

446 Commits

Author SHA1 Message Date
Vort
ace4a4dfa9 Use correct directory separator in Windows builds 2023-04-16 12:22:45 +03:00
Benjamin David Lunt
a0e4106f4a
Add over-current signaling
This adds over-current signaling to the USBs four host controllers.
To signal an OC, use the runtime configuration and set the checkbox (GUI) or text config's parameter to 1.
This pull request also adds USB documentation to user.dbk.
2023-03-22 16:12:08 -07:00
Benjamin David Lunt
8ef4dcc7d1
Allow a usb port number to be more than one digit 2023-03-12 16:36:22 -07:00
Benjamin David Lunt
86b50988be
USB emulation update
Added examples for new options.
xhci: model= option
usb disk: proto= option
2023-03-10 11:29:06 -07:00
Stanislav Shwartsman
1e4f1624c8 remove trailing whitespace from source files 2022-08-23 21:46:04 +03:00
Stanislav Shwartsman
e32d536abe
added ability to select memory block size configurable (#25)
very large memory configurations require large memory block (or very large amount of blocks)
2022-07-30 13:56:09 +03:00
Volker Ruppert
1408de3ad2 Fixed and improved PCI slot config error handling. 2021-10-14 17:59:08 +00:00
Volker Ruppert
e34d017f60 Some fixes for compiling for WIN64 with MSVC.
- Added check in config.h whether or not Bochs is configured and compiled for
  the same target platform (WIN32 / WIN64).
- Fixed some warnings that occur in the MSVC WIN64 case.
2021-07-12 19:05:25 +00:00
Volker Ruppert
7e75d3d66b Two fixes in the USB code.
- Fixed possible segfault in the EHCI code.
- Fixed and improved backward compatibility code for USB port options.
2021-06-30 15:50:49 +00:00
Volker Ruppert
d9dd62e42f Improved conversion of old-style USB device options to new format. 2021-06-24 19:45:20 +00:00
Volker Ruppert
4db9f76819 Added port 0xE9 hack switch to runtime options. 2021-05-11 14:42:31 +00:00
Volker Ruppert
adf209fe9e Fixed some issues reported by valgrind. 2021-04-18 17:20:41 +00:00
Volker Ruppert
8e8414aae4 Some cleanup in the plugins code and related documentation additions. 2021-04-01 19:36:59 +00:00
Volker Ruppert
249fcf9442 Set the device type correctly for all media types when parsing floppy options.
- Added helper function get_floppy_devtype_from_type().
- The floppy type option now accepts the value "none".
- Added parameter handler for "devtype" to handle the BX_FDD_NONE case.
- Cleaned up floppy options parser code.
2021-03-29 11:17:03 +00:00
Volker Ruppert
b1c36691de Partly fixed floppy issues caused by previous commit. If device type is set to
"none" the dependent parameters cannot be set. That's why the bochsrc parser
needs to set device type first.
- Set initial device type of first floppy to '3.5" 1.44M'.
- Detect device type along with image type if necessary.
- TODO: fixes for media types like "1_44" and some more cleanup.
2021-03-28 08:40:28 +00:00
Volker Ruppert
3fcc320897 Added new plugin type PLUGTYPE_CI for config interfaces. Updated related code
and documentation.
2021-03-27 17:23:31 +00:00
Volker Ruppert
0c2a9c69d6 Some config option changes.
- Moved serial and parallel config parameter list creation to the corresponding
  device code.
- Unregister serial and parallel bochsrc options in PLUGIN_FINI mode.
- Moved USB config and runtime parameter list creation to bx_init_usb_options().
- textconfig.cc: Small fixes in the optional plugin control.
2021-03-07 11:54:50 +00:00
Volker Ruppert
66d9fd53b5 Two more disabled options fixes in the config interfaces. 2021-03-05 21:25:13 +00:00
Volker Ruppert
e8709d58e4 Fixes in the config interfaces handling of disabled options.
- Don't show dialog or menu if selected list is NULL or empty.
- Don't create list for lowlevel sound options if disabled in config.h.
2021-03-05 16:52:26 +00:00
Volker Ruppert
a475fee44f Fixed compilation with networking and USB support disabled. 2021-03-03 17:47:15 +00:00
Volker Ruppert
2aadd3e470 Changed type of the PCI slot option to bx_param_enum_c and build choices list
from plugin devives with PLUGFLAG_PCI set.
2021-02-27 10:23:05 +00:00
Volker Ruppert
8aaf9d858e Changed type of vga and svga_cirrus plugins to PLUGTYPE_VGA. Modified vga
extension option init to make this work correctly. The choices "none" and "vbe"
load the vga plugin, "cirrus" loads svga_cirrus.
2021-02-23 08:12:24 +00:00
Volker Ruppert
7a479ff4c9 Upgraded MSVC workspace files for VS2019 and fixed some MSVC warnings. 2021-02-21 08:08:06 +00:00
Volker Ruppert
2e44a5c8bf Changed type of VGA extension option to bx_param_enum_c. Additional choices are
added from plugins list.
2021-02-19 16:05:56 +00:00
Volker Ruppert
24bccc8efb Changed parameter handler argument "set" type to bool. 2021-02-19 13:13:42 +00:00
Volker Ruppert
368c83127e Some small changes in the USB devices configuration.
- Fixed USB devices list by adding a terminating NULL entry.
- Disable USB device options parameter if device is set to "none".
- Related documentation updates.
2021-02-15 19:55:53 +00:00
Volker Ruppert
919d82b68e Next step of USB devices handling rewrite. Changed type of the device parameter
to bx_param_enum_c. Updated code to provide support for legacy syntax
(portX="device:option").
TODO: generate USB devices list from plugins list.
2021-02-15 16:09:02 +00:00
Volker Ruppert
e00a5d0761 Started rewrite of the USB devices handling.
- Moved main option from the portX parameter to the optionsX parameter. Added
  new option "path" for the disk, cdrom and floppy devices, "ports" for the
  USB hub and "file" for the USB printer. The legacy syntax is still supported.
- Register USB device state after init() to ensure all options that may have
  effect on the save/restore list are applied.
- Report available devices on top of log file similar to hdimage, network and
  sound modules.
- Changed USB device type variable typein host controllers to int.
- Prepared improved usbdev_ctl init / exit implementation.
- TODO: Create list of USB devices dynamicly from available plugins.
2021-02-14 08:30:49 +00:00
Volker Ruppert
535856833c Display library plugins list is now created dynamicly at startup instead of the
hardcoded one. In plugins mode now all plugins with PLUGTYPE_GUI can be used.
Added similar code for the case plugins are disabled. The macros
PLUG_get_plugins_count() and PLUG_get_plugin_name() can be used in both cases.
2021-02-09 21:53:15 +00:00
Volker Ruppert
333afe3e4a Fixed some issues found with save/restore tests.
- BXRS_PARAM_BOOL macro should be used for bool type members only.
- Fixed usage of wrong BXRS macro for numeric member in usb_hid.cc.
- New PCI parameter "advopts" must be saved in config.
- FIXME: Bochs hangs at startup in restore mode.
2021-02-09 21:32:35 +00:00
Volker Ruppert
6ad19a7716 Rewrite of the sound driver handling similar to the hdimage and networking
module code. Sound driver names are now stored as string constants instead
of hardcoded values. Available modules are detected at Bochs startup and stored
in a string array before initializing options. In the plugins case available
modules are read from the plugins list. If plugins are off, the registry of
bx_sound_lowlevel_c is used. Related changes similar to the hdimage and
network modifications.
2021-02-06 16:51:55 +00:00
Volker Ruppert
1fe24e32b0 Rewrite of the networking module handling similar to the hdimage module
handling. Networking module names are now stored as string constants instead of
hardcoded values. Available modules are detected at Bochs startup and stored in
a string array before initializing options. In the plugins case available
modules are read from the plugins list. If plugins are off, the eth_locator_c
registry is used. Related changes in all parts of Bochs that need the
networking stuff.
TODO #1: Sound drivers could be handled in a similar way.
2021-02-05 20:40:43 +00:00
Volker Ruppert
22fabb599a Started bx_bool to bool type changes in the Bochs core. 2021-01-30 15:16:00 +00:00
Volker Ruppert
880ee1832a Some Bochs plugins support and VGA extension option changes.
- Changing VGA extension to "voodoo" did not work in the config interface.
  Moved plugin loading to the string parameter handler and added plugin
  unloading case.
- Unloading "voodoo" VGA plugin resets pluginVgaDevice to stubVga.
- pluginUnregisterDeviceDevmodel() now supports core plugins.
- Some other small plugin related changes.
2021-01-27 20:06:02 +00:00
Volker Ruppert
74deb16b44 Since externally developed optional device plugins (AKA "user plugins") can be
loaded in bochsrc with "plugin_ctrl" or with their own name, the user plugin
option and the special cases for PLUGTYPE_USER are no longer needed. Updated
example patch to make it work with the latest SVN code.
2021-01-24 10:16:22 +00:00
Volker Ruppert
e5c68dd4ac Rewrite of the optional plugin control feature.
- Now that we know about all available plugins at startup, the bx_list_c object
  "plugin_ctrl" contains a fixed number of bx_param_bool_c objects representing
  the requested status (1 = load). It is verified at simulation startup.
- The config interface creates two text lists (textconfig) or list boxes (win32,
  wx) from it to show the remaining available and the loaded plugins. Loading
  and unloading is performed immediately and plugins may install / uninstall
  options in other menus / dialogs.
- Modified the "non-plugin" code to make the optional plugin control work very
  similar in this mode.
2021-01-21 18:10:40 +00:00
Volker Ruppert
5ffb319df1 Rewrite of the disk image mode handling. Disk image modes are now stored as
string constants instead of hardcoded values. Available modes are detected at
Bochs startup and stored in a string array before initializing options. In the
plugins case additional modes are read from the plugins list. If plugins are
off, the hdimage_locator_c registry is used. Related changes in all parts of
Bochs that need the hdimage stuff.
TODO #1: Network and sound drivers could be handled in a similar way.
TODO #2: Make disk image mode detection work again in plugins mode.
2021-01-05 21:57:13 +00:00
Volker Ruppert
c12c8324dc Added config parameter to set up advanced PCI options as comma-separated
values. Now it is possible to disable ACPI or HPET in case the i440FX chipset
is selected.
2020-12-04 17:04:40 +00:00
Volker Ruppert
6692664a3b Added helper function bx_split_option_list() to reduce code duplication.
It creates an array of strings from a string containing a comma separated list
of options. Now using this function for display library options, USB port
options and ROM image options.
2020-12-03 20:30:10 +00:00
Volker Ruppert
90dc9f7468 Setting up options without specifying display library is now also supported. 2020-11-29 13:37:07 +00:00
Volker Ruppert
aaf8c9d4e4 Removed "svga" display library designed for the obsolete Linux SVGALib.
The latest release is from 2001 and it will not work on modern Linux systems.
Parts of the SVGALib code have been moved to the Linux kernel and the X11 and
SDL libraries are using it as a video driver.
2020-11-25 07:56:32 +00:00
Volker Ruppert
2045ead0ce Improved error handling of the user shortcut feature.
- Shortcut parser sets a flag in case of error.
- String parameter handler resets to old value if the new one is invalid.
- User button handler shows a message box if the parser signals an error.
2020-10-19 15:01:40 +00:00
Volker Ruppert
5de465b5b1 Fixed some gcc 9.3 warnings. 2020-08-06 20:21:14 +00:00
Volker Ruppert
c05cb5e1d7 Removed legacy "load32bitOShack" feature. In the early days of Bochs some hacks
were required to load a 32 bit OS. In the meantime Bochs has been made capable
of loading 32 and 64 bit OS's without hacking.
2020-06-07 17:28:54 +00:00
Volker Ruppert
ed223c6499 DDC: changed the "off" case to Bochs default name "disabled" and updated docs. 2020-03-22 12:31:34 +00:00
Volker Ruppert
e23a930864 Added "ddc" parameter to the "vga" option to make it possible either to disable
the DDC feature or to read the monitor EDID from file. By the default the
builtin "Bochs Screen" EDID is used.
2020-03-21 18:00:02 +00:00
Volker Ruppert
d51f6480a0 Some fixes for the "multiple NICs" support.
- Fixed ne2k parameter save function.
- For backward compatibility, card #0 defaults to PCI if the ne2k is assigned
  to at least one PCI slot.
- The "bootrom" parameter is only valid for the PCI card type.
2020-03-04 17:37:34 +00:00
Volker Ruppert
835a745215 Added experimental "multiple NICs" support (currently NE2000 only). Unlike the
old SF patches this solution is compatible with the plugin architecture. The
ne2k plugin is loaded only once and a new ne2k_main_c object creates up to 4
ne2k device objects depending on the config. The new ne2k parameter "card"
specifies the zero-based card number to configure. If not given, the default
is card #0 for compatibility. The new ne2k parameter "type" specifies the bus
it is connected to ("isa" or "pci"). Card #0 defaults to PCI, the others to
ISA. In the PCI slot configuration the ne2k device can be used multiple times
if more than one card is configured.
Related changes:
- removed SMF stuff for ne2k
- always convert device prefix to uppercase (ne2k uses NE2K0 ... NE2K3)
- removed unused BXPN values
- TODO: add multiple NICs support for the E1000
2020-03-02 22:04:10 +00:00
Volker Ruppert
a088949447 Save / restore fixes
- Don't set up and load pre-defined optional plugins in restore mode.
- Remove the save/restore registration in Voodoo destructors.
- TODO: Fix frozen SDL/SDL2 display after restore.
2020-01-24 16:01:00 +00:00
Stanislav Shwartsman
96e2c50bef applying SF patch #545 Speling fixes 2019-12-09 16:29:23 +00:00