Commit Graph

203 Commits

Author SHA1 Message Date
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
Volker Ruppert
2b310aeb33 - function get_builtin_variable(): on win32 use the value of the registry key
created by the nsis installer for the BXBIOS variable. The compile time
  default for BXBIOS (e.g. /usr/local/share/bochs) is not usable on win32.
2002-12-03 18:55:23 +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
79db8b0d71 - added missing bochsrc options in function bx_write_configuration() 2002-12-02 20:32:13 +00:00
Volker Ruppert
f3bbde98e0 - define MAX_ARGLEN if it doesn't exist 2002-12-01 14:18:37 +00:00
Volker Ruppert
9f7130c150 - implemented builtin variable BXBIOS for the non-plugin version and platforms
that do not support setenv()
2002-11-26 20:40:50 +00:00
Volker Ruppert
91af460652 - checked in patch.sdl-win32-console from Bryce Denney (see below).
- removed the code for changing the console screen buffer size
- BUG: the gui window receives all keypresses from the console when it gets back
  the focus. We have eliminate all keypresses before the simulation continues.

Bryce wrote:

This untested patch shows how and where to call RedirectIOToConsole() when
compiling with SDL on win32.  I believe this, or something like it, will
fix the problem of having no console window on SDL.

- enable RedirectIOToConsole() when compiling with SDL on win32, so that
  it can be called in main().
- move main() down below the definition of RedirectIOToConsole(), and
  add a call to RedirectIOToConsole()
- in WinMain, Bochs always asked the user to press ENTER before exiting.
  I moved that code to main() with #ifdef WIN32...#endif around it.
  (Maybe this should only be done when Bochs explictly creates a console
  window, though.)
2002-11-26 18:15:56 +00:00
Volker Ruppert
09ffa26383 - the function SetConsoleScreenBufferSize() seems to be the reason for the
console scrolling problems - disabling it for now.
2002-11-25 21:28:19 +00:00
Bryce Denney
59401e9de3 - add comments about win32 main/WinMain and associated functions 2002-11-25 18:17:13 +00:00
Bryce Denney
56b67a6a8d - do feature request [ 640888 ] add default for BXBIOS env variable
- if BXBIOS is not defined, set it to a default value that is produced
  in the makefile.  This allows us to make disk image TAR packages that
  look for the bios images in the $BXBIOS directory.  These packages
  will be able find the current images for future Bochs versions, without
  any modifications.
2002-11-25 18:00:05 +00:00
Bryce Denney
37077c8c1c - check in Br'fin's patch from
[ 642324 ] MacOSX: Silent failure when run from GUI
  This fills in the ensure_text_console_exists() function for Carbon.
2002-11-25 17:53:53 +00:00
Christophe Bothamy
2252507276 - add "-n" option to NOT load any configuration file 2002-11-24 13:41:07 +00:00
Bryce Denney
87baf09bb9 - call new function ensure_text_console_exists before going into the
text config interface.  This function does not have any contents yet...
  the contents need to be filled in for those platforms which sometimes
  have no stdin/stdout.  The default case, in which stdin/stdout is
  usable, is to just return.  But if stdin/stdout is NOT usable, this
  function should display a warning dialog and quit.
2002-11-23 13:26:21 +00:00
Bryce Denney
714924eadc - check in Br'fin's solution to CFURLGetFileSystemRepresentation
compile error on MacOSX.  This patch was attached to an email today.
2002-11-23 12:35:42 +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
919e8a3575 - move call to update_drive_status_buttons until after hardware init.
Before when the debugger was enabled, the update function was called
  before hardware init leading to a panic.

Modified Files:
main.cc debug/dbg_main.cc
2002-11-20 19:34:51 +00:00
Bryce Denney
00c0ff3a5a - call bx_gui::update_drive_status_buttons after all hardware has been
initialized.  This should fix
  Bug #630865: CDRom icon in toolbar initiall 'ejected'
2002-11-20 13:08:17 +00:00
Bryce Denney
ccd006835b - always print header, not just if !wx 2002-11-19 08:54:32 +00:00
Volker Ruppert
35c2be5518 - changed ne2k presence options from "valid" to "present" 2002-11-18 17:16:07 +00:00
Bryce Denney
ab6cb49693 - this fixes bug #638600: need default plugin search path
- configure script adds -DBX_PLUGIN_PATH="${plugdir}" to CFLAGS/CXXFLAGS
  in the Makefile.
- in main.cc, if plugins enabled and the environment variable LTDL_LIBRARY_PATH
  is not set, then it gets set to the value supplied by BX_PLUGIN_PATH.

Modified Files:
  main.cc Makefile.in configure.in config.h.in configure
2002-11-18 02:32:53 +00:00
Bryce Denney
70b69a2a64 - if cmd line is empty, don't touch array index 1 with "*(last_nonspace+1)"
- argc was returning the wrong number of args.  Now I treat null and space
  the same way, except that null causes the loop to exit.
- change "extern "C" int WinMain" to "int WINAPI WinMain".
- in WinMain pause for the user to read the screen before making it disappear.
  This is very useful when there was an error during startup because otherwise
  you can't read it.  However we'll probably want to disable it when the
  user actually asked for Bochs to quit.
2002-11-16 22:50:51 +00:00
Bryce Denney
2b1982bb3a - fix yet another creative spelling of "library" 2002-11-15 22:56:37 +00:00
Bryce Denney
34f8d7e447 - there are 2 definitions of main. I moved the "normal" one to the top so that
it's easier to find.  The other one is for wxWindows on win32 only.
- for wxWindows on win32, I added a function called RedirectIOToConsole() from
  an article in the Windows Developers Journal that creates a console window
  and sets up stdin,stdout,stderr to operate on the console.  This works,
  except for a console freezing problem that I described on the mailing list
  earlier today.
- Once it is working better, we may want to use the WinMain definition for
  other types of compiles on win32, and maybe even for all win32 compiles.  In
  particular when we compile with SDL we should create a console window too.
- comment out some debug output from the command line parser, add \n's in
  a few places.  (I'm using stderr instead of BX_PANIC because I don't think
  the logging system is ready to be used at this early stage.)
2002-11-15 18:53:52 +00:00
Bryce Denney
9022439b17 - fix spelling of "library" 2002-11-15 16:14:01 +00:00
Bryce Denney
3f07ce86d6 - change startup behavior so that if you don't type any command line args,
the bochsrc is loaded by default.
- if you asked for quick start, but the config file could not be loaded,
  print a warning "Switching off quick start, because no configuration file
  was found".
- now the behavior looks like this:
  . no command line arg (most common)
    -> .bochsrc is loaded
      -> if found defaults to "5. Begin simulation"
      -> if not found 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 specifies which conf file to load)
    -> conf file is loaded
      -> if found defaults to "5. Begin simulation"
      -> if not found, print error message on console:
	  >>PANIC<< reading from bochsrc2.txt failed
  . 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, print error message on console:
	  >>PANIC<< reading from other failed
  . after selection of "2. Read options from..."
    -> defaults to "5. Begin simulation"
  . if user wants to create a new conf file:
    -> run bochs with no args
    -> .bochsrc is loaded by default
    -> choose 1. Restore factory default configuration
    -> default is changed to "3. Edit options"
- See bug #625696 "text config menu: default can be wrong" for
  more discussion of this issue.
2002-11-15 14:47:58 +00:00
Bryce Denney
8d7da6be35 - win32 applications get the whole command line in one long string.
Add a new function "split_string_into_argv" that chops up the
  string into individual args, and understands the rules of single
  and double quotes.
2002-11-14 05:12:28 +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
01027b46c9 - converted devices pci and pci2isa to plugins
- moved PCI presence check to devices.cc
- moved initialization of the PCI register arrays from constructor to init()
- PCI macros updated
2002-11-09 20:51:40 +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
Bryce Denney
0c734d9a4d - commit patch [ 629157 ] MacOSX Carbon Plugin Cleanup
by Jeremy Parsons <brefin@mac.com>
- modified: configure.in configure Makefile.in main.cc
2002-11-01 17:53:52 +00:00
Bryce Denney
8ab3a76bbf - remove tabs 2002-11-01 16:30:53 +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
5bc28d6dfa Add a minimum IPS value at compile time.
This is used for calculating the minimum speed for the realtime PIT and for flagging errors with user IPS values.
2002-10-30 18:30:29 +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
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
99aa099b67 - we renamed the term 'VGA library' to 'display library' a while ago. I
fixed some lingering references to vga library.
2002-10-26 13:22:47 +00:00
Bryce Denney
441eb253f7 - remove references to obsolete hga. Now --enable-vga and --disable-vga
no longer exist.  I think configure will silently ignore them.
- modified:
    iodev/Makefile.in iodev/devices.cc iodev/iodev.h main.cc
    configure.in config.h.in configure build/batch-build.perl
2002-10-26 13:14:11 +00:00
Bryce Denney
48acd53db4 - all #warnings are now inside #ifdef __GNUC__ ... #endif
Modified Files:
    ltdl.c main.cc plugin.cc cpu/cpu.cc cpu/debugstuff.cc
    cpu/exception.cc cpu/fetchdecode64.cc cpu/init.cc
    cpu/paging.cc gui/siminterface.cc gui/wxmain.cc
    iodev/harddrv.cc
2002-10-25 12:36:44 +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
Bryce Denney
9297b17797 - in main.cc make the bochsrc parser a little more lenient about
empty pathnames, zero cylinders, etc.  It doesn't seem fair to allow
  people to write out bochsrcs that they cannot read back in without
  patching them up by hand!
- in harddrv.cc add the equivalent checks with BX_PANICs so that at least
  we don't start simulating with incomplete device configuration.
- make a few error messages more clear
- modified: main.cc iodev/harddrv.cc
2002-10-21 11:22:26 +00:00
Bryce Denney
cd4d17a363 - min and max in shadow params were broken recently when I changed the
constructors around.  The min,max that were being passed to the parent
  class constructor had junk in them.  In config.h.in, I defined the minimum
  and maximum values for each integer datatype so now we pass correct
  min and max values to the parent class.  These replace the BX_MAX_[U]INT
  and BX_MIN_[U]INT values.
- modified: main.cc config.h.in gui/siminterface.cc
2002-10-21 11:13:54 +00:00
Bryce Denney
f6c637aa8a - upgrade bx_param_num to use 64 bit values, so that I could make
bx_shadow_num_c able to handle pointers to 64 bit values.  This
  allows x86-64 and wxWindows to coexist.
- I had a number of duplicate constructors for bx_shadow_num_c,
  with an without the description arg.  I eliminated the ones
  that had no description, and also removed the min/max arg from
  all.  I still need a bunch of constructors though, for
  Bit64u*, Bit64s*, Bit32u*, Bit32s*, Bit16u*, Bit16s*, Bit8u*, Bit8s*.
  Having all these constructors allows us to write
    new bx_shadow_num (bxid, name, description, &value)
  for basically any integer variable.  They are all handled by the same class.
- these changes led to minor touchups in cpu/init.cc and iodev/keyboard.cc
- modified:
    configure main.cc cpu/init.cc iodev/keyboard.cc
    gui/siminterface.cc gui/siminterface.h
2002-10-16 19:39:27 +00:00
Bryce Denney
d1196d1996 - clean up the command line argument parsing. Before, we had two slightly
different versions of the code for wxWindows and non-wxWindows and the GDB
  stub did not accept any command line options at all.
- IMPORTANT CHANGE: the quick start option used to cause two things:
  1) read the bochsrc immediately, 2) start simulation immediately without
  going into the config interface.  This has changed in a subtle way.
  Now, we always try to read the bochsrc immediately.  Then if the quick
  start option is on, we start the simulation immediately.
- add "Restore Factory Default Configuration" in text config menu.  It was
  already there in wx.  Now the default choice is always "5. Begin simulation"
  and because the bochsrc is always read now, this works.
- When the user chooses "Read configuration file" from either text mode
  or wx interfaces, reset all bochs parameters first, then read in the
  new file.  This means that every time you read a configuration file
  you are starting from a consistent "blank slate".
- move much of the code from bx_do_text_config_interface into bx_init_main
  so that wxWindows and non-wxWindows code uses the same logic.  There was
  only a tiny bit left in bx_do_text_config_interface so I eliminated it.
- move the "help" message into a separate function print_usage()
- detect all flags (cmdline args that start with -) in a loop, instead of
  a big if/else.  This makes it easy to add others.
- fix problem with Carbon gui, so that -psn arg gets ignored
- print usage if you type -h, --help, or if flags are not recognized
- code that called io->set_log_action (that sets the log action for all
  devices) was only called if the configuration interface was on; I'm not
  sure why.  Now it is called all the time.
- the wxWindows equivalent of main() is called MyApp::OnInit.  Now OnInit
  and main() are very similar.  They both call bx_init_siminterface, then
  bx_init_main (and quit if it fails), then show the config interface if
  quickstart is off, and then simulate.
- modified: main.cc gui/control.cc gui/wxmain.cc
2002-10-14 13:37:20 +00:00
Bryce Denney
555e1d03e1 - set the quit context to NULL after it is no longer usable. I don't want
anybody jumping back because the pointer was still lying around.
- modified: gui/wxmain.cc main.cc
2002-10-06 19:21:05 +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
Bryce Denney
e568d14ef3 - add GDB stub patch by Johan Rydberg 2002-10-03 05:29:15 +00:00
Bryce Denney
cbf9307ad9 - workaround for SDL compile problem on MacOS X 2002-10-02 19:23:01 +00:00
Bryce Denney
0d8e31b672 - solve SDL specific build problem: in win32, SDL redefines main to SDL_main.
Include SDL.h so that the C language prototype can be found.  Otherwise
  SDL_main() will get its name mangled and not match what the SDL library is
  expecting.
2002-10-01 23:34:52 +00:00