- moved ne2k presence check to devices.cc
- added special make rules for the ne2k and the lowlevel network support
- added macro for the debug feature of the ne2k
- leave just the two configurations that I plan to build binary RPMs with:
one is conservative with just X11 and the options we used before,
and the other includes plugins, lots of display libraries, etc.
- My previous rev to dbg_main.cc caused the debugger to fail when readline
was disabled. With these changes I have tested more thoroughly and it works
with readline enabled or disabled, and with wxWindows enabled and disabled.
- The Bochs debugger uses BX_WITH_WX to decide to change to wxWindows debugger
behavior: sending a synchronous message to the config interface to get a new
command, sending all dbg_printf output to the config interface, deciding
whether to trap control-C, etc. But now that it's possible to compile with
BX_WITH_WX and BX_WITH_other_things, this isn't quite right anymore. With
this change, we now use calls to a new method SIM->is_wx_selected() to decide
which behavior to use. This method is equivalent to checking if the display
library variable is set to "wx", but it's implemented in such a way that it
only has to check a boolean for each call to SIM->is_wx_selected().
- in siminterface.cc, init some local variables to 0 to avoid compile
warnings.
Modified Files:
debug/dbg_main.cc gui/siminterface.cc gui/siminterface.h
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
reports that on some Linux systems, once you restart the font server
you have to restart X as well. At least with this change it only happens
once, not every time you install.
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 them alone.
More details inside the file itself.
- configure script adds -DBX_PLUGIN_PATH="${plugdir}" to CFLAGS/CXXFLAGS
in the Makefile.
- in main.cc, if plugins enabled and the environment variable LTDL_LIBRARY_PATH
is not set, then it gets set to the value supplied by BX_PLUGIN_PATH.
Modified Files:
main.cc Makefile.in configure.in config.h.in configure
- argc was returning the wrong number of args. Now I treat null and space
the same way, except that null causes the loop to exit.
- change "extern "C" int WinMain" to "int WINAPI WinMain".
- in WinMain pause for the user to read the screen before making it disappear.
This is very useful when there was an error during startup because otherwise
you can't read it. However we'll probably want to disable it when the
user actually asked for Bochs to quit.
> Dlltool creates a useless file called 'mingwex'.
> I think the first dlltool call should only contain bochs object files and
> no link options or external libraries.
For years we have been writing beyond the end of this array in the VGA code:
bx_bool vga_tile_updated[BX_NUM_X_TILES][BX_NUM_Y_TILES];
and doing who-know-how-much damage to other memory structures in the process.
I changed every reference to vga_tile_updated[][] into calls to two macros
GET_TILE_UPDATED and SET_TILE_UPDATED, and defined the macros to check
the bounds of the array before referencing it. At first I used an
assert, then a panic, then an error, and now I'm not printing any message
at all because there were thousands and thousands of messages during
a boot of win95 when it's updating the win95 logo screen.
- I couldn't resist cleaning up a few confusing-looking things like
"if (condition) { // }". There are no functional changes except for
bounds checking on the vga_tile_updated array.
needs to include the .o's and .a's that are part of the Bochs source code
so that it can create a list of Bochs symbols that need to be exported.
I started out using the same list as the link line, but dlltool
doesn't accept all the same options as the link such as -I and -L.
it's easier to find. The other one is for wxWindows on win32 only.
- for wxWindows on win32, I added a function called RedirectIOToConsole() from
an article in the Windows Developers Journal that creates a console window
and sets up stdin,stdout,stderr to operate on the console. This works,
except for a console freezing problem that I described on the mailing list
earlier today.
- Once it is working better, we may want to use the WinMain definition for
other types of compiles on win32, and maybe even for all win32 compiles. In
particular when we compile with SDL we should create a console window too.
- comment out some debug output from the command line parser, add \n's in
a few places. (I'm using stderr instead of BX_PANIC because I don't think
the logging system is ready to be used at this early stage.)
textconfig.cc. I can't quite explain why it wasn't a problem before,
but it's certainly a problem now. In fact VC++ does define off_t, so
I removed the #define entirely.
the bochsrc is loaded by default.
- if you asked for quick start, but the config file could not be loaded,
print a warning "Switching off quick start, because no configuration file
was found".
- now the behavior looks like this:
. no command line arg (most common)
-> .bochsrc is loaded
-> if found defaults to "5. Begin simulation"
-> if not found defaults to "2. Read options from..."
. command line arg -q (user want to quick start from .bochsrc)
-> .bochsrc is loaded
-> if found, run the simulation
-> if not found defaults to "2. Read options from..."
. command line arg -f (user specifies which conf file to load)
-> conf file is loaded
-> if found defaults to "5. Begin simulation"
-> if not found, print error message on console:
>>PANIC<< reading from bochsrc2.txt failed
. command line arg -qf (user want to quick start from a conf file)
-> conf file is loaded
-> if found, run the simulation
-> if not found, print error message on console:
>>PANIC<< reading from other failed
. after selection of "2. Read options from..."
-> defaults to "5. Begin simulation"
. if user wants to create a new conf file:
-> run bochs with no args
-> .bochsrc is loaded by default
-> choose 1. Restore factory default configuration
-> default is changed to "3. Edit options"
- See bug #625696 "text config menu: default can be wrong" for
more discussion of this issue.
- since rombios.c also supports 8 processors, go ahead and build an 8 cpu
bios as well.
Modified Files:
BIOS-bochs-2-processors BIOS-bochs-4-processors
BIOS-bochs-latest
Added Files:
BIOS-bochs-8-processors
Instead, just build all 4 bioses for 1,2,4,8 processors all the time.
Now they should all stay in sync without any special effort.
Modified Files:
rombios.c Makefile.in
- plugins are installed into ${plugdir} which is defined to be
${libdir}/bochs-${VERSION}/plugins.
Modified Files:
Makefile.in plugin.cc configure.in configure gui/Makefile.in
iodev/Makefile.in
The cmos function get_timeval is only used by the pc_system
to print the last system time on exit. We should remove the
STUBFUNC() macro and simply return 0.
. if BX_GUI_SIGHANDLER is true and the term gui is selected at run time,
a new global boolean (bx_gui_sighandler) variable is set to true.
Special signal handling is done if bx_gui_sighandler is true.
. if BX_GUI_SIGHANDLER is not true, bx_gui_sighandler is not compiled in.
New behaviour is:
. No command line arg (user want to load or create a new conf file)
-> no .bochsrc is loaded
-> defaults to "2. Read options from..."
. command line arg -q (user want to quick start from .bochsrc)
-> .bochsrc is loaded
-> if found Run the simulation
-> if not found defaults to "2. Read options from..."
. command line arg -f (user want to edit a conf file)
-> conf file is loaded
-> if found defaults to "3. Edit options"
-> if not found defaults to "2. Read options from..."
. command line arg -qf (user want to quick start from a conf file)
-> conf file is loaded
-> if found Run the simulation
-> if not found defaults to "2. Read options from..."
. After selection of "2. Read options from..."
-> defaults to "5. Begin simulation"
- fix "enable-control-panel" behaviour in configure.in.
- check if a romimage was supplied in the conf file.
If not, print a hint about a missing/corrupt conf file.
I hope I did not break anything, notably the Carbon gui
interface at runtime. The behaviour of the button handlers was wrong if bochs
is configured with plugins and all display libs enabled, wxWindows is present
and a gui using textconfig is selected.
The wx cdrom button still doesn't work since get_first_cdrom() always returns
NULL.
I am somewhat unhappy about the fact that this patch relies (at the
top) on finding rpmbuild in /usr/bin/. A better patch would search the
user's path properly, or perhaps be generated via configure to know
the correct rpmbuild path.
by default.
Rearranged the output to make the output instructions always appear in
the same column, which makes them considerably easier to read.
I have *not* done the physical address display changes -- plan to do
that separately.
stack limits. This is needed for EROS, and probably for L4, as both
rely on this SS fault (and the corresponding GP fault) to trigger the
switch from small address spaces to large address spaces. The
push_16() code was already correct, and I find the inconsistency a bit
odd.
I'm not 100% sure about the push_64() change, so I made the change
with a comment but left it a BX_PANIC() rather than switching it to
BX_INFO. I'll ask Peter momentarily to have a look and let me know.
While I was added, changed the push_16() BX_INFO message to be
consistent with the others -- all now say 'push outside stack limits'.
- add new keyboard init code from Adam Sulmicki
- changed last cli() to #asm cli #endasm
- remove unused cli() function
- don't panic on shutdown status 0x09. just do the normal post
- Now compiles for plain ia-32
- Fixed some printf formatting for ia32 only.
- Update to latest Win32 DLL
- Added an ICEBP (Undoc 0xF8, INT 01) facility.
- updated to use latest VGA refresh routine
Changed "License" to "Bochs License"
Added "Third Party License" section, taken from old docs.
Authored "Will it Work for Me?" section according to instructions in user.dbk comments.
- add a new global struct bx_startup_flags which stores argc,argv and
when necessary, the WinMain arguments hInstance, hPrevInstance, etc.
The new struct is defined in gui/siminterface.h because it is needed in
both the main.cc code and in wxmain.cc and textconfig.cc (which don't
include bochs.h).
- rename main() to bxmain() and create new main() and WinMain().
main() and WinMain() just fill in the bx_startup_flags and then
call bxmain(). Only one is defined at a time, of course.
- so far, WinMain is ONLY used when compiling with wxWindows on win32.
It may be useful in other contexts as well, but I don't want to enable
it in any other situation without some serious testing of different
configurations.
- modified:
main.cc gui/siminterface.cc gui/siminterface.h
gui/textconfig.cc gui/wxmain.cc
I believe that if we had correct BOCHSAPI macros on everything then it
would not be necessary, and on my cygwin box it isn't necessary. However
it seems that on other versions of cygwin it is necessary. The trouble with
--export-all-symbols is that it's making bochs.exp much bigger so the binary
grows by 900k, compared to exporting only the symbols that are marked. If
someone with that "other" version of cygwin can figure out where BOCHSAPI is
needed, this can be removed.
a control panel, but now we're calling it a text configuration interface.
Modified:
.bochsrc Makefile.in bochs.h main.cc cpu/Makefile.in
debug/Makefile.in disasm/Makefile.in fpu/Makefile.in
gui/Makefile.in iodev/Makefile.in memory/Makefile.in
Update Makefile.in to compile it that way.
This fixes a VisualAge problem which prevented bximage from compiling.
I still use the C++ linker for bximage since I don't think it
makes any difference. If it does, that should be changed also.
These files are part of the wx plugin, and they should not be linked
into a separate plugin. I have changed gui/Makefile.in and configure.in
to correct this.
- This fixes bug [ 628667 ] don't build plugin for wxdialog, wxmain
- modified: gui/Makefile.in configure.in configure
- if translation=auto :
. translation=none if cylinders <=1024 and heads <=16
. translation=large if cylinders * heads <= 131072
. transaltion=lba otherwise
- changes default translation value to "auto"
- add example in .bochsrc
- implement "large" "r-echs" "lba" disk translations
- fix if ( (sc==0x01) && (sn=0x01) ) bug
- fix option field in int13 function 0x48 for harddisks
- fix option field in int13 function 0x48 for cdrom
- add "%u" in printf to handle unsigned values
- remove UDIV
- asm helper asm function ldivul idiv_ and idiv_u
one for --disable-cdrom, and one for the defalt if it's not specified. The
enabled action and default are supposed to be the same, but they were
slightly different, and Bochs on BeOS was able to compile with --enable-cdrom
but not with the default action. Solution: now the autoconf actions only
sets bx_cdrom=0 or bx_cdrom=1. Then afterward, it tests $bx_cdrom and does
the enable or disable action. This will be easier to maintain because there
is just one copy of each action, instead of two copies that are supposed to
be kept identical to each other.