Commit Graph

1499 Commits

Author SHA1 Message Date
Volker Ruppert
d9b3c3b91b Added simple 'ask' dialog box for the SDL2 gui on non-Windows platforms 2014-06-29 07:37:58 +00:00
Volker Ruppert
3e2acd21ac Fixes for the SDL2 gui on Windows 2014-06-28 23:49:10 +00:00
Volker Ruppert
a2ee3b4931 Some more work on the new SDL2 gui
- added keyboard mapping support (TODO: update keymap files)
- added simple application icon
- minor mouse handling fix
2014-06-28 13:25:52 +00:00
Volker Ruppert
36842943f5 Some work on the new SDL2 gui
- fixed compilation with gui debugger enabled
- added mouse wheel support
- added gui option "nokeyrepeat"
2014-06-28 08:18:26 +00:00
Volker Ruppert
a643105a9c Added initial SDL2 gui code, use --with-sdl2 to enable it.
TODO list:
- fullscreen mode, keyboard mapping, mouse wheel support
- take advantage of new SDL2 features
- Windows port not yet tested
2014-06-27 20:53:20 +00:00
Volker Ruppert
ccc66ad4d7 Cleaned up SDL gui code (no functional changes - SDL2 support will appear in
a separate file)
2014-06-27 20:26:03 +00:00
Volker Ruppert
3c0ad43092 Continued preparing Bochs for SDL2 support
- added new symbol BX_WITH_SDL2 and prepared build system
- TODO #1: add new option --with-sdl2 to configure script
- TODO #2: add new file sdl2.cc (porting seems hard to do - writing from scratch
  might be better)
2014-06-23 19:37:58 +00:00
Volker Ruppert
c188a6ba5d Started preparing Bochs for SDL2 support. Set up GUI_LINK_OPTS_SDL in the
configure script (SDL2 uses 'sdl2-config' instead of 'sdl-config').
2014-06-21 08:22:22 +00:00
Volker Ruppert
5602e1b676 Added new symbol BX_USE_WIN32CONFIG in config.h and cleaned up related code 2014-06-20 09:31:56 +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
4f2a23602b Fixed ugly side effect of the win32 fullscreen changes
- don't try to resize the simulation window if minimized (iconic)
- handle window size correction in the gui event handler and by calling
  resize_main_window(FALSE), since fullscreen mode is not always required
2014-06-05 20:12:44 +00:00
Volker Ruppert
0c833ad58f Some changes in dimension_update()
- switching to a resolution > desktop size now causes a BX_ERROR
- stretch VBE demo mode 320x200 to double size
2014-05-30 10:12:13 +00:00
Volker Ruppert
42afaef2ba Load floppy plugin after the display plugin and simplified related init gui code. 2014-05-26 17:04:02 +00:00
Volker Ruppert
acea38455b Continued work on win32 fullscreen rewrite
- fixed screen flickering after entering fullscreen for the second time
- now using resize_main_window() directly for leaving fullscreen mode
- dimension_update() now only used for guest display mode change
- TODO: more testing to find cases that can make Bochs crash
2014-05-23 19:28:23 +00:00
Volker Ruppert
a15bc4acc4 Some more work on the win32 fullscreen mode
- moved fullscreen mode enable/disable stuff to a new function
- now only use dimension_update() for leaving fullscreen mode
- fixed fullscreen issues in text mode
- TODO: check if guest display is too large and add a proper handling for this case
2014-05-22 19:06:01 +00:00
Volker Ruppert
255198baa8 Added some workarounds for the win32 fullscreen mode
- changing from window mode to fullscreen and back now looks okay
- changing guest resolution in fullscreen mode now also works
- TODO #1: rewrite of the window / fullscreen code to avoid using dimension_update()
  to toggle the internal mode
- TODO #2: add size checks in dimension_update() to avoid crash. We could panic
  at this point or compress screen to desktop size.
2014-05-20 18:42:36 +00:00
Volker Ruppert
fdbbdf254f Initial win32 fullscreen fixes
- send lost ALT keyup event after closing notification message box
- disable border of simulation window in fullscreen mode
- TODO #1: fix window sizes after leaving fullscreen mode
- TODO #2: add screen size checks to avoid crash
2014-05-18 19:13:35 +00:00
Volker Ruppert
0a6274c2af Fixed bx_shadow_bool_c method set() to make it work with initial value "1".
This fixes the floppy malfunction after restore and maybe other issues. The
buggy code failed to clear the DMA controller mask bits and the floppy DMA
requests never arrived at the CPU.
2014-05-13 21:10:31 +00:00
Volker Ruppert
6616afa7a9 Fixes and improvements log options save/restore methods
- device prefix size needed update, but now using log function name instead
- don't use overlapping strcpy() (increment pointer and one single strcpy())
- now using get_logfn_id() to simplify code
TODO: fix floppy access failure after restore
2014-05-12 17:30:05 +00:00
Volker Ruppert
ed41df332a Support for compiling plugin version of Bochs with MSVC nmake now complete.
- embedding combined manifest makes BOCHS.EXE usable
- list of DLL plugins now depends on the pci and debugger options
- 'make clean' now removes the generated manifest files
- renamed variable for external rules
- documentation update
2014-05-03 10:58:10 +00:00
Volker Ruppert
bb8444fdb1 The ask() method now returns even in the "quit" case. The calling method then
terminates the simulation with fatal().
X11 ask dialog: increase string size for device prefix.
TODO: the "format string vulnerability" in fatal() is still not fixed.
2014-05-01 14:34:32 +00:00
Volker Ruppert
900c0fddc4 Temporarily added targets for MSVC nmake plugins in network, sound and usb
sections. A better solution must be found for the basic set of device plugins
in iodev that don't require special rules.
Switched back to the original gui macro naming for linking plugins.
2014-04-27 07:46:33 +00:00
Volker Ruppert
95346323af Added MSVC nmake support for the gui plugins nogui, rfb and win32.
Updated comments about DLL plugins in makefiles
2014-04-25 16:07:26 +00:00
Volker Ruppert
eb484919fe Next step for plugin support with MSVC nmake: device plugins that need special
rules can be built now (keyboard, pit, gameport, serial, vga, svga_cirrus,
hdimage, netmod, soundmod, usb_common). The generated DLLs are usable with the
BOCHS.EXE built with the IDE, but the nmake won't work at all yet.
2014-04-21 18:43:22 +00:00
Volker Ruppert
3273a24c1e Use realtime mode for the "LED auto-off" timer if enabled 2014-04-07 17:37:07 +00:00
Volker Ruppert
994f908438 Fixed memory leaks found with valgrind 2014-04-06 19:01:38 +00:00
Volker Ruppert
2777ac0dc5 Added separate target for MSVC plugins (causing an error for now) 2014-04-06 07:22:16 +00:00
Volker Ruppert
76a03aa1f0 Networking-related fixes
- bx_param_string_c method isempty() didn't work for raw byte strings. Now using
  it to check whether or not the current value matches the initial one. The
  parameter handling of the network adapters now use this method to check if
  the MAC address is already initialized to avoid incorrect BX_ERRORs.
- small documentation update
2014-03-10 19:05:46 +00:00
Volker Ruppert
7ec9adbb2d Switch to Winsock2 library for all Windows cases 2014-02-15 12:18:15 +00:00
Volker Ruppert
cf93269380 Define WIN32_LEAN_AND_MEAN to make using Winsock2 possible (for vncsrv and slirp).
TODO: change include statements to winsock2.h and link with ws2_32.dll.
2014-02-15 00:23:36 +00:00
Stanislav Shwartsman
09414f2f4b implemented access to opmask AVX-512 registers from debugger, fixed enhdbg buffer overflow with EVEX enabled 2014-02-11 20:51:18 +00:00
Volker Ruppert
63cb7f93bf Small bugfix for Windows: set / clear menu item check mark for log viewer 2014-01-13 22:04:39 +00:00
Volker Ruppert
4c6481578d Added capability to use the gui debugger output window as a log viewer 2014-01-13 21:31:14 +00:00
Volker Ruppert
05de03bf59 Small optimization in the log viewer code 2014-01-13 18:03:40 +00:00
Volker Ruppert
71feea84ed Implemented log viewer dialog for the wx gui
- added new class LogViewDialog based on the already removed DebugLogDialog
- log output is only sent to the viewer if visible to avoid performance trouble
- text buffer is limited to 48k, older lines are removed if necessary
- red text color is used for error and panic messages and black for others
- minor related code cleanups
2014-01-12 19:27:01 +00:00
Volker Ruppert
bace4d0c6b Prepared siminterface and logio code for the implementation of a log viewer
for watching the log output at simulation time. This feature has been prepared
and described in the code (BX_ASYNC_EVT_LOG_MSG), but it was never implemented.
A viewer window could be implemented easily in wx. The gui debugger could also
have an option to view the log output while debugging.
2014-01-12 08:26:04 +00:00
Volker Ruppert
63a86148bf wxWidgets toolbar fixes
- moving ToggleMouse() call to the gui thread fixes two issue: possible deadlock
  in wxGTK after showing message box, mouse cursor not hidden in wxMSW
- don't add undefined toolbar events to the queue
- removed unused / unhandled cases from the toolbar code
2014-01-05 19:38:57 +00:00
Volker Ruppert
23a2ded526 Fixed build process without libtool and plugins 2014-01-03 21:58:04 +00:00
Volker Ruppert
8c66e91f81 Some work on wx dialogs
- disable log file options at runtime
- fixed vertical alignment of label text
- added license, tab2space and minor other changes
2014-01-03 20:46:59 +00:00
Volker Ruppert
401321d500 Added symbol BX_NULL_PREFIX and fixed textconfig log options table.
If log module name not specified, use device log prefix converted to lower
case as the name and simplified setting up some short prefixes.
2013-12-31 09:20:08 +00:00
Volker Ruppert
443f04703c Added / modified device log prefixes 2013-12-29 12:56:52 +00:00
Volker Ruppert
acc4c6c2c8 Some fixes and cleanups
- in wx we had two logfunctions for the siminterface (removed duplicate init)
- renamed siminterface prefix to "SIM"
- moved variable "pluginlog" to the plugin interface
- fixed / removed some forward declarations
2013-12-29 08:45:28 +00:00
Volker Ruppert
49c639e00d Removed obsolete stuff from the gui code 2013-12-26 20:51:46 +00:00
Volker Ruppert
bd89ed053d Some work on the wx toolbar
- disable most of the buttons if no simulation is running
- save/restore button calls restore function at configuration time
- disable code related to the config button
2013-12-26 08:37:51 +00:00
Volker Ruppert
a603fe4471 Added mouse wheel support to the rfb and vncsrv guis 2013-12-25 09:48:53 +00:00
Volker Ruppert
bb90270b8d Use WIN32 thread functions for Cygwin, too. 2013-12-24 22:43:49 +00:00
Volker Ruppert
1ce8d5de2f Several wxWidgets fixes and improvements
- send wheel data to the PS/2 mouse emulation (wx mouse wheel support works now)
- show selected mouse toggle method in toolbar help and message box
- added capability to start the simulation with the power button
2013-12-24 17:18:46 +00:00
Volker Ruppert
8f5408e653 Fixed some gcc 4.8.1 warnings 2013-12-23 11:31:32 +00:00
Stanislav Shwartsman
52c80539ef fixed uninitialzied variable which caused unpredictable behavior in some cases (randomly ignoring params during loading .bochsrc) 2013-12-22 20:47:30 +00:00
Volker Ruppert
e3862e34e5 Fixed compilation with Cygwin
- reverted changes in SVN revision 10985 (-DWIN32 now works again with Cygwin)
- don't link Bochs.exe or RFB gui with wsock32.dll in the Cygwin case
- the win32 gui doesn't need to be linked wsock32.dll at all
2013-12-22 12:17:28 +00:00
Volker Ruppert
11571f0ecf Improvements and cleanups for the textconfig runtime menu
- added menu item for saving configuration
- use existing cdrom runtime menu instead of hardcoded items
- some code cleanups after cdrom option changes
2013-12-20 17:53:00 +00:00
Volker Ruppert
58019a1649 Renamed "ltdl.h" to "ltdl-bochs.h" to avoid conflicts with the include file
that is a part of the libtool package. Updated Makefile dependencies.
TODO: check if we can get rid of the ltdl*.* files (this would be possible if
the ltdl library is always available if libtool is present).
2013-12-17 19:57:40 +00:00
Volker Ruppert
ba748560d6 Added basic scroll window support for wx ParamDialog 2013-12-10 19:34:56 +00:00
Volker Ruppert
f534e8f6f6 win32ParamDialog: added separate functions for handling child windows and buttons
floppy dialog: update controls after setting path with the browse button
2013-12-09 20:23:23 +00:00
Volker Ruppert
eebeb7a06a Replaced floppy dialog by a new implementation based on win32ParamDialog
- DONE: create image feature
- DONE: OK button forces a media change
- TODO: set status and media type after browse button
win32ParamDialog changes:
- changed base IDs for dialog child items
- set enum and bool parameters only if modified
- several changes for the floppy dialog
2013-12-08 21:22:50 +00:00
Volker Ruppert
f008f0989f Simplified floppy parameter handling
wx floppy dialog now forces a media change by clicking OK (same as win32dialog)
wxdialog.cc: one more whitespace cleanup
wxdialog.h: removed unused members
2013-12-08 11:32:13 +00:00
Volker Ruppert
a3de279d3a Floppy runtime config dialog parameter handling rewritten
TODO: use modified version of win32ParamDialog for floppy config (similar to wx)
2013-12-07 22:58:41 +00:00
Volker Ruppert
495dd21691 Added wxWidgets mouse wheel support 2013-12-03 20:08:30 +00:00
Volker Ruppert
73b2402538 Fixed some runtime config issues
- es1370: fixed wave file parameter name
- wx cdrom dialog: use the first item of the cdrom runtime parameter list
- wx ParamDialog: always pause the simulation thread while setting parameters
- wx ParamDialog: call SIM->update_runtime_options() before continuing simulation
2013-12-01 16:02:31 +00:00
Volker Ruppert
7f3552614d Some wxWidgets fixes
- Fixed ParamDialog::isGeneratediD() (browse button of last item could fail)
- Disable menu items without runtime options
- Partial whitespace cleanup
2013-11-29 16:37:50 +00:00
Volker Ruppert
0be25b75fe Fixed some runtime dialog issues
- Show disabled runtime parameters
- Don't do anything if a dependent parameter's control ID is not found
- process dependent lists only for a few control notification messages
- Added second try to find the control ID for a parameter (browse all lists)
2013-11-26 20:09:01 +00:00
Volker Ruppert
84b088c0c0 Revert a change I did only for testing 2013-11-25 21:14:26 +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
375b033117 wxWidgets keyboard / mouse fixes:
- Release mouse capture on simulation exit
- Don't handle keyboard / mouse events if the simulation is not running
2013-11-24 19:36:47 +00:00
Stanislav Shwartsman
f66a49a570 fixed some msdev warnings 2013-11-10 17:36:13 +00:00
Volker Ruppert
b9944b43b5 Some small fixes
- bochs.h:     fixed gcc 4.8 warning
- config.h.in: fixed newline
- extplugin.h: fixed VS2008Ex plugins compilation
- gui.cc:      fixed tooltip
2013-11-07 19:38:23 +00:00
Volker Ruppert
f8ea396a2c Several fixes for compiling Bochs successfully in Cygwin64 2013-11-01 18:19:52 +00:00
Volker Ruppert
7f19435887 Fixed some gcc 4.8.1 warnings 2013-10-27 15:13:19 +00:00
Stanislav Shwartsman
b6c39a3176 merge AVX and SSE .bochsrc options to single SIMD option which will configure SSE and AVX together 2013-09-16 19:50:36 +00:00
Stanislav Shwartsman
40f02e0bfb fixed msdev warnings, update msdev workspaces - add vapic.cc and cpudb new defs 2013-06-26 19:03:00 +00:00
Volker Ruppert
3193de9516 Minor fixes in rfbSetPixelFormat message handling
- fixed error message for unsuported pixel format
- removed useless assignments
2013-06-09 17:16:16 +00:00
Volker Ruppert
38e292a261 Make shared data access thread-safe
- use LibVNCServer macros for pthread mutex support in the keyboard / mouse code
- workaround for WIN32: use critical section stuff instead (not yet present in
  LibVNCServer)
2013-06-08 06:47:52 +00:00
Volker Ruppert
9cb610464d Several RFB changes
- don't quit simulation on client disconnect (reverted to original behavior)
- don't wait for client connection on startup if timeout is set to 0
- RFB color handling rewritten to fix headerbar and statusbar colors in 8 bpp
  graphics modes (they no longer depend on VGA palette)
- set maximum resolution to 1280x1024 (same as vncsrv)
- minor other changes
2013-06-05 20:25:44 +00:00
Volker Ruppert
e824499639 Removed recently added "noclient" code to let vncsrv always work this way
TODO: Fix RFB gui to make work the same again
2013-06-04 19:10:40 +00:00
Volker Ruppert
e06b44c866 minor fixes in dimension_update(): snapshot.bmp now correctly saved on server 2013-06-03 21:27:22 +00:00
Volker Ruppert
e276742d56 vncsrv "noclient" mode and some vncsrv / rfb fixes and cleanups
- vncsrv: noclient mode: simulation run even without client connected
- vncsrv / rfb: parse specific options before starting server thread
- vncsrv / rfb: panic on invalid timeout value
- vncsrv: don't wait for client connection if timeout value is 0
- vncsrv / rfb: removed unnecessary newlines
2013-06-02 20:56:46 +00:00
Volker Ruppert
536887aee2 vncsrv gui code cleanup with small addition
- quit simulation if the client has disconnected
- changed the order of methods and function in the file
2013-06-02 14:32:45 +00:00
Volker Ruppert
9325db1b55 RFB code cleanup and small additions
- quit simulation if the client has disconnected
- moved update region checks to new function rfbAddUpdateRegion
- changed the order of methods and function in the file
2013-06-02 09:21:11 +00:00
Volker Ruppert
21feca3767 Some work on the new 'vncsrv' gui
- use the CXXFLAGS and link options provided by the libvncserver-config script
- added Windows support for MinGW/MSYS (compiles fine, but crashes sometimes)
2013-05-31 16:46:15 +00:00
Volker Ruppert
17b7b87a61 Added new experimental gui 'vncsrv" using the LibVNCServer library. It supports
higher resolutions and > 8 bpp graphics modes. The RFB gui with limited
capabilities is still available.
TODO:
- fix random segfaults in dimension_update()
- Windows (MinGW) support
- fixes for clients not supporting 'rfbEncodingNewFBSize'
- fix cursor shape after dimension update()
2013-05-30 17:18:30 +00:00
Volker Ruppert
dc1dd06794 Prepare the RFB sources for the implementation of a new gui based on the
LibVNVServer library. The include files will be used for both guis.
2013-05-30 09:31:21 +00:00
Volker Ruppert
b04df59367 RFB code cleanup (no functional changes)
Updated version strings after release
TODO: implement new RFB(VNC) gui using LibVNCServer
2013-05-29 17:35:19 +00:00
Volker Ruppert
180d8a295e initialize scroll position in WM_CREATE
reduce virtual window height
2013-03-19 19:26:04 +00:00
Volker Ruppert
900ac609c7 fixed disabling of dialog items in a scroll window
added mouse wheel support to the scroll window
minor cleanups
TODO: update workspace files, scroll window support for wx
2013-03-19 17:44:19 +00:00
Stanislav Shwartsman
2bb620844f added scrollwin.cc into Makefile 2013-03-18 20:40:21 +00:00
Volker Ruppert
a4a275848f initial implementation of scrollable dialog items on WIN32
- scroll window has 16 visible items and the virtual size is not limited
- CPUID parameter list now using this feature
- FIXME #1: scroll window is not resized if browse button column is present
- FIXME #2: only one scroll window per dialog is supported
2013-03-18 19:08:26 +00:00
Volker Ruppert
0dfd73dd15 added bx_list_c flag USE_SCROLL_WINDOW for scrollable dialog items (needed by CPUID)
TODO: implement this feature in the win32 and wx dialog code
2013-03-17 17:16:45 +00:00
Volker Ruppert
b0d8d898c0 wx second run fix: fixed width of list views 2013-02-24 12:12:11 +00:00
Volker Ruppert
745b1bef84 wx second run fix: clear LOGFONT structure before losing it
fixed some warnings
2013-02-23 20:27:07 +00:00
Volker Ruppert
ab57c1fb2f found a better solution to fix the power_handler() deadlock
fixed bx_dbg_exit() handling for shutting down second simulation correctly
2013-02-20 18:51:39 +00:00
Volker Ruppert
209b8c9ff8 fixed deadlock in second simulation after exiting the first one with the power button 2013-02-19 19:12:44 +00:00
Volker Ruppert
9c3d374e6a continued work for "wx second run" support
- memory: initialize ISA and PCI ROM variables in init_memory()
- sb16: remove items from runtime menu in destructor
- gui debugger: show dialog contents (TODO: fix remaining display issues)
- TODO: fix deadlock in bx_wx_gui::handle_events()
2013-02-18 20:52:19 +00:00
Volker Ruppert
910774513b some work for "wx second run" support (not yet complete)
- bx_list_c: added support for removing parameter with other parent list
- USB HC's: remove item from runtime config on simulation exit
- initialize bx_user_quit in bx_begin_simulation()
- only remove optional plugin from list if alrady unloaded
2013-02-17 08:27:43 +00:00
Volker Ruppert
058c0e05fb - removed wx debugger dialogs (enhanced gui debugger now almost stable with wx) 2013-02-16 12:22:13 +00:00
Volker Ruppert
a6bce2031c two important fixes for the gui debugger in wx (GTK)
- fixed closing the debugger window from wx (power button / ask dialog)
- OnKillSim(): bx_user_quit must be set to 1 to exit the debugger wait loop
2013-02-15 22:22:51 +00:00
Volker Ruppert
638a1a2157 fixed stepN command in SMP mode 2013-02-15 20:06:09 +00:00
Volker Ruppert
e44176f597 run stepN command in the simulation thread to avoid deadlock in wxBochs
GTK init is not required in the wxGTK case
removed unnecessary include
2013-02-15 15:47:16 +00:00
Volker Ruppert
5416e462e9 moved debugger notify callback functions to enh_dbg.cc 2013-02-14 21:06:20 +00:00
Volker Ruppert
98598e4da9 some fixes for the GTK debugger window for the wx case (to be continued)
- run GTK main loop only if wx (wxGTK) is not active
- don't try to destroy debugger window twice
2013-02-14 08:36:52 +00:00
Volker Ruppert
3109ad3d87 minor fixes for the gui debugger with wx on Windows 2013-02-13 11:13:28 +00:00