Commit Graph

84 Commits

Author SHA1 Message Date
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
329bc47b77 - move BX_BOOT_* constants from bochs.h into gui/siminterface.h 2002-08-31 04:57:21 +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
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
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
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
Christophe Bothamy
b42c7228f0 - moved optrom[1-4] options to an array of 4 elements.
Option reading/writing should really be done in a for loop.
  This was just a test to check if the new ata options could
  be handled that way.
2002-08-22 22:38:40 +00:00
Volker Ruppert
46093f8a88 - i440fx structure is now a private member of bx_pci_c
- PCI configuration space of the host bridge renamed from array[] to pci_conf[]
- new functions load_ROM() and mem_read() for ROM access
- macros for PCI functions defined in bochs.h
2002-08-17 09:23:42 +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
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
6b22b92881 - removed #include <sys/mount.h>. This should only be defined if BX_HAVE_BLKGETSIZE is defined (see patch.blkgetsize). 2002-07-29 09:52:03 +00:00
Christophe Bothamy
92839ea2d1 - added options to use up to 4 optional romimages 2002-07-24 17:52:34 +00:00
Bryce Denney
ae30f4121e - Bernd Korz reports that sys/mount.h doesn't exist on Beos, so I added
an ifndef __BEOS__ around it.  Is this mount.h actually necessary?
2002-07-21 02:55:04 +00:00
Volker Ruppert
53128ce079 - don't define ACT_ASK and ACT_FATAL with the same values if the control panel
is not compiled in
2002-07-14 13:23:10 +00:00
Christophe Bothamy
17fe31ad4d - reverted to before patch.blkdevsize inclusion, because compilation fails on WIN32.
It will be included back when we know which platforms handle the GETBLKSIZE ioctl right
2002-06-28 21:34:30 +00:00
Christophe Bothamy
383ff23866 - cleaned up the logprefix code 2002-06-28 14:03:47 +00:00
Christophe Bothamy
fcc5bd67cb - added patch for block device size detection from Ph. Marek
- included it in the main branch as it is only active with block devices
2002-06-26 16:45:27 +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
c7c9cc2430 - DMA register and unregister functions for DMA channels added and macros for
DMA functions defined. Most of the changes are based on the "bochs sync"
   version of plex86. Here is the list of changes:

  * register/unregister functions for DMA channels added. The DMA controller
    can use the DMA read/write handlers of registered devices directly.
  * "hardwired" code in dma.cc removed
  * all DMA related code in devices.cc and iodev.h removed
  * DMA related code in pc_system.* removed except HRQ handling
  * macros for DMA functions defined in bochs.h
  * floppy and SB16 code modified to use the changes described above
2002-06-16 15:02:28 +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
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
d71c73ed88 - rename TIMER_DELTA to to BX_IODEV_HANDLER_PERIOD. Now that it's a global
define, I wanted it to be a little more descriptive.
2002-03-26 13:59:35 +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
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
Christophe Bothamy
ac91aa0d3c . changes to enable El-Torito boot. It is disabled by default in rombios.c 2002-01-30 10:30:52 +00:00
Christophe Bothamy
bd7420ade5 - Added XFree86 keyboard mapping (us, fr, de) 2001-12-14 17:56:37 +00:00
Christophe Bothamy
70b1367dd1 . Added a keyboard_type option in configuration file
. Modified answer of keyboard controler to a keyboard-identify command
  depending on keyboard_type
. Added the keyboard_type option in bochsrc man page
2001-12-12 10:43:36 +00:00
Bryce Denney
5585e0cb30 - fixes based on Roland Mainz's patch.mainz-2001-10-05. 2001-11-12 18:28:07 +00:00
Bryce Denney
c52fbaa3a7 - allow configuration of the parallel port in .bochsrc and the config
interface menus.  Parallel port #1 is implemented, and I left stubs for
  parallel port #2 in case we want to ever add it.  If the parallel port
  is enabled, the init method of parallel.cc does an fopen() on the output
  file.  If disabled, or if the fopen fails, the file handler remains
  NULL and no characters are printed.  There is no attempt to enable/disable
  the operation of the parallel port, only the output to a file.
2001-11-12 02:35:09 +00:00
Bryce Denney
d746112a1b - make the "getlevel" function foolproof 2001-10-07 18:42:55 +00:00
Bryce Denney
caf267f24e - remove references to max_ips and system_clock_sync. If you need to revert,
find patches/patch.remove-max-ips.
2001-10-07 00:58:10 +00:00
Bryce Denney
03c9a235b5 Fixes for bug [ #467530 ] cmd line overrides config interface
- rework the order of initialization with and without the control panel.
  The thing that was bothering me most was the command line options were
  being processed after the user had set everything in the control panel.
  This is clearly not what's expected--the command line options should
  affect the startup defaults of the control panel, but whatever the user
  chooses in the cpanel menus is the final choice.
- if the control panel (config interface) is not wanted, the user can
  put "-nocp" or "-nocontrolpanel" as the FIRST argument on the command
  line.  Also, the "-psn" option which is automatically passed in by
  MacOS X when you doubleclick the application causes the control panel
  to be disabled.  In this case, the order of operations is:
    1. read bochsrc
    2. parse command line options.
- if the control panel is enabled (default), the command line options are
  parsed to provide the startup defaults for the control panel, but the
  control panel settings are the final answer.  So the order is:
    1. parse command line options
    2. run control panel  (if user chooses, he can read bochsrc from menus)
- I haven't tested command line options with the debugger yet.
2001-10-06 22:31:31 +00:00
Bryce Denney
daf2a9fb55 - add RCS Id to header of every file. This makes it easier to know what's
going on when someone sends in a modified file.
2001-10-03 13:10:38 +00:00
Bryce Denney
6d5c174ec0 - move config.h before the extern "C" { } business so that I can use
BX_WITH_CARBON in there
- don't include Carbon/Carbon.h.  I assume it was in there just for the
  typedef Boolean
2001-09-26 23:33:14 +00:00
Bryce Denney
4ad1870fa3 - add section for BX_WITH_CARBON for macosx 2001-09-26 00:11:23 +00:00
instinc
563cde946a Added IODEBUGLOG with value 47 2001-09-14 15:15:25 +00:00
Gregory Alexander
728252e212 Fixed a small problem in the latching code in the new pit.
Personal note: case...BREAK;

This makes OpenBSD and QNX a little happier.

Added debug messages.


 Modified Files:
 	bochs.h iodev/pit82c54.cc
2001-09-05 14:41:55 +00:00
Bryce Denney
6334f837e2 - now BIOS messages have prefix "BIOS" instead of "UNMP" 2001-08-21 04:10:35 +00:00
Nicholai Benalal
075578621b ok, now the amiga target on cvs is complete 2001-08-16 12:35:52 +00:00
Bryce Denney
72d28e5a87 - add string parameter called screenmode
- put #if BX_USE_AMIGAOS...#endif around fullscreen and screenmode, since
  they only apply to amiga
2001-08-16 02:00:31 +00:00
Bryce Denney
eb6a85629e - add option called fullscreen, for Nicholai Benalal's amiga port 2001-08-15 20:17:19 +00:00
Todd T.Fries
f833500359 some reformat, various misc stuff with Init, introduce $ 2001-06-27 20:11:10 +00:00
Todd T.Fries
a06b031dcf setprefix -> put 2001-06-27 19:16:01 +00:00
Bryce Denney
ef61b33db2 - moved win32 hacks into osdep.h so that gui/control.cc (which doesn't
include bochs.h) can use them too
2001-06-22 13:35:48 +00:00
Bryce Denney
e7f7c0e5d6 - allow --disable-control-panel to work again. Now it actually compiles
and links in the control panel, but just doesn't call it up.
2001-06-21 20:50:30 +00:00
Bryce Denney
b1b56487c1 - turn the last few options into parameters (cmos, loader, random stuff) 2001-06-21 19:57:21 +00:00
Bryce Denney
1bcdee2301 - add options to the string parameter class that allow it to deal with
raw hex bytes, for the MAC address.
2001-06-21 19:27:05 +00:00
Bryce Denney
8ca273ce73 - converted ne2k and sb16 to new style parameters and control panel,
except for MAC address of the ne2k, which is next.
2001-06-21 18:34:50 +00:00