(based on a patch from Christopher Nelson <paradox@BBHC.ORG>)
* the win32 gui changes the bitmap settings using the bpp argument
* added stubs for all guis except win32
* descriptions of function dimension_update() updated
font usage)
- horizontal and vertical pel panning in text mode implemented (without windows
fonts only)
- separate bitmap for the textmode cursor no longer necessary
- text_update(): unused variable new_start removed
compile time. The old version used this fonts for char heights smaller 14.
If the Windows fonts are enabled, the font heights 12, 14 and 16 are used.
These features are not available in that case:
* charmap change
* char width switch 8/9
* horizontal and vertical pel panning
If the Windows fonts are disabled, the changeable guest font is used and all
implemented features are available. This is the default setting.
TODO: implement horizontal and vertical pel panning
FIXME: Should we add a bochsrc option to control the font usage?
- invalidate character at previous and new cursor location before entering the
update loop
- cursor drawing moved into the update loop
- variables for previous cursor position renamed
- invalidate character at previous and new cursor location before entering the
update loop
- cursor drawing moved into the update loop
- speed optimizations in function DrawBochsBitmap() (malloc/free removed)
- description of function text_update() updated
* changed all %ll format descriptions to FMT_LL macro so that
Microsoft Visual C works correctly (it uses %I64)
* missing type conversions added
* cdrom.cc: variable types for win32 fixed
* removed some unused variables in eth_win32.cc and harddrv.cc
* added missing includes in make_cmos_image.c and niclist.c
in text mode. The new variables 'text_rows' and 'text_cols' are used in the
text_update() function.
- desriptions of the functions text_update() and dimension_update() updated
These changes are based on the SF patch #742670. It did not work with
plugins disabled.
Here is the descriiption of patch #742670:
the library dependencies (see objdump -p file) in the
main bochs binary and the gui plugins are wrong:
- the gui plugins don't depend on their respective gui
libraries
- the main bochs binary depends on all the gui libraries
this doesn't seem much of a problem, since the needed
libraries are loaded anyway, but it's problematic when
building packages for binary distribution of bochs.
in Debian, the package building tools will set package
dependencies according to the library dependencies of
each file, so the result is:
- the main bochs package depends on all libraries. this
includes libwx, libsdl, libncurses and xlibs.
- the indivudual plugin packages don't depend on any
gui library
so when a user wants to run bochs with the curses gui
and installs the bochs-curses package, he/she will be
forced to install Xfree86, WxWindows and GTK+ on
his/her system.
the attached patch fixes the problem by moving the
linker flags related to GUI libraries to the right
makefile (gui/Makefile.in)
in text mode. The new variables 'text_rows' and 'text_cols' are used in the
text_update() function.
- optimizations in function UpdateScreen()
- desriptions of the functions text_update() and dimension_update() updated
* renamed variables textres_x and textres_y to text_cols and text_rows
* use text_rows in function text_update() instead of the function argument
(unused for now - should be removed)
* fixed a warning (bochs_icon_bits)
cursor enable/disable support implemented
- function dimension_update() now calculates the number of visible rows and
columns in text mode
- draw a border if the physical screen is larger than the bochs text screen
- initialize color pairs only when color support is present
- german umlaut characters added in function get_term_char()
- function get_term_char(): unsupported characters are now replaced by spaces
and implemented in SDL
* sequencer controller register 0x01 bit 0 controls the width of the characters.
This value is used to calculate the screen width.
* attribute controller register 0x10 bit 2 controls the appearance of graphics
characters (ASCII 0xC0 - 0cDF). A change of this value forces a charmap update
to rebuild the font bitmaps.
* the SDL display library uses the new feature described above
* the other display libraries recalculate the screen width, since they are using
a fixed font width of 8 for now.
- VGA: attribute controller register 0x10 bit 2 (enable_line_graphics) does not
switch the palatte in CGA mode
- line offset handling simplified
- calculate textres_x and textres_y after changing the font dimensions
- unnecessary size check in function dimension_update() removed
You can now choose for each disk on the ata interfaces the
disk mode, between :
- flat : one file flat layout
- concat : multiple files layout
- external : developer's specific, through a C++ class
- dll : developer's specific, through a DLL
- sparse : stackable, commitable, rollbackable
- vmware3 : vmware3 disk support
- undoable : flat file with commitable redolog
- growable : growing file
- volatile : flat file with volatile redolog
- z-undoable : gziped flat file with commitable redolog
- z-volatile : gziped flat file with volatile redolog
A new "bxcommit" utility can merge commitable redologs to
flat images.
DEV_kbd_gen_scancode() is called instead of DEV_kbd_put_scancode(). This
change enables the support for different scancode sets. The win32 scancodes
are now converted to bx_key values.
- 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
and improved by Christophe Bothamy and Volker Ruppert)
Comment from the author:
Attached is a "patch" file detailing what you need to do
to add USB support (UHCI only for now) to your existing
Bochs (2.0.xx) source code.
I use Win32 and VC++ but the source and modifications
should be platform and compiler independant.
Please let me know if this patch some how breaks the
build process of your compilation (Bochs 2.0.0 or above
only).
I would also like any feedback on how this code works
(or doesn't work) on your platform and within your
images. If you explain in as much detail as you can on
how it did or did not work, I will try to add to the source
to help it work on all platforms and images.
appears with the right dimensions. Font sizes other than 16 are working now.
The maximum font height in text mode is 32.
- the text mode cursor is now drawn with the right colors
the icon problem on Win2000. RegisterClassEx() would be required if we want
to specify a special mini icon.
- the win32 gui now uses the new function/macro DEV_vga_actl_pal_idx() to
determine the text mode colors.
palette - it's an index to the attribute controller palette index.
The new function get_actl_palette_idx() now returns the real DAC index.
The guis sdl, wx and x11 are using the new function. TODO: Fix this bug in
all other guis.
Authors: Br'fin, Bryce
- for MacOSX/Carbon, if you start the app by double clicking in the finder,
there is no text console. So in logfunctions::fatal(), display the
final message in a Carbon dialog instead of using fprintf.
- in the text-mode config interface, return an error code if the
user tries to use the text menus when there's no text console.
Back in bxmain() this error code causes a panic
"Bochs needed the text console, but it was not usable"
- if a config file was not found, normally we turn off quick start
and drop into the text menus. However in the no-console case the
text menus won't work, so we added a panic: Unable to start Bochs
without a bochsrc.txt and without a text console. This is a much
more useful error than the generic one above.
- removed ensure_text_console() which was making matters worse instead
of better.
Modified Files:
logio.cc main.cc gui/siminterface.cc gui/siminterface.h gui/textconfig.cc
completely ignored and Bochs has always been returning 0. Now Bochs should
exit with the proper exit code.
- implementation: BX_EXIT(exitcode) calls SIM->quit_sim(exitcode).
quit_sim stores the exit code in the SIM object, then uses longjmp
to unwind the stack and return to main(). main() calls
SIM->get_exit_code() to retrieve the exit code and returns it.
- If you are wondering why we don't just call exit(exitcode), it is
because in the wxWindows interface all of the CPU simulation runs as one
thread while the user interface runs as another thread. With the longjmp
technique the simulation thread ends cleanly and it is possible to
start a new simulation thread without making a new process.
eject, insert, eject, etc. several extra times before allowing you to
actually change the CD. The extra insert/eject cycles were coming from the
param handlers for cdrom status and for the cdrom pathname. To fix this, I
changed wxdialog.cc and textconfig.cc to only call set() on parameters if
they are different from the original value. Now it generally does what you
would expect.
- to change physical CD: change the Bochs CD status to "ejected". On some OSes
that will actually eject it, but on others it will simply close the file so
that the eject button will actually work. Then put the new CD into the
drive, and change the Bochs CD status to "inserted".
Modified Files:
main.cc gui/siminterface.cc gui/siminterface.h
gui/textconfig.cc gui/wxdialog.cc
the first cdrom. Implemented by MyFrame::editFirstCdrom().
- eliminate OnOtherEvent and call OnEditATA directly from the event table.
Modified Files:
gui/wxmain.cc gui/wxmain.h
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
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
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
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
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.
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'
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
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
- 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
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
- 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
. 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.
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
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.
- 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
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
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
- 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
"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
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
value instead of a 32 bit value. Unfortunately there were many uses
of bx_param_num_c::get() which depended on its size, and they were
all broken by this change. So in this rev I am changing get() to
return a 32bit unsigned again. If you really want a 64bit value (which
is quite rare) you should call get64() instead.
- modified: gui/siminterface.h gui/siminterface.cc
Patch name: patch.macosx-ui-polishing
Author: Jeremy Parsons <brefin@mac.com>
Date: Wed Oct 16 2002
Detailed description:
A number of changes to the Carbon Code to improve how well it meshes with the
MacOS X user experience as well as to make sure that all of more recently added
toolbar buttons actually work.
Specific changes include:
Added partial keymap support. (Keymaps don't yet affect what the user types
but an X11 keymap can be used to enable pasting)
Copying of text screens added
Pasting of text as keyboard input added
Copy, Paste, Reset, and Snapshot menu items now work the same as the
corresponding toolbar elements
Revamped icon handling to use Control Manager IconControls,
thus removing icon display code and greatly simplifying icon click handling code
while adding better behaviours (icons that darken when clicked, track mouse movement,
and only do something if the mouse is released atop of them as well as gaining
the ability to be disabled)
Tweaked Paste toolbar and menu items to only be enabled if key mapping is in use AND the
clipboard contains text
Tweaked Copy and Snapshot toolbar and menu elements to only be enabled if
the screen mode is text.
Tweaked User Keys toolbar element to only be enabled if there are user keys
defined to be sent
Tweaked Configure toolbar element to only be enabled if a tty is available
(as in the emulator was started from a terminal)
Respaced toolbar icons to match Aqua Toolbars
Disabled menu items that are not currently handled (undo, clear, cut, disk eject)
Full screen backdrop resettled all across the screen
Fixed the callback interface so that when a Panic needs to ask the user about continuing
it actually works appropriately.
----------------------------------------------------------------------
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
X11 keymap files. This okay since the keysym values are identical. The "AltGr"
key on European keyboards doesn't work with wxGTK 2.3.3 because the keysym
GDK_Mode_switch is not handled in wxGTK.
- German keymap table for wx and wxgtkkeys.h are no longer needed
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