I have not tested these functions, but they model the format and
acceleration principals of the byte/word/dword functions. Give them
a try on both little/big endian machines.
to diff configure...you'll have to run autoconf yourself.
- in config.h.in set BX_SUPPORT_MMX to 0, not 1. The configure script
will replace it with a 1 if appropriate. That's the way all other
options are done.
- you need to use patch -p1 for this
wxHAS_RAW_KEY_CODES is not available in the wxWindows library.
my patch "patch.wx-raw-keycodes" adds wxHAS_RAW_KEY_CODES to the wxWindows
library, and it will also be in wxWindows 2.3.3 and beyond.
correct name for floppy and cdrom devices:on windows, A:, B:, etc;
on Linux /dev/fd0 and /dev/cdrom.
- It's perfectly ok to type device names into the blank on those dialog
boxes, but the label "Disk Image File:" sort of implies that it has to
be a file. To try to avoid confusion change the label to simply
"Disk Image:".
on win32. I believe this is the same problem that scarlip referred to as
"it doesn't start reliably. sometimes it works, sometimes it won't".
See comments in gui/wx.cc (dimension_update) for details.
- since dimension_update is called from the simulator thread, it needs to
get the GUI mutex before calling any wxWindows functions. Now it does.
- add lots of IFDBG_VGA(...) lines which I use to diagnose various problems.
They are compiled away by default (for performance). See definition of
IFDBG_VGA() in gui/wxmain.h.
values. All wxWindows dialogs return wxID_OK or wxID_CANCEL. The
wxOK and wxCANCEL symbols are ONLY used in input arguments that determine
whether to display the ok and cancel buttons. Now I'm doing the same.
Return values are wxID_OK if they pressed the ok button, and wxID_CANCEL
if they pressed cancel.
so that a compare of the current access could be done more
efficiently against the cached values, both in the normal
paging routines, and in the accelerated code in access.cc.
This cut down the amount of code path needed to get to
direct use of a host address nicely, and speed definitely
got a boost as a result, especially if you use the
--enable-guest2host-tlb option.
The CR0.WP flag was a real pain, because it imparts
a complication on the way protections work. Fortunately
it's not a high-change flag, so I just base the new
cached info on the current CR0.WP value, and dump
the TLB cache when it changes.
an allocation scheme that is guaranteed to return a block that is
aligned correctly.
- Kevin asked me to go ahead and align the memory to 4k page boundaries,
so I did. If we need to change this, just change BX_MEM_VECTOR_ALIGN
in memory/memory.h (now 4096).
checks were honoring the EFLAGS.DF bit, but assuming it was always
equal to 0 (increment upward). Plus some general cleanup of the
acceleration code.
I left the default of '--enable-repeat-speedups' to disabled, but
it seems pretty solid. Definitely adds performance for disk
heavy workloads.
SetToolBitmapSize() to set the icon size to 16x16; when I changed the icon
size I forgot to change SetToolBitmapSize() and somehow it looked ok on
wxGTK.
- change mouse tooltip to "(Mouse Not Implemented Yet!)" for now
has a 16bit signed value. If you try to set the max above 32767, it
overflows and does stupid things. To combat this tendency, I now use
the SPINCTRL_FIX_MAX(x) macro when setting the max range of a spinctrl.
On platforms that need it, this will saturate the range at 32767.
think i is still defined the second time.
- MSVC++: can't use a variable to define another variable's array bounds.
Now I use a #define for the array bounds instead.
- implement the Edit Keyboard dialog using ParamDialog instead of the
handcoded thing.
- make Serial/Parallel dialog look a little better
- change order of "other" dialog to get ips and vga_update_interval on top
ParamDialog. When a boolean param changes, I read its dependent_list
field to see which other parameters depend on it. Then, for any
dependents that are actually showing in the dialog, I set their
enable bit accordingly. This required addition of another hash table,
called paramHash. The two EnableChanged() methods implement this.
- remove all ConfigKeyboardDialog code because I can do just as well
using the generic ParamDialog.
- fix bug that caused occasional crashes. To attempt to find all the
choices in an a wxChoice control, I was calling GetClientData() on
increasing index until it returned NULL. The docs implied that this
was safe, but it's not. Eventually I found an apparantly undocumented
call wxChoice::GetCount() that gives the number of strings in the
choice box and it allows me to do the right thing.
to change the enable/disable status of other parameters worked fine for
the text mode interface but poorly for the wxWindows gui. So I
implemented it a different way. Now in every boolean parameter, there is
a field called dependent_list which is a list of parameters which
are enabled/disabled by that boolean. Having this list available
allows both the text mode CI and the wxWindows CI to know which fields
should be enabled and disabled as a result of a boolean changing value.
- when the set() method of a bool param is called, or when the
dependent_list is changed, a private method called update_dependents()
changes the enabled status of all dependent parameters.
- add macros to get parameter ids of serial and parallel port parameters,
using the port number as an input variable.
to change the enable/disable status of other parameters worked fine for
the text mode interface but poorly for the wxWindows gui. So I
implemented it a different way. Now in every boolean parameter, there is
a field called dependent_list which is a list of parameters which
are enabled/disabled by that boolean. Having this list available
allows both the text mode CI and the wxWindows CI to know which fields
should be enabled and disabled as a result of a boolean changing value.
- when the set() method of a bool param is called, or when the
dependent_list is changed, a private method called update_dependents()
changes the enabled status of all dependent parameters.
to change the enable/disable status of other parameters worked fine for
the text mode interface but poorly for the wxWindows gui. So I
implemented it a different way. Now in every boolean parameter, there is
a field called dependent_list which is a list of parameters which
are enabled/disabled by that boolean. Having this list available
allows both the text mode CI and the wxWindows CI to know which fields
should be enabled and disabled as a result of a boolean changing value.
- I've made this change in many of the parameters, in the init code of
main.cc. When I add a dependent_list, I no longer need the "handler"
so I remove the call to set_handler and the cases in the handler
functions.
- in the process, I also made the serial and parallel port init code
into loops, instead of hardcoded initialization. Now if you change
the number of serial/parallel ports in bochs.h the correct number of
ports will be initialized and the menus will grow/shrink accordingly.
- fixed up a few names to improve the look of ParamDialog generated
dialogs.
- define preproc macros for BX_N_SERIAL_PORTS and BX_N_PARALLEL_PORTS
so that if you want to change the number, you only have to change it
in one place.
to get default values, but I didn't initialize bx_options until
bx_init_options(). I still think that removing the initializer
was the right choice, so I made a macro in bochs.h called
DEFAULT_LOG_ACTIONS(level) that supplies the defaults instead.
a method to add the parameters (bx_param_c) that you want to edit,
and display it. It knows how to display and edit boolean, int,
enum, and string, so it can do a reasonable job on any parameter.
The end result is not as nice as a box that you lay out by hand, but
it's decent. The most obvious thing that's missing from
ParamDialog-generated dialogs is that I haven't found a way to
make an "Enable" button that enables/disables a bunch of other
parameters. I'll keep thinking about that.
- using ParamDialog, I made dialogs for Sound, Cmos, Serial/Parallel,
32bitOSloader, and an ugly catch-all category called other.
Now I believe you can edit every single option using wxWindows.
access routines in access.cc, completing the upgrade of
those routines. You do need '--enable-guest2host-tlb', before
you get the speedups for now. The guest2host mods seem pretty
solid, though I do need to see what effects the A20 line has
on this cache and the paging TLB in general.
- remove the format string from GetTextCtrlInt() because the strtoul
conversion is better than the sscanf with a format string (it supports
both base 10 and 16 with 0xFF notation).
- modified files: gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
- also other browse buttons were somewhat broken in that they didn't
set the initial value of the wxFileDialog. Now all text fields
with a browse button use a single function BrowseTextCtrl() to
avoid future problems of this sort.
- if the Ok on the MemoryConfigDialog is rejected because the integers
can't be parsed, now give a more specific error message that points you
to which field has the illegal value.
- print hex numbers with CAPS. With proportional font this is much
easier to read.
- accept either strings with base 10 or 16 numbers in GetTextCtrlInt by
default. If the sscanf fails, accept anything that strtoul can
read. Unfortunately legitimate "-1"'s being returned from strtoul will
be rejected, but at present there is no need for negative numbers in
textfields anywhere.
- modified files: gui/wxdialog.cc gui/wxdialog.h