Commit Graph

987 Commits

Author SHA1 Message Date
Volker Ruppert
3663992ffd - fixed possible segfault when pressing the power button with debugger enabled
- the textconfig 'quit' option must call bx_dbg_exit() if debugger is present
2006-10-02 17:07:36 +00:00
Stanislav Shwartsman
925ae93e22 Reveer back changes for debug.h removal from bochs.h 2006-09-26 19:16:10 +00:00
Stanislav Shwartsman
aab3feb2e0 Fixed Makefile to compile with ACPI stub disabled
Remove bx_debug.h from bochs.h to reduce compilation dependencies
2006-09-25 20:13:52 +00:00
Volker Ruppert
48ed7e1ba6 - fixes for second simulation support with wxBochs
* wxBochsStopSim flag is now reset before starting the SimThread
  * the siminterface 'init_done' flag now controls the execution of the hardware
    cleanup in bx_atexit()
2006-09-23 09:07:15 +00:00
Volker Ruppert
e315eb0fa6 - realloc wxScreen if already used (for 2nd simulation support) 2006-09-21 21:07:17 +00:00
Volker Ruppert
fad22265b5 - bx_list_c: after deleting the list entries, the list must be deleted, too 2006-09-18 21:24:27 +00:00
Volker Ruppert
f7d668289d - bx_list_c: fixed deleting of the parameter list 2006-09-18 20:31:37 +00:00
Volker Ruppert
f688701592 - cleanup() method added to reset the number of status items (cannot be done in
init() since the floppy indicators are register prior to gui init
- create framebuffer only if it doesn't exist
2006-09-17 20:37:28 +00:00
Volker Ruppert
ec9c361e9c - fixed handling of parameter "debug_running" for restart support
- wx: delete of "debugCommand" fixed
2006-09-17 07:12:50 +00:00
Volker Ruppert
4cf2f745d1 - some fixes to avoid segfaults after early panics
- fixed gameport log type
- wx: store mouse capture mode in the gui code (only access the mouse parameter
  when the capture mode changes)
- wx: don't initialize wxScreen if already done and clear screen on exit
2006-09-12 13:05:07 +00:00
Volker Ruppert
c07197758b - plugin unload mechanism implemented in the plugin and devices code
- added exit() method to the devmodel object for devices that need to do special
  cleanups on exit. Device plugins should call this method from their plugin_fini()
  function. If Bochs is compiled without plugin support, for non-core plugins
  the exit() method is called directly from bx_unload_plugins().
- exit() method implemented in the keyboard device
- wx "Show Keyboard" feature now only appear when the wxdebug keyboard subtree
  is not empty
- cpu cleanup must be done before the devices cleanup
- moved PCI chipset dump call to the devices exit method
2006-09-10 09:13:47 +00:00
Volker Ruppert
e075c68f78 - close logfile and reset logging to stderr at the end of the simulation
- removed unused code
2006-09-09 11:28:52 +00:00
Volker Ruppert
c1a073bc2d - yes/no dialog: set default button to "no" if requested (value == 0) 2006-09-09 08:05:07 +00:00
Volker Ruppert
5dd0d64b11 - several changes for restart support in wx (not yet complete)
* don't initialize cpu specific parameters for the wx debugger if they already
    exist
  * separate siminterface method init_save_restore() added
  * old wx specific handling in quit_sim() removed
  * new bx_list_c method clear() deletes all parameters from the list
  * moved devices cleanup code from the pc_system to a new devices method exit()
  * pc_system init code now sets ticksTotal to 0
2006-09-07 18:50:51 +00:00
Volker Ruppert
3dfc9b4d5a - fixed end of thread in debugger mode (always dump cpu state to log file)
- hide debug console before showing "Bochs stopped" message box
2006-09-04 18:36:47 +00:00
Volker Ruppert
10235cb1ba - fixed floppy device presence detection for menu items and toolbar buttons
- disable floppy and cdrom toolbar buttons at runtime if the selected device is
  not present
2006-09-03 16:55:35 +00:00
Volker Ruppert
8c82b3f937 - status change must be handled different if the simulation is stopped with the
menu item instead of the power button. TODO: The wxGTK port still hangs after
  pressing the power button before displaying the "Bochs stopped" message box
- wxMSW: don't wait for the enter key on the console window if the user quits
  Bochs by the menu item
- fixed 'ask' dialog text
2006-09-03 11:06:54 +00:00
Volker Ruppert
5afe0efe08 - wxMutexGuiEnter() / wxMutexGuiLeave() calls are required at status bar updates
(fixes gui display problems in the wxGTK port)
- fixed floppy dialog title and label
2006-09-03 05:52:53 +00:00
Volker Ruppert
c4785b7709 - Bochs with 'term' gui now quits when the terminal is closed (SIGHUP) 2006-08-30 18:16:36 +00:00
Volker Ruppert
4b744658fe - added missing bx_atexit() call before quit_sim() (runtime option "quit" now
has the same behaviour as the power button)
2006-08-30 17:49:12 +00:00
Volker Ruppert
c9b4d06ff4 - fixed and improved save state dialog handling
* generic save state dialog code moved to the save_restore_handler() in gui.cc
  * the suspend button in the wxWidgets port now works and uses the new code
  * old wxWidgets save state code removed (not thread-safe)
- wxWidgets HandleAskParamString() method fixed for wxGTK (now using a temporary
  string array instead of a pointer)
2006-08-29 20:10:27 +00:00
Volker Ruppert
25f6299550 - fixed save/restore XPM bitmap (wxMSW is now able to load it) 2006-08-28 19:05:38 +00:00
Volker Ruppert
0d6c1b8363 - fixed Carbon notify callback function (don't handle the ask event twice) 2006-08-08 17:10:30 +00:00
Volker Ruppert
f3046ae0cd - moved OSX beep implementation to the carbon gui code
- improved carbon notify callback similar to the x11 implementation
2006-08-03 16:01:23 +00:00
Volker Ruppert
a687f0de4f - added help support for the parameter prompt (entering '?' prints parameter
description if defined)
- fixed error message for illegal hex parameter values
- removed unnecessary spaces
2006-07-29 09:58:24 +00:00
Volker Ruppert
c695084794 - improved the workaround of the "AltGr" key on European keyboards (TODO: find
a way to detect whether this key exists or not and skip this code if not)
2006-07-23 11:09:15 +00:00
Stanislav Shwartsman
275ea4f7c9 - Allow to control SMP quantum value through .bochsrc CPU
option parameter. Previous Bochs version used hardcoded quantum=5
    value.
2006-06-21 20:42:26 +00:00
Stanislav Shwartsman
b794e6b54a Indent changes 2006-06-20 17:17:46 +00:00
Volker Ruppert
cf6ec36040 - updated dependencies 2006-06-17 18:10:10 +00:00
Volker Ruppert
43838a54fa - file descriptor check fixed 2006-06-16 09:10:26 +00:00
Volker Ruppert
c562a1243e - fixed broken save/restore function for binary data 2006-06-11 18:03:11 +00:00
Stanislav Shwartsman
869f74b3ee Reduce amount of dbg_get_cpu calls (I would like to remove this function) and use save/restore power in debugger 2006-06-11 16:40:37 +00:00
Volker Ruppert
a695c1739c - fixed compilation error 2006-06-09 12:01:13 +00:00
Volker Ruppert
1be86095ab - new function win32SaveState now called after pressing the "suspend" button
- save state handling removed from runtime dialog
- textconfig save state prompt improved
- textconfig: save state item removed from runtime menu
2006-06-08 17:02:52 +00:00
Volker Ruppert
21b1f8ce58 - prepared save state feature using the suspend button and textconfig code
rewritten to handle the new toolbar event (TODO: win32 and wx)
- suspend button: CR/LF to LF conversion
2006-06-07 19:40:15 +00:00
Stanislav Shwartsman
a71543ced4 Added new (currently not connected) button for save/restore feature.
Pressing the button currently prints to the log diagnostic message.
Vaolker, could you make it call save/restore dialog and remove the button inside config dialog ?
2006-06-06 22:11:09 +00:00
Stanislav Shwartsman
453ffd1e17 Fix more ugly strdup calls 2006-06-05 19:06:36 +00:00
Stanislav Shwartsman
b66d5385f7 Added missed 'delete' for ask_format field in destructor 2006-06-05 16:47:55 +00:00
Volker Ruppert
6730922952 - geometry autodetection for 'concat' mode hard disk images added
- removed all references to the old 'split-hd' feature (now: 'concat' mode)
- updated documentation for 'concat' images
2006-06-04 21:49:17 +00:00
Volker Ruppert
a4a2bdf333 - OnStateSave() updated to make it work like similar functions in win32dialog
and textconfig (TODO: simulation thread must be stopped after executing a
  cpu instruction)
2006-06-04 14:16:31 +00:00
Volker Ruppert
a6b03f67fb - bx_param_c: handle the member 'ask_format' the same way as 'label' and 'description'
- ask_yes_no(): build the 'ask_format' string from 'label' and 'description'
  (for the textconfig prompt only)
2006-06-04 07:55:34 +00:00
Volker Ruppert
e55ec3e8e3 - yes/no dialog implemented in wx 2006-06-01 19:35:46 +00:00
Volker Ruppert
005ca56f04 - prepared yes/no dialog in the siminterface and added message box for win32
- test case for ask_yes_no(): confirm power off
- textconfig: set the event return code when asking for a parameter
2006-05-31 20:12:43 +00:00
Volker Ruppert
36d4ee68e4 - save state handling rewritten similar to the win32dialog behaviour 2006-05-30 18:01:51 +00:00
Volker Ruppert
013901f9f1 - wxdialog compilation fixed 2006-05-30 17:41:43 +00:00
Stanislav Shwartsman
4b7e7087aa Handle more fields memory management insie the bx_param_c.
Remove more strdups
2006-05-30 17:01:27 +00:00
Volker Ruppert
a57d0a6aa9 - save_sr_param(): fixed 64-bit decimal output
- wx compilation fixes
2006-05-30 16:05:51 +00:00
Stanislav Shwartsman
fee48d74e0 Avoid doing strdup for param name field - most of the strdups elliminated ! 2006-05-29 22:33:38 +00:00
Stanislav Shwartsman
cabc1d0181 Fixed minor bugs. Support for 64-bit save/restore values. 2006-05-29 19:57:12 +00:00
Volker Ruppert
0c4069d2f7 - folder selection dialog starts up with current directory selected
- continuing simulation after saving state now possible again (a message box
  warns the user and asks what to do)
2006-05-29 18:52:46 +00:00
Stanislav Shwartsman
bd22a4e39a Revert format change for now (I won't work for me).
The problem that original '%x' also won't work ;(
Need to find solution to print Bit64u !
2006-05-28 17:22:35 +00:00
Volker Ruppert
6ca6b46203 - failure handling for save/restore added 2006-05-28 16:39:25 +00:00
Volker Ruppert
2b72920cb6 - updated save/restore stuff in the win32 runtime dialog 2006-05-28 08:49:20 +00:00
Stanislav Shwartsman
938d9c1cbb Change format for 64-bit param print 2006-05-27 21:37:36 +00:00
Stanislav Shwartsman
8b0df8e99b Merge SAVE_RESTORE branch to CVS 2006-05-27 15:54:49 +00:00
Stanislav Shwartsman
7c1767d17a Partial sync with save-restore 2006-05-27 14:02:34 +00:00
Stanislav Shwartsman
6a22aa2328 Partially sync from save/restore branch 2006-05-22 21:29:54 +00:00
Volker Ruppert
837d104770 - unicode fixes in the wx debugger 2006-05-22 16:35:03 +00:00
Volker Ruppert
6a299e61a7 - get rid of the unused description field of shadow bool and data parameters
(new/modified constructor)
- new constructor for bx_list_c objects without title
- shadow parameter bitmasks fixed
- functions bx_sr_before_save_state() and bx_sr_after_restore_state() prepared
- ne2k.cc: reset behaviour fixes
- sb16: some variable types changed
2006-05-14 15:47:37 +00:00
Volker Ruppert
8f16594a42 - unicode fix for the BX_SHOW_IPS feature 2006-05-07 09:49:16 +00:00
Volker Ruppert
9340f3b3f8 - partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
* changed data format of text files for save/restore (looks like C/C++ structures,
    similar to the format used in old save/restore branches)
  * don't set the initial value of shadow bool parameters
  * don't set the initial value of bool parameters twice
  * cpu/init.cc: missing #undef added
  * ne2k.cc: variable tx_timer_active was never set to 1 (type now bx_bool)
  * floppy.cc: missing initialization of the 'eot' array in reset() added
  * pic.h: type of member 'byte_expected' changed to Bit8u
  * pit_wrap.h: unused members removed
2006-05-01 18:24:47 +00:00
Volker Ruppert
52c4666465 - partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
* fixed minimum limit of signed variable types
  * don't set the initial value of shadow parameters
  * fixed range check for shadow parameters
  * added support for setting the value base (decimal/hex) of numeric shadow parameters.
    The text format hex number is now initialized in the constructor
  * added missing newline after filename for binary data
  * fixed data size of 64-bit shadow parameters
  * fixed save/restore output format of numeric parameters (signed/unsigned/64-bit)
  * cpu/init.cc: fixed macro name and added missing #undef line
2006-04-22 18:14:55 +00:00
Volker Ruppert
eb2104d0de - parameters for the wx debugger moved to a separate subtree to avoid conflicts
with the proposed save/restore feature
- fixed a warning in the cpu parameter handler for the wx debugger
2006-04-16 10:12:32 +00:00
Volker Ruppert
36498746c1 - some more work for the save/restore feature in the plugins and devices code
* register_state() will be called after init() and registers the device members
    required for save/restore
  * before_save_state() can do some work before the device state is saved by the
    siminterface
  * after_restore_state() can do some work after the device state has been
    restored (updating dependant stuff)
2006-04-15 17:03:59 +00:00
Volker Ruppert
14107f56fa - some more work for the save/restore feature in the siminterface
* new parameter object type bx_shadow_data_c for binary arrays (e.g. system
    and video memory, CMOS RAM, PCI config space)
  * save_state() completed and restore_hardware() implemented
  * get_sr_root() returns the list with the save/restore subtree
2006-04-15 14:05:18 +00:00
Volker Ruppert
a8bfc2d2bf - fixed memory leaks 2006-04-14 13:27:17 +00:00
Volker Ruppert
86a0aada3b - save support for user-defined options added 2006-04-14 08:07:24 +00:00
Volker Ruppert
bbef36f5c1 - save/restore functions now available in wx
- config file read/save functions fixed
2006-04-12 20:51:24 +00:00
Stanislav Shwartsman
df70fa0a2f Indent changes 2006-04-10 19:02:30 +00:00
Volker Ruppert
0396a9d86f - save state function now supported on win32 in the runtime dialog
- for the BrowseDir() function Bochs for win32 needs to be linked with SHELL32.DLL
  (currently used for the save/restore support only)
- save/restore support symbol name changed
2006-04-09 13:55:55 +00:00
Volker Ruppert
841c802e6b - save/restore of log options implemented (using bochsrc style)
- log options must be restored after initializing all devices
- menu items and descriptions for save/restore updated
- TODO: implement access to save/restore functions for win32 and wx
2006-04-09 09:05:30 +00:00
Volker Ruppert
c7c1d25175 - execute save/restore only if the path is != 'none'
- save/restore menu items and description now shows the current capabilities
- type of default value for ask_string() changed to 'const char'
2006-04-08 16:25:52 +00:00
Volker Ruppert
97520ff814 - save/restore of the configuration implemented (in bochsrc format)
- don't load another config file if the restore flag is set
- disabled restore_hardware() for now (will be enabled when save/restore is
  complete and stable)
2006-04-07 12:49:50 +00:00
Volker Ruppert
74c8c05d22 - prepared save/restore feature
- some siminterface types changed
2006-04-06 20:42:51 +00:00
Volker Ruppert
ba597401a2 - user-defined config option support implemented 2006-04-05 16:05:11 +00:00
Volker Ruppert
6ce71008f6 - fixed submenu (child list) handling in do_menu()
- base parameter for do_menu() is now obsolete
2006-03-29 20:31:51 +00:00
Volker Ruppert
8d178b107b - prepared user-defined config option support 2006-03-29 19:27:31 +00:00
Volker Ruppert
6cbdf98b38 - header of log options table is now always visible
- removed unnecessary spaces after function names
2006-03-26 15:52:31 +00:00
Volker Ruppert
6048821249 - fixed a warning and some remaining unicode issues
- removed unnecessary spaces after function names
2006-03-19 15:35:20 +00:00
Volker Ruppert
2439c65acf - wxWidgets unicode fixes completed 2006-03-19 09:24:10 +00:00
Volker Ruppert
6106f1c905 - some more fixes for unicode support (wxT("string") conversion) 2006-03-18 16:30:52 +00:00
Volker Ruppert
d456b8ceb4 - fixes for unicode support in wx.cc (grabbed from FC5 patch for Bochs) 2006-03-14 18:13:08 +00:00
Volker Ruppert
2e144d5862 - changed some function argument and return types from char * to const char *
(grabbed from patch included in FC5 Bochs package for wxWidgets 2.6.x)
2006-03-13 18:55:53 +00:00
Volker Ruppert
9a1c64721e - fixed parameter check before calling the "Show CPU" dialog
- wxBochs needs to be linked with the wxWidgets core and base libraries
2006-03-12 15:11:54 +00:00
Volker Ruppert
4e4df52109 - added new function bx_stop_simulation() to stop the Bochs simulation thread
(used by wx). Now the siminterface no longer depends on cpu.h
2006-03-11 22:40:32 +00:00
Volker Ruppert
568b41c659 - re-implemented LogOptionsDialog based on ParamDialog 2006-03-11 10:00:56 +00:00
Volker Ruppert
9699eaeca4 - added SMP support in save/restore parameter subtree
- TODO: implement tab window control for SMP CPUs in wx "show cpu" dialog
2006-03-09 20:16:17 +00:00
Volker Ruppert
5597fc9cf3 - fixed wx "Show CPU" dialog to make it work with the new parameter handling
- fixed CPU register names
- removed old parameter handling (bx_id, BXP_* symbols, param_registry, etc.)
2006-03-08 18:10:41 +00:00
Volker Ruppert
575a17e50f - converted cpu state parameters to param-tree style
- removed old-style parameter init methods
- NOTE: the wx CPU registers dialog (debugger) currently reports nothing
- TODO: fix wx CPU registers dialog, remove remaining bx_id related stuff
2006-03-07 20:32:07 +00:00
Volker Ruppert
c66191bd13 - prepared save/restore subtree to make the conversion of the cpu and keyboard
parameters of the wx debugger possible
- started rewrite of shadow parameters and converted keyboard parameter stuff
- test function print_tree() now shows raw byte strings correctly
- removed unnecessary spaces
2006-03-07 17:54:27 +00:00
Stanislav Shwartsman
7b6c2587a9 Now devices could be compiled separatelly from CPU
Averything that required cpu.h include now has it explicitly and there are a lot of files not dependant by CPU at all which will compile a lot faster now ...
2006-03-06 22:03:16 +00:00
Volker Ruppert
0c573d15cf - fixed compile error (missing typecast)
- fix for parameter objects without a parent list
- textconfig: logfile options moved to a submenu
- obsolete parameter init methods removed
2006-03-06 18:50:55 +00:00
Volker Ruppert
dd7e08de99 - remaining config options and special menus added to parameter tree
- parameter tree structure updated (TODO: should be moved to development.dbk)
- code cleanup: bx_options stuff and obsolete parameter access methods removed
- TODO: rewrite of shadow parameter stuff (for subtree "save_restore")
2006-03-05 10:24:29 +00:00
Volker Ruppert
dbe0918d59 - text snapshot check option added to parameter tree
- GDB stub options are now regular parameters
- syntax of text_snapshot_check bochsrc directive changed
2006-03-04 12:43:47 +00:00
Volker Ruppert
e1b42d183a - sb16 options rewritten to a parameter tree
- sb16 parameters stored in the device class and runtime parameter handler added
- wx: ParamDialog can currently handle only dependency lists of bool parameters
  correctly (TODO: add support for numeric parameters)
2006-03-03 20:29:50 +00:00
Volker Ruppert
dafe33fc84 - network options rewritten to a parameter tree
- disable usb options if not compiled with usb support
- usb and network dependency list created with menu->clone()
- load usb plugin only if at least one hub is present
- remaining options prepared for rewrite
- proposed parameter tree updated
2006-03-02 20:13:14 +00:00
Volker Ruppert
62cfd57854 - wx: fixed possible crash if parent parameter is NULL
- network options prepared for rewrite
- ata device enum type option handling simplified
2006-03-01 21:24:20 +00:00
Volker Ruppert
9196541d58 - fixed USB runtime parameter names 2006-03-01 17:56:32 +00:00
Volker Ruppert
154702eaca - serial, parallel and usb options rewritten to a parameter tree
- bx_init_options(): local variables cleanup
- hide floppy devtype parameter (floppy media type change support not yet complete)
- wx: menu order changed
- keyboard.cc: removed obsolete FIXME
- proposed parameter tree updated
2006-03-01 17:14:36 +00:00
Volker Ruppert
fbd61d0a00 - fixed memory leak in the parameter list method clone()
- removed useless parameter list method set_options() (usage caused memory leak)
2006-02-28 16:19:29 +00:00