Commit Graph

2010 Commits

Author SHA1 Message Date
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
Bryce Denney
7b157bbf43 - remove panic condition "memory not suitably aligned" and replace with
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).
2002-09-04 02:11:33 +00:00
Kevin Lawton
54bc40971c Fixed repeated IO/string instruction acceleration bug. Not all the
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.
2002-09-03 19:38:27 +00:00
Bryce Denney
901540f1ed - fix buggy link to releases in the Latest News section, reported by lexxmt. 2002-09-03 19:14:44 +00:00
Bryce Denney
33eefab657 - clean up extra ^M's I introduced when playing in win32 land. They are
mostly harmless EXCEPT if they appear after a '\' that's used for line
  continuation.  Then they are a disaster.
2002-09-03 19:04:17 +00:00
Bryce Denney
f2398d7daa - I needed to add iodev/biosdev.cpp to the project 2002-09-03 18:02:04 +00:00
Bryce Denney
452df7aafb - update wxWindows workspace for VC++. A few source files have appeared
or moved around, so now the workspace knows where to find them.
2002-09-03 17:54:49 +00:00
Bryce Denney
e0f6cfbf86 - fix appearance of toolbar icons on win32. I think Psyon used
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
2002-09-03 17:50:12 +00:00
Bryce Denney
a231b12359 - on win32, apparantly the wxSpinCtrl depends on a native control which only
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.
2002-09-03 17:48:21 +00:00
Bryce Denney
e804c745bb - this patch should guarantee that the memory vector is aligned on an
8-byte boundary.  It simply allocates 8 extra bytes, then steps forward
  one at a time until it finds a pointer whose address is a multiple of 8.
2002-09-03 16:57:42 +00:00
Bryce Denney
31b30d562e - if ROM image could not be opened, we were doing a BX_INFO and then
a BX_EXIT.  I changed it to BX_PANIC followed by a return (just in case
  the user continues) to be more consistent with how everything else works.
2002-09-03 16:44:33 +00:00
Bryce Denney
152527af04 - MSVC++: can't use variable as array bounds. In this case it's easy enough
to use a #define.
2002-09-03 16:03:50 +00:00
Bryce Denney
b1614f7019 - MSVC++ doesn't like "#undef label()" it only likes "#undef label"
- add a missing "return" in BrowseTextCtrl()
2002-09-03 16:02:21 +00:00
Bryce Denney
8d02c83536 - bx_param_bool_c constructor must init dependent_list before calling set(). 2002-09-03 16:00:50 +00:00
Bryce Denney
2644e2ac53 - can't use "for (int i=0; ...)" twice because some compilers (e.g. MSVC++)
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.
2002-09-03 15:59:52 +00:00
Bryce Denney
765f21fbc3 - disable #warning on MSVC++ because it doesn't understand it 2002-09-03 15:56:24 +00:00
Bryce Denney
6e88962c1e - copy a few useful cygwin scripts from the old wxwindows development branch. 2002-09-03 15:49:22 +00:00
Bryce Denney
e4a5dcd78a - clean up wx compile instructions for win32 2002-09-03 15:23:14 +00:00
Bryce Denney
6e5dcfb83a - disable all menu choices that aren't implemented. Only a few remaining!
- 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
2002-09-03 08:55:35 +00:00
Bryce Denney
dd4d31e5ea - now parameters can be enabled/disabled by boolean parameters in
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.
2002-09-03 08:53:41 +00:00
Bryce Denney
a768d54939 - the system of using the bx_param_c::set_handler() callback functions
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.
2002-09-03 08:46:30 +00:00
Bryce Denney
7918513df4 - the system of using the bx_param_c::set_handler() callback functions
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.
2002-09-03 08:44:55 +00:00
Bryce Denney
023408d33e - the system of using the bx_param_c::set_handler() callback functions
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.
2002-09-03 08:42:23 +00:00
Bryce Denney
a43c1391d3 - add DEFAULT_LOG_ACTIONS(level) macro to supply defaults
- 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.
2002-09-03 08:34:17 +00:00
Bryce Denney
eaa2f87f05 - logfunctions constructor tries to read bx_options.log.actions[]
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.
2002-09-03 08:32:47 +00:00
Bryce Denney
55498cf4a3 - init bx_options using a few simple lines of code, instead of a monstrous
initializer full of NULLs and zeroes that has to be fixed every time
  we change the bx_options_t type.
2002-09-03 06:22:53 +00:00
Bryce Denney
fbdf6cb89d - remove unused vars to fix warning 2002-09-03 05:40:59 +00:00
Bryce Denney
f48a33c3af - create a preproc variable for the number of optional roms. Not used yet. 2002-09-03 05:38:09 +00:00
Bryce Denney
0fb8d539df - set the default address for ROM BIOS to 0xF0000 (it was 0 before) 2002-09-03 05:34:32 +00:00
Bryce Denney
b74269a3b7 - add generic dialog class called ParamDialog. You create it, call
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.
2002-09-03 05:32:49 +00:00
Bryce Denney
2c5e29a77b - add get_size() on a bx_list_c 2002-09-03 05:31:42 +00:00
Kevin Lawton
3f2d28f86c Added guest2host TLB tricks to read-modify-write variants of
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.
2002-09-03 04:54:28 +00:00
Bryce Denney
b9439c5f61 - correct abuse of local variable in bx_param_bool_c::text_ask. I had created
a temporary char[] buffer, filled it using sprintf, and then used a pointer
  to it even after it went out of scope.
2002-09-03 01:09:46 +00:00
Bryce Denney
1267d19090 - add ConfigKeyboardDialog
- 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
2002-09-02 22:53:39 +00:00
Bryce Denney
367c549fc4 - fix those browse buttons on the MemoryConfigDialog
- 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
2002-09-02 22:12:31 +00:00