Commit Graph

12277 Commits

Author SHA1 Message Date
Volker Ruppert
049826aa32 Fixed possible segfault in case of invalid filename based on patch #559.
Since this save/restore list exists in all devices, it's safe to move the new
code to the usb_device_c destructor.
2021-04-13 11:56:41 +00:00
Volker Ruppert
d74210b93f Added missing new VGABIOS binary for Banshee. 2021-04-12 19:37:17 +00:00
Volker Ruppert
faa11624e0 Updated LGPL'd VGABIOS from SVN.
- Added initial version of the VGABIOS for Voodoo Banshee adapters.
- Several code optimizations to reduce binary size.
NOTE #1: Banshee version has no VBE support yet.
NOTE #2: Banshee binary uses PCI ID for Banshee PCI and Bochs temporarily
         modifies the PCI data for Voodoo3 and AGP models.
2021-04-12 19:35:37 +00:00
Volker Ruppert
69695bfd67 Prepared the Banshee code for the planned LGPL'd VGABIOS with 3dfx Voodoo
support. The VGABIOS image will be compiled for Banshee PCI and this code
modifies the PCI data for the Voodoo3 and AGP models.
2021-04-11 20:09:43 +00:00
Volker Ruppert
e9eccadb82 Recompiled binaries. 2021-04-09 06:47:35 +00:00
Volker Ruppert
59a3b3f8b3 Added helper function get_ebda_seg() to optimize code. 2021-04-09 06:45:42 +00:00
Volker Ruppert
7aa5eb7a51 Some changes for correct vertical frequency reporting on mode switch.
- vgacore: method get_crtc_params() now returns selected video clock value.
- banshee: now using selected video clock instead of hardcoded VCLK #3.
- cirrus: added vertical frequency to mode switch BX_INFO.
2021-04-07 06:31:25 +00:00
Volker Ruppert
7aea547b9f Fixed possible segfault on some platforms. We need 'count + 4' device entries,
one for the "none" entry and a terminating NULL entry.
2021-04-05 11:17:20 +00:00
Volker Ruppert
857c3be2ba Some work on the Voodoo Banshee code.
- Moved setup of default i/o register values to reset().
- Set up strapInfo register bits in init().
- Don't overwrite readonly bits in miscInit1 register.
- Set up subsystem ID in VGABIOS ROM in case it's > 32k (doesn't exist yet).
- Copy subsystem ID from ROM to PCI config registers in reset().
2021-04-04 19:00:29 +00:00
Volker Ruppert
d8b25c5f26 Some more cleanup in the plugins code. 2021-04-03 18:26:03 +00:00
Volker Ruppert
7b355cd399 Get rid of the code duplication in the PIC write handler. 2021-04-03 16:44:19 +00:00
Volker Ruppert
7d104ffceb Fixed setting up advanced PCI options. 2021-04-03 12:54:25 +00:00
Volker Ruppert
e411667942 Started reducing PIC code duplication and some cleanups. 2021-04-02 19:01:37 +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
5406c037ec Improved example script for cross compiling Bochs on Linux for Windows.
- Disable the readline library since it's not present by default.
- Added support for adding config options with variable CONFIGURE_ARGS.
2021-03-29 11:39:24 +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
0ccf537103 Fixed two minor issues in bx_param_num_c class.
- reset() must call set() to ensure the set handler is called if present.
- don't set value if parameter is disabled.
2021-03-28 06:31:03 +00:00
Volker Ruppert
dc9c93f0c5 Updated both VS2019 workspace packages after textconfig / win32config changes. 2021-03-27 20:42:14 +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
9426ba987b Converted the win32config module to a plugin (using PLUGTYPE_CORE for now). 2021-03-26 19:12:09 +00:00
Volker Ruppert
e9df9c51c8 Fixed compilation with PCI host device mapping support enabled. Since a plugin
cannot unload itself, BX_UNREGISTER_DEVICE_DEVMODEL() call will fail. Setting
plugin control flag to 0 like other devices do. When starting simulation, all
unused plugins are removed.
NOTE: The pcidev stuff is unmaintained, functionality not tested.
2021-03-26 18:41:28 +00:00
Volker Ruppert
de0a844b75 Regenerated configure script. 2021-03-23 10:06:13 +00:00
Volker Ruppert
7661b74d5c Step #1 for converting the win32config code to a plugin.
- Renamed win32dialog.cc to win32config.cc.
2021-03-23 10:04:29 +00:00
Volker Ruppert
df3b45edea Resource fixes for Windows ports.
- Bochs for wxMSW: fixed duplicate value caused by manifest.
- Bochs for wxMSW: fixed resource file dependencies.
- Include gui debugger resources only when enabled.
2021-03-22 08:50:55 +00:00
Volker Ruppert
81f7b6d47a Fixed floppy format track handling. After introducing the DMA optimization it
stopped after first sector.
2021-03-21 20:53:48 +00:00
Stanislav Shwartsman
8e58d7336f implement MSR PAR handling in AMD SVM 2021-03-21 15:33:18 +00:00
Volker Ruppert
ca654e2033 References to the gui debugger are no longer needed here. 2021-03-20 15:54:42 +00:00
Volker Ruppert
db3a176c84 Fixed issue reported in SF patch #558: deassert INT if IMR change masks active request. 2021-03-19 17:45:49 +00:00
Stanislav Shwartsman
0736953e89 save GUEST PAT into VMCB for SVM 2021-03-19 06:03:04 +00:00
Volker Ruppert
4966843c90 Converted the textconfig module into a plugin, using PLUGTYPE_CORE for now.
It has been compiled and tested on Linux, with MinGW/MSYS and MSVC nmake.
TODO: Check whether or not the config interface choice "win32config" can be
a plugin, too. Possibly add a new plugin type for config interfaces.
2021-03-18 19:50:12 +00:00
Volker Ruppert
b79b868ff9 Attempt to fix the issue reported in SF patch #558 (fixed spurious interrupt
detection).
2021-03-17 19:42:41 +00:00
Volker Ruppert
5e2365d8de Fixed compilation error in case the textconfig module is disabled. 2021-03-17 16:40:08 +00:00
Volker Ruppert
4d6f1039c7 Removed reference to textconfig.cc from win32dialog.cc. Added switching config
interface to textconfig if the selected gui has a builtin console in
SIM->set_init_done(). This is required on Windows for the rfb and vncsrv guis.
Cleaned up the textconfig code.
2021-03-17 16:11:05 +00:00
Volker Ruppert
130be4e7bb Separation of textconfig and paramtree modules. Converting textconfig to a
plugin is possible now. Added new functions text_print() and text_ask() in
textconfig.cc to replace related methods of bx_param_c classes. Removed a now
obsolete comment section in siminterface.h.
2021-03-14 18:27:42 +00:00
Volker Ruppert
5385b2b98b Some textconfig related changes.
- Removed unused method bx_list_c::text_print().
- Fixed default prompt in bx_param_enum_c::text_ask().
- speaker.cc: fixed a typo in ask format.
2021-03-14 09:52:15 +00:00
Volker Ruppert
25e725a23c Makefile dependency updates
- Don't include paramtree.h in siminterface.h to get rid of duplicates
  in a lot of Makefile dependency lines.
- Regenerated Makefile dependencies in iodev and affected subdirectories.
- FIXME #1: including debug.h causes duplicate entries of config.h and osdep.h.
- FIXME #2: cpudb.h appears in most of the iodev* dependencies, but only needed
  by config.cc and the cpu class.
2021-03-13 09:54:06 +00:00
Volker Ruppert
90ac89ea22 After changing network device object pointer to class logfunctions the
networking modules don't need to include iodev.h.
2021-03-12 21:31:51 +00:00
Volker Ruppert
51a9557acf Disk image and sound driver modules don't need to include iodev.h. 2021-03-11 21:46:25 +00:00
Stanislav Shwartsman
a2004dd0f0 update CHANGES 2021-03-11 21:26:01 +00:00
Stanislav Shwartsman
08a068a161 fixed SVM V_TPR handling SF bug #1428 AMD SVM Hyper-V fails 2021-03-11 21:19:45 +00:00
Volker Ruppert
c07daa3a1c Some more code cleanup.
- Removed unnecessary SIM-opt_plugin_ctrl() call.
- Removed outdated menu layout sketch.
2021-03-11 08:10:12 +00:00
Volker Ruppert
b5428785aa Small code cleanup. 2021-03-08 09:04:16 +00:00
Volker Ruppert
8cf09f8545 Some additions in the plugins section and fixes/updates in other sections.
Removed obsolete README-plugins file.
2021-03-07 17:10:20 +00:00
Volker Ruppert
a2cf072751 Some cleanups in the plugins code. 2021-03-07 16:01:39 +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
01516a153f Fixed a warning. 2021-03-05 17:01:41 +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
2f2752dd74 Some more documentation updates and additions (new section for the siminterface class). 2021-03-05 15:45:02 +00:00
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
Volker Ruppert
dce82d74e1 Changed bx_bool to bool type in some more devices.
TODO: parts of the display adapter and USB host controller code.
2021-02-01 20:39:33 +00:00
Volker Ruppert
b2f0f74c6a Fixed USB floppy model selection. 2021-02-01 13:41:04 +00:00
Volker Ruppert
093b274b53 Changed bx_bool to bool type in some more device and the developer doc. 2021-02-01 12:42:12 +00:00
Volker Ruppert
45e03f9572 Changed bx_bool to bool type in the harddrv, cdrom, hdimage and sound code. 2021-01-31 15:44:39 +00:00
Stanislav Shwartsman
1765a06d01 move debug.h from bochs.h and include it only where required 2021-01-31 15:22:58 +00:00
Stanislav Shwartsman
d103603452 some bx_bool -> bool in debugger code 2021-01-31 14:58:28 +00:00
Stanislav Shwartsman
5874c8e29f fix compilation with SMP enabled 2021-01-31 14:03:28 +00:00
Volker Ruppert
e0142872e9 Changed bx_bool to bool type in a bunch of devices. 2021-01-31 10:50:53 +00:00
Volker Ruppert
f9dfaf1cca Changed bx_bool to bool type in iodev.h and affected code. 2021-01-31 08:22:55 +00:00
Stanislav Shwartsman
b4a031a70e convert bx_bool to bool in instrumentation stubs 2021-01-31 05:41:43 +00:00
Volker Ruppert
89522c30d8 Some more bx_bool to bool type changes.
- bx_shadow_bool_c: removed unused bitnum feature and changed data type.
- Changed return type of memory handlers to bool.
- Modified virtual timer, PIC and PIT code.
2021-01-30 23:55:24 +00:00
Volker Ruppert
c8f4a6f260 Save/restore: now using the macro BXRS_PARAM_BOOL in all devices. 2021-01-30 21:59:15 +00:00
Volker Ruppert
fcd7f3e6f8 Changed bx_bool to bool type in the paramtree code (except bx_shadow_bool_c).
TODO: Check whether or not the bx_shadow_bool_c bitnum handling is really used.
2021-01-30 20:44:53 +00:00
Stanislav Shwartsman
fcb85bebe3 remove code duplication and extract all bswap functions from bochs.h to misc/bswap.h 2021-01-30 20:33:22 +00:00
Stanislav Shwartsman
7153228d48 fixed compilation without bochs debugger 2021-01-30 20:31:03 +00:00
Volker Ruppert
6cca254c9d Fixed compilation of wxdialog.cc. 2021-01-30 20:24:27 +00:00
Stanislav Shwartsman
8285b6b51b regen Makefile include dependencies for CPU and internal debugger 2021-01-30 20:17:15 +00:00
Stanislav Shwartsman
1089e470e9 remove bochs-memory.h from bochs.h and include it only where required 2021-01-30 20:13:34 +00:00
Stanislav Shwartsman
6d6ff0e06b regen Makefile include dependencies for CPU, MEMORY and internal debugger 2021-01-30 19:44:41 +00:00
Stanislav Shwartsman
7cc9cffeed remove siminterface.h from bochs.h and include it only where required 2021-01-30 19:40:18 +00:00
Volker Ruppert
3bc8cdc91a Fixed nogui compilation. 2021-01-30 19:20:45 +00:00
Stanislav Shwartsman
2999eab48c remove defines which belong to already removed feature. fix compilation with GUI debugger enabled 2021-01-30 19:07:56 +00:00
Stanislav Shwartsman
0b83259417 regen include dep lists for cpu and memory - need to regen for all others 2021-01-30 18:57:45 +00:00
Stanislav Shwartsman
7ad435831c move stuff from bochs.h to more appropriate include 2021-01-30 18:50:09 +00:00
Stanislav Shwartsman
99e7b71540 remove gui.h from bochs.h and include it only where required 2021-01-30 18:47:25 +00:00
Volker Ruppert
a248bd375a Changed bx_bool to bool type in the gui component of Bochs. 2021-01-30 18:32:52 +00:00
Stanislav Shwartsman
c878933057 remove pc_system.h from bochs.h and include it only where required
next step: same for gui.h
2021-01-30 18:29:28 +00:00
Stanislav Shwartsman
a8013fdeba * convert bx_bool -> bool in pc_system.cc/pc_system.h
* extract logfunctions class definition to separate include logio.h to simplify the bochs.h reading

next step: try to minimize amount of includes in bochs.h as everyone in Bochs includes it
for example it includes pc_system.h which is not necessary required to be included in all CPU source files
2021-01-30 18:05:55 +00:00
Stanislav Shwartsman
abac80801f more bx_bool -> bool also fixing bxhub.cc case where bx_bool were assigned integer -1 value 2021-01-30 17:37:42 +00:00
Stanislav Shwartsman
9314902a85 convert some defines to typed consts 2021-01-30 17:06:34 +00:00
Volker Ruppert
22fabb599a Started bx_bool to bool type changes in the Bochs core. 2021-01-30 15:16:00 +00:00
Stanislav Shwartsman
bc680908ba fix compilation with debugger enabled 2021-01-30 08:58:42 +00:00
Stanislav Shwartsman
f79d6df458 strip redundant info from tigerlake cpuid text file 2021-01-30 08:45:34 +00:00
Stanislav Shwartsman
1bf18b8aae ! CPUID: Added TigerLake CPU definition (features CET and CLWB support)
- CPU code refactor, remove uses of bx_bool datatype and use C++ classic bool instead.
  This enable better compiler optimizations and reduce binary size
2021-01-30 08:35:35 +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
d46c80562e Some wx gui related changes.
- Moved wx gui plugin entry point to wx.cc, so we can use the macro
  PLUGIN_ENTRY_FOR_GUI_MODULE to be compatible with the other guis.
- Updated gui Makefile dependencies.
2021-01-26 07:22:58 +00:00
Volker Ruppert
3f760e2900 Some work on the Bochs plugins support.
- Improved macro definitions for plugin entry points.
- Forward declarations of plugin entry points are only required when plugin
  support is off.
- Improved panic message for the case when plugin entry point is not found.
2021-01-24 19:47:04 +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
8db0a2b001 Replaced the plugin init / fini functions with one single function called
plugin_entry(). The additional boolean argument "init" is used to select the
requested action. The entry points still have unique names for compatibility
with the "non-plugin" compilation. Added macros for setting up these names
(e.g. PLUGIN_ENTRY_FOR_MODULE for device plugins).
2021-01-23 12:06:11 +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
9e95491fb5 Some work on the Bochs plugin API.
- bx_load_plugin() now returns the status of the operation.
- Plugin load failures are now correctly handled by the plugin code (unloading
  if necessary, then panic).
2021-01-18 19:57:11 +00:00
Volker Ruppert
1733076e4f Fixed segfault in case Bochs app is terminated before starting simulation. 2021-01-17 17:33:49 +00:00
Volker Ruppert
81ecfcb10f Improved cross compiling support on Linux for Windows.
- In case of cross compiling of the win32 gui, use the environment variable
  WINDRES for the name of the resource compiler.
- Added example shortcut script for cross compiling on Linux for Windows.
2021-01-17 10:54:18 +00:00
Volker Ruppert
d61e3eca9b Moved image creation code for sparse, growing, vmware4 and vpc mode images from
the main bximage code to the device_image_t class / file it belongs to (enabled
in the BXIMAGE case only).
2021-01-16 12:47:02 +00:00
Volker Ruppert
59ee157575 Some work on the hdimage code for bximage support.
- Enabled self registering code for the bximage case to simplify mode detection.
- Fixed vpc image format check for mode detection case.
2021-01-10 10:18:23 +00:00
Volker Ruppert
38a04afe8e Some work on the bximage utility.
- The selected / detected disk image mode is now stored as a string constant to
  simplify code (same as Bochs core).
- Changed command line option to select operation mode to "-func=X" to avoid
  confusion with disk image mode.
- Documentation updates.
2021-01-09 16:51:52 +00:00
Volker Ruppert
afcda20b83 Some work on the hdimage mode detection code.
- In plugin mode make sure all hdimage plugins are loaded for mode detection.
- Implemented image mode detection via hdimage_locator_c.
- TODO: use the new code for bximage, too.
2021-01-08 21:17:47 +00:00
Volker Ruppert
04c767d240 Some fixes for wx "second run" support. 2021-01-08 19:46:31 +00:00
Volker Ruppert
127fd003cc Some more work on the Bochs plugins support.
- Added support for loading all plugins of one type using wildcard "*".
- Unloading no longer removes the plugin object. Now the member "loaded" is
  set to 0 and the type of a device plugin is reset.
- Added plugin_cleanup() function to remove plugin objects on Bochs exit.
- Some other related cleanups in the plugins code.
2021-01-08 19:04:41 +00:00
Volker Ruppert
3602ec1cd7 Added support for converting VDI images to another format with bximage. 2021-01-08 13:19:08 +00:00
Volker Ruppert
7c8748a661 Removed stub for the "external" disk image mode. It was designed for
implementing disk image support with an external C++ class. With the new code
it's now easier to implement support for additional disk images formats, so we
don't need the old stub anymore.
2021-01-07 20:50:34 +00:00
Volker Ruppert
30519781eb Fixed deadlock in GTK debugger gui pointed out in SF patch #557. 2021-01-06 12:18:35 +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
d48ca7e2a4 Fixed compilation with plugin support disabled. 2021-01-02 21:05:56 +00:00
Volker Ruppert
2ee6a0b0bf Regenerated configure script. 2021-01-02 20:50:37 +00:00
Volker Ruppert
4f311f0618 Some work on the Bochs plugins support.
- Added suffix "_gui" to the base name of display library plugins.
- Added new function plugins_search() that browses the plugin folder(s) and
  detects the type from the library name. Plugins with no prefix or suffix are
  treated as i/o device plugins. The plugin_load() function uses this database.
- Some related fixes and cleanups.
2021-01-02 20:49:39 +00:00
Stanislav Shwartsman
b7855153a0 new disasm: print branch target in 32-bit mode as 32-bit value 2021-01-02 16:48:13 +00:00
Stanislav Shwartsman
e15012cfcf fix code duplication in <limiting max cpuid leaf to 0x02 for winnt> feature 2021-01-02 16:28:51 +00:00
Stanislav Shwartsman
c33308731e fixed disasm of shift/rotate with implicit shift count=1 2021-01-02 15:12:29 +00:00
Stanislav Shwartsman
1a20dbc7f7 fixed bug in new disasm 2021-01-02 14:32:52 +00:00
Stanislav Shwartsman
5755328ff1 fixed compilation warnings in bxdisasm.cc 2021-01-02 14:27:11 +00:00
Stanislav Shwartsman
62511c3101 allow dbg_fetch_mem function in broader scope 2021-01-02 14:19:28 +00:00
Stanislav Shwartsman
980cfc1903 fixed compilation with no debugger configured in 2021-01-02 14:09:03 +00:00
Stanislav Shwartsman
bea432dacb fixed compilation with no debugger configured in 2021-01-02 14:04:35 +00:00
Stanislav Shwartsman
154c06b11b regen configure script 2021-01-02 13:48:17 +00:00
Stanislav Shwartsman
11fd7a369c update CHANGES 2021-01-02 13:46:55 +00:00
Stanislav Shwartsman
41ea50ba22 complete transition to new disasm, remove old disasm from source code 2021-01-02 13:43:10 +00:00
Stanislav Shwartsman
2cbf3577ce update CHANGES 2021-01-02 12:33:04 +00:00
Stanislav Shwartsman
a8e066ede7 remove debugger command for disasm constant hex print mode, was not used and new disasm doesn't support it 2021-01-02 12:12:02 +00:00
Stanislav Shwartsman
2f3adf849c enable syntax switch with new disasm also in GUI debugger, switch to new disasm by default everywhere 2021-01-02 12:04:52 +00:00
Stanislav Shwartsman
bc2e9fb177 rename old disasm methods: use GAS (GNU assembly) for AT&T syntax naming 2021-01-02 11:55:51 +00:00
Stanislav Shwartsman
22774a0534 support for AT&T (GAS) disasm style in new disassembler 2021-01-02 11:12:23 +00:00
Volker Ruppert
578d40e301 Fixed include file name. 2020-12-30 17:58:51 +00:00
Volker Ruppert
c99bd49f34 Some work on the hdimage plugin support.
- Renamed vpc-img.* files to vpc.* and removed hack for image mode name conversion.
- Added suffix "_img" to all disk image mode plugin base names. This is important
  for the future implementation of a plugin enumeration at Bochs startup.
2020-12-30 17:56:27 +00:00
Stanislav Shwartsman
c8eec65f04 fix code indentation 2020-12-30 17:23:12 +00:00
Stanislav Shwartsman
a4a2562c8d fixed compilation with no debugger enabled - will be cleaned up later 2020-12-30 16:58:17 +00:00
Stanislav Shwartsman
d2896bbd2a fixed compilation with no debugger enabled 2020-12-30 14:48:34 +00:00
Stanislav Shwartsman
bb568997c9 use new disasm wrapper method in more place 2020-12-30 14:09:25 +00:00
Stanislav Shwartsman
72db10d766 fix symbols display within disasm for new disassember, integrate new disasm with GUI debugger properly 2020-12-30 12:23:19 +00:00
Stanislav Shwartsman
79db3896d4 enable symbols for branch targets and JMP/CALL direct ptr instructions in new disassembler (still to be tested), attempt to use new disassembler in GUI debugger 2020-12-30 11:36:33 +00:00
Volker Ruppert
b880fb2975 Rewrite of the hdimage plugin code.
- Common hdimage code, lowlevel cdrom code and the classes for the Bochs "own"
  image modes (e.g. flat, sparse, growing") are now a part of the Bochs core.
- All classes for image modes present in separate files are now built as
  plugins with the same self register mechanism as network, sound and usb
  modules. Defined new plugin type PLUGTYPE_HDIMAGE.
- Temporarily disabled the base image format detection of the undoable/volatile
  modes for the "external" modes in the plugins case.
- TODO: Bochs should know about all of the available plugins and their
  capabilities right after startup, but before the configuration stage.
2020-12-27 17:26:33 +00:00
Stanislav Shwartsman
d1d65ce49f fixed disasm of adcq instruction 2020-12-26 18:36:22 +00:00
Volker Ruppert
269d4dd30d Removed unnecessary include. 2020-12-26 08:53:06 +00:00
Volker Ruppert
b0cee9a038 Added the sample config file for the 'vnet' networking module to install list. 2020-12-26 08:31:16 +00:00
Volker Ruppert
518cedb602 Some more USB device fixes.
- Removed not functional secondary interface from USB keyboard / keypad.
- Fixed mouse wheel function of the USB tablet.
2020-12-23 16:07:06 +00:00
Volker Ruppert
66dfa8fc90 Two small USB device changes.
- Changing LOG_THIS symbol fixes USB device logging.
- USB HID: removed unused variable.
2020-12-22 14:09:57 +00:00
Volker Ruppert
14baa621c5 Some USB mouse fixes.
- Now all mouse events create a mouse packet in buffer (fixes slow movement).
- Fixed a warning.
2020-12-21 11:39:33 +00:00
Volker Ruppert
a96e1779ed Added buffer for mouse / tablet button events to make sure all changes are sent
to the guest. Double click are now recognized.
2020-12-21 08:31:49 +00:00
Volker Ruppert
68dd8e6e75 Some work on the USB keyboard / keypad support
- Added USB HID idle timer.
- Don't modify status indicators by default keyboard if owned by removable one.
2020-12-20 09:07:49 +00:00
Volker Ruppert
fc39da7d55 Moved paste feature and keyboard / mouse runtime handlers to the devices code.
The paste feature now basically works with the USB keyboard.
Prepared improvements for the keyboard indicator handling.
2020-12-19 11:00:36 +00:00
Stanislav Shwartsman
47f72f5ff7 fixed disasm of symbolic labels when target print is not required 2020-12-19 06:35:02 +00:00
Volker Ruppert
c644b826f5 Some changes for the USB keyboard support.
- Added buffer for maximum 16 key events.
- PS/2 keyboard now sets the changed indicators only.
- Added support for the yellow status indicator in the win32 gui.
2020-12-16 20:04:47 +00:00
Volker Ruppert
0660b7e313 Some USB keyboard related changes.
- Added HID code for the menu key.
- Added support for the yellow status indicator in the rfb and vncsrv guis.
- Cleaned up status indicator code in SDL, SDL2 and X guis.
2020-12-16 12:24:35 +00:00
Stanislav Shwartsman
e6822c81a1 fixed behavior of MMX PSRAW/PSRAD instructions when shift count is zero - still has to invalidate x87 tags for dest register 2020-12-15 20:05:54 +00:00
Volker Ruppert
4c81e496b6 Some work on the USB keyboard / keypad emulation.
- Unified USB keyboard and keypad code. Removed the keypad lookup table.
- Moved keyboard indicator stuff to the devices code and use it for both the
  USB and legacy keyboard device. In the USB case a different color is used.
- In the SDL, SDL2 and X guis added new status indicator color yellow. It is
  designed to be used by the USB keyboard (write flag 1 and "auto_off" flag 0).
- Added missing sysmbol to the German X11 keymap table.
2020-12-15 11:29:36 +00:00
Volker Ruppert
250215b2f7 Added USB keyboard support as an extension to the numeric keypad.
TODO #1; Add some missing HID key codes.
TODO #2: Add key event queue to avoid losing events.
TODO #3: Unify keyboard and keypad code.
TODO #4: Support multiple non-modifier keys pressed at the same time.
TODO #5: Share keyboard indicators with the legacy PS/2 keyboard.
2020-12-14 16:33:20 +00:00
Volker Ruppert
2b5ef99a56 Some work on the USB keypad support.
- Added NUMLOCK to the table of supported keys.
- Temporarily added status bar item for the keypad NUMLOCK indicator.
- TODO: Add new HID device "keyboard" with all keys supported.
2020-12-13 20:35:41 +00:00
Volker Ruppert
8dc51f2cb7 Fixed PS/2 keyboard usage. 2020-12-13 16:30:42 +00:00
Volker Ruppert
520ca1459e Some keyboard related changes.
- Added new devices method register_default_keyboard() and handle keyboard
  events similar to the mouse stuff.
- Prepared removable keyboard support for the "paste bytes" feature.
- Store keyboard type in device object to avoid reading parameter at runtime.
- Related code cleanups.
- TODO #1: Extend USB keypad to full featured keyboard.
- TODO #2: Paste bytes support for USB keyboard.
2020-12-12 21:27:43 +00:00
Volker Ruppert
575ebe9cad Simplified floppy / cdrom toolbar button handlers and related cleanups. 2020-12-12 12:32:26 +00:00
Volker Ruppert
4d6a88ec94 Fixed dbg_fetch_mem() and dbg_set_mem() similar to other memory access methods.
- Always apply the A20 setting to the requested address.
- Fixed the conditions for SMRAM access.
- Added support for memory handlers and removed direct VGA memory access.
- Added support for reading from BIOS flash memory.
2020-12-08 19:52:39 +00:00
Volker Ruppert
4e23b04d15 Accessing function bx_split_option_list() via siminterface method fixes MSVC
plugins compilation.
2020-12-04 21:09:18 +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
1ae98a9f66 Unified code for mapping PCI slot to device number. By default the first slot
is mapped to device number #2, but for the i440BX chipset we are using #8
(expected by real BIOS when testing and some timer later added support for it
in Bochs BIOS).
2020-12-01 19:47:27 +00:00
Volker Ruppert
6d55094650 Fixed ROM checksum code: added missing check for the upper 64k of Bochs BIOS. 2020-11-30 18:08:29 +00:00
Volker Ruppert
87d660e652 Fixed some MSVC warnings. 2020-11-30 08:50:22 +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
11318c98f3 Improved flash memory support for the BIOS EEPROM (now emulating Intel(tm)
flash chips.
- 28F001BX-T for 128k BIOS image (two 4k parameter blocks below boot block)
- 28F002BC-T for 256k BIOS image (two 8k parameter blocks below boot block)
- Only tested updating ESCD by external BIOS images. Bochs BIOS currently
  writes configuration to shadow RAM.
2020-11-29 08:47:13 +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
d357de7baf Some work on the term gui.
- Now cursor can appear in two different modes (if supported by terminal)
- Simplified text cursor handling.
- Show a status bar if terminal has enough lines for it. Added "show IPS" output
  there unless display library option "hideIPS" is used.
2020-11-23 10:14:13 +00:00
Volker Ruppert
08b120c5f8 Some code cleanup after implementing new text update API. 2020-11-22 09:02:38 +00:00
Volker Ruppert
db02efc65f Some small changes in the floppy emulation.
- Reading data register without result present returns the last byte of the
  previous result and enters result phase just like an invalid command.
- Changed name of bit #7 of MSR to RQM (from spec) and some small cleanups.
2020-11-21 17:32:06 +00:00
Volker Ruppert
4309c7afa6 Implemented new text update API in the win32 gui. 2020-11-19 16:32:22 +00:00
Volker Ruppert
fd27f21940 Implemented new text update API in the sdl, sdl2 and wx guis. 2020-11-17 15:48:15 +00:00
Volker Ruppert
45507705bf Implemented new text update API in the X gui and some related fixes.
- The X gui behaviour should be unchanged.
- RFB / vncsrv: cursor shape fixes.
- Changed format of the font parameters to fix "double width" characters.
- Restore guest charmap after leaving gui console.
2020-11-16 15:39:35 +00:00
Volker Ruppert
b94fff0501 Implemented new text update API in the vncsrv gui and console cursor fix.
- Now the vncsrv gui supports the VGA features split screen and h/v pel panning.
- Fixed new API cursor blinking in the gui console.
2020-11-15 16:16:14 +00:00
Volker Ruppert
6202244991 Implemented a new text update API in the common gui code and enabled it for RFB.
- Now using text_update_common() for the new text update API in addition to the
  graphical text snapshot feature.
- Drawing to snapshot buffer moved to new method draw_char_common().
- A gui using the new text update API only needs to implement the new method
  draw_char(). The method set_font() is optional and it can be used to update
  font bitmaps / pixmaps.
- Modified the RFB gui to use the new API. Now the VGA features split screen
  and h/v pel panning are supported by the RFB gui. The legacy text_update()
  method is now empty but it must be present for compatiblity.
- TODO: Implement new API in some other guis to reduce code duplication.
2020-11-15 09:55:38 +00:00
Volker Ruppert
1209ec7d5a It's enough to set the refresh flag once in flush(). 2020-11-13 08:27:51 +00:00
Volker Ruppert
e6f0e7f328 Fixed another issue reported by valgrind and some tab2space changes. 2020-11-11 08:14:02 +00:00
Volker Ruppert
0c24af112d Fixed two issues found with valgrind: Since runtime parameters are revoved by
the destructor, the main parameters must be removed after deleting device object.
2020-11-08 09:58:15 +00:00
Volker Ruppert
691461df4d Some work on the flash memory emulation for the BIOS ROM EEPROM. According to
the flashrom project a JEDEC chip needs to be emulated here. Tests with BIOS
images designed for the i440FX chipset are okay, but for the i440BX chipset
some more commands need to implemented.
2020-11-07 16:31:46 +00:00
Volker Ruppert
6395c52286 Remove newly created packet if the TD PID is invalid. 2020-11-03 18:54:29 +00:00
Volker Ruppert
b91f907a1c Some BIOS ROM related changes in the memory code.
- Store BIOS ROM start address and use it instead of hardcoded BIOS_MASK.
- Added stub for BIOS ROM access switches.
- Verify checksum of legacy Bochs BIOS, too.
2020-11-01 16:13:38 +00:00
Volker Ruppert
2293308afe BIOS ROM write support requires a suitable flash memory emulation for the
selected PCI chipset. When testing Bochs with a real BIOS image the programming
sequence for the ESCD unexpectedly overwrites some BIOS locations and it fails
to reboot. For the i440BX AGP chipset development it is required to test with
a real BIOS image, but currently reporting "unknown flash type". For now I have
added two stubs with unmodified behaviour.
2020-10-30 17:34:12 +00:00
Volker Ruppert
e9fa62f44f Added BX_ERROR for the currently unsupported BIOS ROM enable switches (not used
by Bochs BIOS).
2020-10-30 16:21:23 +00:00
Volker Ruppert
bab68dbb2b Some small changes on the Voodoo Banshee emulation.
- Access to VGA registers via Banshee address space is not memory mapped.
- Added BX_ERRORs for unimplemented unaligned access to i/o registers.
- Access to the unimplemented YUV address space now causes BX_ERROR.
- Removed some TODO comments.
2020-10-26 18:22:15 +00:00
Volker Ruppert
f8024d3819 Added win32 gui feature "autoscale" for the fullscreen mode, too (including
some fullscreen fixes and cleanups).
2020-10-25 16:23:42 +00:00
Volker Ruppert
bed49deb86 Added win32 display library option "autoscale" to scale a small simulation
window by 2, 4 or 8 depending in desktop window size (window mode only).
Modified special stretching case for the CO40 text mode.
2020-10-23 13:14:34 +00:00
Volker Ruppert
f62baaa7fd Small fixes and cleanups in the text_update() code. 2020-10-20 16:20:33 +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
d708382bc0 Added gui message box support and use it to display errors that can occur in
toolbar button handlers.
2020-10-18 19:57:05 +00:00
Volker Ruppert
3c1851aa40 Added support for vertical pel panning to graphical text snapshot feature. 2020-10-18 08:08:53 +00:00
Volker Ruppert
c6bb5cf5a6 Fixes in wx for the snapshot button feature.
- Fixed deadlock after pressing the snapshot button.
- Setting up font parameters is required for the graphical text mode snapshot.
2020-10-17 21:23:20 +00:00
Volker Ruppert
41af6f9f66 Setting up font parameters is required for the graphical text mode snapshot. 2020-10-17 19:29:22 +00:00
Volker Ruppert
e010dcd4fd Fixed possible segfault in the vga core text update code. 2020-10-17 18:01:03 +00:00
Volker Ruppert
d1028178d3 Improved text mode snapshot in BMP format and text_update() API changes.
- Added support for split screen mode and horizontal pel panning.
- Text mode cursor now correctly visible independent from blink state.
- Workarounds for the existing text_update() API.
2020-10-17 15:44:52 +00:00
Volker Ruppert
163622a59a Modified text cursor handling and fixed text cursor bug in split screen mode
in some guis.
2020-10-16 21:41:02 +00:00
Volker Ruppert
dffaa9794b Added support for saving text mode snapshot in BMP format if file extension is
set accordingly.
TODO #1: Text mode features split screen and h/v pel panning missing for now.
TODO #2: Show error messages related to dialogs in message boxes.
2020-10-16 17:25:50 +00:00
Volker Ruppert
1d0efc734f Some work on the Voodoo Banshee emulation.
- New attempt to fix the host-to-screen bitblt issue with monochrome source.
  The specs are wrong at this point. The rules for calculating the real source
  pitch are still unknown. These hacks should fix most the glitches.
- Added source colorkeying support for host-to-screen blt with pattern.
2020-10-15 21:00:18 +00:00
Volker Ruppert
4650a59677 Recompiled BIOS images. 2020-10-13 08:10:05 +00:00
Volker Ruppert
d6827e20ef Forgot to update year and set LANG to default. 2020-10-13 08:05:48 +00:00
Volker Ruppert
49f8624898 Some changes in the Bochs BIOS.
- Disable i/o and memory access in PCI command register before probing and
  setting up base addresses and re-enable it when complete for selected device.
- Legacy BIOS should not enable busmaster function in PCI init.
2020-10-13 07:55:56 +00:00
Volker Ruppert
98e10e0bab Some changes in the Voodoo code.
- Banshee: Added colorkey support for host-to-screen blts without pattern.
- Clearing base address registers in reset is not okay. Maybe we have to
  unregister i/o and memory regions here. This affects other devices, too.
- Some other small changes and typo fixes.
2020-10-12 19:30:25 +00:00
Volker Ruppert
b70954d3ab Don't report BX_ERROR when writing an unsupprted to shutdown status register
in case a CMOS image is used.
2020-10-11 18:47:21 +00:00
Volker Ruppert
03404ff050 Some small changes in the PM register handling. No functional change. 2020-10-10 16:09:58 +00:00
Volker Ruppert
0b06e25d4c Voodoo2 cpu-to-screen blt: Added support for color orders other than ARGB. 2020-10-09 16:25:37 +00:00
Volker Ruppert
938c5bd26c Implmented byte / word wizzling in Voodoo2 and Banshee bitblt code. 2020-10-08 17:22:25 +00:00
Volker Ruppert
dd44d70670 Several changes in the Voodoo code.
- Voodoo2 bitblt: fixed handling of negative bltSize values.
- 3D core: limit error messages for TEXLOD_LOD_ZEROFRAC to 50.
- Banshee: fixed MSVC warning.
2020-10-07 16:06:49 +00:00
Volker Ruppert
7e7f6e03e8 Some work on the Voodoo2 cpu-to-screen bitblt code.
- Added support for "byte packed" monochrome source data.
- TODO #1: All modes except 16 bpp color source untested (based on specs).
- TODO #2: byte / word wizzling, other color orders, 24 bpp source dithering.
2020-10-06 16:54:21 +00:00
Volker Ruppert
9ed02917b2 Some work on the Voodoo2 cpu-to-screen bitblt code.
- Added support for undithered 24 bpp source data.
- Fixed "standard monochrome" mode in case of transparency.
- TODO: byte / word wizzling, other color orders, 24 bpp source dithering.
2020-10-06 15:40:35 +00:00
Volker Ruppert
32a9d7433c Implemented Voodoo2 cpu-to-screen bitblt for 16 bpp and "standard monochrome"
source data. Cleaned up the Voodoo2 bitblt sources a little bit.
2020-10-06 12:55:57 +00:00
Volker Ruppert
f9eedc4a2c Some work on the Voodoo2 bitblt functions.
- Implemented screen-to-screen blt function (untested).
- Fixed and improved "Rectangle fill" function.
- "SGRAM fill" function rewritten similar to the other functions.
- TODO: cpu-to-screen function (handle data written to bltData register).
2020-10-04 18:35:06 +00:00
Volker Ruppert
1a9e9be180 Some work on the Voodoo Banshee support.
- Implemented destination colorkey support for the remaining functions.
- Some other small changes in the Banshee code.
- TODO: Source colorkey support for host-to-screen blts.
2020-10-04 14:28:22 +00:00
Volker Ruppert
a6bc694082 Implemented Voodoo2 BitBlt command "Rectangle fill" with clipping and chroma
range support.
2020-10-03 18:10:18 +00:00
Stanislav Shwartsman
1df9bc0070 Fixed buffer overflow in LOAD_Wdq method when MXCSR.MM=1 -> thanks new gcc10 warning 2020-10-03 09:37:06 +00:00
Stanislav Shwartsman
c6050a99d1 implemented AVX encoded VNNI instructions published in recent SDM - not tested yet 2020-10-03 09:23:28 +00:00
Stanislav Shwartsman
03b02b7991 Apply patch from developers mailing by Lander Brandt (with some modifications) - speedup of WinXP boot by 7% 2020-10-03 08:29:58 +00:00
Stanislav Shwartsman
a378441254 update CPUID bits and CR bits according to recently published SDM documents by Intel 2020-10-03 07:59:47 +00:00
Volker Ruppert
8e0541fe5a Fixed some Voodoo2 regressions.
- Fixed SGRAM fill command (y start and size have one more bit - spec is wrong).
- CMDFIFO packet type #5: texture address is a 32 bit register number.
- Setting clut_dirty is required when writing to most of the fbiInit registers.
2020-10-02 22:44:37 +00:00
Volker Ruppert
90219fc8ca Some work on the Banshee 2D colorkey feature.
- Added colorkey support for screen-to-screen pattern blt, rectangle fill and
  pattern fill commands.
- Consider colorkeying enabled when branching to normal or pattern blt functions.
- Changed 2D TODO messages to BX_ERROR and some other minor changes.
2020-10-02 17:30:20 +00:00
Volker Ruppert
ec2dcd4719 Some small changes in the Voodoo code.
- Fixed switch to 3D mode (mixed mode doesn't exist).
- Added / improved error messages for unimplemented features.
2020-09-29 21:29:09 +00:00
Volker Ruppert
1ad0303ace Disable mouse capture while showing an SDL2 dialog box and some code cleanup. 2020-09-27 16:44:00 +00:00
Volker Ruppert
69db3a60a8 Some small changes in the Voodoo2 BitBlt code.
- Fixed SGRAM fill command.
- Improved BX_ERROR messages for unimplemented commands.
- Changed message for bltData register writes to BX_DEBUG for now.
- TODO: Implement Voodoo2 BitBlt commands.
2020-09-27 15:36:55 +00:00
Volker Ruppert
e8e9cd03a3 Some work on the CMDFIFO "byte disable" (Voodoo2) / "byte enable" (Banshee)
feature of packet type #5. Added some W2 cases for texture writes, modified
code for linear LFB writes and added BX_ERROR messages for the WN cases. Some
more test cases are needed for a complete implementation.
2020-09-27 08:15:48 +00:00
Volker Ruppert
8977c34db1 Implemented colorkey support for screen-to-screen blts with color source. 2020-09-26 15:59:41 +00:00
Volker Ruppert
870d4034a7 Some work on the Voodoo code.
- Real fix for the Voodoo2 DirectX issue after CLUT pens implementation.
- Banshee hardware cursor now uses the CLUT pens for the background.
- Banshee hardware cursor now uses the same 3D start address as update().
2020-09-25 17:37:46 +00:00
Volker Ruppert
06acf5e761 Some work on the Voodoo 3D code.
- Set clut_dirty flag when writing to fbiInit registers. This fixes a Voodoo2
  issue when using the DirectX driver.
- Report another unimplemented case in the texture code.
2020-09-25 12:06:14 +00:00
Volker Ruppert
f845457362 Implemented usage of the color lookup table (CLUT) for gamma correction during
video refresh in 16 bpp modes. The Banshee also uses this feature in 16 bpp
desktop mode in addition to 3D modes. The code for the pen calculation comes
from the original Voodoo patch for DOSBox. Since it was unused there, I had
disabled it when porting to Bochs.
2020-09-23 14:24:17 +00:00
Volker Ruppert
3aba63304a Added BX_INFO for unimplemented trilinear textures and small code cleanup. 2020-09-18 19:29:47 +00:00
Volker Ruppert
439152d2e4 Implementing 64 bit read access to VRAM fixes background pattern issues in XP. 2020-09-18 15:24:12 +00:00
Volker Ruppert
fa36ec0e87 Fixed i/o access map and changed some messages to BX_DEBUG. 2020-09-18 09:35:52 +00:00
Volker Ruppert
052db63202 Some work on the Voodoo Banshee emulation.
- Fixed serious issues in 16 bpp mode of XP guest (clipped y value).
- Added BX_ERROR messages for unsupported features.
- Added / updated comments.
- TODO #1: Background pattern issues in XP guest still remain in all modes.
- TODO #2: Some small issues in Win9x guests caused by monochrome host blts.
2020-09-17 20:26:52 +00:00
Volker Ruppert
9d2d3cd759 Some changes in the Voodoo code for better performance in 3D mode.
- Now using semaphores instead of events in the Voodoo 3D code.
- Handle swapbuffer command flag "swap in sync with vertical retrace".
2020-09-15 18:55:03 +00:00
Volker Ruppert
07e30e4f83 Some work on the Bochs multithreading code.
- Removed SDL specific code to reduce dependencies. SDL works okay with
  pthreads or win32 implementations.
- Prepared semaphore support for the use in the Voodoo code (thanks to Luigi B.).
2020-09-14 18:43:45 +00:00
Volker Ruppert
6f323dd9fd Some changes for the Banshee emulation.
- Polygon fill: Check if pixels are within clip window.
- Polygon fill: Added error message for unimplemented pattern ROPs.
- Some cleanups in the code for pattern ROPs with transparency.
2020-09-14 18:06:56 +00:00
Volker Ruppert
8b41cc3ff7 Fixed graphics snapshot in Banshee 3D mode. 2020-09-13 09:12:43 +00:00
Volker Ruppert
2429bb7891 Banshee: Fixed video memory offset calculation for tiled LFB space writes. 2020-09-12 12:24:46 +00:00
Volker Ruppert
dcebc1185c Setting up memory for TMU #1 fixes segfault Voodoo3 DirectX test. 2020-09-11 20:23:50 +00:00
Volker Ruppert
d7d3d27f57 Some work on the Voodoo Banshee emulation.
- Implemented 2D command "Polygon Fill".
- Changed some log messages to BX_DEBUG.
2020-09-11 07:08:47 +00:00
Volker Ruppert
42738bf8c9 Some work on the "polygon fill" code (drawing upper left vertex for now). 2020-09-09 08:12:07 +00:00
Volker Ruppert
3183103896 Some small Voodoo changes.
- Voodoo 1/2: fixed behaviour when resetting with Voodoo output on.
- Banshee / Voodoo3: locking render_mutex not necessary when writing i/o regs.
2020-09-06 16:52:18 +00:00
Volker Ruppert
bdb7954732 Some small changes for the vnet server support.
- bxhub: initialize DHCP "net" IP address.
- DHCP: increase lease time to 24 hours.
- DHCP: simplified broadcast IP address handling.
2020-09-05 08:39:25 +00:00
Volker Ruppert
b76e10a600 Added basic support for the debugger command 'info device "voodoo"'
(Banshee/Voodoo3 only).
2020-09-03 18:17:36 +00:00
Volker Ruppert
3f13ea21ca Disable the gui debugger if GTK+ is required but not found. 2020-09-03 15:19:37 +00:00
Volker Ruppert
a16a4a0886 Some improvements for the vnet config file support.
- Added options "net" for the IP address space and "ftp" for the FTP server.
- Added some sanity checks for the IP address configuration.
- Added sample config file.
2020-09-03 14:23:06 +00:00
Volker Ruppert
8bbcc7c65e Save / restore: renamed register methods of device cores (fixes warnings in
FreeBSD gcc 9.3).
2020-09-03 06:45:39 +00:00
Volker Ruppert
748b6a1279 Fixed gcc 9.3 warnings in case C++17 support is enabled. 2020-09-02 08:35:44 +00:00
Volker Ruppert
600228148d Fixed some gcc 9.3 warnings. 2020-09-01 20:13:56 +00:00
Volker Ruppert
77f377a36f Fixed compilation in the MSVC plugins case. 2020-08-30 08:34:57 +00:00
Volker Ruppert
fbc8921b0a Some changes on the "vnet" networking module.
- Added new config file options "host", "dns" and "dhcpstart" (similar to slirp).
- modified bx_vnet_pktmover_c class to be compatible with other modules.
- On TFTP RRQ check file presence directly (fixes iPXE boot).
2020-08-29 17:45:42 +00:00
Volker Ruppert
a96065314c Started implementing config file support for the 'vnet' module similar to the
'slirp' one. File name can be specified with the "script" parameter. Currently
supported parameters: bootfile, hostname and pktlog.
2020-08-25 19:04:05 +00:00
Volker Ruppert
32e4eecd8e Fixed compilation with win32 gui enabled. 2020-08-24 15:31:14 +00:00
Volker Ruppert
b558f19338 Prepared vnet server for setting up client hostname from config. 2020-08-24 11:22:37 +00:00
Volker Ruppert
0e72952798 Fixed hostname reporting in DHCP reply. 2020-08-23 10:54:16 +00:00
Volker Ruppert
9cbe03f7f2 Pressing the "m" button in gui command mode writes a marker to log file.
Removed now obsolete patch.
2020-08-21 19:12:37 +00:00
Volker Ruppert
eaf4beb474 Moving include statements of Bochs internal headers makes gui dependencies
created on Linux work correctly work on Windows. Fixed a warning on MSVC.
2020-08-21 15:18:44 +00:00
Volker Ruppert
ec9bae94c7 Some small changes for Banshee/Voodoo3 BitBlt.
- Added stub for host-to-screen stretch blt.
- Improved stub for "polygon fill" command.
2020-08-20 09:20:23 +00:00
Volker Ruppert
5e6d0b7545 Some small changes for Banshee/Voodoo3.
- Added support for host-to-screen pattern blts with color source.
- Added stub for "polygon fill".
2020-08-16 20:43:49 +00:00
Volker Ruppert
8d607c4886 Some small changes for Banshee/Voodoo3.
- Fixed start address for the gui screen update in 3D overlay mode.
- Small optimization for drawing transparent monochrome bitmaps.
- In the restore case start the fifo thread in after_restore_state().
- Report unimplemented colorkey feature (test case missing).
- TODO: issues in some Windows guests still not fixed.
2020-08-16 13:37:50 +00:00