Commit Graph

12503 Commits

Author SHA1 Message Date
Volker Ruppert
a475fee44f Fixed compilation with networking and USB support disabled. 2021-03-03 17:47:15 +00:00
Volker Ruppert
47f456b299 Some more documentation updates and additions (section for class bx_devmodel_c). 2021-03-01 18:16:31 +00:00
Volker Ruppert
1d162d5f2e Started adding section about the plugin interface in the developer doc and
updated plugin-related information in the user doc.
2021-02-28 15:55:03 +00:00
Volker Ruppert
27c120154b Fixed a GCC warning and some MSVC warnings. 2021-02-27 20:53:10 +00:00
Volker Ruppert
3209b04d82 Fixed compilation with plugins enabled on Windows. 2021-02-27 13:15:37 +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
4dd5816108 Some changes in the Bochs plugins code.
- Changed variable type of the plugin_t "type" member from enum to Bit16u.
- Added support for returning device flags with the new mode PLUGIN_FLAGS in
  the plugin entry functions. It is currently only used for devices that can
  be connected to a PCI slot.
- Code cleanup in core device plugins: checking type no longer necessary.
- The "non-plugin" mode now also uses the "loadtype" member of plugin_t.

TODO: Change PCI slot options to bx_param_enum_c and build the choices list
using the new capabilities of the plugin API.
2021-02-26 20:37:49 +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
442d7256bf Updated CHANGES. 2021-02-21 09:46:51 +00:00
Volker Ruppert
ff93b11eb8 Removed SVN property "executable" from some files. 2021-02-21 09:25:33 +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
b84c6c8526 Some changes in the device config handling in all HCs and external hub.
- Disable port "options" parameter after successful connect. While connected,
  a device may install runtime options to control it's behaviour.
- Added enable handlers for the "options" parameter to ensure an attempt to
  change the device while connected doesn't enable it.
- Some related code cleanups.
2021-02-20 19:58:39 +00:00
Volker Ruppert
595d4e5c3f Some changes in the Bochs config parameter code and related gui dialogs.
- Changed some bx_param_c member types and related code to bool.
- Added bx_param_string_c method get_enable_handler() for the use in gui dialog
  dependency processing.
- Call the enable_handler (if present) when processing dependent list in the wx
  and win32 ParamDialog code.
2021-02-20 18:56:25 +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
67a5487eab Some cleanup in the USB device change code. 2021-02-18 18:10:41 +00:00
Volker Ruppert
d4171cbf31 Renamed usb_cbi plugin to usb_floppy (including changes of source file names
and internal names).
2021-02-18 15:03:05 +00:00
Volker Ruppert
8107f2461b Fixed Bochs link error in MSVC by post-processing parser.cc with sed. 2021-02-17 19:44:16 +00:00
Volker Ruppert
ceb8462cc7 Updated main and usb Makefile dependencies. 2021-02-17 16:53:40 +00:00
Volker Ruppert
dcdceb96f6 Generate USB devices list from available USB plugins list and removed hardcoded
device handling. Added some code to handle plugins that provide more than one
device type (usb_hid, usb_msd) or with different name (usb_cbi). The device
type member is now only used by multi-function devices.
2021-02-17 16:22:55 +00:00
Stanislav Shwartsman
2ab50c7d66 solve code duplication between different cpudb models 2021-02-16 18:57:49 +00:00
Volker Ruppert
16d79cbf0b Some fixes and cleanups in the USB code.
- USB hub: disable device "options" parameter if device is set to "none".
- USB hub: handle device disconnect in runtime_config().
- Removed handling of USB device type in host controllers and external hub.
2021-02-16 17:04:04 +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
ebc11b80c8 The variable name "interface" cannot be used if windows.h is included. 2021-02-14 09:59:36 +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
07f32da5a7 Some plugin related fixes.
- Fixed loading of all plugins with one type using wildcard.
- Reduced maximum length of line when listing available modules for hdimage,
  network and sound.
2021-02-14 06:25:01 +00:00
Volker Ruppert
587c7b257b Bugfix: USB descriptors depending on speed must be set up in init(). 2021-02-13 10:22:19 +00:00
Stanislav Shwartsman
b6e284b080 fix MSVC warnings 2021-02-11 15:05:06 +00:00
Volker Ruppert
d154ead26b Fixed broken save/restore feature: set() argument type must be Bit64s. 2021-02-11 09:29:44 +00:00
Volker Ruppert
744efe9c22 The hdimage, networking and sound code now also use PLUG_get_plugins_counrt()
and PLUG_get_plugin_name() in case plugin support is disabled. Removed
temporary compatibility code from the self-registering stuff.
2021-02-10 07:29:14 +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
1f583e6e7f Regenerated configure script. 2021-02-09 08:24:20 +00:00
Volker Ruppert
006c843c96 Fixed incomplete setup of default config interface and display library. 2021-02-09 08:23:24 +00:00
Stanislav Shwartsman
7635b3df3e part of fixing compilation of bx_debug with MSVC 2021-02-08 13:09:01 +00:00
Stanislav Shwartsman
c87ce2d11a fixed some MSVC wannings in CPU code 2021-02-08 13:06:44 +00:00
Volker Ruppert
b12cd467f7 Updated user plugin example. 2021-02-07 18:37:34 +00:00
Volker Ruppert
0d425037df Improved plugin type detection at Bochs startup.
- Added special mode to all plugin entry functions that returns the plugin type.
- The plugins search function now temporarily loads all available plugins and
  reads the plugin type using the new mode PLUGIN_PROBE.
- Added "loadtype" to the plugin structure to store the type used for plugin
  loading (currently only the voodoo plugin provides two types).
2021-02-07 16:16:06 +00:00
Volker Ruppert
cdc505dfce Fixed MSVC warnings in the devices code after bx_bool to bool changes. 2021-02-06 19:56:57 +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
30b9c1b086 Fixed VS 2019 compilation error in siminterface.cc.
TODO (also MSVC / VS 2019 issues):
- Bochs with debugger enabled fails to link.
- After bx_bool removal there are tons of warnings (C4804 / C4805).
2021-02-06 13:35:34 +00:00
Volker Ruppert
83ab74a0c4 Set executable flag for shortcut scripts. 2021-02-06 09:38:02 +00:00
Volker Ruppert
7ae0a21158 Some small changes after networking module handling rewrite.
- Make sure the 'null' module is on top of the list.
- Removed no longer required method.
2021-02-06 09:27:08 +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
96193ed79c Finished bx_bool to bool type changes.
- Changes in the USB host controller code.
- Finally removed bx_bool type definition.
- NOTE: The Bochs BIOS still has it's own bx_bool definition.
2021-02-04 20:15:13 +00:00
Stanislav Shwartsman
908b798015 update bx_bool->bool in documentation 2021-02-04 19:21:47 +00:00
Stanislav Shwartsman
f77303043f regenerate parser.cc after code changes 2021-02-04 18:29:59 +00:00
Stanislav Shwartsman
44d7906420 convert debugger command line parser YACC to generate C++ source instead of pure C
use bool instead of bx_bool in all bx_debug stuff (now possible when YACC script have generated C++ source)
2021-02-04 18:25:27 +00:00
Volker Ruppert
3cf2807dce Continued bx_bool to bool type changes.
- Changes in the VGA core and Voodoo code.
- Removed unnecessary typecasts in some devices.
- TODO: USB host controller code.
2021-02-03 18:08:04 +00:00