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
- 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
- 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")
(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
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
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
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
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
"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
(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()
- 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
- 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.
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)
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
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.