Commit Graph

500 Commits

Author SHA1 Message Date
Bryce Denney
4694ac5c04 - clean up
pollution
2002-09-18 20:59:05 +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
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
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
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
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
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
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
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
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
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
Volker Ruppert
1332f37bce - do the longjmp() only when variable quit_context is not NULL 2002-09-07 14:27:50 +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
Bryce Denney
c1f363c7b5 - not using the config button in wxwindows 2002-09-06 15:00:54 +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
Volker Ruppert
b978b19405 - adding strdup() fixes the 'const' problem with gcc 2.95.3 2002-09-05 20:16:19 +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
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
fce114ed19 - eliminate printfs in wxwindows code--use wxLogDebug instead 2002-09-05 16:27:06 +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
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
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
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
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
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
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
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
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
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
fbdf6cb89d - remove unused vars to fix warning 2002-09-03 05:40:59 +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
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
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
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
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
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
Volker Ruppert
dfe902554a - text mode cursor size feature implemented 2002-09-01 07:32:03 +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
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
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
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
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
e43d822c32 - change SetDriveName() method to take const char * 2002-08-28 21:06:14 +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
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
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
44ec9a0fc8 - update Makefile dependencies on nearly everything 2002-08-27 22:43:57 +00:00
Bryce Denney
6bbf7d5957 - use setjmp() and longjmp() to quit the simulation thread cleanly.
I use setjmp() to save the context just before calling
  bx_continue_after_config_interface().  Then, in
  bx_real_sim_c:quit_sim, I use longjmp() to jump back to that context.
  This happens in main.cc and in gui/wxmain.cc (wxWindows only).
  I haven't tested with the debugger yet.  Possibly with debugger
  the quit longjmp() should jump back to the debugger prompt loop
  instead of actually quitting the program.
- clean up BX_ASYNC_EVT_LOG_MSG implementation by creating a different,
  synchronous event called BX_SYNC_EVT_LOG_ASK.  The async event
  could be used to simply tell the CI that an event has occurred,
  for example if the user wanted to view the events on screen
  (not implemented).  The sync event is used when you want the user
  to respond before the simulation can continue, such as a for the
  "panic=ask" behavior.
- in wxmain.cc, move the updates to the Start,Stop,Pause,Resume menu
  items into a separate method simStatusChanged().  This makes the code that
  does important stuff more readable.
- remove wxMutexGuiEnter()/Leave() from MyFrame::OnSim2CuiEvent().
  This method is an event handler called in the gui thread, so it
  already has the gui lock.  This call caused thread lock on my linux
  box.
2002-08-27 18:11:13 +00:00
Volker Ruppert
9882c64fb6 - removed unused static char *ask_about_config_interface
- changed quickstart option in start menu help text to -q
2002-08-27 16:27:57 +00:00
Bryce Denney
26385f2866 - I've added lots of comments in siminterface.h, and tried to clean up
the terminology a bit.  In particular, the term "gui" has started
  to mean different things in different contexts, so I've defined
  some more specific names for the parts of the user interface, and
  updated comments and some variable names to reflect it.  See
  siminterface.h for a more complete description of all of these.

    VGAW: VGA display window and toolbar buttons, the traditional Bochs
      display which is ported to X, win32, MacOS X, etc.  Implemented
      in gui/gui.* and platform dependent gui/*.cc files.
    CI: configuration interface that lets the user change settings such
      as floppy disk image, ne2k settings, log options.  The CI consists
      of two parts: configuration user interface (CUI) which does the
      actual rendering to the screen and handles key/mouse/menu events,
      and the siminterface object.
    CUI: configuration user interface.  This handles the user interactions
      that allow the user to configure Bochs.  To actually change any
      values it talks to the siminterface object.  One implementation of
      the CUI is the text-mode menus in gui/control.cc.  Another
      implementation is (will be) the wxWindows menus and dialogs in
      gui/wxmain.cc.
    siminterface: the glue between the CUI and the simulation code,
      accessible throughout the code by the global variable
        bx_simulator_interface_c *SIM;
      Among other things, siminterface methods allow the simulator to ask the
      CUI to display things or ask for user input, and allows the CUI
      to query and modify variables in the simulation code.


    GUI: Literally, "graphical user interface".  Until the configuration menus
      and wxWindows came along, everyone understood that "gui" referred to the
      VGA display window and the toolbar buttons because that's all there
      was.  Now that we have the wxWindows code, which implements both the VGAW
      and the CUI, while all other platforms implement only the VGAW, it's not
      so clear.  So, I'm trying to use VGAW, CI, and CUI consistently since
      they are more specific.
    control panel: This has been used as another name for the configuration
      interface.  "control panel" is also somewhat unspecific and it sounds
      like it would be graphical with buttons and sliders, but our text-mode
      thing is not graphical at all.  I've replaced "control panel" with
      "configuration interface" wherever I could find it.  In configure script,
      the --disable-control-panel option is still supported, but it politely
      suggests that you use --disable-config-interface instead.
- clean up comments in siminterface,wx* code
- add comments and examples for bx_param_* and BxEvents
- remove some obsolete stuff: notify_*_args,
  bx_simulator_interface_c::[sg]et_enabled() methods
- in siminterface.cc, move a few bx_real_sim_c methods to where they belong,
  with the rest of the methods.  No changes to the actual methods.
- remove some DOS ^M's which crept in and confused my editor.
2002-08-26 15:31:23 +00:00
Volker Ruppert
026f0dcb8d - disable menu items "New Configuration" and "Read Configuration" when the
simulation thread starts
2002-08-25 20:35:19 +00:00
Volker Ruppert
6055c158e9 - wx gui menu functions "Read Configuration" and "Save Configuration" implemented
- loading default bochsrc for the wx gui no longer necessary
- the wx gui version of bochs now accepts the same command line arguments as
  the other guis
2002-08-25 15:51:46 +00:00
Volker Ruppert
dc07804616 - simple user shortcut dialog for wxWindows added
- floppya, floppyb and cdromd handlers: don't change anything when the user has
  cancelled the dialog
2002-08-25 12:32:54 +00:00
Volker Ruppert
4a58339cad - pass command line arguments to function bx_init_main() 2002-08-25 09:54:05 +00:00
Volker Ruppert
95771fe0e5 - command line parameter --help added
- this changes also fix a carbon gui compile problem (SF bug #594718)
2002-08-25 08:31:16 +00:00
Bryce Denney
e352d0b871 - oops, I used BX_CPU_THIS_PTR outside of the cpu object. Changed the
reference to BX_CPU(0) which is legal even when BX_USE_CPU_SMF is off.
2002-08-25 05:21:16 +00:00
Volker Ruppert
eda0dc5c7e - renamed serial and parallel options "Opresent" to "Oenabled" and "*_PRESENT"
to "*_ENABLED"
- bx_serial_options for all 4 ports moved into an array com[4]
- serial port com1 is enabled by default
- detection of com2, com3 and com4 config options disabled for now
- new parameter "enabled" added to the serial bochsrc options
- error handling for serial and parallel bochsrc options changed. The unhandled
  BX_PANICs are replaced by BX_ERRORs.
- new function bx_write_serial_options() added
- serial destructor restores original terminal settings only when serial port
  is enabled and the tty_id is valid
2002-08-24 17:11:33 +00:00
Volker Ruppert
56952f9132 - parport1 enable/disable support added. Now you can control the presence of
parport1 with the new option "enabled". The old option "enable" only
  controlled the output. The parport1 is enabled with no output by default.
  Changes:
  * bochrc option "enable" replaced by "enabled"
  * parport option "Oenable" replaced by "Opresent"
  * bx_parport_options par1 and par2 replaced by an array par[2]
  * initialize parport1 resources only when enabled
  * renamed variable "parport_init_list" to "par_ser_init_list" since it
    contains parport and serial options
  * documentation and bochsrc updates
- the parport variables "output" and "initmode" now belong to the bx_par_t
  structure
- TODO: add parport2 (disabled by default), parport detection in the bios
2002-08-24 10:20:35 +00:00
Volker Ruppert
29f5e855cf - mouse functions fixed:
* the captured mouse belongs to the simWnd
  * adding border and caption sizes is not necessary
2002-08-18 08:35:52 +00:00
Volker Ruppert
7433d1d293 - set the log action for the log level "panic" of all devices to "fatal" (doing
it for the gui isn't enough)
2002-08-17 14:01:07 +00:00
Volker Ruppert
001f8003e9 - get_term_char(): replace the current character by a space when foreground
color and background color are the same
- shifted function keys added
2002-08-15 10:02:18 +00:00
Volker Ruppert
b50ce295da - DrawBitmap and DrawChar() now use the system color palette instead of fixed
RGB values
2002-08-12 14:41:42 +00:00
Volker Ruppert
da3a147ce2 - array 'colortbl' replaced by the 'curses_color' array using curses constants
(from plex86 curses.cc)
- set the log action for the log level "panic" to "fatal", because the "ask"
  menu causes trouble in the terminal
- logfile output to stderr not allowed
- handle_events(): type of variable 'character' must be 'int'
- two terminal chars added in function get_term_char()
- bit 7 of the vga attribute enables the A_REVERSE flag of the terminal char
  (from plex86 curses.cc)
- variable term_attr no longer necessary in function text_update()
2002-08-12 12:00:11 +00:00
Volker Ruppert
85f803d919 - support for color terminal implemented
- function keys are working now
- clear_screen() function works now
- a few special vga characters converted to terminal characters
- exit() now clears the screen and calls endwin()
- "[TERM]" removed from info/error messages
- debug messages changed to BX_DEBUG
2002-08-11 18:42:10 +00:00
Volker Ruppert
f49fb131b1 - InitCommonControls() must be called before creating the toolbar 2002-08-11 13:01:49 +00:00
Volker Ruppert
112487f7b1 - standard headerbar replaced by a real win32 toolbar using the existing
bitmaps. The bochs window now consists of 3 windows: the main window and
  it's child windows simulation window and toolbar window.
  Changes:
  - new windows "mainWnd" and "simWnd" replace the old "hwnd"
  - moved the functions of the old window procedure to the new ones
  - toolbar functions added in create_bitmap(), headerbar_bitmap() and
    replace_bitmap()
  - function show_headerbar() no longer needed (must be present for
    compatibility)
  - a few variables for the headerbar changed or removed
  - bitmap and headerbar variables now initialized in specific_init()
2002-08-10 15:23:30 +00:00
Volker Ruppert
7ebffde233 - buxfixes in function terminateEmul():
- delete the headerbar bitmaps
  - delete the cursor bitmap only if present
  - set the log action for the log level "panic" to "fatal"
2002-08-09 20:25:02 +00:00
Volker Ruppert
1d4d5aa244 - new "user" button added to the headerbar. It can send keyboard shortcuts to
the guest OS. The shortcut can be defined in the bochsrc or in the config
  interface. It is possible to change it at runtime.

  These shortcuts are currently recognized:
  ctrlaltdel, ctrlaltesc, ctrlaltf1, alttab

  Here is the list of changes:

  * userbutton.h and userbutton.xpm added in gui/bitmaps
  * config options for the userbutton shortcut added
  * initialize the new button in the gui.cc
  * the new userbutton handler generates keypresses and relaeses depending on
    the shortcut keyword
  * the gui stops adding buttons to the headerbar if not enough space is left.
    This can happen when the screen width is 320 pixels (done for X11 only).
  * TODO: build a dialog box for the wxWindows gui
2002-08-09 06:16:43 +00:00
Volker Ruppert
3a294b7521 - function bx_read_rc() returns -1 when the rcfile is "none". Now the default
option in the start menu doesn't change to "Begin simulation" in that case.
2002-08-07 07:24:32 +00:00
Volker Ruppert
c3cda0a919 - separation of floppy device type and media type started. This feature needs
more work in the floppy and bios code.
- floppy and cdrom entries in the runtime config menu can be disabled if the
  drive wasn't defined in bochsrc or start menu
- floppy variable "initial_status" and cdrom variable "inserted" renamed to
  "status"
- unused variable *ips in function build_runtime_options_prompt() disabled
2002-08-04 08:42:34 +00:00
Volker Ruppert
a6d07ad166 - added support for 360k floppy images
* new floppy type 360k can be used in .bochsrc and the config interface
  * media type and geometry can be set for the floppy type
  * BIOS changes to make 360k floppy drives work
  * bximage can create 360k images now
2002-08-01 07:37:56 +00:00
Christophe Bothamy
92839ea2d1 - added options to use up to 4 optional romimages 2002-07-24 17:52:34 +00:00
Bryce Denney
eaf037e658 - add Swedish keymap from Magnus 'Moggen' Öberg 2002-07-21 04:03:41 +00:00
Volker Ruppert
70eb02913b - trailing comma removed after the last item of enum {} bx_string_opt_bits 2002-07-04 19:24:30 +00:00
Christophe Bothamy
a926744628 I reworked and included Carl's patch to have a new bochsrc directive
to describe the format of the log prefix. This option can be any string
with special tokens being replaced at run time :
  #   %t : 11 decimal digits timer tick
  #   %i : 8 hexadecimal digits of cpu0 current eip
  #   %e : 1 character event type ('i'nfo, 'd'ebug, 'p'anic, 'e'rror)
  #   %d : 5 characters string of the device, between brackets
the default is "%t%i%d", so the logprefix is the same as before.

New tokens can be easily added or changed if needed.


Modified Files:
  .bochsrc bochs.h logio.cc main.cc gui/control.cc
  gui/siminterface.h gui/siminterface.cc
  patches/patch.logfilefmteip
2002-06-26 14:42:35 +00:00
Volker Ruppert
b9822b6f1c - in function bx_list_c::text_print() added parentheses (fixes SF bug #572177) 2002-06-23 18:02:55 +00:00
Gregory Alexander
18ca414cc0 Oops! 2002-06-20 17:59:26 +00:00
Gregory Alexander
401b990cb9 Added comment about nocp option to config menu. 2002-06-20 15:43:09 +00:00
Volker Ruppert
53acc7b2d7 - "ask" dialog implemented (a part of this changes comes from the old version
of wx.cc)
2002-06-01 15:44:54 +00:00
Volker Ruppert
a8fc8f8d84 - cleaned up and improved the X gui text font handling
* dimension_update() stores the global variables columns, rows and
    font_height_orig; it uses X font sizes to recalculate the screen size
  * text_update() uses the columns, rows and X font sizes when redrawing the
    screen; it adjusts the cursor shape using the font sizes
2002-05-18 16:02:20 +00:00
Christophe Bothamy
a0c64105fa - italian keymap file from Emanuele Goldoni 2002-05-17 20:25:36 +00:00
instinc
cd10b68d0a Added sdl-config to SDL_CFLAGS 2002-05-04 00:50:26 +00:00
Christophe Bothamy
980364868d - added a script directive in ne2k options of .bochsrc
- added the script directive management for ne2k options
- added the execution of the script (if defined and not 'none') after init of the tun device
2002-05-02 07:54:22 +00:00
Christophe Bothamy
cd50268e2f - added a floppy_bootsig_check option to .bochsrc that will be used to enable/disable the 0xaa55 signature check ONLY for floppy-boot
- stored the boot signature check flag in cmos reg 0x38
- the rombios that is able to handle that flag will be uploaded later
2002-04-23 07:44:34 +00:00
Volker Ruppert
462871fd3a - Improvements for dimension_update() in text mode and text_update()
- The emulated vga card issues a dimension_update() using the real
    screen dimensions and the real font height.

  - The gui selects a font with the requested height or it recalculates
    the screen height if the font height is not available.

  - The text_update() function uses a new variable 'ncols' instead of the
    fixed value of 80 for the number of text columns.

  I have tested the changes with X11/Linux, SDL, wxGTK and win32. The changes
  in the other guis are not tested yet.
2002-04-20 07:19:35 +00:00
Volker Ruppert
189c1bbddc - text cursor disable feature added 2002-04-18 18:36:02 +00:00
Bryce Denney
30aaf4088e - commit patch.wxwindows.gz in the main branch. Now you can try out
the wxwindows interface by just "configure --with-wx; make"

  Modified Files:
    Makefile.in bochs.h config.h.in configure configure.in
    load32bitOShack.cc logio.cc main.cc cpu/cpu.cc cpu/cpu.h
    debug/dbg_main.cc gui/Makefile.in gui/control.cc gui/gui.cc
    gui/siminterface.cc gui/siminterface.h gui/x.cc iodev/cdrom.cc
    iodev/keyboard.cc memory/misc_mem.cc
  Added Files:
    README-wxWindows wxbochs.rc gui/wx.cc gui/wxmain.cc
    gui/wxmain.h gui/bitmaps/cdromd.xpm
    gui/bitmaps/configbutton.xpm gui/bitmaps/copy.xpm
    gui/bitmaps/floppya.xpm gui/bitmaps/floppyb.xpm
    gui/bitmaps/mouse.xpm gui/bitmaps/paste.xpm
    gui/bitmaps/power.xpm gui/bitmaps/reset.xpm
    gui/bitmaps/snapshot.xpm
  Removed Files:
    patches/patch.wxwindows.gz
2002-04-18 00:22:20 +00:00
Bryce Denney
c20298b6f4 - the runtime menu was displaying the old default of 10. It should be 11
(continue).
2002-04-08 00:11:52 +00:00
Volker Ruppert
55ccdca509 - swap the scancodes of "numlock" and "pause" - this simplifies the test for
extended scancodes
2002-04-07 18:07:20 +00:00
Christophe Bothamy
2dceae9e8f - fixed bug on NumericKeypad 5 when not using keymapping 2002-04-05 12:10:50 +00:00
Volker Ruppert
3d49380b35 - send a scancode for "left control key released" before handling the scancode
for the "AltGr" key (present on European keyboards)
2002-04-04 18:11:53 +00:00
Bryce Denney
767ac9b2dc - b_dolata@compfort.pl sent in this patch to fix a problem Christophe
described in bug [ #538214 ] directory as keymap file
2002-04-03 21:07:14 +00:00
Bryce Denney
54721fc3d2 - if vga font not found, search for a font called "-*-vga-*" too.
This was suggested in the bug report:
  [ #537593 ] vga font not being found.
2002-04-03 04:22:18 +00:00
Christophe Bothamy
24e2d109da - changed copyright strings 2002-04-01 22:43:01 +00:00
instinc
4e17b97211 fixed feature request 488645 2002-04-01 04:12:11 +00:00
Volker Ruppert
bc7ca5b0e6 - removed unnecessary include statemants for X 2002-03-30 06:45:30 +00:00
Bryce Denney
dd5d93705f - revert revision 1.26 which was labelled "Fix for win32 host not displaying
all of the window especially after a resize".  This causes screen corruption
  on my win98 box whenever Bochs changes resolution, so I removed it from cvs
  and checked it in as patches/patch.win32-resize instead.
2002-03-28 01:12:26 +00:00
Bryce Denney
b394a44157 - made keyboard_paste_delay a runtime configurable option
- clean up comments & debug msgs in paste code
2002-03-26 14:46:03 +00:00
Bryce Denney
34e02290eb - apply Christophe's patch.paste-for-dos. I will make minor tweaks as
separate revisions.
2002-03-26 13:51:48 +00:00
Christophe Bothamy
20462eb3ff - fixed a typo on the ']' key 2002-03-25 00:57:30 +00:00
Bryce Denney
453a4bfb56 - fix up comments to mention keymap functions that I added 2002-03-24 09:11:04 +00:00
Christophe Bothamy
30541d7a37 - added KEY_LEFT_BACKSLASH 2002-03-21 19:12:35 +00:00
Volker Ruppert
a7d5ae3b2d - added support for text modes with 8x8 characters on win32 gui (patch from
Hartmut Birr <hartmut.birr@tesionmail.de>)
  This is usefull for ROS (50 lines console).
2002-03-21 18:40:20 +00:00
Bryce Denney
8ba46b2450 - apply patch.x11-auto-private-colormap 2002-03-19 23:38:08 +00:00
Volker Ruppert
665e67d404 - call SDL_GetMouseState() to get the state of all buttons when handling a
mouse button event.
- replaced SDL_BUTTON(2) by SDL_BUTTON_MIDDLE in the mouse button event handler
2002-03-19 19:59:44 +00:00
Bryce Denney
7a6fbf9597 - fix copy to clipboard problem for X11 by calling XSetSelectionOwner()
before XStoreBytes.
2002-03-19 18:43:22 +00:00
Volker Ruppert
9e1cf3bec1 - function mouse_enabled_changed_specific() implemented
- added toggle_mouse_enable() call to the handling of the middle mouse button
- removed break statement between SDL_MOUSEBUTTONDOWN and SDL_MOUSEBUTTONUP
- added prefix "SDL" in specific init
2002-03-18 21:21:19 +00:00
Volker Ruppert
8263d15e76 - renamed update_floppy_status_buttons() to update_drive_status_buttons() since
it handles the cdrom status too
2002-03-17 20:57:54 +00:00
Volker Ruppert
6518957fe4 - implemention of the headerbar functionality (new function headerbar_click)
- the function replace_bitmap() tranfers the dst.x value of the old bitmap
  to the new one
2002-03-17 20:56:15 +00:00
Volker Ruppert
37955596f8 - create_bitmap(): setting Amask to 0x0 makes other colors visible
- fixed headerbar colors (X look)
2002-03-17 16:57:07 +00:00
Volker Ruppert
3ec4af94b4 - fixed dependence: recompile sdl.o if sdl.h is modified 2002-03-17 16:56:26 +00:00
Volker Ruppert
4870476367 - headerbar bitmap alignment implemented
- replace_bitmap() works now
2002-03-17 12:34:03 +00:00
Volker Ruppert
f113121db0 - text mode cursor is now visible in modes with more than 25 lines 2002-03-16 13:20:58 +00:00
Volker Ruppert
92b06b9ebf - new function get_clipboard_text() for GUI specific clipboard handling
GUI specific paste functions for X11 and WIN32 in paste_handler() moved to
  the new function
- get_clipboard_text() prepared for other GUIs
- set_clipboard_text() has now a return value (0 = failed or not implemented)
- use portable code in copy_handler() if set_clipboard_text() fails
- snapshot_handler() prepared for adding a file dialog call
- writing snapshot file in binary mode (LF->CRLF conversion already done)
2002-03-16 11:30:06 +00:00
Bryce Denney
842bfb4430 - BX_WITH_X11 is always defined. use "#if BX_WITH_X11" not #ifdef 2002-03-15 17:10:58 +00:00
Volker Ruppert
7373bb7647 - new function set_clipboard_text() for GUI specific clipboard handling
GUI specific copy functions for X11 and WIN32 in copy_handler() moved to
  the new function
- set_clipboard_text() prepared for other GUIs
- value of text mode cursor variables fixed (and renamed in x.cc)
- BX_ERROR message in snapshot_handler() fixed
2002-03-15 16:45:10 +00:00
Mike Lerwill
026b7018bd Fix for win32 host not displaying all of the window especially after a resize 2002-03-15 10:55:48 +00:00
Christophe Bothamy
256161956f - fixed the phantom buttons problem.
- the button still have to we placed in the right order
- the SDL_MapRGB problem is NOT fixed. The fg color is hardcoded to 0xffffffff
2002-03-15 01:11:10 +00:00
Christophe Bothamy
c2df473661 - added ASCII_equivalent constants 2002-03-12 23:56:53 +00:00
Christophe Bothamy
a4bf328178 - fixed header keymap layout name (DE, ES) 2002-03-12 23:56:01 +00:00
Bryce Denney
502a48057b - fix clipboard code that is compiled when neither windows nor X windows
is enabled.
2002-03-12 06:46:35 +00:00
Volker Ruppert
0f37656bc1 - updated German keymap file for paste support 2002-03-11 20:35:28 +00:00
Bryce Denney
ebc19a5e6c - fix bugs in copy&paste on win32.
- paste: grabbing the data from the clipboard in win32 was not implemented
  at all.  I found some example code on usenet and adapted it for Bochs.
- keymap: now if you call loadKeymap with NULL for the function pointer,
  it just fills in all the X windows keysyms with zero.  Added a call
  to loadKeymap in win32.cc.
2002-03-11 16:35:41 +00:00
Bryce Denney
d82a73ed21 - fix things I broke while working in linux 2002-03-11 15:45:34 +00:00
Bryce Denney
70e007b8f7 - add comment 2002-03-11 15:13:38 +00:00
Bryce Denney
8125bee908 - commit patch.paste 2002-03-11 15:04:58 +00:00
Jeroen Janssen
b6074761e2 - fixed small bug causing always including X11 header 2002-03-10 20:08:14 +00:00
Bryce Denney
aa6acc2be4 - add code for X windows to put the snapshot data onto the clipboard. 2002-03-10 16:06:56 +00:00
Volker Ruppert
beae7bda41 - added constant BX_INSERTED for media status (taken from bochs.h)
- fixed a warning in ask_uint() (type of variable n is now Bit32u)
- removed unused variable buffer[512] in text_ask()
2002-03-10 10:19:32 +00:00
Bryce Denney
3d2c58ee49 - revert to revision 1.27. My changes in 1.28 caused cygwin to be unable to
copy to the clipboard so I removed them.
- I was having cygwin compile problems because <windows.h> was not always
  included when compiling this file.  Add an include of <windows.h> at
  the top, and now it compiles in cygwin.
2002-03-10 05:49:26 +00:00
Bryce Denney
8c0256840c - apply patch.vbe-janssen by Jeroen Janssen <japj@darius.demon.nl>,
to add VBE support to Bochs.  The changes in this checkin correspond
  to Jeroen's 5th version of the patch on sourceforge patch #526595.
2002-03-10 04:51:24 +00:00
Bryce Denney
a7c15927bf - apply patch [ 505057 ] MacOS X carbonized event handlers
by Jeremy Parsons (brefin)
2002-03-09 02:40:25 +00:00
Bryce Denney
a0640f1c32 - add std bochs header 2002-03-06 20:39:23 +00:00
Bryce Denney
70f4e7ee27 - increase max bitmaps to 32 since I was running out
- only do the "scancode-8" trick on linux.  On windows it did exactly the
  wrong thing, so I'll assume it's a bug in SDL for linux.
2002-03-06 20:38:31 +00:00
Bryce Denney
55b12f615c - to get it running on other compilers, I removed all references to
iostream, vector, and the use of templates.  Now the vector of bitmaps
  is an array of pointers to bitmaps and a count.
2002-03-06 20:36:35 +00:00
Bryce Denney
efb6eeb621 - use UNIX-like code when compiling in cygwin 2002-03-06 18:17:24 +00:00
Christophe Bothamy
11ed519a07 - Deleted a "debug" include <X11/...>
- BX_KEY_PRINT_SCREEN and BX_KEY_SCROLL_LOCK were defined twice
2002-03-06 14:04:42 +00:00
Christophe Bothamy
f0e762c3d2 - updated the BX_KEY_NBKEYS comment to remind to modify the bx_key_symbol of gui/keymap.cc 2002-03-06 10:55:44 +00:00
Christophe Bothamy
e931247144 - New keymap architecture.
The localisation is now read from keymap files
  The keymap files are in gui/keymaps directory
2002-03-06 09:31:55 +00:00
Stu Grossman
6f3d73741a Deal with systems that don't have XK_EuroSign defined. 2002-03-05 15:42:02 +00:00
Bryce Denney
dd90b7ab46 - add serial port options to the configuration interface, in the same
menu as the parallel port options.
2002-03-03 06:10:04 +00:00
Bryce Denney
e50a1be21b - commit serial port patch from Stu Grossman <grossman@juniper.net>
Here are the patches (without the serial name fix).  Let me know if you want
  me to change that.  Oh, FYI, my changes also open up the com1 terminal in raw
  mode, which makes the emulation much more accurate.  You'll also notice that
  I added infrastructure for com2->4 in the option parsing.  I didn't add it to
  the serial code, as I think a bunch of things need to be untangled before
  that can work.
2002-03-03 06:03:29 +00:00
Volker Ruppert
9f097cbf00 - cursor size feature implemented for win32 2002-02-24 17:20:19 +00:00
Volker Ruppert
b1738bed08 - implementation of the text mode cursor in the SDL GUI 2002-02-16 20:31:35 +00:00
Volker Ruppert
197f80bde5 - snapshot_handler() prepared for copying text to clipboard
- copy text to clipboard added for WIN32
2002-02-12 17:09:51 +00:00
instinc
1eccd64198 Fixes the mouse direction problem (sorry, I couldn't test locally)
Fixes the font switch 8x8 <-> 8x16 and clears the screen accordingly.
Known issue: the headerbar is still not displayed
2002-02-07 02:12:51 +00:00
instinc
12f50276e5 Removed the configuration panel width/height
Added FG/BG color definitions for the headerbar
2002-02-06 02:13:32 +00:00
instinc
ee181da9d3 Added required space for the control bar
Added control for 80x50 fonts
Added mouse input
Added mouse grabbing
Added automatic mouse grabbing when entering full screen
Added autoremoval of header when going fullscreen
Simplified a couple of graphic routines
2002-02-06 02:12:45 +00:00
instinc
61ee0ca2c3 Added mouse input + mouse/keyboard grabbing. 2002-02-05 21:39:15 +00:00
instinc
96fdd89e74 added SDL libraries 2002-02-05 17:36:42 +00:00
instinc
10fd6daf08 SDL support, importing sources 2002-02-05 05:51:38 +00:00
instinc
55b2f65a1c Header file for sdl.cc 2002-02-05 05:50:50 +00:00
Volker Ruppert
1d9861fc59 - implementation of the text mode snapshot function 2002-02-04 20:31:35 +00:00
Volker Ruppert
84b649831e - new cdrom button in the headerbar
- changing cdrom media in a Bochs session now possible
- don't eject cdrom when the guest OS has locked the drive
2002-02-01 16:46:27 +00:00