Commit Graph

152 Commits

Author SHA1 Message Date
Stanislav Shwartsman
8d44a9e355 Warnings fixed 2007-10-24 23:09:59 +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
Volker Ruppert
a2584bd271 - attempt to fix the "Print Screen" key problem
* partial fix for bug #1549873 (SF patch #1766536)
  * added keyword "print" to the userbutton shortcut table
  * FIXME #1: CTRL+PRINT and ALT+PRINT not working in Win98 guest
  * FIXME #2: win32 hosts do not generate the "make" code for "Print Screen"
2007-08-18 08:05:33 +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
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
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
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
Stanislav Shwartsman
df70fa0a2f Indent changes 2006-04-10 19:02:30 +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
48bb9719a6 - fixed number of initializers for ATA options if BX_MAX_ATA_CHANNEL < 4
- changed ask_param() method argument to param pointer (fixes win32 cdrom dialog)
2006-02-27 09:37:58 +00:00
Volker Ruppert
6cd4ffff28 - floppy options rewritten to a parameter tree
- enum parameter type method set_by_name() fixed
2006-02-24 22:35:46 +00:00
Volker Ruppert
c47508bdb1 - keyboard and mouse options rewritten to a parameter tree
- siminterface method ask_param() can now handle new-style parameters
- proposed parameter tree updated
2006-02-22 19:18:29 +00:00
Volker Ruppert
8de434138d - gui tooltip support added (currently used by win32 gui only)
- win32 gui overrides default mouse tooltip setting depending on the configuration
2006-01-25 17:37:22 +00:00
Volker Ruppert
22187086d7 - new user shortcut "bksl" (backslash) 2006-01-09 18:37:29 +00:00
Volker Ruppert
8be27bf03d - gui dialog capability flags added to simplify the button handler code 2005-11-12 16:09:55 +00:00
Volker Ruppert
3658399a4a - maximum length of user shortcut string set to 20
- old-style user shortcut detection fixed
- bx_param_string_c value needs one byte more space for the final null character
2005-10-22 08:07:53 +00:00
Volker Ruppert
feb97a65a0 - new gui variable 'user_dialog' indicates the presence of a gui dialog box for
editing the userbutton shortcut before sending it
- simple userbutton shortcut dialog for the X11 gui implemented
- small fixes in the X11 "ask" dialog code
2005-10-21 18:00:17 +00:00
Stanislav Shwartsman
915c2d9eea Fix compilation warnings 2005-10-20 17:34:22 +00:00
Stanislav Shwartsman
469358aaf9 Move SHOW_IPS action to bx_gui object, may be some GUI will be able to print IPS online in the simulation window status bar ...
Small code cleanup
2005-10-13 16:22:21 +00:00
Volker Ruppert
847f1d293e - some more keys supported by user shortcut feature with new-style syntax
- usage of old-style syntax for 'user_shortcut' now causes a warning
- deprecated options 'pit' and 'time0' now cause an error
- old disk options completely removed from bochsrc parser
- documentation changes: 'pit' and 'time0' removed, 'user_shortcut' updated
2005-10-10 19:32:53 +00:00
Volker Ruppert
6f506fcf96 - modified syntax of the user shortcut string. The key names are now separated
with a '-' character. Added support for some more keys. The old-style syntax
  is still supported for a few key combinations.
- updated/added documentation for the 'cmosimage' option
2005-10-08 11:41:18 +00:00
Volker Ruppert
98ef1412c3 - new graphics update API implemented (patch from Robin Kay)
Description from the author:
  This API allows framebuffer device plugins to draw directly on to the
  GUI's tile buffer and hence eliminates the need to memcpy(3C) tiles to
  an intermediate buffer. Functions like update_hardware_cursor function
  are rendered unnecessary as framebuffer device plugins can now draw the
  full range of host colours. svga_cirrus will fallback to calling
  graphics_tile_update without a hardware cursor if the GUI doesn't support
  the new API. This patch includes implementations of graphics_tile_info,
  graphics_tile_get, and graphics_tile_update_in_place (the new API) for SDL
  and X11.
- new graphics update API implemented in wx and rfb
- common update functions for guis without support for the new API added (should
  be removed after implementing the new API in all display libraries)
2004-08-15 19:27:15 +00:00
Volker Ruppert
242b9a2c3a - level sensitive irq mode prepared
- pci reset mechanism implemented
- obsolete ResetSignal stuff removed
- ioapic: irq handling functions renamed to raise_irq/lower_irq
- pic: fixed two warnings
2004-07-06 19:59:10 +00:00
Stanislav Shwartsman
5873b26a82 Speed up compilation process.
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
2004-06-19 15:20:15 +00:00
Volker Ruppert
d748f22ed0 - new gui function get_capabilities() returns the maximum values for xres, yres
and bpp (done for the x display library)
- new switch VBE_DISPI_GETCAPS. The xres, yres and bpp registers return the gui
  capabilities if enabled.
- VBE_DISPI_ID3 defined
2004-02-22 13:03:02 +00:00
Volker Ruppert
f5c165e32a - statusbar items for floppy and keyboard added (win32 gui only). TODO: implement
statusbar in other display libraries and add items for harddisk/cdrom and network.
2004-02-07 14:34:35 +00:00
Christophe Bothamy
8ad4cf6056 - add speaker log, pluginSpeaker, and beep_on/off methods in guis 2004-02-01 23:48:57 +00:00
Volker Ruppert
278c6e9f38 - new gui dialogs for the first cdrom and the runtime options (log options are
still handled on the console)
- minor changes in other win32dialog functions
2004-02-01 01:40:14 +00:00
Volker Ruppert
f731c1774c - DEV_set_media_status() not necessary in gui floppy handlers when using the
win32 floppy dialog
- report geometry with BX_INFO after inserting new floppy media
2003-12-18 20:04:49 +00:00
Volker Ruppert
2c64b67679 - runtime configuration and gui dialogs must be disabled if the active display
library is rfb
2003-07-18 15:51:02 +00:00
Volker Ruppert
707004d222 - the floppy handlers now return immediately if the requested floppy device
doesn't exist
2003-07-17 15:49:23 +00:00
Volker Ruppert
0d60d343b3 - simple floppy image dialogbox for win32 added
- references to wx removed from the floppy button handlers (wx doesn't use them)
2003-07-15 21:02:05 +00:00
Volker Ruppert
04ad96b585 - don't wait for the 'enter' key on the win32 console if the user has pressed
the power button or has chosen "kill simulation" in the "ask" dialog
2003-05-27 18:19:13 +00:00
Volker Ruppert
ecfaa5f1b0 - simple text input dialog for the userbutton function on win32 added
- snapshot_handler(): simplified the filedialog call
2003-05-25 18:34:03 +00:00
Volker Ruppert
906ac57dc9 - the text snapshot function now uses the standard save file dialog box on win32
if the config interface is not wx.
2003-05-25 13:35:39 +00:00
Volker Ruppert
1b2868d4dc - missing initialization of the variable 'charmap_updated' added (bug found
with valgrind)
2003-05-24 10:51:00 +00:00
Volker Ruppert
b716dafbcc - user_shortcut feature: new key name "bksp" (backspace) added
- function userbutton_handler(): stop parsing the shortcut string if the
  key name is invalid
- function userbutton_handler(): incrementing variable 'len' simplified
- function snapshot_checker(): fixed a warning
2003-02-09 18:59:19 +00:00
Gregory Alexander
78d0f43b94 Added mask support to snapshot code.
This makes it more versatile.
2002-12-17 05:17:41 +00:00
Gregory Alexander
d90c6636ff Added support for a PASS log level. This probably
isn't complete, but it hopefully will do the job.
2002-12-17 03:36:53 +00:00
Gregory Alexander
b522c1dcf3 Enhanced support for text snapshot checking.
Now CR/LF creation is suppressed in win32 when text
snapshot checking is on.  This allows for creation of
generic text snapshots in win32.
2002-12-16 02:49:55 +00:00
Christophe Bothamy
16ebfdb9e1 - update for macos compile 2002-12-12 15:29:45 +00:00
Gregory Alexander
ffc8c18fcd Fix incorrect retrieval of text_snapshot_check option. 2002-12-12 06:51:19 +00:00
Gregory Alexander
44e58663bc Working on a testing framework for bochs.
Added an option to do a BX_PANIC when the display
matches a previously recorded text snapshot.
2002-12-12 06:21:43 +00:00
Gregory Alexander
32340d66cc make_text_snapshot returns a length value.
We now use that instead of calling strlen.
2002-12-12 03:41:51 +00:00
Christophe Bothamy
5dc0a6ab61 - fix [ 639873 ] get_first_cd_handle called before init
We set the cdrom to ejected first (no call to get_first_cd_handle),
  the status will be updated after init
2002-11-24 14:57:43 +00:00
Christophe Bothamy
052ee134b7 - fix [ 629606 ] BX_WITH_TERM affects ^C handling :
. if BX_GUI_SIGHANDLER is true and the term gui is selected at run time,
    a new global boolean (bx_gui_sighandler) variable is set to true.
    Special signal handling is done if bx_gui_sighandler is true.
  . if BX_GUI_SIGHANDLER is not true, bx_gui_sighandler is not compiled in.
2002-11-11 17:09:57 +00:00
Volker Ruppert
52e703d8e8 - replaced all #if BX_WITH_WX sections by a check for the active config
interface at runtime. The behaviour of the button handlers was wrong if bochs
  is configured with plugins and all display libs enabled, wxWindows is present
  and a gui using textconfig is selected.
  The wx cdrom button still doesn't work since get_first_cdrom() always returns
  NULL.
2002-11-09 06:41:34 +00:00
Bryce Denney
cec9135e9f - Apply patch.replace-Boolean rev 1.3. Every "Boolean" is now changed to a
"bx_bool" which is always defined as Bit32u on all platforms.  In Carbon
  specific code, Boolean is still used because the Carbon header files
  define it to unsigned char.
- this fixes bug [ 623152 ] MacOSX: Triple Exception Booting win95.
  The bug was that some code in Bochs depends on Boolean to be a
  32 bit value.  (This should be fixed, but I don't know all the places
  where it needs to be fixed yet.)  Because Carbon defined Boolean as
  an unsigned char, Bochs just followed along and used the unsigned char
  definition to avoid compile problems.  This exposed the dependency
  on 32 bit Boolean on MacOS X only and led to major simulation problems,
  that could only be reproduced and debugged on that platform.
- On the mailing list we debated whether to make all Booleans into "bool" or
  our own type.  I chose bx_bool for several reasons.
  1. Unlike C++'s bool, we can guarantee that bx_bool is the same size on all
     platforms, which makes it much less likely to have more platform-specific
     simulation differences in the future.  (I spent hours on a borrowed
     MacOSX machine chasing bug 618388 before discovering that different sized
     Booleans were the problem, and I don't want to repeat that.)
  2. We still have at least one dependency on 32 bit Booleans which must be
     fixed some time, but I don't want to risk introducing new bugs into the
     simulation just before the 2.0 release.

Modified Files:
    bochs.h config.h.in gdbstub.cc logio.cc main.cc pc_system.cc
    pc_system.h plugin.cc plugin.h bios/rombios.c cpu/apic.cc
    cpu/arith16.cc cpu/arith32.cc cpu/arith64.cc cpu/arith8.cc
    cpu/cpu.cc cpu/cpu.h cpu/ctrl_xfer16.cc cpu/ctrl_xfer32.cc
    cpu/ctrl_xfer64.cc cpu/data_xfer16.cc cpu/data_xfer32.cc
    cpu/data_xfer64.cc cpu/debugstuff.cc cpu/exception.cc
    cpu/fetchdecode.cc cpu/flag_ctrl_pro.cc cpu/init.cc
    cpu/io_pro.cc cpu/lazy_flags.cc cpu/lazy_flags.h cpu/mult16.cc
    cpu/mult32.cc cpu/mult64.cc cpu/mult8.cc cpu/paging.cc
    cpu/proc_ctrl.cc cpu/segment_ctrl_pro.cc cpu/stack_pro.cc
    cpu/tasking.cc debug/dbg_main.cc debug/debug.h debug/sim2.cc
    disasm/dis_decode.cc disasm/disasm.h doc/docbook/Makefile
    docs-html/cosimulation.html fpu/wmFPUemu_glue.cc
    gui/amigaos.cc gui/beos.cc gui/carbon.cc gui/gui.cc gui/gui.h
    gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
    gui/rfb.cc gui/sdl.cc gui/siminterface.cc gui/siminterface.h
    gui/term.cc gui/win32.cc gui/wx.cc gui/wxmain.cc gui/wxmain.h
    gui/x.cc instrument/example0/instrument.cc
    instrument/example0/instrument.h
    instrument/example1/instrument.cc
    instrument/example1/instrument.h
    instrument/stubs/instrument.cc instrument/stubs/instrument.h
    iodev/cdrom.cc iodev/cdrom.h iodev/cdrom_osx.cc iodev/cmos.cc
    iodev/devices.cc iodev/dma.cc iodev/dma.h iodev/eth_arpback.cc
    iodev/eth_packetmaker.cc iodev/eth_packetmaker.h
    iodev/floppy.cc iodev/floppy.h iodev/guest2host.h
    iodev/harddrv.cc iodev/harddrv.h iodev/ioapic.cc
    iodev/ioapic.h iodev/iodebug.cc iodev/iodev.h
    iodev/keyboard.cc iodev/keyboard.h iodev/ne2k.h
    iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pic.h
    iodev/pit.cc iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h
    iodev/sb16.cc iodev/sb16.h iodev/serial.cc iodev/serial.h
    iodev/vga.cc iodev/vga.h memory/memory.h memory/misc_mem.cc
2002-10-25 11:44:41 +00:00
Bryce Denney
5e520261db Add plugin support to Bochs by merging all the changes from the
BRANCH_PLUGINS branch!

Authors:
  Bryce Denney
  Christophe Bothamy
  Kevin Lawton (we grabbed a lot of plugin code from plex86)
Testing help from:
  Volker Ruppert
  Don Becker (Psyon)
  Jeremy Parsons (Br'fin)

The change log is too long to paste in here.  To read the change log, do
  cvs log patches/patch.final-from-BRANCH_PLUGINS.gz

All the changes and a detailed description are contained in a patch
called patch.final-from-BRANCH_PLUGINS.gz.  To look at the complete
patch, do
  cvs upd -r1.1 patches/patch.final-from-BRANCH_PLUGINS.gz

Then you will have a local copy of the patch, which you can gunzip and
play with however you want.

Modified Files:
    .bochsrc Makefile.in aclocal.m4 bochs.h config.h.in configure
    configure.in gdbstub.cc logio.cc main.cc pc_system.cc
    pc_system.h state_file.h bios/Makefile.in bios/rombios.c
    cpu/Makefile.in cpu/access.cc cpu/apic.cc cpu/arith16.cc
    cpu/arith32.cc cpu/arith8.cc cpu/cpu.cc cpu/cpu.h
    cpu/ctrl_xfer32.cc cpu/exception.cc cpu/fetchdecode.cc
    cpu/fetchdecode64.cc cpu/flag_ctrl.cc cpu/flag_ctrl_pro.cc
    cpu/init.cc cpu/io.cc cpu/logical16.cc cpu/logical32.cc
    cpu/logical8.cc cpu/paging.cc cpu/proc_ctrl.cc
    cpu/protect_ctrl.cc cpu/segment_ctrl_pro.cc cpu/shift16.cc
    cpu/shift32.cc cpu/stack64.cc cpu/string.cc cpu/tasking.cc
    debug/Makefile.in debug/dbg_main.cc disasm/Makefile.in
    doc/docbook/user/user.dbk dynamic/Makefile.in fpu/Makefile.in
    gui/Makefile.in gui/amigaos.cc gui/beos.cc gui/carbon.cc
    gui/control.cc gui/control.h gui/gui.cc gui/gui.h
    gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
    gui/rfb.cc gui/sdl.cc gui/sdlkeys.h gui/siminterface.cc
    gui/siminterface.h gui/term.cc gui/win32.cc gui/wx.cc
    gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
    gui/x.cc gui/keymaps/sdl-pc-de.map gui/keymaps/sdl-pc-us.map
    gui/keymaps/x11-pc-de.map instrument/example0/instrument.h
    instrument/example1/instrument.h
    instrument/stubs/instrument.cc instrument/stubs/instrument.h
    iodev/Makefile.in iodev/biosdev.cc iodev/biosdev.h
    iodev/cdrom.cc iodev/cmos.cc iodev/cmos.h iodev/devices.cc
    iodev/dma.cc iodev/dma.h iodev/eth_fbsd.cc iodev/eth_linux.cc
    iodev/eth_null.cc iodev/eth_tap.cc iodev/floppy.cc
    iodev/floppy.h iodev/guest2host.cc iodev/guest2host.h
    iodev/harddrv.cc iodev/harddrv.h iodev/iodebug.cc
    iodev/iodebug.h iodev/iodev.h iodev/keyboard.cc
    iodev/keyboard.h iodev/ne2k.cc iodev/ne2k.h iodev/parallel.cc
    iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pci2isa.cc
    iodev/pci2isa.h iodev/pic.cc iodev/pic.h iodev/pit.cc
    iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h iodev/sb16.cc
    iodev/sb16.h iodev/scancodes.cc iodev/scancodes.h
    iodev/serial.cc iodev/serial.h iodev/slowdown_timer.cc
    iodev/slowdown_timer.h iodev/unmapped.cc iodev/unmapped.h
    iodev/vga.cc iodev/vga.h memory/Makefile.in memory/memory.cc
    memory/memory.h memory/misc_mem.cc misc/bximage.c
    misc/niclist.c
Added Files:
    README-plugins extplugin.h ltdl.c ltdl.h ltdlconf.h.in
    ltmain.sh plugin.cc plugin.h
2002-10-24 21:07:56 +00:00
Volker Ruppert
c43564368a - remove trailing spaces from text snapshot
- incrementing variable txt_addr simplified
2002-10-22 17:30:54 +00:00
Volker Ruppert
21b8955a4e - userbutton shortcut feature improved. The shortcut string can be a combination
of these key names: "alt", "ctrl", "del", "esc", "f1", "f4", "tab", "win".
  Up to 3 keys can be pressed at a time.
2002-10-16 19:50:27 +00:00
Bryce Denney
346e2747d3 - fixed up ParamDialog to correctly handle "trees" of parameters. A
bx_list_c can now be displayed as either a wxStaticBox with the
  child parameters inside, or as a wxNotebook with each child
  parameter in a separate tab.  (The children can also be lists of
  course.)  The default display is the wxStaticBox type, but if you
  set the option bit bx_list_c::USE_TAB_WINDOW in the list,
  ParamDialog will use the wxNotebook display instead.
- to get the param trees working, I created a new struct
  AddParamContext, which is passed to AddParam().  This struct is
  critical when AddParam calls itself recursively to display lists
  within lists.
- use the wxNotebook display feature for the ATA0,1,2,3 controller
  dialog box.  Now instead of being hundreds of pixels tall, it is
  reasonable height with three different tabs.  This fixed bug
  #619074: "wx: ATA interface editor too tall" and was the whole
  reason I started messing with this at all.

plus some minor cleanups
- when I added the enum constant bx_list_c::USE_TAB_WINDOW, I also
  removed the BX_ prefix from all the other enum constants that are
  used in parameter options in siminterface.cc.  Since these constants
  are enums within a class, there is no possibility of namespace
  conflicts so the prefix is not needed.
- added wxADJUST_MINSIZE to all wxChoice controls, since that tells
  wxWindows to adjust its size to the length of the longest string.
- instead of calling SetSize or SetSizeHints on every textcontrol with
  a hardcoded width, I am using just two wxSize specifications for
  everything: either normalTextSize or longTextSize.
- edit names of a few menus and params.  For example now instead of
  the tab saying "Master ATA device on channel 0" it will say
  "First HD/CD on channel 0".

Modified Files:
  main.cc gui/control.cc gui/gui.cc gui/siminterface.cc gui/siminterface.h
  gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc
2002-10-06 02:37:28 +00:00
Christophe Bothamy
440dffc803 - applied patch.4ata-channels and patch.4ata-channels.bbd
- Features :
 . number of active channels defined at boot-time config
 . new options in bochsrc
 . up to 8 devices support (disks or cdroms)
 . up to 4 cdrom devices can be changed at runtime config
 . wxwindows config interface
2002-09-22 20:56:12 +00:00
Volker Ruppert
4c4294cc6f - new variable 'charmap_updated', 'charmap_changed' array renamed to
'char_changed'. These variables are currently only used by the win32 gui for
  the update of the font bitmaps. SDL and wxWindows do not use the variables
  since they are using the charmap data directly
- free text snapshot memory when the user has cancelled the dialog
- write text snapshot file in binary mode (disables the LF -> CRLF conversion
  in cygwin)
2002-09-21 19:38:47 +00:00
Volker Ruppert
721f89b77b - forward changes of the active charmap to the gui with the new function
set_text_charbyte()
- vga: store the address of the active charmap in the new variable
  charmap_address
- vga: text mode hack removed. The write modes, operations and masks must be
  used in text mode too.
- sdl: clear_screen() is not necessary when the charmap has changed
- win32: update only the changed font bitmaps before drawing the text
2002-09-19 18:59:50 +00:00
Volker Ruppert
d23d121674 - new function set_text_charmap() stores the vga charmap data in the array
vga_charmap
- the SDL gui uses the charmap data for the vga text display
  * TODO: implement this feature for other guis
- removed unused variables in sdl.cc and gui.cc
- fixed a warning in vga.cc
2002-09-08 07:56:10 +00:00
Bryce Denney
26385f2866 - I've added lots of comments in siminterface.h, and tried to clean up
the terminology a bit.  In particular, the term "gui" has started
  to mean different things in different contexts, so I've defined
  some more specific names for the parts of the user interface, and
  updated comments and some variable names to reflect it.  See
  siminterface.h for a more complete description of all of these.

    VGAW: VGA display window and toolbar buttons, the traditional Bochs
      display which is ported to X, win32, MacOS X, etc.  Implemented
      in gui/gui.* and platform dependent gui/*.cc files.
    CI: configuration interface that lets the user change settings such
      as floppy disk image, ne2k settings, log options.  The CI consists
      of two parts: configuration user interface (CUI) which does the
      actual rendering to the screen and handles key/mouse/menu events,
      and the siminterface object.
    CUI: configuration user interface.  This handles the user interactions
      that allow the user to configure Bochs.  To actually change any
      values it talks to the siminterface object.  One implementation of
      the CUI is the text-mode menus in gui/control.cc.  Another
      implementation is (will be) the wxWindows menus and dialogs in
      gui/wxmain.cc.
    siminterface: the glue between the CUI and the simulation code,
      accessible throughout the code by the global variable
        bx_simulator_interface_c *SIM;
      Among other things, siminterface methods allow the simulator to ask the
      CUI to display things or ask for user input, and allows the CUI
      to query and modify variables in the simulation code.


    GUI: Literally, "graphical user interface".  Until the configuration menus
      and wxWindows came along, everyone understood that "gui" referred to the
      VGA display window and the toolbar buttons because that's all there
      was.  Now that we have the wxWindows code, which implements both the VGAW
      and the CUI, while all other platforms implement only the VGAW, it's not
      so clear.  So, I'm trying to use VGAW, CI, and CUI consistently since
      they are more specific.
    control panel: This has been used as another name for the configuration
      interface.  "control panel" is also somewhat unspecific and it sounds
      like it would be graphical with buttons and sliders, but our text-mode
      thing is not graphical at all.  I've replaced "control panel" with
      "configuration interface" wherever I could find it.  In configure script,
      the --disable-control-panel option is still supported, but it politely
      suggests that you use --disable-config-interface instead.
- clean up comments in siminterface,wx* code
- add comments and examples for bx_param_* and BxEvents
- remove some obsolete stuff: notify_*_args,
  bx_simulator_interface_c::[sg]et_enabled() methods
- in siminterface.cc, move a few bx_real_sim_c methods to where they belong,
  with the rest of the methods.  No changes to the actual methods.
- remove some DOS ^M's which crept in and confused my editor.
2002-08-26 15:31:23 +00:00
Volker Ruppert
dc07804616 - simple user shortcut dialog for wxWindows added
- floppya, floppyb and cdromd handlers: don't change anything when the user has
  cancelled the dialog
2002-08-25 12:32:54 +00:00
Volker Ruppert
1d4d5aa244 - new "user" button added to the headerbar. It can send keyboard shortcuts to
the guest OS. The shortcut can be defined in the bochsrc or in the config
  interface. It is possible to change it at runtime.

  These shortcuts are currently recognized:
  ctrlaltdel, ctrlaltesc, ctrlaltf1, alttab

  Here is the list of changes:

  * userbutton.h and userbutton.xpm added in gui/bitmaps
  * config options for the userbutton shortcut added
  * initialize the new button in the gui.cc
  * the new userbutton handler generates keypresses and relaeses depending on
    the shortcut keyword
  * the gui stops adding buttons to the headerbar if not enough space is left.
    This can happen when the screen width is 320 pixels (done for X11 only).
  * TODO: build a dialog box for the wxWindows gui
2002-08-09 06:16:43 +00:00
Volker Ruppert
c3cda0a919 - separation of floppy device type and media type started. This feature needs
more work in the floppy and bios code.
- floppy and cdrom entries in the runtime config menu can be disabled if the
  drive wasn't defined in bochsrc or start menu
- floppy variable "initial_status" and cdrom variable "inserted" renamed to
  "status"
- unused variable *ips in function build_runtime_options_prompt() disabled
2002-08-04 08:42:34 +00:00
Bryce Denney
30aaf4088e - commit patch.wxwindows.gz in the main branch. Now you can try out
the wxwindows interface by just "configure --with-wx; make"

  Modified Files:
    Makefile.in bochs.h config.h.in configure configure.in
    load32bitOShack.cc logio.cc main.cc cpu/cpu.cc cpu/cpu.h
    debug/dbg_main.cc gui/Makefile.in gui/control.cc gui/gui.cc
    gui/siminterface.cc gui/siminterface.h gui/x.cc iodev/cdrom.cc
    iodev/keyboard.cc memory/misc_mem.cc
  Added Files:
    README-wxWindows wxbochs.rc gui/wx.cc gui/wxmain.cc
    gui/wxmain.h gui/bitmaps/cdromd.xpm
    gui/bitmaps/configbutton.xpm gui/bitmaps/copy.xpm
    gui/bitmaps/floppya.xpm gui/bitmaps/floppyb.xpm
    gui/bitmaps/mouse.xpm gui/bitmaps/paste.xpm
    gui/bitmaps/power.xpm gui/bitmaps/reset.xpm
    gui/bitmaps/snapshot.xpm
  Removed Files:
    patches/patch.wxwindows.gz
2002-04-18 00:22:20 +00:00
Volker Ruppert
bc7ca5b0e6 - removed unnecessary include statemants for X 2002-03-30 06:45:30 +00:00
Volker Ruppert
8263d15e76 - renamed update_floppy_status_buttons() to update_drive_status_buttons() since
it handles the cdrom status too
2002-03-17 20:57:54 +00:00
Volker Ruppert
92b06b9ebf - new function get_clipboard_text() for GUI specific clipboard handling
GUI specific paste functions for X11 and WIN32 in paste_handler() moved to
  the new function
- get_clipboard_text() prepared for other GUIs
- set_clipboard_text() has now a return value (0 = failed or not implemented)
- use portable code in copy_handler() if set_clipboard_text() fails
- snapshot_handler() prepared for adding a file dialog call
- writing snapshot file in binary mode (LF->CRLF conversion already done)
2002-03-16 11:30:06 +00:00
Bryce Denney
842bfb4430 - BX_WITH_X11 is always defined. use "#if BX_WITH_X11" not #ifdef 2002-03-15 17:10:58 +00:00
Volker Ruppert
7373bb7647 - new function set_clipboard_text() for GUI specific clipboard handling
GUI specific copy functions for X11 and WIN32 in copy_handler() moved to
  the new function
- set_clipboard_text() prepared for other GUIs
- value of text mode cursor variables fixed (and renamed in x.cc)
- BX_ERROR message in snapshot_handler() fixed
2002-03-15 16:45:10 +00:00
Bryce Denney
502a48057b - fix clipboard code that is compiled when neither windows nor X windows
is enabled.
2002-03-12 06:46:35 +00:00
Bryce Denney
ebc19a5e6c - fix bugs in copy&paste on win32.
- paste: grabbing the data from the clipboard in win32 was not implemented
  at all.  I found some example code on usenet and adapted it for Bochs.
- keymap: now if you call loadKeymap with NULL for the function pointer,
  it just fills in all the X windows keysyms with zero.  Added a call
  to loadKeymap in win32.cc.
2002-03-11 16:35:41 +00:00
Bryce Denney
d82a73ed21 - fix things I broke while working in linux 2002-03-11 15:45:34 +00:00
Bryce Denney
8125bee908 - commit patch.paste 2002-03-11 15:04:58 +00:00
Jeroen Janssen
b6074761e2 - fixed small bug causing always including X11 header 2002-03-10 20:08:14 +00:00
Bryce Denney
aa6acc2be4 - add code for X windows to put the snapshot data onto the clipboard. 2002-03-10 16:06:56 +00:00
Bryce Denney
3d2c58ee49 - revert to revision 1.27. My changes in 1.28 caused cygwin to be unable to
copy to the clipboard so I removed them.
- I was having cygwin compile problems because <windows.h> was not always
  included when compiling this file.  Add an include of <windows.h> at
  the top, and now it compiles in cygwin.
2002-03-10 05:49:26 +00:00
Bryce Denney
efb6eeb621 - use UNIX-like code when compiling in cygwin 2002-03-06 18:17:24 +00:00
Volker Ruppert
197f80bde5 - snapshot_handler() prepared for copying text to clipboard
- copy text to clipboard added for WIN32
2002-02-12 17:09:51 +00:00
Volker Ruppert
1d9861fc59 - implementation of the text mode snapshot function 2002-02-04 20:31:35 +00:00
Volker Ruppert
84b649831e - new cdrom button in the headerbar
- changing cdrom media in a Bochs session now possible
- don't eject cdrom when the guest OS has locked the drive
2002-02-01 16:46:27 +00:00
Bryce Denney
1e3f0cff19 - added configuration button contributed by
Volker Ruppert <Volker.Ruppert@t-online.de>
  instead of borrowing the snapshot button for the config interface.
2001-11-09 22:17:33 +00:00
Bryce Denney
daf2a9fb55 - add RCS Id to header of every file. This makes it easier to know what's
going on when someone sends in a modified file.
2001-10-03 13:10:38 +00:00
Bryce Denney
42473b7038 - fix up floppy button handlers so that the function that actually
updates the buttons can be called from the outside.
2001-09-28 06:03:40 +00:00
Bryce Denney
55f999327b - use #if BX_WITH_MACOS instead of #ifdef macintosh to distinguish
between MacOS pre-10 and MacOS 10
2001-09-26 00:15:30 +00:00
Todd T.Fries
28885e4973 some INFO->DEBUG/ERROR cleanups 2001-08-31 16:06:32 +00:00
Todd T.Fries
a06b031dcf setprefix -> put 2001-06-27 19:16:01 +00:00
Bryce Denney
fba34be1e7 - added a new method to all GUIs called mouse_enabled_changed_specific,
which notifies them that the mouse_enabled bit has changed.  Now that
  mouse_enabled can be initialized or modified by parameter events in
  addition to GUI events, the guis must be prepared for it.  I have pasted
  empty method definitions into mouse_enabled_changed_specific for all
  guis except for X11, which I did the right way.  The implementation
  of this function must use the argument "val" rather than reading the
  parameter.
2001-06-23 03:18:14 +00:00
Bryce Denney
0bc41bc8ba - now the win32 gui updates bx_options.Omouse_enabled whenever it
goes in/out of mouse capture mode.  This is critical because
  bx_options.Omouse_enabled is used to control whether the mouse
  events are sent into the hardware queue or not (keyboard.cc).
  This is only a partial fix though, because changing the mouse
  enabled setting in the control panel has no effect on the gui.
2001-06-23 01:47:26 +00:00
Bryce Denney
80a7541fed - used grep to search for more instances of new bx_options problems that
I have introduced, and fixed a lot.
2001-06-21 14:56:43 +00:00
Bryce Denney
ec0fbf18bc - convert nearly all bx_options to parameter form. All options that have
been converted into parameters temporarily have the letter "O" appended
  to their name.  I don't want to keep it this way, but it has helped
  in the conversion process because the compiler refuses to compile the
  old uses of the name.  Before I started using the "O" trick, there were
  many bugs like this:   if (bx_options.diskc.present) {...}
  This was legal with the new parameters, but it was testing whether the
  parameter structure had been created, instead of testing the value of
  the present parameter.  Renaming present to Opresent turns this into
  a compile error, which points out the incorrect use of the param.
- the "--disable-control-panel" no longer works, I'm afraid.  I can no
  longer support this and continue progress.
2001-06-20 14:01:39 +00:00
Todd T.Fries
12985edb26 setprefix now uses a variable length name as a string for an argument 2001-06-19 21:36:09 +00:00
Bryce Denney
c3d88c5924 - now ips, mouse_enabled, vga_update_interval, and rom_path are
declared as bx_param_c * types in the bx_options structure.  They are
  initialized in main.cc (bx_init_options) with default values.
  Access to parameters of this type should always be like this:
    bx_options.mouse_enabled->get ();
    bx_options.mouse_enabled->set (newval);
  Eventually I will be transferring all options to this format.
2001-06-16 23:08:32 +00:00
Bryce Denney
cee98e0033 - Add special case for power button so that it is always fatal.
a GUI panic.
2001-06-15 18:01:52 +00:00
Bryce Denney
a97df5a8fa - add some #if's to compile the control panel stuff only when
BX_USE_CONTROL_PANEL is set.  I put the #if...#endif thing around
  the entire file in siminterface.cc and control.cc so that it's safe
  to compile them in either case.
2001-06-11 06:48:37 +00:00
Bryce Denney
8b7fbca53e - more work on text-mode control panel. Now the control panel starts before
the simulation begins, to give you a chance to choose between bochsrcs,
  choose the boot disk, etc.
2001-06-09 20:01:12 +00:00
Bryce Denney
f2af827a63 - add a layer of abstraction between the text-mode control panel in
gui/control.cc and the simulator.  Now all communication between
  the control panel and the rest of bochs goes through an object
  called bx_simulator_interface_c.
2001-06-08 07:20:07 +00:00
Bryce Denney
b26e2fb362 - even if panic is nonfatal, the exit button should still make it quit! 2001-06-08 03:07:51 +00:00
Bryce Denney
0cc0bb9c2c - add first attempt at a text mode control panel 2001-06-07 20:31:20 +00:00
Todd T.Fries
2bbb1ef8eb strip '\n' from BX_{INFO,DEBUG,ERROR,PANIC}
don't need it, moved the output of it into the general io functions.
saves space, as well as removes the confusing output if a '\n' is left off
2001-05-30 18:56:02 +00:00
Todd T.Fries
622031500e reset callback now implemented 2001-05-25 14:21:46 +00:00
Todd T.Fries
bdb89cd364 merge in BRANCH-io-cleanup.
To see the commit logs for this use either cvsweb or
cvs update -r BRANCH-io-cleanup and then 'cvs log' the various files.

In general this provides a generic interface for logging.

logfunctions:: is a class that is inherited by some classes, and also
.   allocated as a standalone global called 'genlog'.  All logging uses
.   one of the ::info(), ::error(), ::ldebug(), ::panic() methods of this
.   class through 'BX_INFO(), BX_ERROR(), BX_DEBUG(), BX_PANIC()' macros
.   respectively.
.
.   An example usage:
.     BX_INFO(("Hello, World!\n"));

iofunctions:: is a class that is allocated once by default, and assigned
as the iofunction of each logfunctions instance.  It is this class that
maintains the file descriptor and other output related code, at this
point using vfprintf().  At some future point, someone may choose to
write a gui 'console' for bochs to which messages would be redirected
simply by assigning a different iofunction class to the various logfunctions
objects.

More cleanup is coming, but this works for now.  If you want to see alot
of debugging output, in main.cc, change onoff[LOGLEV_DEBUG]=0 to =1.

Comments, bugs, flames, to me: todd@fries.net
2001-05-15 14:49:57 +00:00
Bryce Denney
e363f402ca - This implements a solution that lets any GUI take over handling of any
signal.  First, selection of the GUI should cause BX_GUI_SIGHANDLER to
  be defined in config.h.in.  Then, the GUI should define member functions
    Bit32u get_sighandler_mask ();
    void sighandler (int sig);
  The mask function returns a bitfield where one bit corresponds to each
  signal.  For any signal whose bit is set to 1 in the return value of
  get_sighandler_mask, the gui will control that signal.  When the signal
  arrives, bx_gui.sighandler(sig) will be called by bx_signal_handler,
  instead of the default behavior of that signal.
2001-05-08 20:18:04 +00:00