Commit Graph

177 Commits

Author SHA1 Message Date
Volker Ruppert
5ebe6b46d0 Removed useless BX_DEBUG messages in devices init 2022-08-29 18:14:59 +02: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
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
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
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
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
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
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
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
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
1ffac6a461 Moved method release_keys() to the common devices code to make sure this
feature also affects the removable (USB) keyboard.
2017-04-22 15:32:07 +00:00
Volker Ruppert
e023b5896f Partial rewrite of the optional keyboard handling. Now the BX_KEY_* events are
directly sent to the optional keyboard (USB keypad). It is now independent
from the legacy keyboard and the check for supported keys is simplified. The
legacy keyboard still receives the unhandled key event, but now sent from the
common devices code.
2017-03-31 21:32:58 +00:00
Volker Ruppert
c897ffa619 Cleanups in the Bochs system timer code
- Now using macro DEV_register_timer() in all devices and lowlevel modules.
- Removed unused timer stuff from the plugin.cc/.h code.
2017-03-30 18:08:15 +00:00
Volker Ruppert
458f747b48 Removed unused argc and argv parameters from plugin init functions. 2017-01-28 09:52:09 +00:00
Volker Ruppert
eed2bb15b8 Simplified register_state() for for small byte arrays in remaining i/o devices. 2015-10-06 18:20:16 +00:00
Volker Ruppert
65d2bb11eb Release all pressed keys when the Bochs window gets back the keyboard focus.
- feature implemented in the wxWidgets gui
- feature not required for legacy SDL (releases keys on focus change)
- removed duplicate code in keyboard.cc
- TODO: implement feature in the win32 gui if required
2014-12-27 09:43:05 +00:00
Volker Ruppert
227da0c6de Release all pressed keys when the simulation window gets back the keyboard
focus. This change will fix some keyboard-related bug reports (DONE for the
x and sdl2 guis / TODO for all others).
2014-12-26 20:25:27 +00:00
Volker Ruppert
773ac518b3 Fixed broken MSVC plugins support (many CDECL additions required)
TODO: check for remaining CDECL issues (hdimage mode 'dll') and update project files
2014-06-08 08:40:08 +00:00
Volker Ruppert
98545762b6 Keyboard code cleanup
- BX_CPU_LEVEL < 3 doesn't exist in Bochs
- verbose debug output removed
- tab2space and minor coding style changes
2013-12-28 12:00:19 +00:00
Volker Ruppert
f3a6fbd235 Simplified setup of special runtime menus / dialogs
- If the runtime flag of a bx_list_c object is set, all it's items are set up
  as runtime options.
- Set the runtime parameter for all top-level runtime-only lists. Setting up
  each single parameter is no longer needed.
2013-11-25 21:07:39 +00:00
Volker Ruppert
c8012c3f1d cleaned up devices timer handler / fixed keyboard paste counter 2012-10-30 17:25:33 +00:00
Volker Ruppert
a2dd985aef - remove registered device state in destructor (fixes crash on Bochs exit with
MSVC plugins)
2012-08-19 08:16:20 +00:00
Volker Ruppert
4538078abb - several fixes for "2nd run" support in wx (still incomplete)
- uninstall parameter handlers (floppy, keyboard)
  - unload plugin that cannot be removed automatically
- wx: removed "show keyboard" demo and some other cleanups
- TODO: remove wx debugger and make wx work with the enhanced gui debugger
2012-08-14 19:33:24 +00:00
Volker Ruppert
9189105a0b - prepared support for sending absolute x/y values from the gui to the mouse emulation
- new gui method set_mouse_mode_absxy() should switch the gui to absolute
    x/y mode
  - new DEV_mouse_motion() argument 'absxy' indicates whether or not the gui
    sends absolute x/y values
  - USB tablet code prepared to use the new feature
  - TODO: implement this feature for each gui (sdl, win32, wx, x, ...)
2012-06-21 17:33:37 +00:00
Volker Ruppert
de94b08a1a - class bx_list_c now contains a chained list of parameters. Removed the now
obsolete maxsize parameter from all lists.
2012-02-12 18:43:20 +00:00
Volker Ruppert
47f2137edf - set device state structure to 0 with memset() for some devices
- cleaned up vga core init code after adding memset()
- floppy: removed structures that had been used for win95 direct access
2012-02-05 10:08:56 +00:00
Volker Ruppert
b130bf671b - initial "log action by device" implementation added (TODO: check for
invalid module names, save log actions to bochsrc)
- added new member 'name' to the logfunctions class for the case the prefix
  is too short. Added to some devices with longer names.
2011-12-29 19:51:54 +00:00
Stanislav Shwartsman
39ccbf5a77 cleanup and style changes, fixed gcc4.6 warning 2011-05-10 20:04:20 +00:00
Stanislav Shwartsman
00981cd7a6 Adding Id and Rev property to all files 2011-02-24 22:05:47 +00:00
Volker Ruppert
adb8359bb0 - moved mouse parameter handling to the keyboard parameter handler 2011-01-20 16:54:42 +00:00
Stanislav Shwartsman
153d43520d change copyright to bochs project 2009-12-04 19:50:29 +00:00
Volker Ruppert
a1e65bae3a - bx_dbg cleanup in the keyboard and harddrv code
- several other debug message cleanups
2009-04-25 08:06:32 +00:00
Volker Ruppert
7a1236636a - improved mouse register mechanism for the default mouse selected with the
mouse type option and updated mouse devices to use it
- removed some stubs and stub functions from the devices code
2009-03-03 20:34: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
9e3dd83e85 - reduce some more dependencies and related Makefile.in updates 2009-02-23 11:06:53 +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
0b782cd749 - prepared USB OHCI support in build system and common devices code (OHCI patch
by Ben Lunt will be tested and merged soon)
- renamed specific pciusb stuff to 'usb_uhci' (files, objects)
- minor USB-related changes
- TODO: changes in siminterface and bochsrc options
2009-01-19 09:48:12 +00:00
Volker Ruppert
34d767f938 - moved mouse buffer size definition to iodev.h
- reduce dependencies (TODO: update Makefile.in)
- removed unused defines from iodev.h
- updated FSF address
2009-01-16 11:53:38 +00:00
Volker Ruppert
0ec93b8586 - moved common mouse handling code to devices.cc
- moved mouse capture control code back to config.cc
- related changes in the USB keyboard and mouse interface
2009-01-13 19:01:19 +00:00
Volker Ruppert
501952efdd - removed unused logfunctions member 'type' and related method 'settype()'
- updated FSF address in copyright
2009-01-10 11:30:20 +00:00
Stanislav Shwartsman
dd0b8eceb2 Fixed some compilation issues with
Microsoft 32-Bit C/C++ Optimizing Compiler 9.00
2008-09-18 17:18:36 +00:00
Volker Ruppert
a68542f91c - added keyboard controller commands 0xCA and 0xCB 2008-09-12 14:40:41 +00:00
Stanislav Shwartsman
a459a64f3e whispace, tab2space, indent, dos2unix and other cleanups 2008-02-15 22:05:43 +00:00
Stanislav Shwartsman
ae35b0276e white space cleanups and coding style changes 2008-01-26 22:24:03 +00:00
Stanislav Shwartsman
071c5c1a26 A lot of changes but everything is really trivial.
Make save/restore default feature, the configure option for save/restore removed from configure script and save/restore made available forever. All code now assume it is exists. Bochs save/restore tree previosly called "save_restore" renamed to "bochs" tree and it will be havily used everywhere, starting from save/restore and ending by various bochs debugger functions. I am going to rework debugger code to get rid of debug CPU access functions and use this "bochs" param tree instead
2007-09-28 19:52:08 +00:00
Stanislav Shwartsman
9d907b5f65 Try to specify everywhere the list size in bx_list_c constructor 2007-04-03 22:38:49 +00:00
Volker Ruppert
69e0110c7b - USB HID mouse support ported from Qemu to separate file and C++ object
* removed old-style mouse stuff
  * TODO: implement USB tablet from Qemu and re-implement Bochs USB keypad
- clear out USB hub structures in constructor to avoid segfault
- keyboard: mouse capture flag must affect all mouse types
2007-03-21 18:54:41 +00:00