Commit Graph

494 Commits

Author SHA1 Message Date
Bryce Denney
74cc67753a - in the wxWindows debugger, truncate the text in the debug console when it
reaches a certain maximum length.  Otherwise the debug console grows and
  grows and never frees any memory.  The max length is defined as a constant
  in wxdialog.h.  The max length should be made into a variable some day.
- This fixes bug [ 624317 ] wx: debug console never discards lines.

Modified Files:
  gui/wxdialog.h gui/wxdialog.cc
2002-12-08 09:16:18 +00:00
Bryce Denney
16ebed0b1e - since Christophe added the four-ata patch, it is possible to boot from
the first hard drive or first cdrom drive no matter where they are found.
  Now the wxWindows interface recognizes this fact.  It allows you to
  select HD boot if there is a hard drive in any ATA location, and
  select CDROM boot if there is a cdrom in any ATA location.
- this fixes bug [ 616139 ] wx: boot hd/cd must be in ata0 interface

Modified Files:
  gui/siminterface.cc gui/siminterface.h gui/wxmain.cc
2002-12-07 19:43:53 +00:00
Christophe Bothamy
c360ec907d - add debugger log output configuration to wxwindows interface.
this closes [ 629068 ] make a way to log debug output to file
2002-12-07 16:52:09 +00:00
Bryce Denney
1340d550ec - implement set_display_mode method for svgalib display library. Now it
handles text-to-vga transitions correctly for panics, the runtime config
  menu (accessible by F12), and the Bochs debugger.
2002-12-06 20:25:22 +00:00
Bryce Denney
5e1c89dfcb - put ifdefs around the whole file, so that it is enabled by BX_WITH_SVGA 2002-12-06 20:21:59 +00:00
Bryce Denney
87f1f3a2e0 Apply patch.safe-fullscreen. Comments from the patch follow:
This fixes bug #614724: SDL can get stuck in full-screen mode, and provides
a framework for fixing the problem on other full-screen display libraries
such as term, svga, etc.

- add virtual method bx_gui::set_display_mode(mode) which can be overridden
  by each display library class, if appropriate.  This method is primarily
  used when you run Bochs full screen, to tell the gui to switch from full
  screen back to a mode where you can use the text console.
- There are two display modes: config and simulation.  The mode is changed to
  config mode during logfunctions::ask, during the runtime configuration menu,
  and before displaying a debugger prompt.  It is changed back to simulation
  mode whenever instructions are running.
- Instead of being called directly through the global bx_gui pointer, the
  bx_gui_c::set_display_mode() method is almost always accessed through
  siminterface, like this:
    SIM->set_display_mode (DISP_MODE_CONFIG);
    SIM->set_display_mode (DISP_MODE_SIM);
  Of course siminterface just passes the call on to bx_gui::set_display_mode().
  I added it to siminterface so that the config interfaces could call it.
  (They don't #include bochs.h so they can't access bx_gui.)

Modified Files:
  logio.cc main.cc debug/dbg_main.cc gui/gui.h gui/sdl.cc
  gui/siminterface.cc gui/siminterface.h
2002-12-06 19:34:32 +00:00
Bryce Denney
586809116b - add explanation to a panic that can happen if you turn on private
colormap in X11 on a 32 bit display.
2002-12-05 19:19:34 +00:00
Christophe Bothamy
12f8aec60f - implement feature request [ 629068 ] make a way to log debug output to file
there is one more option in the configuration file "debugger_log"
  if the debugger is compiled in, all debugger output will be also
  written to this file.  Note: wxWindow config interface is not updated yet
2002-12-02 21:26:05 +00:00
Volker Ruppert
eac663c715 - fixed a warning in function HandleAskParam() 2002-12-01 16:11:12 +00:00
Bryce Denney
3edf45a1d9 - regenerate makefile dependencies 2002-11-25 15:05:51 +00:00
Bryce Denney
24f58227a5 - use </usr/include/vga.h> instead of "/usr/include/vga.h" so that it
doesn't get put in the dependency list.  It's not clear what is the best way
  to handle this header conflict anyway, other than to rename vga.h to bxvga.h
  or something.
2002-11-25 15:05:02 +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
Bryce Denney
b079f4ace2 - move includes of standard headers stdlib, stdio, etc. before the include of
bochs.h.  Bernd Korz reported redefinition of Bit32u in the system header
  files, which I never saw before I moved bochs.h up above the other includes.
- The exact errors:
    /boot/develop/headers/posix/be_prim.h:23: error: conflicting types for
    `typedef long unsigned int Bit32u'
    /boot/home/Entwicklung/Sourcecodes/bochs/config.h:474: error: previous
    declaration as `typedef unsigned int Bit32u'
2002-11-22 15:14:39 +00:00
Bryce Denney
7382b84f8c - A new GUI is born!
add SVGALIB display library by Igor Popik <igipop@wsfiz.edu.pl>
  While it's running, you can press F12 to escape into the runtime config
  menu, and then you can change disks or quit or whatever.

  Better not try it with the bochs debugger...you could get stuck.

Modified Files:
  Makefile.in config.h.in configure configure.in main.cc
  plugin.h gui/Makefile.in
Added Files:
  gui/svga.cc
Removed Files:
  patches/patch.svgalib-gui patches/patch.svgalib-gui-f12
2002-11-21 19:26:07 +00:00
Bryce Denney
6868c681e9 - fix broken range checks in shadow params when you use x86-64 and wxWindows.
The problem is that bx_param_num_c values are signed 64 bit, but it's
  shadowing a 64 bit unsigned variable.
2002-11-21 19:12:31 +00:00
Bryce Denney
691c9d56c7 - change to nmake compatible lines (from Psyon) 2002-11-20 20:36:05 +00:00
Bryce Denney
c43b46c531 - check in some small compile patches from Martin Str|mberg <ams@ludd.luth.se>
to make Bochs compile on DJGPP.
  - put references to SIGSTOP and SIGTSTP in #ifdefs
  - add definition of BX_CD_FRAMESIZE and CD_FRAMESIZE
  - look for curses functions in -ldcurses

Modified Files:
  gui/term.cc iodev/cdrom.cc configure.in configure
2002-11-20 12:23:42 +00:00
Bryce Denney
eff7720ae7 This fixes bug #640549: dbg fails if wx configured but not on.
- The Bochs debugger uses BX_WITH_WX to decide to change to wxWindows debugger
  behavior: sending a synchronous message to the config interface to get a new
  command, sending all dbg_printf output to the config interface, deciding
  whether to trap control-C, etc.  But now that it's possible to compile with
  BX_WITH_WX and BX_WITH_other_things, this isn't quite right anymore.  With
  this change, we now use calls to a new method SIM->is_wx_selected() to decide
  which behavior to use.  This method is equivalent to checking if the display
  library variable is set to "wx", but it's implemented in such a way that it
  only has to check a boolean for each call to SIM->is_wx_selected().
- in siminterface.cc, init some local variables to 0 to avoid compile
  warnings.

Modified Files:
  debug/dbg_main.cc gui/siminterface.cc gui/siminterface.h
2002-11-19 09:27:39 +00:00
Bryce Denney
044598dfa6 - VC++ didn't like the fact that we were deleting a const char*. So I
typecast it to a char* and THEN deleted it!
2002-11-19 05:54:25 +00:00
Bryce Denney
0a7cb3a43c - apply patch.ifdef-disabled-options. Comments from that patch are below:
For a whole lot of configure options, I put #if...#endif around code that
  is specific to the option, even in files which are normally only compiled
  when the option is on.  This allows me to create a MS Visual C++ 6.0
  workspace that supports many of these options.  The workspace will basically
  compile every file all the time, but the code for disabled options will
  be commented out by the #if...#endif.

  This may one day lead to simplification of the Makefiles and configure
  scripts, but for the moment I'm leaving Makefiles and configure scripts
  alone.

  Affected options:
    BX_SUPPORT_APIC (cpu/apic.cc)
    BX_SUPPORT_X86_64 (cpu/*64.cc)
    BX_DEBUGGER (debug/*)
    BX_DISASM (disasm/*)
    BX_WITH_nameofgui (gui/*)
    BX_SUPPORT_CDROM (iodev/cdrom.cc)
    BX_NE2K_SUPPORT (iodev/eth*.cc, iodev/ne2k.cc)
    BX_SUPPORT_APIC (iodev/ioapic.cc)
    BX_IODEBUG_SUPPORT (iodev/iodebug.cc)
    BX_PCI_SUPPORT (iodev/pci*.cc)
    BX_SUPPORT_SB16 (iodev/sb*.cc)

Modified Files:
  cpu/apic.cc cpu/arith64.cc cpu/ctrl_xfer64.cc
  cpu/data_xfer64.cc cpu/fetchdecode64.cc cpu/logical64.cc
  cpu/mult64.cc cpu/resolve64.cc cpu/shift64.cc cpu/stack64.cc
  debug/Makefile.in debug/crc.cc debug/dbg_main.cc debug/lexer.l
  debug/linux.cc debug/parser.c debug/parser.y
  disasm/dis_decode.cc disasm/dis_groups.cc gui/amigaos.cc
  gui/beos.cc gui/carbon.cc gui/macintosh.cc gui/rfb.cc
  gui/sdl.cc gui/term.cc gui/win32.cc gui/wx.cc gui/wxdialog.cc
  gui/wxmain.cc gui/x.cc iodev/cdrom.cc iodev/eth.cc
  iodev/eth_arpback.cc iodev/eth_fbsd.cc iodev/eth_linux.cc
  iodev/eth_null.cc iodev/eth_packetmaker.cc iodev/eth_tap.cc
  iodev/eth_tuntap.cc iodev/eth_win32.cc iodev/ioapic.cc
  iodev/iodebug.cc iodev/ne2k.cc iodev/pci.cc iodev/pci2isa.cc
  iodev/sb16.cc iodev/soundlnx.cc iodev/soundwin.cc
2002-11-19 05:47:45 +00:00
Volker Ruppert
35c2be5518 - changed ne2k presence options from "valid" to "present" 2002-11-18 17:16:07 +00:00
Bryce Denney
c07684021c - fix obvious bug in macintosh gui code caused by search and replace
gone wrong.  It said "bx_amigaos_gui_c" instead of "bx_macintosh_gui_c".
  I wish somebody would test this!
2002-11-18 16:42:57 +00:00
Bryce Denney
b161509c56 - put wxT() around every string constant that gets passed into wxWindows.
This turns the string into a multibyte char * if necessary.  It becomes
  important if wxWindows is compiled with unicode support.
2002-11-18 02:40:31 +00:00
Bryce Denney
3ad052c23a - minor fix to compile in VC++ 2002-11-16 22:44:09 +00:00
Volker Ruppert
68a7e67d1b - fixed the names of the gui dll plugins (bx_*.dll) 2002-11-16 10:44:27 +00:00
Bryce Denney
515ffa8ecc - add BOCHSAPI_CYGONLY to insert DLL export tags in places that only Cygwin
wants them.
- modified: bochs.h config.h.in gui/siminterface.h
2002-11-15 18:31:55 +00:00
Bryce Denney
7cb3c606fe - when you reset the options, change the default to Edit Options 2002-11-15 14:38:57 +00:00
Bryce Denney
4e3d70d613 - if user chooses "Restore factory default configuration" then print a
message saying what it has done.
2002-11-15 13:26:15 +00:00
Bryce Denney
1bd7226b6f - change definition of BX_QUICK_START and friends into an enum, and
add more detailed comments about what they do.
2002-11-15 13:22:06 +00:00
Bryce Denney
1bd9a44a9e - plugins are now called libbx_NAME.so for unix and bx_NAME.dll for win32.
- plugins are installed into ${plugdir} which is defined to be
  ${libdir}/bochs-${VERSION}/plugins.

Modified Files:
  Makefile.in plugin.cc configure.in configure gui/Makefile.in
  iodev/Makefile.in
2002-11-14 18:45:49 +00:00
Bryce Denney
09dc13d0f8 - add BOCHSAPI on a bunch of extern variable declarations 2002-11-14 05:14:10 +00:00
Bryce Denney
1af54f9f12 - add definition of BX_PLUGGABLE in wx.cc and wxdialog.cc, since they
have to import DLL symbols from the main executable.

Modified Files:
  gui/wx.cc gui/wxdialog.cc
2002-11-14 05:13:40 +00:00
Bryce Denney
95e62bd80d - apply patch [ 632278 ] Carbon.cc Detabbing
from Jeremy Parsons (brefin)
2002-11-14 01:40:11 +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
Christophe Bothamy
81eca54b51 - fix [ 625696 ] text config menu: default can be wrong.
New behaviour is:
  . No command line arg (user want to load or create a new conf file)
    -> no .bochsrc is loaded
    -> defaults to "2. Read options from..."
  . command line arg -q (user want to quick start from .bochsrc)
    -> .bochsrc is loaded
      -> if found Run the simulation
      -> if not found defaults to "2. Read options from..."
  . command line arg -f (user want to edit a conf file)
    -> conf file is loaded
      -> if found defaults to "3. Edit options"
      -> if not found defaults to "2. Read options from..."
  . command line arg -qf (user want to quick start from a conf file)
    -> conf file is loaded
      -> if found Run the simulation
      -> if not found defaults to "2. Read options from..."
  . After selection of "2. Read options from..."
    -> defaults to "5. Begin simulation"
- fix "enable-control-panel" behaviour in configure.in.
- check if a romimage was supplied in the conf file.
  If not, print a hint about a missing/corrupt conf file.

  I hope I did not break anything, notably the Carbon gui
2002-11-09 14:12:10 +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
Volker Ruppert
942c4c6c36 - added parentheses in function bx_real_sim_c::get_first_cdrom()
BUG: this function should be called if you press the wx cdrom button
2002-11-08 13:18:05 +00:00
Bryce Denney
1533c6df2c - remove tabs 2002-11-01 15:28:41 +00:00
Bryce Denney
c6d6b17c9a - fix wxWindows on win32, which was broken when we added plugin support.
- add a new global struct bx_startup_flags which stores argc,argv and
  when necessary, the WinMain arguments hInstance, hPrevInstance, etc.
  The new struct is defined in gui/siminterface.h because it is needed in
  both the main.cc code and in wxmain.cc and textconfig.cc (which don't
  include bochs.h).
- rename main() to bxmain() and create new main() and WinMain().
  main() and WinMain() just fill in the bx_startup_flags and then
  call bxmain().  Only one is defined at a time, of course.
- so far, WinMain is ONLY used when compiling with wxWindows on win32.
  It may be useful in other contexts as well, but I don't want to enable
  it in any other situation without some serious testing of different
  configurations.
- modified:
    main.cc gui/siminterface.cc gui/siminterface.h
	gui/textconfig.cc gui/wxmain.cc
2002-11-01 15:19:48 +00:00
Gregory Alexander
fc61a0522a Added support for run-time configuration of realtime PIT. 2002-10-29 22:26:32 +00:00
Bryce Denney
a6aa9afd67 - rename "control" to "textconfig". It was named when we called it
a control panel, but now we're calling it a text configuration interface.

Modified:
    .bochsrc Makefile.in bochs.h main.cc cpu/Makefile.in
    debug/Makefile.in disasm/Makefile.in fpu/Makefile.in
    gui/Makefile.in iodev/Makefile.in memory/Makefile.in
2002-10-29 20:18:32 +00:00
Bryce Denney
d8798fb799 - rename control.cc revision 1.66 to textconfig.cc 2002-10-29 20:17:05 +00:00
Bryce Denney
4442c9d28b - rename control.h revision 1.8 to textconfig.h 2002-10-29 20:16:04 +00:00
Bryce Denney
98e37268fc - include standard path variables in gui and iodev. We were missing
libdir, which is now used as the PLUGIN_PATH.
2002-10-28 08:42:06 +00:00
Bryce Denney
73c234b351 - add makefile rule for building SDL dll. It links the plugin with
the SDL library.
2002-10-28 08:20:12 +00:00
Bryce Denney
883442544c - we've been compiling a few extraneous plugins: wxdialog and wxmain.
These files are part of the wx plugin, and they should not be linked
  into a separate plugin.  I have changed gui/Makefile.in and configure.in
  to correct this.
- This fixes bug [ 628667 ] don't build plugin for wxdialog, wxmain
- modified: gui/Makefile.in configure.in configure
2002-10-28 05:49:42 +00:00
Bryce Denney
db750f8234 - to make the "idle hack" compile again, add virtual function sim_is_idle
to bx_gui_c and to bx_x_gui_c.
2002-10-27 23:33:13 +00:00
Christophe Bothamy
814d8b69ef - add "none", "lba", "rechs", "large", "auto" translation
- if translation=auto :
  . translation=none if cylinders <=1024 and heads <=16
  . translation=large if cylinders * heads <= 131072
  . transaltion=lba otherwise
- changes default translation value to "auto"
- add example in .bochsrc
2002-10-27 21:25:33 +00:00
Bryce Denney
954b737dda - apply MacOSX "About Box Patch" from Jeremy Parsons (Br'fin). This fixes
bug [ 626261 ] About Box is awkwardly outdated
2002-10-26 22:06:37 +00:00
Bryce Denney
dd7ad0449d - add missing LOG_THIS to fix compile problem reported by Timothy Schepens 2002-10-26 21:03:21 +00:00