Commit Graph

2352 Commits

Author SHA1 Message Date
Bryce Denney
adeb5331f6 - I used to have a method called ParamDialog::Refresh() that reread all the
parameter values associated with the dialog and updated the wxWindows
  controls.  At the time I didn't realize that I was overriding
  wxWindow::Refresh() which repaints the window.  Later, I renamed the method
  to CopyParamToGui() to make it more clear, but many of the callers in
  wxmain.cc continued to call Refresh(), which now reverted to the parent class
  wxWindow::Refresh().  Since there was no compile error I didn't notice for a
  while, but it caused the ParamDialogs to repaint themselves constantly but
  never actually change their values.  This is now fixed by changing those
  method calls to CopyParamToGui().
2002-09-22 04:36:09 +00:00
Bryce Denney
85a7d1dad8 - on win32, the wxWindows interface was never redrawing the screen since I
started using a wxTimer to trigger the redraws.  Now instead of calling
  MyPanel::OnPaint directly, I call Refresh() instead.  This makes the Windows
  display work correctly.
2002-09-22 04:04:40 +00:00
Bryce Denney
5933d94c91 - add typecast to Bit32u to avoid lots of useless -Wall warnings. The constant
expression on the right side of the comparison was turning out signed, while
  the expression on the left was unsigned.
2002-09-22 02:53:09 +00:00
Bryce Denney
d4bf3598f0 - fix some types in printf format strings 2002-09-22 02:44:31 +00:00
Bryce Denney
de67199921 - call SetFocus() on the panel so that it is certain to get key events.
I'm not sure why this wasn't needed before, but after switching to
  wxWindows 2.3.3 it seems to be important.
- in a wxLogDebug() call I was trying to pass a struct instead of a string.
  Fixed that.
2002-09-22 02:43:37 +00:00
Bryce Denney
38ad31fd4b - add Greg's suggestions for dialog box to configure time options, from an
email
2002-09-22 02:42:07 +00:00
Bryce Denney
556e4d2590 - fix call to create slowdown timer object. I'm pretty sure I broke this
on August 28 when I was messing with init and reset methods.
2002-09-22 02:29:59 +00:00
Kevin Lawton
7fd744b4ef Oops, I had #ifdef 0'd the code in here to do a test compile,
and forgot to put it back.
2002-09-22 02:07:46 +00:00
Bryce Denney
e41655a78c - add configure test for BX_HAVE_GETTIMEOFDAY
- hardcode BX_HAVE_GETTIMEOFDAY=0 if cross compiling for VC++
  (this part hasn't been tested)
- modified files: configure configure.in config.h.in iodev/pit_wrap.cc
2002-09-22 01:56:18 +00:00
Kevin Lawton
3bfeab23c9 Split out JZ/JNZ instructions from JCC because they were called
so frequently.
Coded asm() statements for INC/DEC_ERX() instructions.
Cleaned up the iCache a litle including a bug fix.  The
  generation ID was decrementing the whole field including
  some high meta bits.  That could roll over after 1 Billion
  cycles.  I know only decrement if the field is valid, to
  save the write.
I implemented inline functions which can serve the value of
  the arithmetic flags if they are cached, and redirect to
  the lazy_flags.cc routines if not.
Most of this was just prep work for adding more asm() statements
  for native eflags processing when on x86.
2002-09-22 01:52:21 +00:00
Bryce Denney
bed405dad0 - revert 1.30. The change I made caused VPATH builds to fail, like when
you run configure from another directory.  We'll have to try some other
  way to make nmake happy.
2002-09-22 01:35:12 +00:00
Bryce Denney
cddddb96d9 - avoid using $< syntax because nmake can't handle it 2002-09-22 01:19:19 +00:00
Volker Ruppert
4c4294cc6f - new variable 'charmap_updated', 'charmap_changed' array renamed to
'char_changed'. These variables are currently only used by the win32 gui for
  the update of the font bitmaps. SDL and wxWindows do not use the variables
  since they are using the charmap data directly
- free text snapshot memory when the user has cancelled the dialog
- write text snapshot file in binary mode (disables the LF -> CRLF conversion
  in cygwin)
2002-09-21 19:38:47 +00:00
Stanislav Shwartsman
a08834b7f7 MMX cannot be compiled without FPU 2002-09-21 17:24:24 +00:00
Volker Ruppert
d7e6649f72 - log type PCI2ISALOG added
- pci2isa prefix changed to "P2I"
- device name changed to "PIIX3 PCI-to-ISA bridge"
- added more default values to the reset() function
- added stubs for i/o mapped registers
- array pci_conf[] is now a part of the structure s
2002-09-21 11:38:12 +00:00
Volker Ruppert
7ea3cdfd76 - update dependencies after adding the pci2isa device 2002-09-21 10:24:43 +00:00
Gregory Alexander
e668567e85 Made BX_USE_REALTIME_PIT checked at runtime. This is
a precursor to making it a runtime option.  I'm not
sure how to do this, but it should be trivial.  All it
would take is adding the option and changing the
macro for BX_USE_REALTIME_PIT to point to that option.
2002-09-21 04:02:51 +00:00
Gregory Alexander
44c5829ea5 Realtime PIT with gettimeofday is working beautifully.
It's MUCH smoother than with the time(NULL) version.

We need to work on setting up the config parameters some more.
2002-09-21 03:20:59 +00:00
Kevin Lawton
e2e219eda0 Modified the way that the register field (low 3 bits of a few opcodes
also extended by the REX.B field on Hammer) is passed to instructions.
I rearranged the bxInstruction_c to free up a field to be used
to pass this info when mod-rm bytes are not used.  This got rid
of the ugly ((i->b1 & 7) + i->rex_b) code.

Probably shaved just a very little run time off Hammer emulation,
and even less on x86-32.  The resultant is a little cleaner anyways.
2002-09-20 23:17:51 +00:00
Bryce Denney
dc18466f15 - fix "fatal error U1083: target macro '' expands to nothing" that
Psyon reported
- clean up remnants of cpu64 merge in configure script, Makefile.in,
  and cpu/Makefile.in
2002-09-20 23:16:23 +00:00
Gregory Alexander
1f05d9aa6b Working on Realtime PIT code.
Getting fair results with gettimeofday.
2002-09-20 23:10:55 +00:00
Bryce Denney
0d68427d37 - we kept getting /usr/include/math.h in the dependency list for keyboard.cc
and I could never explain it.  The problem was that in keyboard.cc it
  included "math.h" with quotes instead of <math.h> with less than/greater
  than, so gcc -MM didn't realize it was a system header.
2002-09-20 22:42:29 +00:00
Bryce Denney
375fcf648b - plug up some memory leaks in wxWindows code, with help from Valgrind
- MyPanel::blankCursor
  - MyFrame::panel
  - AdvancedLogOptions::action (2d array of wxChoice *'s)
  - ParamDialog::idHash, ParamDialog::paramHash, and ParamStructs
  - file dialog in BrowseTextCtrl
- fix illegal use of a wxObject.  I had been clearing the ParamStruct
  with memset(), but I forgot that ParamStruct was a subclass of wxObject
  so I was trashing the wxObject fields too!  Instead I created a
  ParamStruct constructor that clears the pointers to NULL.
- comment out debug output from AdvancedLogOptionsDialog::SetAction
- modified files: gui/wx.cc gui/wxdialog.cc gui/wxdialog.h
  gui/wxmain.cc gui/wxmain.h
2002-09-20 21:25:09 +00:00
Stanislav Shwartsman
470dd1d30f Examples directory for mew instrumentation stuff 2002-09-20 20:25:55 +00:00
Stanislav Shwartsman
973422be6f Removed patch-smp-fpu because it already merged with MMX support 2002-09-20 20:15:34 +00:00
Stanislav Shwartsman
22d8918774 New version of Bochs instrumentation stuff 2002-09-20 20:12:36 +00:00
Volker Ruppert
efbcf33bc7 - real mode PCI BIOS modifies the iret flags on stack if no error is present
- bug in the 'find PCI device' functions fixed
- register for the PCI i/o addresses is always DX
2002-09-20 19:36:05 +00:00
Bryce Denney
28fa5324b8 - add a few little bugs to the list
- put off some log related features until later
- advanced log options and debug log are done, so I removed them from the list
- added some wxWindows coding hints I found on usenet
2002-09-20 18:16:59 +00:00
Bryce Denney
ed36bc11f0 - sync up control.cc (text mode config interface) with wxmain.cc (wxWindows
interface) by using get/set_default_log_action.  This has very minimal effect
  on the behavior of the text config interface.
- modified: main.cc gui/control.cc
2002-09-20 18:14:27 +00:00
Bryce Denney
d285e86bdb - test with --enable-icache instead of --enable-fetchdecode
- change x,y increment between successive xterms to only 30 (--parallel mode)
- run everything with nice to be less of a hog
2002-09-20 17:57:54 +00:00
Bryce Denney
eca3ef17dc - How to handle default log options has been somewhat confused for a long
time, so I've tried to improve it.  Now the logfunctions class has a
  static field default_onoff[] which represents the default actions for
  each kind of log message.  Default_onoff[] is initialized with static
  data so it should be valid by the time it's used.  This can be reached by
  static accesors logfunctions::set_default_action and
  logfunctions::get_default_action.  It seemed appropriate to put the defaults
  inside the logfunctions class, rather than in bx_options or siminterface.
  However, to make them accessible to the config interface, I added similar
  methods in siminterface that map to the accessors in logfunctions.
- logio.cc had two different definitions of LOG_THIS for different halves
  of the file, which was ugly and confusing.  (LOG_THIS is needed for BX_INFO,
  BX_DEBUG, etc.)  I removed the first definition and fixed the minor compile
  problems that ensued.  In the initializers for iofunctions, everything
  is complicated because of the unpredictable order that constructors get
  called.  They must use this->log to print things, because genlog hasn't
  been initialized yet.
- now if SIM->set_log_action(int mod, int level, int action) is called
  with mod<0, it sets the action for all modules/devices instead of just one.
- modified: bochs.h logio.cc main.cc gui/siminterface.cc gui/siminterface.h
2002-09-20 17:56:22 +00:00
Bryce Denney
a33f144f6c - implement behavior of the AdvancedLogOptionsDialog
- LogOptionsDialog: show the "no change" option.  When options other than
  "no change" are selected, set both the default log action and the
  specific log action for all devices.
- AdvancedLogOptionsDialog: store the wxChoice*'s in a 2d array since I
  have to refer to them later.
- since both the log options and advanced log options dialogs needed to
  create many wxChoices using similar rules, I moved the creation code
  into a utility function makeLogOptionChoiceBox.
- I finally discovered the wxADJUST_MINSIZE option to wxSizer::Add(),
  which solves some layout problems that I was having with wxChoices.
  With this setting, the wxChoice will automatically grow to the size of
  the largest string that can be selected.
- improve sizing of the scrollWin according to the desired size of the panel
  that contains all the wxChoices.
- add sketches for proposed dialog that combines both LogOptionsDialog and
  AdvancedLogOptionsDialog using tabs
2002-09-20 17:53:14 +00:00
Bryce Denney
d2b5e83283 - fix typo in a comment. Also this hunk will conflict with what I'm
about to check in.
2002-09-20 17:52:05 +00:00
Bryce Denney
f9a1de5a58 - I remembered the real reason why I made an abstract class
bx_simulator_interface_c, so I included that in the comments.
2002-09-20 17:39:07 +00:00
Christophe Bothamy
3dfb397974 - added patch found in sf [ 609616 ] remote GDB stub
From sf patch page :

This patch adds remote GDB stub capability to Bochs.
It's an updated version of the patched bochs 1.3pre1 in
found in this URL:

http://www.rtmk.org/bochs-gdb.html

more details in the same site. thanks Johan Rydberg
2002-09-20 16:14:55 +00:00
Bryce Denney
aee82fdde3 - eliminate unused warning on int cpu 2002-09-20 15:35:44 +00:00
Christophe Bothamy
c0be71cded - applied patch from Luiz Henrique Shigunov [ 605815 ] more disasm functions
Modified Files: dis_decode.cc dis_groups.cc disasm.h
2002-09-20 15:34:55 +00:00
Kevin Lawton
9b02229b84 Removed defunct options from configure.in (for dynamic translation
and old style fetchdecode cache).  Removed generations of
dynamic/Makefile.  Upgraded my autoconf to 2.50 to get rid
of those pesky "EOF" errors.
2002-09-20 15:34:51 +00:00
Bryce Denney
226fd0e2c0 - enable MMX by default 2002-09-20 15:12:25 +00:00
Christophe Bothamy
de39c3bd6d - VGABIOS-lgpl name change
. removed VGABIOS-lgpl-0.3
  . added VGABIOS-lgpl-latest (current cvs version)
  . updated configuration file
2002-09-20 13:23:46 +00:00
Bryce Denney
452f65235b - rename Refresh to CopyParamToGui
- rename CommitChanges to CopyGuiToParam
2002-09-20 12:40:13 +00:00
Bryce Denney
b4b0e689e8 - remake configure with autoconf 2.53 2002-09-20 12:34:39 +00:00
Gregory Alexander
f5f6cc65be Working on using gettimeofday for timing instead of time(NULL). 2002-09-20 04:42:25 +00:00
Kevin Lawton
402d02974d Moved the EFLAGS.RF check and clearing of inhibit_mask code
in cpu.cc out of the main loop, and into the asynchronous
events handling.  I went through all the code paths, and
there doesn't seem to be any reason for that code to be
in the hot loop.

Added another accessor for getting instruction data, called
modC0().  A lot of instructions test whether the mod field
of mod-nnn-rm is 0xc0 or not, ie., it's a register operation
and not memory.  So I flag this in fetchdecode{,64}.cc.
This added on the order of 1% performance improvement for
a Win95 boot.

Macroized a few leftover calls to Write_RMV_virtual_xyz()
that didn't get modified in the x86-64 merge.  Really, they
just call the real function for now, but I want to have them
available to do direct writes with the guest2host TLB pointers.
2002-09-20 03:52:59 +00:00
Gregory Alexander
88e64f9521 Fix big endian compile problem. 2002-09-20 03:06:39 +00:00
Bryce Denney
4118b29da3 - add "#else" case for BX_CPP_AlignN() macro so that non-gcc compilers
can continue to compile.
2002-09-19 21:42:24 +00:00
Bryce Denney
d10cfdf22a - add mmx.cpp to workspace 2002-09-19 21:39:53 +00:00
Kevin Lawton
0cd7346b9c - Added an instruction cache. Size is fixed for the moment,
but if you hand edit cpu/cpu.h, and change BxICacheEntries,
  you can try different sizes.  I'll make this more flexible
  with configure.  For now, use "--enable-icache" with no parameters.

- Modified fetchdecode.cc/fetchdecode64.cc just enough so that
  instructions which encode a direct address now use a memory
  resolution function which just sticks the immediate address
  into rm_addr.  With cached instructions we need this.
2002-09-19 19:17:20 +00:00
Volker Ruppert
721f89b77b - forward changes of the active charmap to the gui with the new function
set_text_charbyte()
- vga: store the address of the active charmap in the new variable
  charmap_address
- vga: text mode hack removed. The write modes, operations and masks must be
  used in text mode too.
- sdl: clear_screen() is not necessary when the charmap has changed
- win32: update only the changed font bitmaps before drawing the text
2002-09-19 18:59:50 +00:00
Bryce Denney
d8c27b4f83 - add AdvancedLogOptionsDialog. It's not connected to actual parameters
yet, since I've been just working on the layout at first.  The main
  challenge has been getting the scrollbar set up right.
2002-09-19 04:52:03 +00:00
Bryce Denney
bb507ec5b5 - increase tilesize to 16x24 as suggested by Peter Tattam 2002-09-19 01:32:38 +00:00
Bryce Denney
d5952573e6 - remove this patch, since we now have x86-64 support in current CVS 2002-09-19 00:46:38 +00:00
Bryce Denney
c278349cdf - in wxWindows, hide mouse cursor when mouse is captured, to avoid the
confusion of having two cursors showing at once.  Actually implemented by
  changing to a blank cursor when cursor should be hidden.
2002-09-19 00:43:32 +00:00
Bryce Denney
f0c612f23a - mouse works now 2002-09-19 00:32:59 +00:00
Bryce Denney
a9ad06ec00 - mouse event should have signed deltas: dx and dy 2002-09-18 23:17:47 +00:00
Bryce Denney
24d88d2d28 - implement mouse in wxWindows interface
- All mouse events in the VGA window go to MyPanel::OnMouse.  Middle mouse
  button and F12 both toggle mouse capture.  OnMouse queues an event
  for the simulation thread to process.  The simulation thread calls
  bx_devices.keyboard->mouse_motion() when it sees the event on the queue.
- add IFDBG_VGA around some display debug code.  All wx mouse debug code
  is controlled by IFDBG_MOUSE.
- modified: gui/wx.cc gui/wxmain.cc gui/wxmain.h
2002-09-18 22:44:02 +00:00
Bryce Denney
cfd549d7c0 - align the EFLAGS parameters left instead of center 2002-09-18 21:01:58 +00:00
Bryce Denney
0a5ce87b15 - now instead of having the simulation thread send repaint messages to
the wxwindows thread, it just sets a boolean flag needRefresh.  Meanwhile, a
  wxTimer running in wall clock time (as opposed to sim time) triggers a
  repaint only if the the boolean is true.
- now MyRefresh is implemented by just setting needRefresh=true.
- make graphics_tile_update call MyRefresh.
- make dimension_update call MyRefresh.
2002-09-18 20:59:35 +00:00
Bryce Denney
4694ac5c04 - clean up
pollution
2002-09-18 20:59:05 +00:00
Bryce Denney
8dde63da04 *** empty log message *** 2002-09-18 14:11:13 +00:00
Kevin Lawton
4e51dcae40 Converted all the remaining available separate fields in bxInstruction_c
to bitfields.  bxInstruction_c is now 24 bytes, including 4 for
the memory addr resolution function pointer, and 4 for the
execution function pointer (16 + 4 + 4).

Coded more accessors, to abstract access from most code.
2002-09-18 08:00:43 +00:00
Kevin Lawton
6723ca9bf4 Moved more separate fields in the bxInstruction_c into bitfields
with accessors.  Had to touch a number of files to update the
access using the new accessors.

Moved rm_addr to the CPU structure, to slim down bxInstruction_c
and to prevent future instruction caching from getting sprayed
with writes to individual rm_addr fields.  There only needs to
be one.  Though need to deal with instructions which have
static non-modrm addresses, but which are using rm_addr since
that will change.

bxInstruction_c is down to about 40 bytes now.  Trying to
get down to 24 bytes.
2002-09-18 05:36:48 +00:00
Bryce Denney
4e091e37ea - the constructors for BX_MEM_C did not always init vector and actual_vector
to NULL.  If actual_vector points to junk when alloc_vector_aligned
  is called, it will try to free the junk, leading to memory corruption
  or crashes.
2002-09-18 05:28:55 +00:00
Bryce Denney
15a3cbc35f - make cpu_param_handler compile with SMP enabled. Unfortunately it will
read all param values from CPU #0.  The only solution I can come up with
  is to change the siminterface handler function interface to pass a void*
  to the callback function.  I'll take care of it eventually.
2002-09-18 04:32:16 +00:00
Bryce Denney
3591c3297b - add several new categories of test compile configurations, which
you can switch on and off using the $TEST_* varables at top.
- when running with --parallel, use "-geom +x+y" argument to xterm
  to make the windows appear in a regular pattern.
2002-09-18 04:12:12 +00:00
Bryce Denney
30dafd03a1 - removed --enable-loader option from configure, and associated makefile
variables
2002-09-18 03:40:39 +00:00
Kevin Lawton
07b0df2a8a Updated accessing of modrm/sib addressing information to
use accessors.  This lets me work on compressing the
size of fetch-decode structure (now called bxInstruction_c).

I've reduced it down to about 76 bytes.  We should be able
to do much better soon.  I needed the abstraction of the
accessors, so I have a lot of freedom to re-arrange things
without making massive future changes.

Lost a few percent of performance in these mods, but my
main focus was to get the abstraction.
2002-09-17 22:50:53 +00:00
Bryce Denney
f1a3e0307a - add #if BX_CPU_LEVEL>=4 around cr0.wp and cr4 so that i386 will compile 2002-09-17 22:14:33 +00:00
Bryce Denney
620b264889 - remove obsolete loader option 2002-09-17 21:45:51 +00:00
Bryce Denney
e16d550248 - with this version of my patch, 4ata works in wxWindows 2002-09-17 18:11:12 +00:00
Stanislav Shwartsman
a43bd93b98 just little clean of the code 2002-09-17 14:36:39 +00:00
Bryce Denney
274ce4cd55 This patch applies on top of Christophe Bothamy's 4ata-channels patch.
I'm keeping a separate patch in case Christophe wants to make revisions
to his patch without my changes getting in the way.

I have just been working on the configuration interface part, for
example making it so that when you disable the ata[0123] channel, all the
devices controlled by that channel will be disabled as well.  I haven't
gotten around to the wxWindows part, but these changes will make the
wxWindows work much easier.  I will update this patch as my work progresses.
2002-09-17 14:36:23 +00:00
Bryce Denney
ad8bb1023b - move the dependent_list structure up the hierarchy to bx_param_num_c,
instead of bx_param_bool_c.  There are several cases where I need an
  enum to enable/disable some fields, and this change should allow
  that.
- modified: gui/siminterface.h gui/siminterface.cc
2002-09-17 04:47:55 +00:00
Kevin Lawton
3d4210fd3f Got rid of a couple fields in BxInstruction_t that were
no longer used.  Also rearranged that struct a little
to be more compressed.  Over time, I'm going to reduce
it further, for use with future accelerations.
2002-09-17 04:20:42 +00:00
Kevin Lawton
2eb34d13a6 Added a configure option, "--enable-pae". The x86-64 enhancements
already had Physical Address Extensions support - we can now
compile for PAE support for x86-32 mode as well.
2002-09-16 21:55:57 +00:00
Kevin Lawton
cc6d44f9c6 Fixed cpu/paging.cc for non-global-pages support compile. 2002-09-16 21:10:31 +00:00
Kevin Lawton
a851db3e36 Ooops, cpu/paging.cc was hosed on that last commit. Fixed that. 2002-09-16 21:01:55 +00:00
Kevin Lawton
846c50e635 Removed more references to cpu64 stuff in Makefile.in. 2002-09-16 20:41:11 +00:00
Kevin Lawton
366e5f78f0 Removed reference to cpu64/Makefile in the last generation stage
of configure.
2002-09-16 20:39:32 +00:00
Kevin Lawton
5eb4e247bc Merged the final filed ("paging.cc") from Peter Tattam's x86-64
enhancement to bochs.  You can now configure with
--enable-guest2host-tlb.

Force the support of big pages (PSE) when x86-64 is configured.

Reverted back to only one kind of TLB entry style, since everything
is ported.

Fixed one bug in io.cc with as_64 and the index registers.
There are others, as noticed by Peter.
2002-09-16 20:23:38 +00:00
Volker Ruppert
19c660a30c - implementation of the PCI-to-ISA bridge started. I/O ports and features are
not present yet.
2002-09-16 19:18:58 +00:00
Bryce Denney
c3e4ccecb3 - I screwed up the BX_USE_CONFIG_INTERFACE variable earlier today; fixed. 2002-09-16 18:36:01 +00:00
Bryce Denney
d162178f24 - make the patch apply to current sources (very minor)
- now this patch is checked in with -kb flag
2002-09-16 18:23:29 +00:00
Bryce Denney
9de7181ce5 - include Peter Tattam's external debugger in build/win32 since it's
win32 specific.
2002-09-16 17:09:25 +00:00
Bryce Denney
6a50742b20 - clean up ^M pollution from working in cygwin 2002-09-16 17:00:16 +00:00
Bryce Denney
39a6dfc935 - I've added some debugger features recently, but now that I've tested
wxWindows without debugger, I needed to add some more cases of
  #if BX_DEBUGGER to make it work.  It is certainly possible to
  handle such problems by always compiling in the debug dialogs but
  only instantiating them if debug support is compiled in, but I have
  chosen (for now) to put #if BX_DEBUGGER around things like this.
- modified: gui/wxdialog.h gui/wxdialog.cc
2002-09-16 16:04:15 +00:00
Bryce Denney
5af13700e6 - I've added some debugger features recently, but now that I've tested
wxWindows without debugger, I needed to add some more cases of #if
  BX_DEBUGGER to make it work.  All the problems I found were things like
  referencing a debug structure which was never initialized (NULL).  It is
  possible to handle such problems by always compiling in the debug dialogs but
  only instantiating them if debug support is compiled in, but I have chosen
  (for now) to put #if BX_DEBUGGER around things like this.
2002-09-16 15:28:19 +00:00
Bryce Denney
42f412c43b - MS VC++ did not accept initialization of static const fields in the
class declaration, for example:
     static const unsigned os_64=0, as_64=0;
  After reading some suggestions on usenet, I changed these into
  enums instead, like this:
     enum { os_64=0, as_64=0 };
2002-09-16 15:21:51 +00:00
Bryce Denney
9eb006ee66 - cr4 has turned into a struct. fix two cases where it was used as if it
was still a number by calling the accessor.
2002-09-16 13:14:06 +00:00
Bryce Denney
4749a0e246 - add configurations for lots of other guis 2002-09-16 13:09:50 +00:00
Bryce Denney
2b388ceddf - rename debug_fputs to debug_puts. Since it doesn't take a file handle,
this is more consistent.
2002-09-16 13:04:13 +00:00
Bryce Denney
7619ecfe91 - this rev deals with a configure script bug that appears on cygwin. When
you have AC_DEFINE(var, value) executed more than once, autoconf is
  supposed to use the last AC_DEFINE value, but sometimes it doesn't.
  I haven't been able to figure out why, so I've just worked around it
  instead.
- for BX_SupportGlobalPages, which could call AC_DEFINE twice, I kept the
  value in a shell variable $support_global_pages until the end and then
  did one AC_DEFINE after it had reached its final value.  Same thing
  with BX_USE_CONFIG_INTERFACE.
- also I realized that we are using AC_SUBST() in many cases where it is
  not needed.  AC_SUBST(name) substitutes the string @name@ with a
  value from the configure script.  For preprocessor symbols like
  BX_SupportPAE, we only need the AC_DEFINE; the AC_SUBST has no effect.
2002-09-16 12:37:16 +00:00
Bryce Denney
4d630a139b - print a message when the use_x86_64 flag forces BX_SupportPAE and
BX_SupportGlobalPages so that it's very clear when they are being
  turned on.
2002-09-16 11:53:35 +00:00
Bryce Denney
fb5f2e83a4 - add -pthread flag to CXXFLAGS when compiling --with-rfb 2002-09-16 00:06:16 +00:00
Bryce Denney
5ab6c253e6 - update text now that some more things work
- remove some general things about dialog box sketches
- add some details about log events and debugger
2002-09-15 23:54:41 +00:00
Kevin Lawton
80dd7a07ec Removed references to building libextdb.a. It doesn't seem to
be used at all, and Peter didn't want it.  "extdb.o" is compiled
into libcpu.a, if configured for it.

Removed a few #warnings for x86-64 compile, based on Peter's
line-item comments regarding the warnings I inserted during
the port/merge.
2002-09-15 15:10:21 +00:00
Bryce Denney
fa0dfd7994 - add --clean option to make it easy to clean up afterward
- try to find the configure script and set the path correctly, in case
  the script is run from the main directory, build, etc.
- name the build directories build-$name so they don't overwrite anything.
  Now that I have "rm -rf" in my script I wanted to be a little more careful.
2002-09-15 14:35:38 +00:00
Kevin Lawton
7a11ed547d Fixed CR4 reference in extdb.cc to use the new accessor model.
Also, deleted the old 32-bit path in there as Peter said it's
no longer useful to him.
2002-09-15 14:01:16 +00:00
Kevin Lawton
a367d3b742 Force global pages as well as physical address extensions when
x86-64 support is enabled.  Otherwise, CR4 accesses were
tripping a fault.
2002-09-15 13:52:22 +00:00
Bryce Denney
96ac81caf8 - tool for compiling bochs with many different configurations. My favorite is
the --parallel option, which spawns a separate xterm for each build so that
  you can keep them separate.
2002-09-15 13:20:33 +00:00
Bryce Denney
6d13447818 - rename debug_fputs to debug_puts. Since it doesn't take a file handle,
this is more consistent.
2002-09-15 12:08:40 +00:00
Bryce Denney
00e769f1e6 - fix fputs bug (args were reversed)
- now debugger code always calls SIM->debug_fputs and the siminterface
  code decides what to do with it.
2002-09-15 12:07:09 +00:00
Bryce Denney
bbae3335a2 - add Debug Log dialog, which shows all the text output that is normally
printed to stderr in the text debugger.  Also allows the user to
  type (text) debugger commands directly, which also appear in the log.
- all text output in the debugger now passes through dbg_printf()
  (used to be fprintf to stderr) so that in wxWindows I can redirect
  it all to the wxWindows debug log screen.  Added debug_fputs to
  siminterface which actually sends the text to the GUI by creating
  a BX_ASYNC_EVT_DBG_MSG event.
- changed prefix and msg fields of BxLogMsgEvent to const char *,
  and also in args of logmsg method of siminterface.
- don't trap SIGINT in wxWindows.  There are other ways to stop execution.
  Also, signal handling with multiple threads is very strange and different
  on different platforms.
- minor changes to fix gcc -Wall warnings in dbg_main.cc
- add a new boolean parameter BXP_DEBUG_RUNNING that tells if the debugger is
  running freely or not.  This is used by the wxWindows GUI to enable or
  disable certain choices.
- CpuRegistersDialog has continue,stop,step buttons.  When the sim is running
  freely, I disable continue and step, and enable stop.  When the sim stops
  to wait for the user, I disable stop and enable continue and step.  The
  change of enables used to be triggered by actually pressing the button,
  but then if you started/stopped the simulation in some other way (typing
  in debug log window) the enables were never changed.  Now the enables are
  controlled by the value of BXP_DEBUG_RUNNING, which is set by the debug code
  itself, and the buttons are enabled at the right time.
- ParamDialog::Refresh() is now virtual so that child classes can redefine
  its refresh behavior.
- in safeWxStrcpy, force the last element of the array to be a 0, since
  I noticed that strncpy is not guaranteed to terminate the string!
- modified: debug/dbg_main.cc debug/debug.h gui/siminterface.cc
  gui/siminterface.h gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc
  gui/wxmain.h
2002-09-15 11:21:35 +00:00
Bryce Denney
d160c872b3 - in debugger, all output must now be printed with dbg_printf, instead
of fprintf to stderr
2002-09-15 11:20:11 +00:00
Bryce Denney
c3e1511874 - move divider (a bunch of equals signs) down to where it's used, so that
it's within the if !BX_WITH_WX.  Otherwise you get warnings when it's
  not used.
2002-09-15 11:02:22 +00:00
Bryce Denney
03bb4c1c92 - update wxwindows param for cr4, since it's changed into a structure 2002-09-15 11:01:36 +00:00
Kevin Lawton
771b1a9558 Added big/little-endian specific declarations for the Bit128{u,s}
types in config.h.in.  It was always in little-endian order.
2002-09-15 05:29:06 +00:00
Kevin Lawton
798fc08585 (cpu64) Merged string.cc. 2002-09-15 05:09:18 +00:00
Kevin Lawton
a6ea6659ab (cpu64) Merged bit.cc. 2002-09-15 03:38:52 +00:00
Kevin Lawton
918442ae4a (cpu64) Merged io.cc. 2002-09-15 02:55:34 +00:00
Kevin Lawton
b68c2b929a (cpu64) Merged a couple more files. 2002-09-15 02:23:12 +00:00
Kevin Lawton
72f37c0fc5 (cpu64) Merged 2 more. For extdb.cc, essentially I just wrapped
the contents of both files with an #ifdef.  It's a small file,
but I don't use it.  Someone else should clean it up.
2002-09-15 01:36:13 +00:00
Kevin Lawton
a372b32c79 (cpu64) Merged another wad of files. 2002-09-15 01:00:20 +00:00
Kevin Lawton
425a8cda81 (cpu64) Merged lazy_flags.cc. 2002-09-15 00:18:41 +00:00
Kevin Lawton
278e27d5fe Merged proc_ctrl.cc. Also fixed a bug in CR4 reloading; we were
printing a message when a reserved bit was set, but not causing
a #GP(0).  As well, I force a new PAE support option to 1 when
Hammer support is enabled.
2002-09-14 23:17:55 +00:00
Kevin Lawton
93d05990cc Updated CR4 to use the patented Bryce bitfields accessor method for
both cpu32 and cpu64, to make upcoming merging easier, and the
code cleaner.  Compiled for debug as well, and fixed CR4 for that
also.
2002-09-14 19:21:41 +00:00
Kevin Lawton
6d4b3e0e4d (cpu64) Merged 4 more files. 2002-09-14 17:29:47 +00:00
Christophe Bothamy
55510b1e17 - Initial revision of the 4 ata channels patch. 2002-09-14 07:34:41 +00:00
Kevin Lawton
aaeeab5850 Reverted back to using "ar" for making libraries. I had to
declare libs from cpu and cpu64 twice to make the linker
pick up all the symbols.
2002-09-14 05:46:57 +00:00
Kevin Lawton
03691c8fca (cpu64) Merged segment_ctrl.cc. 2002-09-14 03:31:50 +00:00
Kevin Lawton
0305a6a2fa (cpu64) Merged {cpu,cpu64}/cpu.h 2002-09-14 03:01:05 +00:00
Kevin Lawton
c24ef050e1 (cpu64) Merged init.cc. 2002-09-14 00:51:46 +00:00
Kevin Lawton
d16fcfce91 (cpu64) Merged fetchdecode.cc. Also, I had some problems with
circular dependencies between 3 cpu related libs that I need
as part of this transition.  I changed the "ar rv" to "ld -i -o"
to do an incremental load instead of an archive.  Hope this
doesn't break any platforms.  We can reset this later.
2002-09-13 23:59:24 +00:00
Kevin Lawton
1154c81816 (cpu64) Merged arith16.cc 2002-09-13 22:31:02 +00:00
Kevin Lawton
a49391ba30 (cpu64) Merged logical8.cc logical32.cc 2002-09-13 22:20:45 +00:00
Bryce Denney
6c6de2d151 - enable/disable the debugger command buttons Continue, Stop, Step
at the appropriate times.  For example, you can't stop when you're
  stopped.  You can't step when it's running.
- modified: gui/wxdialog.cc gui/wxdialog.h
2002-09-13 22:03:05 +00:00
Kevin Lawton
b1e787cdc6 (cpu64) Merged vm8086.cc. 2002-09-13 22:02:11 +00:00
Bryce Denney
0585191e49 - to quit cleanly with the wxwindows debugger, post a "quit" command
to the sim_thread. Otherwise the sim_thread may sit waiting for a
  command forever and the process never terminates.
2002-09-13 21:53:37 +00:00
Kevin Lawton
b9212fdafb (cpu64) Merged data_xfer8.cc 2002-09-13 21:47:21 +00:00
Kevin Lawton
9393b0046c (cpu64) Merged mult8.cc 2002-09-13 21:34:00 +00:00
Kevin Lawton
5e93ae3cd9 These files were removed since they have not been used for
a long time.  They are artifacts of an older fetch/decode
architecture in bochs.
2002-09-13 21:22:35 +00:00
Kevin Lawton
5c54cf5e3a (cpu64) merged protect_ctrl_pro.cc 2002-09-13 21:15:29 +00:00
Kevin Lawton
e5dc75091b (cpu64) Merged protect_ctrl.cc. For cpu64 there is a cpu field
called cpu_mode.  Now there is one for cpu32, but it is declared:

  static const unsigned cpu_mode=BX_MODE_IA32;

This way the compiler can compile-out if-then-else clauses based
on it, allowing for easier code sharing.
2002-09-13 21:08:54 +00:00
Bryce Denney
5b693b960e - only call isSimThread() if compiling with wxWindows 2002-09-13 20:02:07 +00:00
Bryce Denney
98d4c2f823 - fix minor compile problem with wxWindows and no debugger.
- only show continue,stop,step,commit buttons when debugger on.
- modified: gui/wxdialog.cc gui/wxmain.cc
2002-09-13 19:51:06 +00:00
Bryce Denney
565b3846c9 - add infrastructure for sending commands from the wxWindows interface to the
Bochs debugger.  The Bochs debugger calls SIM->debug_get_next_command() which
  does not return until a debugger command is found.  The siminterface sends an
  synchronous event to the wxWindows thread with a blank to be filled in with a
  debugger command.  wxWindows fills in the blank and sends the synchronous
  event back, and the Bochs debugger interprets it as if it was typed on
  the command line.  For the long term I haven't decided whether to stick with
  sending text strings vs. some other method.
- so far the wxWindows debugger consists of one big dialog box that shows
  all the standard registers, and a working Continue, Stop, and Step button.
- modify ParamDialog so that it is more useful as a base class, by moving
  some things to protected members&fields, separating out functionality
  that is most likely to be replaced into virtual functions, and making it
  generally more flexible.  The new CpuRegistersDialog is based on
  ParamDialog.
- in wxdialog.cc, continue the convention of using wxID_HELP, wxID_OK,
  wxID_CANCEL, etc. for the id's of buttons, instead of wxHELP, wxOK, etc.
  which are intended to be ORred together in a bit field.
- cpu/init.cc: put ifdefs around DEFPARAMs for flags in configurations
  where they don't exist.  Add an eflags shadow parameter that represents all
  of the bits of eflags at once.  There are also boolean shadow params for
  each bit.
- modified files: cpu/init.cc debug/dbg_main.cc debug/debug.h
  gui/siminterface.cc gui/siminterface.h gui/wxdialog.cc gui/wxdialog.h
  gui/wxmain.cc gui/wxmain.h
2002-09-13 19:39:38 +00:00
Bryce Denney
7ff21b5f30 - the implementation of accessors should not use BX_CPU_C_PREFIX. When static
member functions are turned on, BX_CPU_C_PREFIX expands to nothing, and any
  method that uses BX_CPU_C_PREFIX instead of explictly writing "BX_CPU_C::"
  will not be a member function at all.  This makes it impossible for code
  outside the BX_CPU_C object to call the accessor because sometimes the method
  is at ptr_to_cpu->get_EIP() and other times you'd have to do just get_EIP().
  The only way I've found to solve this is to remove the BX_CPU_C_PREFIX
  and write BX_CPU_C:: instead.
- in debug/dbg_main.cc I removed the EBP, EIP, ESP, SP shortcuts. Now
  the accessors are used everywhere.  Also I replaced a reference to
  the short-lived get_erx() accessor with ones that work: get_EAX(), etc.
- with these changes the current cvs compiles with any combination of
  debugger enabled/disabled, SMP enabled/disabled, and x86-64 enabled/disabled.
2002-09-13 18:15:20 +00:00
Bryce Denney
8f860f0fd1 - use wxConfigBase::Get() instead of wxConfig::Get() because in some cases
the wxConfig::Get is not defined.
2002-09-13 17:43:57 +00:00
Kevin Lawton
bb7a9e5341 Merged arith8.cc, stack16.cc. 2002-09-13 17:28:14 +00:00
Kevin Lawton
ac7ca2b035 Changed cpu64 calls to macros:
BX_READ_8BIT_REG()  --> BX_READ_8BIT_REGx()
  BX_WRITE_8BIT_REG() --> BX_WRITE_8BIT_REGx()
They use an extra parameter "extended".  I coded this
as the macro without the "x" for cpu32 compiles.  This
allows for ease of merging and code sharing.
2002-09-13 17:04:14 +00:00
Kevin Lawton
6889c3846f resolve32.cc was redundant, tasking.cc was merged. 2002-09-13 16:23:02 +00:00
Kevin Lawton
f05d453b6c Moved 64-bit only files from cpu64 to cpu and modified the Makefiles
accordingly.  These files cause no conflicts at all, since they
are not used in 32-bit compiles.
2002-09-13 15:53:22 +00:00
Christophe Bothamy
5ca59b4d4f - updated from rombios-new-ata.c rev 1.5 2002-09-13 14:31:53 +00:00
Christophe Bothamy
4c41a3f0f8 - fixed error under linux 2.0.36, when reading toc on an iso file.
Since we only return one track, the content stays the same for starttrack in (0,1)
2002-09-13 14:21:53 +00:00
Christophe Bothamy
ac1fc11a13 - fixed missing casts on write_dwords. Cyl/Heads/Spt were not reported correctly by EDD 2002-09-13 13:37:50 +00:00
Kevin Lawton
4181e888e8 "make dist-clean" in top-level recurses to both cpu and cpu64
for cleanliness.
2002-09-13 05:31:28 +00:00
Kevin Lawton
bbb20f5d49 Got rid of get_bit{1,3,5,15} accessors to EFLAGS. They were
only used by the debug functions, and those can get the
entire eflags value in one shot now.
2002-09-13 05:03:37 +00:00
Kevin Lawton
8f9c3c582d More migration/synchronization of cpu/cpu64. 2002-09-13 04:33:42 +00:00
Kevin Lawton
c520824de5 Changed configure and the cpu + cpu64 dir Makefiles so it's easy
to incrementally merge files.  For a test, shift16.cc is always
compiled in the cpu/ directory regardless of 32/64-bit configure.
Ultimately, all files will migrate from cpu64 to cpu.
2002-09-13 02:56:14 +00:00
Kevin Lawton
b9d3791aa5 Integrated Stanislav's general register accessors, which model
Bryce's eflags accessors.
2002-09-13 01:09:10 +00:00
Kevin Lawton
6655634179 I merged the cpu/cpu.h and cpu64/cpu.h files as well as the
other header files.  There no longer are any *.h files in cpu64/.
Had to make some changes to the *.cc files for dealing with
accesses to eip.
2002-09-13 00:15:23 +00:00
Christophe Bothamy
8a9992998e - committed vga patch for yamit. I'm not really sure how the standard vga card
behaves in text mode memory mappings 0 & 1.
2002-09-13 00:11:49 +00:00
Christophe Bothamy
ea76dbe210 - fixed compile problem with gcc 2.95 2002-09-12 20:51:48 +00:00
Stanislav Shwartsman
647c1676e9 Added general registers accessors (like for EFLAGS) 2002-09-12 20:00:24 +00:00
Bryce Denney
5d9fa0844e - rename "_long" to "dword" in eip structure in cpu64.
- add get_erx() method to bx_gen_reg_t which returns the erx field of the
  structure (which is has a different name in cpu and cpu64).  Providing
  an accessor is one strategy for avoiding igly "#ifdef BX_SUPPORT_X86_64"
  statements in the rest of the code.
- cpu64/init.cc: the "eflags" before get_flag and set_flag is no longer
  correct. removed.
- modified files: load32bitOShack.cc logio.cc cpu/cpu.h cpu64/apic.cc
  cpu64/cpu.h cpu64/init.cc cpu64/proc_ctrl.cc debug/dbg_main.cc
2002-09-12 18:52:14 +00:00
Bryce Denney
5fc31bcfda - this revision changes the way eflags are accessed throughout the cpu and
cpu64 directories.  Instead of using the macros introduced in cpu.h rev 1.37
  such as GetEFlagsDFLogical and SetEFlagsDF and ClearEFlagsDF, I made inline
  methods on the BX_CPU_C object that access the eflags fields.  The problem
  with the macros is that they cannot be used outside the BX_CPU_C object.  The
  macros have now been removed, and all references to eflags now use these new
  accessors.
- I debated whether to put the accessors as members of the BX_CPU_C object
  or members of the bx_flags_reg_t struct.  I chose to make them members
  of BX_CPU_C for two reasons: 1. the lazy flags are implemented as
  members of BX_CPU_C, and 2. the eflags are referenced in many many places
  and it is more compact without having to put eflags in front of each.  (The
  real problem with compactness is having to write BX_CPU_THIS_PTR in front of
  everything, but that's another story.)
- Kevin pointed out a major bug in my set accessor code.  What a difference a
  little tilde can make!  That is fixed now.
- modified: load32bitOShack.cc debug/dbg_main.cc
  and in both cpu and cpu64 directories:
    cpu.cc cpu.h ctrl_xfer_pro.cc debugstuff.cc exception.cc flag_ctrl.cc
    flag_ctrl_pro.cc init.cc io.cc io_pro.cc proc_ctrl.cc soft_int.cc
    string.cc vm8086.cc
2002-09-12 18:10:46 +00:00
Bryce Denney
22eb32934a - declare class BX_CPU_C early before it's first used 2002-09-12 17:06:40 +00:00
Bryce Denney
ccc6ac804c - integrate Peter Tattam's x86-64 emulation code into the main branch!
This adds a whole new directory cpu64 with the new emulation code.
  Very few changes were necessary outside cpu64.  To try it, configure
  with --enable-x86-64 and make.
- also this adds Peter Tattam's external debugger interface.
- modified files: Makefile.in bochs.h config.h.in configure.in
  load32bitOShack.cc logio.cc cpu/Makefile.in cpu/cpu.cc debug/dbg_main.cc
- added files: cpu/extdb.cc cpu/extdb.h and cpu64/*
2002-09-12 07:23:47 +00:00
Bryce Denney
0fdbbae45b - integrate Peter Tattam's x86-64 emulation code into the main branch!
This adds a whole new directory cpu64 with the new emulation code.
  Very few changes were necessary outside cpu64.  To try it, configure
  with --enable-x86-64 and make.
- also this adds Peter Tattam's external debugger interface.
- modified files: Makefile.in bochs.h config.h.in configure.in
  load32bitOShack.cc logio.cc cpu/Makefile.in cpu/cpu.cc debug/dbg_main.cc
- added files: cpu/extdb.cc cpu/extdb.h and cpu64/*
2002-09-12 07:16:37 +00:00
Bryce Denney
d6cd93b462 - add support for Peter Tattam's external disk simulator 2002-09-12 06:49:04 +00:00
Bryce Denney
954862cc5b - these are changes from Peter Tattam, who says "This dramatically improves
performance of the ne2K driver in win9x."
- receive timer set to 10000 instructions instead of 1000000.
- placed if (WaitForSingleObject(lpAdapter->ReadEvent,0) == WAIT_OBJECT_0) {}
  around the read code.
2002-09-12 06:44:04 +00:00
Bryce Denney
f4818e6fa3 - bug fix from Peter Tattam that he describes as follows:
> This is the bug fix to make the reset button work properly when the cpu
  > is in the halt state.  There is another patch in init.cc as well to clear
  > async_event.  If you don't do this, if a cpu goes into HLT, the only thing
  > which will fix it is another interrupt.  The reset button won't work.
2002-09-12 06:29:13 +00:00
Bryce Denney
c9edf00e5a - use eflags accessor instead of using field directly 2002-09-11 03:56:22 +00:00
Bryce Denney
450070850b - the debugger was broken by recent changes in the cpu flags. To provide
a consistent way of accessing these flags that works both inside and
  outside the BX_CPU class, I added inline accessor methods for each
  flag: assert_FLAG(), clear_FLAG(), set_FLAG(value), and get_FLAG ()
  that returns its value.  I use assert to mean "set the value to one"
  to avoid confusion, since there's also a set method that takes a value.
- the eflags access macros (e.g. GetEFlagsDFLogical, ClearEFlagsTF) are
  now defined in terms of the inline accessors.  In most cases it will
  result in the same code anyway.  The major advantage of the accesors
  is that they can be used from inside or outside the BX_CPU object, while
  the macros can only be used from inside.
- since almost all eflags were stored in val32 now, I went ahead and
  removed the if_, rf, and vm fields.  Now the val32 bit is the
  "official" value for these flags, and they have accessors just like
  everything else.
- init.cc: move the registration of registers until after they have been
  initialized so that the initial value of each parameter is correct.

Modified files:
  debug/dbg_main.cc cpu/cpu.h cpu/debugstuff.cc cpu/flag_ctrl.cc
  cpu/flag_ctrl_pro.cc cpu/init.cc
2002-09-11 03:55:22 +00:00
Bryce Denney
be2cdca3e0 - extend bx_shadow_num_c so that it can handle bit fields of variable
length.  (The first guinea pig is the 2-bit IOPL field in eflags.)
  Also it can have a pointer to a Bit8u, Bit16u, Bit32u and signed
  equivalents and do the right thing.
- add lots more CPU fields as parameters: EBP ESI EDI ESP, all segment regs,
  LDTR, GDTR, eflags, DR*, TR*, CR*.  These are all visible on a
  ridiculously tall dialog box that will one day become the debugger.
2002-09-11 03:53:48 +00:00
Bryce Denney
3ad2afe73e - normally Sim2CI events are sent from the simulation thread to the
wxWindows thread.  However, when the wxWindows thread calls
  Bochs code, for example SIM->some_action() that triggers a
  BX_PANIC(), then the Sim2CI event is created in the wxWindows
  thread.  This used to cause thread deadlock, but now it is
  recognized and handled safely.
2002-09-11 03:52:27 +00:00
Bryce Denney
41c3bb736d - remove extraneous newline 2002-09-10 18:56:36 +00:00
Kevin Lawton
08576b24be I implemented Global pages. Though, I haven't tested them. :^)
You need to use '--enable-global-pages' to configure in support.
If you have something to boot that uses them, give them a
spin.  Really the were introduced for PPro and above, but
I haven't put in any limits.  CPUID and CR4 report the proper
bits when configured, regardless of --enable-cpu-level at the
moment.
2002-09-10 03:52:32 +00:00
Kevin Lawton
112bf27f29 Fixed bug in tasking.cc found by Scott Duplichan. When paging
if off, we were still reading CR3 from the TSS and reloading
it!  This was causing problems with a DOS extender.  When
paging is turned back on, CR3 would be incorrect.
2002-09-10 01:39:40 +00:00
Kevin Lawton
425ad824c0 I changed the TLB entry from 3 dwords to 4, and (when you compile
with GCC) align them with the GCC special alignment attribute.
Since there was then one available field, I split the protection
attributes and native host pointers into their own fields.

Before, with 3 dwords per TLB entry, some entries (about 3/8)
were spanning two processor cache lines (assuming a 32-byte
cache line).  Now, they all fit within one cache line.

Knocked about 1.4% off Win95 boot time, probably more off normal
software runs.
2002-09-10 00:01:01 +00:00
Kevin Lawton
59d00a46a3 Fixed two calls to dtranslate_linear in paging.cc to use
BX_READ not 0.  BX_READ was 10.  While I was at it, I did
change BX_{READ,WRITE,RW} to {0,1,2} rather than {10,11,12}
in case that helps optimize code.

There may be more paging checks we should do before changing
any state, to avoid receiving a page fault in the middle.
I put some extra comments in there.
2002-09-09 21:59:10 +00:00
uid94540
293cbc01ea Got rid of very old BX_SUPPORT_TASKING define. That originated
way back when I first added paging support.
2002-09-09 19:48:58 +00:00
Volker Ruppert
9b0869bbc5 - added description for the option "#include"
- updated description for the option "com1"
- added example for 360k floppies
- fixed header of "floppya" and "floppyb" option
2002-09-09 17:41:36 +00:00
Kevin Lawton
1e22357b06 Very small #ifdef mods so that all the static functions would
be compiled out, when MMX is not enabled for a compile.  Eliminates
the unused warnings from the compiler.
2002-09-09 17:13:13 +00:00
Kevin Lawton
414e97bc32 Enhanced the repeat IO accelerations (enabled by --enable-repeat-speedups)
to request bulk IO operations to IO devices which are bulk IO aware.
Currently, I modified only harddrv.cc to be aware.  I added some
fields to the bx_devices_c class for the IO instructions to
place requests and receive responses from the IO device emulation.
Devices except the hard drive, don't monitor these fields so they
respond as normal.  The hard drive now monitors these fields for
bulk requests, and if enabled, it memcpy()'s data straight from
the disk buffer to memory.  This eliminates numerous inp/outp calling
sequences per disk sector.

I used the fields in bx_devices_c so that I would not have to
disrupt most IO device modules.  Enhancements can be made to
other devices if they use high-bandwidth IO via in/out instructions.
2002-09-09 16:56:56 +00:00
Bryce Denney
6a9d2e662f - I committed the MMX patch with big endian support, so I have removed
the MMX patches from the patches directory.
- removed: patches/bochs-mmx.patch patches/bochs-mmx.patch-endian-support
2002-09-09 16:28:07 +00:00
Bryce Denney
be659a09b3 - check in Stanislav Shwartsman's patch "bochs-mmx.patch-endian-support".
He writes: Detailed description: MMX instruction set support.
  Also supports BIG_ENDIAN systems. Tested on Solaris and HP1100.
- modified files:
    configure.in cpu/Makefile.in cpu/cpu.h cpu/fetchdecode.cc
    cpu/proc_ctrl.cc fpu/fpu_system.h fpu/wmFPUemu_glue.cc
- added files: cpu/i387.h cpu/mmx.cc
2002-09-09 16:11:25 +00:00
Christophe Bothamy
19ed21c9b0 - set default action to REPORT for panics. I think that's only used when reading
options.
- fixed setting the log options.
2002-09-09 07:19:23 +00:00
Volker Ruppert
813cc30712 - the win32 gui now uses the vga_charmap data for the vga text display if the
fontheight is >=14
- removed unnecessary GetDC() call in function create_vga_font()
2002-09-08 16:41:19 +00:00
Volker Ruppert
0ac366ada2 - the wx gui now uses the vga_charmap data for the vga text display 2002-09-08 09:23:45 +00:00
Volker Ruppert
d23d121674 - new function set_text_charmap() stores the vga charmap data in the array
vga_charmap
- the SDL gui uses the charmap data for the vga text display
  * TODO: implement this feature for other guis
- removed unused variables in sdl.cc and gui.cc
- fixed a warning in vga.cc
2002-09-08 07:56:10 +00:00
Kevin Lawton
0d7a5fdf3c I rehashed the way the EFLAGS register was stored internally.
All the EFLAGS bits used to be cached in separate fields.  I left
a few of them in separate fields for now - might remove them
at some point also.  When the arithmetic fields are known
(ie they're not in lazy mode), they are all cached in a
32-bit EFLAGS image, just like the x86 EFLAGS register expects.
All other eflags are store in the 32-bit register also, with
a few also mirrored in separate fields for now.

The reason I did this, was so that on x86 hosts, asm() statements
can be #ifdef'd in to do the calculation and get the native
eflags results very cheaply.  Just to test that it works, I
coded ADD_EdId() and ADD_EwIw() with some conditionally compiled
asm()s for accelerated eflags processing and it works.

-Kevin
2002-09-08 04:08:14 +00:00
Volker Ruppert
1332f37bce - do the longjmp() only when variable quit_context is not NULL 2002-09-07 14:27:50 +00:00
Volker Ruppert
71eda78391 - bx_init_hardware(): log actions must be updated when bochs starts with -q 2002-09-07 09:57:54 +00:00
Kevin Lawton
51c93e12a1 The paging unit gets notified of all CR0/CR3/CR4 updates so
it can decide how to proceed.  Some of those bits are necessary
to make TLB invalidation decisions.  INVLPG doesn't cause
a whole TLB flush anymore, just one page.  Some of the
current CPU behaviours model the P6, especially on CR0
reloads.  Earlier processors kept some pre-change pre-fetched
instructions until a branch.  We could probably model that
by setting a flag, and letting the revalidate_prefetch_q
function cause serialization.

The TLB flush code only invalidates entries which are not
already invalidated for the case where the TLB invalidation
ID trick is not in use.
2002-09-07 05:21:28 +00:00
Kevin Lawton
491035fcb2 I extended the guest-to-host TLB acceleration across the
Read-Modify-Write instructions.  The first read phase stores
the host pointer in the "pages" field if a direct use pointer
is available.  The Write phase first checks if a pointer was
issued and uses it for a direct write if available.

I chose the "pages" field since it needs to be checked by the
write_RMW_virtual variants anyways and thus needs to be
cached anyways.

Mostly the mods where to access.cc, but I did also macro-ize
the calls to write_RMW_virtual...() in files which use it
and cpu.h.  Right now, the macro is just a straight pass-through.
I tried expanding it to a quick initial check for the pointer
availability to do the write in-place, with a function call
as a fall-back.  That didn't seemed to matter at all.

Booting is not helped by this really.  The upper bound of
the gain is 5 or 6%, and that's only if you have a loop that
looks like:

label:
  add [eax], ebx   ;; mega read-modify-write instruction
  jmp label        ;; intensive loop.
2002-09-06 21:54:58 +00:00
Gregory Alexander
4f6039f533 Macroize BX_TLB_QUICK_INVALIDATE code.
Kevin Lawton says he doesn't get a performance benefit.

I'm not sure if I do.  Either way, the difference isn't
very large.

This code may get removed if it turns out to be useless.
2002-09-06 19:21:55 +00:00
Bryce Denney
d28b9cec9f - when I added bx_dbg_symbolic_address_16bit, I forgot to put a stub
in the "#if !BX_HAVE_HASH_MAP" section.  Now there is one.
2002-09-06 17:41:56 +00:00
Bryce Denney
f0d1e765b5 - there were two calls to wxMutexGuiLeave()...bad! 2002-09-06 16:59:54 +00:00
Bryce Denney
80a3900b8b - apply a patch I've been working on
- modified files: config.h.in cpu/init.cc debug/dbg_main.cc gui/control.cc
  gui/siminterface.cc gui/siminterface.h gui/wxdialog.cc gui/wxdialog.h
  gui/wxmain.cc gui/wxmain.h iodev/keyboard.cc

----------------------------------------------------------------------
Patch name: patch.wx-show-cpu2
Author: Bryce Denney
Date: Fri Sep  6 12:13:28 EDT 2002

Description:

Second try at implementing the "Debug:Show Cpu" and "Debug:Show
Keyboard" dialog with values that change as the simulation proceeds.
(Nobody gets to see the first try.)  This is the first step toward
making something resembling a wxWindows debugger.

First, variables which are going to be visible in the CI must be
registered as parameters.  For some variables, it might be acceptable
to change them from Bit32u into bx_param_num_c and access them only
with set/get methods, but for most variables it would be a horrible
pain and wreck performance.

To deal with this, I introduced the concept of a shadow parameter.  A
normal parameter has its value stored inside the struct, but a shadow
parameter has only a pointer to the value.  Shadow params allow you to
treat any variable as if it was a parameter, without having to change
its type and access it using get/set methods.  Of course, a shadow
param's value is controlled by someone else, so it can change at any
time.

To demonstrate and test the registration of shadow parameters, I
added code in cpu/init.cc to register a few CPU registers and
code in iodev/keyboard.cc to register a few keyboard state values.
Now these parameters are visible in the Debug:Show CPU and
Debug:Show Keyboard dialog boxes.

The Debug:Show* dialog boxes are created by the ParamDialog class,
which already understands how to display each type of parameter,
including the new shadow parameters (because they are just a subclass
of a normal parameter class).  I have added a ParamDialog::Refresh()
method, which rereads the value from every parameter that it is
displaying and changes the displayed value.  At the moment, in the
Debug:Show CPU dialog, changing the values has no effect.  However
this is trivial to add when it's time (just call CommitChanges!).  It
wouldn't really make sense to change the values unless you have paused
the simulation, for example when single stepping with the debugger.

The Refresh() method must be called periodically or else the dialog
will show the initial values forever.  At the moment, Refresh() is
called when the simulator sends an async event called
BX_ASYNC_EVT_REFRESH, created by a call to SIM->refresh_ci ().

Details:
- implement shadow parameter class for Bit32s, called bx_shadow_num_c.
  implement shadow parameter class for Boolean, called bx_shadow_bool_c.
  more to follow (I need one for every type!)
- now the simulator thread can request that the config interface refresh
  its display.  For now, the refresh event causes the CI to check every
  parameter it is watching and change the display value.  Later, it may
  be worth the trouble to keep track of which parameters have actually
  changed.  Code in the simulator thread calls SIM->refresh_ci(), which
  creates an async event called BX_ASYNC_EVT_REFRESH and sends it to
  the config interface.  When it arrives in the wxWindows gui thread,
  it calls RefreshDialogs(), which calls the Refresh() method on any
  dialogs that might need it.
- in the debugger, SIM->refresh_ci() is called before every prompt
  is printed.  Otherwise, the refresh would wait until the next
  SIM->periodic(), which might be thousands of cycles.  This way,
  when you're single stepping, the dialogs update with every step.
- To improve performance, the CI has a flag (MyFrame::WantRefresh())
  which tells whether it has any need for refresh events.  If no
  dialogs are showing that need refresh events, then no event is sent
  between threads.
- add a few defaults to the param classes that affect the settings of
  newly created parameters.  When declaring a lot of params with
  similar settings it's more compact to set the default for new params
  rather than to change each one separately.  default_text_format is
  the printf format string for displaying numbers.  default_base is
  the default base for displaying numbers (0, 16, 2, etc.)
- I added to ParamDialog to make it able to display modeless dialog
  boxes such as "Debug:Show CPU".  The new Refresh() method queries
  all the parameters for their current value and changes the value in
  the wxWindows control.  The ParamDialog class still needs a little
  work; for example, if it's modal it should have Cancel/Ok buttons,
  but if it's going to be modeless it should maybe have Apply (commit
  any changes) and Close.
2002-09-06 16:43:26 +00:00
Gregory Alexander
afdccad36c Oops, had to fix a bunch of parentheses.
Why | has precedence under == (or is it =)
I still don't understand.
2002-09-06 16:29:49 +00:00
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
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
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
Bryce Denney
6009e14996 - add MemoryConfigDialog that sets the ROM BIOS and VGA BIOS options,
and also the optional rom settings.  I think it all works except that
  the Browse buttons aren't hooked up yet.
- modified Files: gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
2002-09-02 20:13:52 +00:00
Kevin Lawton
746f09b427 There's a bug in the repeated IO & mem copy speedups. I
added --enable-repeat-speedups with default to disabled.
Reconfigure/recompile and the speedup code will be #ifdef'd
out for now.  It manifested as junk written to the VGA screen
while booting/running Windows.

Also made some more mods to the main cpu loop.  Moved the
handling of EXT/errorno outside the main loop, much like
the extra EIP/ESP commits were moved, for a little better
performance.

I changed the fetch_ptr/bytesleft method of fetching to
a slightly different model, which calculates a window
for which EIP will be valid (land on the current page),
and a bias which when applied to EIP will be from
0..upper_page_limit.  Speed is about the same for either
method, but a pseudo-op/threaded-interpreter will plug
in better with this and be faster.
2002-09-02 18:44:35 +00:00
Bryce Denney
0268014110 - add LogOptionsDialog that lets you decide whether to ignore, report,
die, or ask the user for each type of event.  It has a button that
  will lead to the "advanced" dialog, which doesn't exist yet.
- in gui/wxdialog.h, sketch a few more dialogs to be done soon
- modified: gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
2002-09-02 17:03:14 +00:00
Bryce Denney
1cda50d9f2 - make all packet mover classes report their log messages using the NE2K
class's prefix, NE2K.  The real issue is that the ne2k class exists at
  configuration time, so it is possible to tell it how to respond to
  panics, errors, etc.  The packet mover is created after configuration
  depending on the setting of bx_options.ne2k.Oethmod, so I cannot
  (with major hacks) affect its settings from the configuration interface.
  Several packet movers were already set up this way anyway.
2002-09-02 16:56:24 +00:00
Kevin Lawton
3d8e5f8b61 Removed the BX_FETCHDECODE_CACHE mods, and the patch that
Bryce created for use of ensuring all mods were removed
cleanly.
2002-09-01 23:02:36 +00:00
Bryce Denney
9a28714cbd - manually remove a diff chunk that was only a difference in version number,
since it always conflicts.
2002-09-01 21:46:30 +00:00
Bryce Denney
99ff4b3ed1 - create a patch that is equivalent to all CVS diffs associated with
the fetchdecode cache.
2002-09-01 21:30:50 +00:00
Bryce Denney
ed82a64ae5 - fix up NetConfigDialog and the code that calls it, so that what the
user selects actually changes the settings.
- modiified files: gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc
2002-09-01 21:24:14 +00:00
Bryce Denney
e7515cd933 - move decision about which ETH_ packet movers are enabled into
config.h.in (from iodev/eth.h)
2002-09-01 21:22:43 +00:00
Kevin Lawton
944697affb Removed patch which I committed to CVS. 2002-09-01 20:21:23 +00:00
Kevin Lawton
3a5f338419 Integrated patches for:
- Paging code rehash.  You must now use --enable-4meg-pages to
    use 4Meg pages, with the default of disabled, since we don't well
    support 4Meg pages yet.  Paging table walks model a real CPU
    more closely now, and I fixed some bugs in the old logic.
  - Segment check redundancy elimination.  After a segment is loaded,
    reads and writes are marked when a segment type check succeeds, and
    they are skipped thereafter, when possible.
  - Repeated IO and memory string copy acceleration.  Only some variants
    of instructions are available on all platforms, word and dword
    variants only on x86 for the moment due to alignment and endian issues.
    This is compiled in currently with no option - I should add a configure
    option.
  - Added a guest linear address to host TLB.  Actually, I just stick
    the host address (mem.vector[addr] address) in the upper 29 bits
    of the field 'combined_access' since they are unused.  Convenient
    for now.  I'm only storing page frame addresses.  This was the
    simplest for of such a TLB.  We can likely enhance this.  Also,
    I only accelerated the normal read/write routines in access.cc.
    Could also modify the read-modify-write versions too.  You must
    use --enable-guest2host-tlb, to try this out.  Currently speeds
    up Win95 boot time by about 3.5% for me.  More ground to cover...
  - Minor mods to CPUI/MOV_CdRd for CMOV.
  - Integrated enhancements from Volker to getHostMemAddr() for PCI
    being enabled.
2002-09-01 20:12:09 +00:00
Bryce Denney
9e67dcb3e1 - add NetConfigDialog box, that configures networking settings
- for all modal dialogs that return a boolean result, return either
  wxOK or wxCANCEL instead of 0,-1.
- you can view the NetConfigDialog box if you choose the Edit:Network menu
  item, but it's not connected to the actual parameter values yet.
2002-09-01 19:38:08 +00:00
Stanislav Shwartsman
9620d2a423 MMX instructions support (LITTLE_ENDIAN version)
After applying the patch edit cpu/MakefilE
2002-09-01 15:44:40 +00:00
Bryce Denney
157a9ac53a - this patch has been committed, and hasn't broken too many compiles so far 2002-09-01 15:39:39 +00:00
Bryce Denney
ffc84c8be9 - add BX_SCHEDULED_DIE_TIME which causes Bochs to exit automatically after a
certain number of instructions.  I use it for performance testing, and it
  won't hurt anyone unless they are foolish enough to enable it in config.h.
  Of course it is disabled by default!
2002-09-01 15:38:29 +00:00
Bryce Denney
572fc4ed57 - I had been misunderstanding how you're supposed to convert wxStrings
into normal C strings.  After asking about it on wx-users, I understand
  it better now.

  Example of unsafe code:
    char *filename = dlg.GetFilename().c_str ();
    printf ("file name is %s\n", filename);

  The problem is that dlg.GetFilename() returns a temporary wxString
  that goes out of scope at the end of that line of code.  The "filename"
  string is unstable if you write it this way.

  Example of safe code:
    char filename[1024];
    wxString fn (dlg.GetFilename ());
    strncpy (filename, fn.c_str (), sizeof(filename));
    printf ("file name is %s\n", name);

  Now we have a stable copy of the wxString in "fn" which is usable
  as long as fn is in scope.

- also now we use wxStrings (almost) all the time in the interface to the
  wxdialogs.  Any conversion from char* to wxString and back is done in
  wxmain.cc now.
2002-09-01 15:27:33 +00:00
Bryce Denney
1e0d562d95 - add instructions for installing Gnu Hurd, from
Bruno Bonfils <asyd@debian-fr.org>
2002-09-01 13:04:59 +00:00
Volker Ruppert
dfe902554a - text mode cursor size feature implemented 2002-09-01 07:32:03 +00:00
Kevin Lawton
d52b23daf1 Made some very minor mods, to make CPUID aware of CMOV instructions
for BX_CPU_LEVEL >= 6, and to have the CMOV instructions generate
an undefined opcode exception after printing info that they were
called, if BX_CPU_LEVEL <= 5.  I suppose we could have a separate
configure option, but mirroring Intel, CMOV is available as of
Pentium Pro.

For now, you have to compile with --enable-cpu-level=6 for CMOV
support to be compiled in.
2002-09-01 04:01:14 +00:00
Kevin Lawton
7a8d2dc61e Oops, added a modified file which I forgot about, to the patch. 2002-09-01 03:20:23 +00:00
Kevin Lawton
976b95ece9 Added 'patches/patch.kpl-paging-cleanup', a well needed clean-up
of bochs' broken paging code, and made an option to compile in
support of 4Meg pages, with the default being disabled, because
it is not well supported yet.
2002-09-01 02:37:40 +00:00
Christophe Bothamy
a52f2467cf - first part of fix for bug [ 601166 ] CMOS Problem @ "0x0F Index 0x05 data"
Added more allowed values for index 0x0F
2002-08-31 21:31:11 +00:00
Volker Ruppert
e1d8d30e4c - meaning of the memory type values changed (0 = ROM, 1 = Shadow RAM)
- the functions mapRead() and mapWrite() are no longer necessary
2002-08-31 15:35:51 +00:00
Volker Ruppert
38666a2cfb - PCI memory handling moved to bx_mem_c
* shadow RAM array and fetch function are now a part of the memory code
  * removed unnecessary PCI macros and functions load_ROM() and mem_read()
2002-08-31 12:24:41 +00:00
Bryce Denney
b65997bb13 - implement Edit:Boot, which chooses the boot drive 2002-08-31 04:58:24 +00:00
Bryce Denney
329bc47b77 - move BX_BOOT_* constants from bochs.h into gui/siminterface.h 2002-08-31 04:57:21 +00:00
Bryce Denney
327cd86e9b - add sketches showing a large configuration dialog similar to Netscape's
Edit:Preferences.
2002-08-31 00:35:25 +00:00
Bryce Denney
9e2a602c56 - remove create image button from cdrom dialog 2002-08-30 22:52:32 +00:00
Bryce Denney
68a7ab13fa - add comments about lifetime of io and genlog and why they're never freed. 2002-08-30 21:41:29 +00:00
Volker Ruppert
c3d63b2e81 - in function DrawBochsBitmap(): use the system palette instead of fixed values
- in function fillBxKeyEvent_MSW(): simplified the detection of extended scancodes
- in function text_update(): fixed a warning
2002-08-30 17:39:14 +00:00
Bryce Denney
645f1a0365 - make the "File:New Configuration" menu item call bx_reset_options(),
with a little "Are you sure?" dialog.
2002-08-30 16:23:36 +00:00
Volker Ruppert
10cdef6ff1 - new function bx_reset_options() resets the bx_options to their initial values 2002-08-30 14:22:47 +00:00
Bryce Denney
a8827a60bf - add note that you need segchecks patch too 2002-08-30 13:52:02 +00:00
Bryce Denney
d2366e1009 - upload patch from Kevin Lawton, SF#602156: Simple performance mod for
cpu.cc (EIP)
2002-08-30 13:26:02 +00:00
Bryce Denney
9d194317ec - add Kevin's patch on SF, #602003: repeat instruction optimizations 2002-08-30 13:20:42 +00:00
Bryce Denney
77f87fbbca - to convince gcc -MM to ignore system headers, I had to change some
#include statements that used ""'s so that they used <>'s instead.
  (gcc -MM generates the dependency list in the Makefile.)
2002-08-30 07:03:50 +00:00
Bryce Denney
4c20c5cd81 - add dependencies for wxwindows source files 2002-08-30 07:01:59 +00:00
Bryce Denney
de5daefbb6 - move all dialog box sketches from README-wxWindows into gui/wxdialog.h,
commented of course.
2002-08-30 06:49:19 +00:00
Bryce Denney
05daf0d6dc - moved a few constant #defines into gui/siminterface.h so they'd be
accesible in the CI
2002-08-30 06:47:51 +00:00
Bryce Denney
03f9b7c4ac - add name for CD-ROM 2002-08-30 06:47:21 +00:00
Bryce Denney
f23005efbf - move ASCII version of menu layout into wxmain.cc next to the code that
implements it.
2002-08-30 06:46:38 +00:00
Bryce Denney
3ce8912089 - add CdromConfigDialog to configure cdroms
- HDConfigDialog now uses an EnableChanged() method to set the enabled bit
  on components controlled by the enable checkbox.
- now sets the present bit on hard disks and cdrom
- enforces the rule that you can't have DISKD and CDROMD (just in time for
  Christophe to add another interface)
2002-08-30 06:06:36 +00:00
Bryce Denney
4bd24c2771 - now the same function is used to create both floppy and hard disk images.
They were nearly the same code anyway.
2002-08-29 23:28:52 +00:00
Bryce Denney
2aba2436fa - add "create image" for hard disk image
- now the megabytes field is a wxStaticText, which makes it clear that
  it cannot be edited.
- add "enter size/compute geometry" button for HD image
- make a few more strings into #defines in wxdialog.h
- disable most of the Edit menu during simulation, reenable it when
  simulation stops
2002-08-29 23:18:10 +00:00
Bryce Denney
e7fbe9e04e - propose new floppy config dialog that distinguished between device
config and changing the media.  The proposed change is NOT implemented.
2002-08-29 22:09:55 +00:00
Bryce Denney
d77a796a10 - add some vertical space between some things 2002-08-29 21:00:27 +00:00
Bryce Denney
a0828d3ee7 - make cancel buttons use id wxID_CANCEL so that pressing Cancel and
pressing ESCAPE are equivalent
2002-08-29 20:41:45 +00:00
Bryce Denney
ef4b975884 - add "Create Image" button to floppy dialog, and make it actually work 2002-08-29 20:13:05 +00:00
Bryce Denney
7ab99b2ac9 - this patch from Volker: make SetFilename arg be const char* as well 2002-08-29 20:09:54 +00:00
Bryce Denney
630d37269b - reset should have one arg, unsigned int type 2002-08-29 16:52:47 +00:00
Bryce Denney
7ce3b36770 - get rid of the not-so-great name CUI which I introduced a few days
ago.  Now we have the simulator, the siminterface, the VGA display
  window (VGAW), and the configuration interface (CI).
2002-08-29 14:59:37 +00:00
Bryce Denney
5ba160a5e3 - mention contributors up at the top
- mention what version of wxWindows to use
- correct VC++ build instructions (I haven't tested in a while but it was
  obviously wrong)
- update "what works right now" and clean up to do list
2002-08-29 14:54:34 +00:00
Bryce Denney
2fbf3206c1 - spelling fix 2002-08-29 14:07:17 +00:00
Bryce Denney
e43d822c32 - change SetDriveName() method to take const char * 2002-08-28 21:06:14 +00:00
Volker Ruppert
1136948638 - declaration of bx_do_text_config_interface() is not necessary for the wx gui
- don't load a bochsrc for the wx gui if no -q or -qf option is present
2002-08-28 20:01:34 +00:00
Volker Ruppert
8fde5ecfaf - implementation of the DMA controller reset
- new function reset_controller() resets the specified controller
- reset code removed from init()
- "master disable" uses the new reset function
2002-08-28 19:39:00 +00:00
Bryce Denney
3f9155c050 - when the device is reset via control register, it is BX_RESET_SOFTWARE 2002-08-28 16:55:16 +00:00
Bryce Denney
2594c18521 - revert previous revision to take out reset() method. The cdrom_interface
object is an interface to the host OS, not really a hardware device, so it
  probably doesn't need a reset().
2002-08-28 16:45:18 +00:00
Bryce Denney
8068f3b8e5 - update dialog box sketches 2002-08-28 15:28:24 +00:00
Bryce Denney
17da6fe3c1 - add HDConfigDialog box for wxWindows for editing hard disk params.
Now you can edit floppy and hard disk parameters using dialogs.
2002-08-28 15:27:26 +00:00
Bryce Denney
02bae6a701 - now I need names for both floppy and HD 2002-08-28 15:26:09 +00:00
Bryce Denney
eca0f0bb57 - add "name" for 1st and 2nd floppy disks. For now, name them a: and b: for
win32 only, and 0 and 1 elsewhere.
2002-08-28 08:29:19 +00:00
Bryce Denney
a08cf194c5 - add another wxWindows dialog, FloppyConfigDialog, which lets you
choose the filename and capacity of a floppy image.  This dialog
  can recognize a list of names as physical disk drives, and it has a
  Browse button so that you can click on a new image intead of having
  to type it.  If you press ok, then the Bochs parameters are updated.
- eventually we should make a function that makes a list of the
  physical devices that should be mentioned here.  For Windows it should
  say "Physical drive A:" for "a:", while on Linux it should say
  "Physical drive fd0" for "/dev/fd0" or something.  Even if bochs
  doesn't find the correct physical disk drives, you can still type
  whatever file name you want.
2002-08-28 07:54:53 +00:00
Bryce Denney
4d1aede4d7 - add comment that warns that gui/wxmain.cc depends on the order of
floppy parameters in the bx_list_c.
2002-08-28 07:45:30 +00:00
Bryce Denney
7fc65e2e25 - add first custom dialog box to the wxWindows interface in
gui/wxdialog.h and gui/wxdialog.cc.  The first dialog box is
  called LogMsgAskDialog.  It displays panic messages and asks if you
  want to continue, quit, etc.
2002-08-28 03:20:23 +00:00
Bryce Denney
67f9213460 - eliminate unused BX_ASYNC_EVT_SHUTDOWN_GUI event. 2002-08-28 03:14:53 +00:00
Bryce Denney
c6277af486 - no longer include prefix in the ask() message string. The code that has to
print the message will have access to the prefix too.
2002-08-28 03:06:12 +00:00
Bryce Denney
f78b7ca3b4 - update makefile dependencies 2002-08-28 03:02:56 +00:00
Bryce Denney
e1df049256 - add patch submitted by Kevin Lawton on ML 2002-08-27 23:00:58 +00:00
Bryce Denney
44ec9a0fc8 - update Makefile dependencies on nearly everything 2002-08-27 22:43:57 +00:00
Bryce Denney
fa63941b96 - attempt to fix compile when loader and debugger are both enabled.
This isn't the biggest problem though...the biggest problem is that
  loader.cc and bx_loader.cc haven't been in the source for 2+ years.
2002-08-27 21:32:03 +00:00
Bryce Denney
c6c0667d2c - bx_devices.reset() method now takes one arg 2002-08-27 21:30:48 +00:00
Bryce Denney
a7e9c74a0e - bx_devices.reset now requires a type arg: BX_RESET_HARDWARE 2002-08-27 20:09:00 +00:00
Bryce Denney
7fdc7303c2 - add "void reset(unsigned type)" method to every I/O device.
Some devices already had one.  Some I had to add an empty one.
  I did a little cleaning of init() methods to make them more uniform
  but generally I left them alone.
- I also put these exact diffs into a patch "patch.iodev-add-reset"
  in case I want to revert these changes for some reason, for example
  if they break an old patch.  It should be deleted after a while.
2002-08-27 19:54:46 +00:00
Bryce Denney
1a7dcbfe86 - update dependencies by running gcc -MM again 2002-08-27 19:50:27 +00:00
Volker Ruppert
3d8bb578df - moved the timer init code from the constructor to init_ips() 2002-08-27 18:53:30 +00:00