Commit Graph

1861 Commits

Author SHA1 Message Date
Bryce Denney c1f363c7b5 - not using the config button in wxwindows 2002-09-06 15:00:54 +00:00
Gregory Alexander 1c3ae99300 Speed-up for TLB invalidates as proposed by Peter Tattam.
I had been planning on this same thing in a similar form
for the I$, so this made a lot of sense, and was easy to
implement.
2002-09-06 14:58:56 +00:00
Bryce Denney 70d0a6b844 - now that wxmain.h class definition includes a few dialogs from wxdialog.h,
wxdialog must come first.
2002-09-06 14:40:22 +00:00
Bryce Denney 47d7669685 - remove a huge chunk of obsolete code 2002-09-06 04:43:03 +00:00
Bryce Denney 781b06e791 - remove obsolete testing code 2002-09-06 04:41:39 +00:00
Bryce Denney 85b3dfe60f - fix minor problems with static member function declarations:
- bx_gen_reg cannot be declared with BX_SMF or it can't read gen_reg
    when static member functions are turned on.
  - use "BX_CPU_C_PREFIX" instead of "BX_CPU_C::" for get_segment_base.
- the SMF (static member function) tricks are just plain wierd. The only way to
  really be sure that you're not breaking something is to try compiling it with
  SMF on and with SMF off.  e.g. "configure && make" and
  "configure --enable-processors=2 && make".
2002-09-05 20:16:40 +00:00
Volker Ruppert b978b19405 - adding strdup() fixes the 'const' problem with gcc 2.95.3 2002-09-05 20:16:19 +00:00
Bryce Denney 9a045c7340 - since wxWindows+debugger+readline is a combination that currently doesn't
work (control-C kills process instead of returning to debugger prompt), give
  a configure-time error if they are enabled together.  If we can fix the
  signal problem in readline, this check can be removed.
2002-09-05 19:59:20 +00:00
Stanislav Shwartsman 2d2651a0f3 Added some useful debug/information methods for BX_CPU class 2002-09-05 19:46:20 +00:00
Bryce Denney b76eb56a8e - fix signal handling for wxWindows with text debugger. There are still
problems with control-C handling if you enable readline, because readline()
  installs its own signal handlers every time you call it.  I'm having
  good luck with "--with-wx --enable-debugger --disable-readline" now.
2002-09-05 19:40:17 +00:00
Stanislav Shwartsman 611d983900 Added get_REGISTER functions for all registers 2002-09-05 19:12:02 +00:00
Bryce Denney e41cfeb329 - put "log filename" onto the LogOptions dialog instead of EditOther
- remove config button from toolbar for wxWindows, since that's what all
  the menus are for!
2002-09-05 17:27:50 +00:00
Bryce Denney 27b57724a6 - fix unused variable warning 2002-09-05 16:50:03 +00:00
Bryce Denney 7a2bb1f5a6 - force wxWindows to put all log messages to stderr. (Sometimes it is
tempted to bring up dialog boxes to display the debug messages.)
2002-09-05 16:41:54 +00:00
Bryce Denney 4a559e26d9 - skip over some fprintfs to stderr when using wxWindows 2002-09-05 16:40:18 +00:00
Bryce Denney fce114ed19 - eliminate printfs in wxwindows code--use wxLogDebug instead 2002-09-05 16:27:06 +00:00
Bryce Denney 53d71821c1 - I already checked in something better than this 2002-09-05 16:02:43 +00:00
Bryce Denney 7cef3cc3a4 - clean up memory usage after bx_gui_c::get_clipboard_text for win32,
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/wxmain.cc gui/wxmain.h
2002-09-05 16:01:34 +00:00
Bryce Denney eb12552eef - in the panic dialog box, change the "Die" button to "Kill Sim".
It wasn't clear if die meant to kill the simulation or the whole app.
2002-09-05 15:58:39 +00:00
Bryce Denney 17624e7549 - clean up memory usage after bx_gui_c::get_clipboard_text for win32,
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
2002-09-05 15:57:37 +00:00
Bryce Denney 5feb140d70 - restore signal handling to default when bochs thread dies 2002-09-05 15:51:03 +00:00
Bryce Denney 2c9fcbb147 - somehow I lost one important line in my last checkin that defines WX_CONFIG 2002-09-05 15:49:48 +00:00
Bryce Denney ce2f799033 - fix bug in key mapping. I typed BX_KEY_MINUS for two different keys. 2002-09-05 15:13:34 +00:00
Bryce Denney 892eaab88c - in wxwindows compile, only include the wxwindows cflags on the few
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
2002-09-05 15:12:13 +00:00
Bryce Denney 28801ce9ff - implement clipboard functions for wxWindows
- enable keymapping for wxWindows, by inserting bx_keymap.loadKeymap(NULL)
  call in wx.cc
2002-09-05 13:38:44 +00:00
Christophe Bothamy 1fb02cacf1 - updated with rombios-new-ata.c rev 1.4 :
- fixed stupid "#if #elif" bug in ata paramaters
  - added debug/screen message if device detection fails.
2002-09-05 08:20:06 +00:00
Christophe Bothamy e6f8c1ba46 - fixed stupid "#if #elif" bug in ata paramaters
- added debug/screen message if device detection fails.
2002-09-05 08:18:30 +00:00
Bryce Denney b9bfa8ed7f - fix signal handling in wxWindows. The problem was that a signal gets
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.
2002-09-05 07:48:39 +00:00
Bryce Denney b79630a14e - Volker introduced the -q command line switch in August 2002, which tells
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
2002-09-05 07:01:30 +00:00
Bryce Denney 578cc09f55 - keypad5 is apparantly called GDK_KP_Begin on my keyboard 2002-09-05 06:08:47 +00:00
Kevin Lawton f29f9ef021 Fixed Big-endian case of --enable-guest2host-tlb. I macro'ized the
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.
2002-09-05 04:56:11 +00:00
Kevin Lawton 83eb7d4199 Updated comments with info on the new TLB permissions storage
and strategy, so that others can understand it.
2002-09-05 03:09:59 +00:00
Kevin Lawton f0c9896964 Now, when you compile with --enable-guest2host-tlb, non-paged
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.
2002-09-05 02:31:24 +00:00
Bryce Denney f4157cad97 - the BIOS and other files have migrated to /usr/share/bochs, so now
"make unpack_dlx" needs to fix up the pathnames appropriately.
2002-09-04 21:13:21 +00:00
Stanislav Shwartsman c3b4f170d6 The patch was changed accoring to access.cc changes and
Bryce's recomendations.
2002-09-04 21:13:08 +00:00
Bryce Denney d6c1c14d43 - patch now adds configure option --enable-mmx that enables/disables it 2002-09-04 20:32:04 +00:00
Kevin Lawton 8a1baa6bb8 Added ::{read,write}_virtual_qword() functions as per Stanislav's request.
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.
2002-09-04 20:23:54 +00:00
Bryce Denney 20bd8507af - add configure option --enable-mmx in configure.in. I didn't bother
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
2002-09-04 20:09:00 +00:00
Bryce Denney db239afdcf - add diffs in cpu/Makefile.in so that it compiles w/o editing anything
- you must use patch -p1, not patch -p0
- write date as September 1, 2002 so it's not confusing to U.S. readers,
  who think 1/9/2002 means January 9.
2002-09-04 19:47:33 +00:00
Stanislav Shwartsman 21413f26aa MMX support patch
Now with BIG_ENDIAN systems compatability
Tested on HP1100 and Solaris systems
(for Bochs 1.4.1 release)
2002-09-04 19:30:09 +00:00
Bryce Denney 137e132371 - add a bunch of missing key codes for MSW. These will only be used if
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.
2002-09-04 19:14:08 +00:00
Bryce Denney 9d20ece24c - add #ifdefs per operating system so that the dialog boxes display the
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:".
2002-09-04 18:39:20 +00:00
Bryce Denney ce17b410ab - don't complain on non-X11 platforms where install-x11-fonts script
does not exist.
2002-09-04 18:18:32 +00:00
Bryce Denney 462797bb16 - remove references to (obsolete) wxthreadtest 2002-09-04 17:21:46 +00:00
Bryce Denney 645b3395f1 - fix settings for release build
- still, the debug build is the default (for now)
2002-09-04 17:16:46 +00:00
Bryce Denney 5596107acb - (hopefully) solves a thread deadlock problem that showed up occasionally
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.
2002-09-04 15:51:04 +00:00
Bryce Denney 614d2ff681 - we don't need to say "Welcome to wxWindows" on the status line 2002-09-04 14:09:05 +00:00
Bryce Denney 9f29d942fd - main should return something! how about 0. 2002-09-04 13:07:26 +00:00
Bryce Denney 0fe0832b99 - to avoid confusion and bugs I made a new convention on dialog return
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.
2002-09-04 12:29:04 +00:00
Kevin Lawton d07c1c0bb0 I rehashed the way the paging code stores protection bits,
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.
2002-09-04 08:59:13 +00:00