X windows, wxWindows. Each platform has its own way of returning
a variable length string, and its own rules about how you're supposed
to dispose of the string. Now all platforms do the same thing: they
allocate a Bit8u buffer with C++ "new" and copy the clipboard data in,
then release the clipboard data in the platform-specific correct way.
The Bit8u buffer is sent to the keyboard code, which frees it with
delete [] when finished.
- modified: gui/wx.cc gui/x.cc gui/win32.cc iodev/keyboard.cc
files that need them. This is more in line with the other gui libraries,
and the compile line is easier to read.
- modified: Makefile.in configure.in configure gui/Makefile.in
delivered to both the GUI and simulator thread, so they both call
bx_signal_handler. This can lead to deadlock as multiple threads enter
BX_PANIC and try to show a dialog box at once. To solve the problem, I made
a function isSimThread() which can be called from anywhere. If the
bx_signal_handler is called from any thread OTHER THAN the simulation thread,
it returns without doing anything. As a result, only one thread is allowed
to enter the signal handler code, and now control-C works correctly.
Bochs to immediately read the bochsrc and start simulating immediately (as
opposed to going into the configuration interface first). Now -q does
the right thing in the wxWindows interface. It behaves as if you selected
Read Configuration and then Simulate:Start.
- modified: main.cc gui/siminterface.cc gui/siminterface.h gui/wxmain.cc
direct reads/writes from native variables to the x86 (guest)
memory image. Look at the end of bochs.h. Don't know if that's
the right place to put them, but here you can extend these
macros to platform-specific asm() code if you like, or just
use the generic C code I supplied. Some platforms have special
instructions for byte-order swapping etc. Also, you can't
make any assumptions about the alignment of the pointers
passed.
mode uses the notion of the guest-to-host TLB. This has the
benefit of allowing more uniform and streamlined acceleration
code in access.cc which does not have to check if CR0.PG
is set, eliminating a few instructions per guest access.
Shaved just a little off execution time, as expected.
Also, access_linear now breaks accesses which span two pages,
into two calls the the physical memory routines, when paging
is off, just like it always has for paging on. Besides
being more uniform, this allows the physical memory access
routines to known the complete data item is contained
within a single physical page, and stop reapplying the
A20ADDR() macro to pointers as it increments them.
Perhaps things can be optimized a little more now there too...
I renamed the routines to {read,write}PhysicalPage() as
a reminder that these routines now operate on data
solely within one page.
I also added a little code so that the paging module is
notified when the A20 line is tweaked, so it can dump
whatever mappings it wants to.
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