Commit Graph

53 Commits

Author SHA1 Message Date
Volker Ruppert
f2c9a503d1 Added debugger support for the term gui using a pseudo-terminal. The command-line
debugger appears on main terminal and Bochs screen on pseudo-terminal connected
to minicom (based on SF patch #522).
2014-12-18 20:29:37 +00:00
Volker Ruppert
443f04703c Added / modified device log prefixes 2013-12-29 12:56:52 +00:00
Volker Ruppert
1fd6745aea Started rewrite of the gui code to make the graphics snapshot independent from
the display adapter code. When ready, the common gui code should handle it
completely. The snapshot handler should set a flag 'snapshot_mode' and then it
should force a display update. The graphics update code should be redirected to
some code that 'draws' to a snapshot buffer. These first steps are done:

- store some guest display settings in the gui code (text / graphics switch,
  x / y resolution and bpp)
- split 8 bpp palette update code in a common and a specific part and store the
  palette values in the gui code
2012-10-14 18:29:44 +00:00
Volker Ruppert
9d42a3eca4 - removed x/y tile size parameters from specific_init() since the tile dimensions
are now members of the bx_gui_c class
2012-03-03 12:41:24 +00:00
Volker Ruppert
a34cf1bcd5 - changes in the text update interface code
- changed argument for the text mode info structure to a pointer
  - added attribute controller palette to bx_vga_tminfo_t and removed the
    previous implementation
  - carbon.cc: attempt to fix the text mode colors (untested)
- x.cc: fixed warnings
2012-01-22 12:22:03 +00:00
Volker Ruppert
345d67c403 - removed BeOS support from sources and documentation 2011-07-11 17:36:10 +00:00
Stanislav Shwartsman
00981cd7a6 Adding Id and Rev property to all files 2011-02-24 22:05:47 +00:00
Stanislav Shwartsman
5df864b1f1 Move param_names.h into bochs root folder 2010-02-26 14:18:19 +00:00
Stanislav Shwartsman
5fec008130 change copyright to bochs project 2009-12-04 20:02:12 +00:00
Volker Ruppert
e5eac65b59 - removed wrong character from FSF address (converted invisible and useless
2-byte character)
- updated FSF address in some files
- added license to some files
2009-02-08 09:05:52 +00:00
Stanislav Shwartsman
66dc9b4cb1 - updated FSF address 2009-02-07 20:35:39 +00:00
Volker Ruppert
24c8296d68 - compilaton fixes for win32 binary with term gui support only 2008-12-18 15:37:25 +00:00
Volker Ruppert
457d320524 - applied patches for the term gui from SF tracker by Sebastian
* fixed missing SIGHUP and SIQUIT on MinGW
  * fixed wrong colors if curses library supports more than 8
2008-06-22 08:32:59 +00:00
Stanislav Shwartsman
457f7ea4bd coding style changes 2008-03-06 21:15:40 +00:00
Stanislav Shwartsman
55ad3e89b6 another whitespace cleanup by Sebastien 2008-02-05 22:57:43 +00:00
Volker Ruppert
5daa9c5975 - text mode character blinking feature added in the X11 and SDL guis
- fixed sdl status bar update after resize
- updated some comments
2008-01-28 21:52:09 +00:00
Volker Ruppert
4fd404b622 - get rid of text_update() parameter 'nrows' (updated remaining guis)
- text mode cursor blinking implemented
2008-01-26 00:00:31 +00:00
Volker Ruppert
c4785b7709 - Bochs with 'term' gui now quits when the terminal is closed (SIGHUP) 2006-08-30 18:16:36 +00:00
Volker Ruppert
dd7e08de99 - remaining config options and special menus added to parameter tree
- parameter tree structure updated (TODO: should be moved to development.dbk)
- code cleanup: bx_options stuff and obsolete parameter access methods removed
- TODO: rewrite of shadow parameter stuff (for subtree "save_restore")
2006-03-05 10:24:29 +00:00
Volker Ruppert
d4d4cbf6dd - display and interface options rewritten to a parameter tree
- new enum parameter method get_selected() returns a pointer to the selected string
- proposed parameter tree updated
2006-02-21 21:35:09 +00:00
Volker Ruppert
3d9495bb45 - implemented idle hack for the term gui (patch by H. Johansson) 2005-06-17 18:37:51 +00:00
Stanislav Shwartsman
4b4538619e Fix compilation error 2004-06-26 07:06:23 +00:00
Christophe Bothamy
fb171e482a - apply MartinS compile patch for missing function in curses 2003-08-17 23:40:39 +00:00
Volker Ruppert
43d5bef9ed - preparing all display libraries (guis) to support graphics modes > 8bpp
(based on a patch from Christopher Nelson <paradox@BBHC.ORG>)
  * the win32 gui changes the bitmap settings using the bpp argument
  * added stubs for all guis except win32
  * descriptions of function dimension_update() updated
2003-06-28 08:04:31 +00:00
Volker Ruppert
b456772b0f - translation table 'vga_to_term[128]' for the characters 0x80-0xff added
- function get_term_char() rewritten
- text background color fixed
2003-05-18 11:26:02 +00:00
Volker Ruppert
30fb8845d4 - function text_update() of the term display library rewritten, line offset and
cursor enable/disable support implemented
- function dimension_update() now calculates the number of visible rows and
  columns in text mode
- draw a border if the physical screen is larger than the bochs text screen
- initialize color pairs only when color support is present
- german umlaut characters added in function get_term_char()
- function get_term_char(): unsupported characters are now replaced by spaces
2003-05-15 19:00:18 +00:00
Volker Ruppert
3a788ddcf4 - char width switch feature (8 / 9 pixels) prepared for all display libraries
and implemented in SDL
  * sequencer controller register 0x01 bit 0 controls the width of the characters.
    This value is used to calculate the screen width.
  * attribute controller register 0x10 bit 2 controls the appearance of graphics
    characters (ASCII 0xC0 - 0cDF). A change of this value forces a charmap update
    to rebuild the font bitmaps.
  * the SDL display library uses the new feature described above
  * the other display libraries recalculate the screen width, since they are using
    a fixed font width of 8 for now.
- VGA: attribute controller register 0x10 bit 2 (enable_line_graphics) does not
  switch the palatte in CGA mode
2003-05-11 15:07:54 +00:00
Volker Ruppert
5ab9786871 - function text_update() prepared for new features. New structure
'bx_vga_tminfo_t' replaces variable 'cursor_state'.
2003-05-07 19:15:47 +00:00
Bryce Denney
c43b46c531 - check in some small compile patches from Martin Str|mberg <ams@ludd.luth.se>
to make Bochs compile on DJGPP.
  - put references to SIGSTOP and SIGTSTP in #ifdefs
  - add definition of BX_CD_FRAMESIZE and CD_FRAMESIZE
  - look for curses functions in -ldcurses

Modified Files:
  gui/term.cc iodev/cdrom.cc configure.in configure
2002-11-20 12:23:42 +00:00
Bryce Denney
0a7cb3a43c - apply patch.ifdef-disabled-options. Comments from that patch are below:
For a whole lot of configure options, I put #if...#endif around code that
  is specific to the option, even in files which are normally only compiled
  when the option is on.  This allows me to create a MS Visual C++ 6.0
  workspace that supports many of these options.  The workspace will basically
  compile every file all the time, but the code for disabled options will
  be commented out by the #if...#endif.

  This may one day lead to simplification of the Makefiles and configure
  scripts, but for the moment I'm leaving Makefiles and configure scripts
  alone.

  Affected options:
    BX_SUPPORT_APIC (cpu/apic.cc)
    BX_SUPPORT_X86_64 (cpu/*64.cc)
    BX_DEBUGGER (debug/*)
    BX_DISASM (disasm/*)
    BX_WITH_nameofgui (gui/*)
    BX_SUPPORT_CDROM (iodev/cdrom.cc)
    BX_NE2K_SUPPORT (iodev/eth*.cc, iodev/ne2k.cc)
    BX_SUPPORT_APIC (iodev/ioapic.cc)
    BX_IODEBUG_SUPPORT (iodev/iodebug.cc)
    BX_PCI_SUPPORT (iodev/pci*.cc)
    BX_SUPPORT_SB16 (iodev/sb*.cc)

Modified Files:
  cpu/apic.cc cpu/arith64.cc cpu/ctrl_xfer64.cc
  cpu/data_xfer64.cc cpu/fetchdecode64.cc cpu/logical64.cc
  cpu/mult64.cc cpu/resolve64.cc cpu/shift64.cc cpu/stack64.cc
  debug/Makefile.in debug/crc.cc debug/dbg_main.cc debug/lexer.l
  debug/linux.cc debug/parser.c debug/parser.y
  disasm/dis_decode.cc disasm/dis_groups.cc gui/amigaos.cc
  gui/beos.cc gui/carbon.cc gui/macintosh.cc gui/rfb.cc
  gui/sdl.cc gui/term.cc gui/win32.cc gui/wx.cc gui/wxdialog.cc
  gui/wxmain.cc gui/x.cc iodev/cdrom.cc iodev/eth.cc
  iodev/eth_arpback.cc iodev/eth_fbsd.cc iodev/eth_linux.cc
  iodev/eth_null.cc iodev/eth_packetmaker.cc iodev/eth_tap.cc
  iodev/eth_tuntap.cc iodev/eth_win32.cc iodev/ioapic.cc
  iodev/iodebug.cc iodev/ne2k.cc iodev/pci.cc iodev/pci2isa.cc
  iodev/sb16.cc iodev/soundlnx.cc iodev/soundwin.cc
2002-11-19 05:47:45 +00:00
Bryce Denney
cec9135e9f - Apply patch.replace-Boolean rev 1.3. Every "Boolean" is now changed to a
"bx_bool" which is always defined as Bit32u on all platforms.  In Carbon
  specific code, Boolean is still used because the Carbon header files
  define it to unsigned char.
- this fixes bug [ 623152 ] MacOSX: Triple Exception Booting win95.
  The bug was that some code in Bochs depends on Boolean to be a
  32 bit value.  (This should be fixed, but I don't know all the places
  where it needs to be fixed yet.)  Because Carbon defined Boolean as
  an unsigned char, Bochs just followed along and used the unsigned char
  definition to avoid compile problems.  This exposed the dependency
  on 32 bit Boolean on MacOS X only and led to major simulation problems,
  that could only be reproduced and debugged on that platform.
- On the mailing list we debated whether to make all Booleans into "bool" or
  our own type.  I chose bx_bool for several reasons.
  1. Unlike C++'s bool, we can guarantee that bx_bool is the same size on all
     platforms, which makes it much less likely to have more platform-specific
     simulation differences in the future.  (I spent hours on a borrowed
     MacOSX machine chasing bug 618388 before discovering that different sized
     Booleans were the problem, and I don't want to repeat that.)
  2. We still have at least one dependency on 32 bit Booleans which must be
     fixed some time, but I don't want to risk introducing new bugs into the
     simulation just before the 2.0 release.

Modified Files:
    bochs.h config.h.in gdbstub.cc logio.cc main.cc pc_system.cc
    pc_system.h plugin.cc plugin.h bios/rombios.c cpu/apic.cc
    cpu/arith16.cc cpu/arith32.cc cpu/arith64.cc cpu/arith8.cc
    cpu/cpu.cc cpu/cpu.h cpu/ctrl_xfer16.cc cpu/ctrl_xfer32.cc
    cpu/ctrl_xfer64.cc cpu/data_xfer16.cc cpu/data_xfer32.cc
    cpu/data_xfer64.cc cpu/debugstuff.cc cpu/exception.cc
    cpu/fetchdecode.cc cpu/flag_ctrl_pro.cc cpu/init.cc
    cpu/io_pro.cc cpu/lazy_flags.cc cpu/lazy_flags.h cpu/mult16.cc
    cpu/mult32.cc cpu/mult64.cc cpu/mult8.cc cpu/paging.cc
    cpu/proc_ctrl.cc cpu/segment_ctrl_pro.cc cpu/stack_pro.cc
    cpu/tasking.cc debug/dbg_main.cc debug/debug.h debug/sim2.cc
    disasm/dis_decode.cc disasm/disasm.h doc/docbook/Makefile
    docs-html/cosimulation.html fpu/wmFPUemu_glue.cc
    gui/amigaos.cc gui/beos.cc gui/carbon.cc gui/gui.cc gui/gui.h
    gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
    gui/rfb.cc gui/sdl.cc gui/siminterface.cc gui/siminterface.h
    gui/term.cc gui/win32.cc gui/wx.cc gui/wxmain.cc gui/wxmain.h
    gui/x.cc instrument/example0/instrument.cc
    instrument/example0/instrument.h
    instrument/example1/instrument.cc
    instrument/example1/instrument.h
    instrument/stubs/instrument.cc instrument/stubs/instrument.h
    iodev/cdrom.cc iodev/cdrom.h iodev/cdrom_osx.cc iodev/cmos.cc
    iodev/devices.cc iodev/dma.cc iodev/dma.h iodev/eth_arpback.cc
    iodev/eth_packetmaker.cc iodev/eth_packetmaker.h
    iodev/floppy.cc iodev/floppy.h iodev/guest2host.h
    iodev/harddrv.cc iodev/harddrv.h iodev/ioapic.cc
    iodev/ioapic.h iodev/iodebug.cc iodev/iodev.h
    iodev/keyboard.cc iodev/keyboard.h iodev/ne2k.h
    iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pic.h
    iodev/pit.cc iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h
    iodev/sb16.cc iodev/sb16.h iodev/serial.cc iodev/serial.h
    iodev/vga.cc iodev/vga.h memory/memory.h memory/misc_mem.cc
2002-10-25 11:44:41 +00:00
Bryce Denney
5e520261db Add plugin support to Bochs by merging all the changes from the
BRANCH_PLUGINS branch!

Authors:
  Bryce Denney
  Christophe Bothamy
  Kevin Lawton (we grabbed a lot of plugin code from plex86)
Testing help from:
  Volker Ruppert
  Don Becker (Psyon)
  Jeremy Parsons (Br'fin)

The change log is too long to paste in here.  To read the change log, do
  cvs log patches/patch.final-from-BRANCH_PLUGINS.gz

All the changes and a detailed description are contained in a patch
called patch.final-from-BRANCH_PLUGINS.gz.  To look at the complete
patch, do
  cvs upd -r1.1 patches/patch.final-from-BRANCH_PLUGINS.gz

Then you will have a local copy of the patch, which you can gunzip and
play with however you want.

Modified Files:
    .bochsrc Makefile.in aclocal.m4 bochs.h config.h.in configure
    configure.in gdbstub.cc logio.cc main.cc pc_system.cc
    pc_system.h state_file.h bios/Makefile.in bios/rombios.c
    cpu/Makefile.in cpu/access.cc cpu/apic.cc cpu/arith16.cc
    cpu/arith32.cc cpu/arith8.cc cpu/cpu.cc cpu/cpu.h
    cpu/ctrl_xfer32.cc cpu/exception.cc cpu/fetchdecode.cc
    cpu/fetchdecode64.cc cpu/flag_ctrl.cc cpu/flag_ctrl_pro.cc
    cpu/init.cc cpu/io.cc cpu/logical16.cc cpu/logical32.cc
    cpu/logical8.cc cpu/paging.cc cpu/proc_ctrl.cc
    cpu/protect_ctrl.cc cpu/segment_ctrl_pro.cc cpu/shift16.cc
    cpu/shift32.cc cpu/stack64.cc cpu/string.cc cpu/tasking.cc
    debug/Makefile.in debug/dbg_main.cc disasm/Makefile.in
    doc/docbook/user/user.dbk dynamic/Makefile.in fpu/Makefile.in
    gui/Makefile.in gui/amigaos.cc gui/beos.cc gui/carbon.cc
    gui/control.cc gui/control.h gui/gui.cc gui/gui.h
    gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
    gui/rfb.cc gui/sdl.cc gui/sdlkeys.h gui/siminterface.cc
    gui/siminterface.h gui/term.cc gui/win32.cc gui/wx.cc
    gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
    gui/x.cc gui/keymaps/sdl-pc-de.map gui/keymaps/sdl-pc-us.map
    gui/keymaps/x11-pc-de.map instrument/example0/instrument.h
    instrument/example1/instrument.h
    instrument/stubs/instrument.cc instrument/stubs/instrument.h
    iodev/Makefile.in iodev/biosdev.cc iodev/biosdev.h
    iodev/cdrom.cc iodev/cmos.cc iodev/cmos.h iodev/devices.cc
    iodev/dma.cc iodev/dma.h iodev/eth_fbsd.cc iodev/eth_linux.cc
    iodev/eth_null.cc iodev/eth_tap.cc iodev/floppy.cc
    iodev/floppy.h iodev/guest2host.cc iodev/guest2host.h
    iodev/harddrv.cc iodev/harddrv.h iodev/iodebug.cc
    iodev/iodebug.h iodev/iodev.h iodev/keyboard.cc
    iodev/keyboard.h iodev/ne2k.cc iodev/ne2k.h iodev/parallel.cc
    iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pci2isa.cc
    iodev/pci2isa.h iodev/pic.cc iodev/pic.h iodev/pit.cc
    iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h iodev/sb16.cc
    iodev/sb16.h iodev/scancodes.cc iodev/scancodes.h
    iodev/serial.cc iodev/serial.h iodev/slowdown_timer.cc
    iodev/slowdown_timer.h iodev/unmapped.cc iodev/unmapped.h
    iodev/vga.cc iodev/vga.h memory/Makefile.in memory/memory.cc
    memory/memory.h memory/misc_mem.cc misc/bximage.c
    misc/niclist.c
Added Files:
    README-plugins extplugin.h ltdl.c ltdl.h ltdlconf.h.in
    ltmain.sh plugin.cc plugin.h
2002-10-24 21:07:56 +00:00
Bryce Denney
bbc43ba25b - avoid segfaults by checking if the term gui has already been initialized
or not, before calling curses functions.
2002-09-26 02:53:58 +00:00
Bryce Denney
d7251f8693 - move comment on bx_gui_c::specific_init down so that it's next to the
method it describes
2002-09-26 02:46:39 +00:00
Bryce Denney
73681b3a53 - for term compile, search for a function called "color_set" and compile it
away if color_set doesn't exist on that platform.  On Solaris this was
  the only thing keeping term from compiling.  See this bug
  [ 613393 ] solaris: term compile missing color_set
  http://sourceforge.net/tracker/index.php?func=detail&aid=613393&group_id=12580&atid=112580
2002-09-26 02:36:04 +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
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
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
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
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
Volker Ruppert
051ef5f1c9 - text mode cursur feature added for X and prepared for other GUIs 2001-12-13 18:36:29 +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
Todd T.Fries
a06b031dcf setprefix -> put 2001-06-27 19:16:01 +00:00
Bryce Denney
fba34be1e7 - added a new method to all GUIs called mouse_enabled_changed_specific,
which notifies them that the mouse_enabled bit has changed.  Now that
  mouse_enabled can be initialized or modified by parameter events in
  addition to GUI events, the guis must be prepared for it.  I have pasted
  empty method definitions into mouse_enabled_changed_specific for all
  guis except for X11, which I did the right way.  The implementation
  of this function must use the argument "val" rather than reading the
  parameter.
2001-06-23 03:18:14 +00:00
Bryce Denney
80a7541fed - used grep to search for more instances of new bx_options problems that
I have introduced, and fixed a lot.
2001-06-21 14:56:43 +00:00
Todd T.Fries
12985edb26 setprefix now uses a variable length name as a string for an argument 2001-06-19 21:36:09 +00:00
Todd T.Fries
2bbb1ef8eb strip '\n' from BX_{INFO,DEBUG,ERROR,PANIC}
don't need it, moved the output of it into the general io functions.
saves space, as well as removes the confusing output if a '\n' is left off
2001-05-30 18:56:02 +00:00
Todd T.Fries
87e75dca26 forgot a LOG_THIS 2001-05-15 16:09:51 +00:00