control panel are all implemented as bx_list_c, and look much like
they did before.
- removed many hardcoded UI functions from control.cc, since the
much more general "text_ask" methods have replaced them.
- add range checking on integer parameter values. This exposed several
cases where my initial value for an integer parameter was not in range.
- cleaned up behavior of get/set methods. The get/set methods allow the
handler to override the value that is returned/set, or perform side
effects.
- the title parameter of a bx_list_c now defaults to the name.
- now bx_param_c fields that used to be private are protected instead
- removed references to bx_any
- moved definition of set_handler from siminterface.h to siminterface.cc.
I was considering with doing a "set" of the old value when the
handler is first installed, but that remains commented out.
- BX_BOOT_DISKA and BX_BOOT_DISKC are now 0,1 so that they can correspond
with the values of a bx_param_enum_c. For a while they were 0x00 and 0x80
corresponding to the numbering convention of the bios, but it didn't
really matter.
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.
crash in the mouse code. The particular problem was that init_done
was never initialized to zero, but it always turned out to be zero
on my system. This may explain why it worked for me but crashed
for him.
data structures, see bx_init_options in main.cc. The implementation
of this menu and all its choices is 17 lines long, see do_mem_options_menu
in gui/control.cc.
now the whole "Bochs Memory Options" menu uses new style parameters.
The next step is to remove the hardcoded stuff that generates and runs
this menu, and replace it with general menu building code. All you should
need to create this menu is the string "Bochs Memory Options", and the
IDs of the bx_param_c options that should appear on the menu. The
bx_param_c structure for each parameter tell what type it is, how to
display it, constraints on the value, what to do when the parameter
changes.
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.
when main.cc no longer had one. Now compiling with debugger is working
with the control panel. To get the control panel, you have to click
the snapshot button, and to get the debugger, you have to press ^C.
These should be better integrated (maybe a control panel menu choice
that jumps into the debugger and a debugger command that starts the
runtime control panel...)
panel. It gives the user the option of continue this time, continue
and never ask again for this type of log message, or die.
- the communication between control.cc and siminterface.cc is still
somewhat crude. I'm trying to implement it so that a network
protocol based on this interface will be simple. I'll get this cleaned
up soon.
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.
writes a bochsrc for you.
- since there were two options related to logging, I moved them both
into a new struct called bx_log_options. This follows the pattern
used by other devices.
- in control.cc: removed option 1 from main menu, the one that said
"Read options from bochsrc.txt." This was identical to choosing
the next option, "Read options from..." and only saved you one
keystroke, so I removed it.
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.