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
"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
constructors around. The min,max that were being passed to the parent
class constructor had junk in them. In config.h.in, I defined the minimum
and maximum values for each integer datatype so now we pass correct
min and max values to the parent class. These replace the BX_MAX_[U]INT
and BX_MIN_[U]INT values.
- modified: main.cc config.h.in gui/siminterface.cc
value instead of a 32 bit value. Unfortunately there were many uses
of bx_param_num_c::get() which depended on its size, and they were
all broken by this change. So in this rev I am changing get() to
return a 32bit unsigned again. If you really want a 64bit value (which
is quite rare) you should call get64() instead.
- modified: gui/siminterface.h gui/siminterface.cc
Patch name: patch.macosx-ui-polishing
Author: Jeremy Parsons <brefin@mac.com>
Date: Wed Oct 16 2002
Detailed description:
A number of changes to the Carbon Code to improve how well it meshes with the
MacOS X user experience as well as to make sure that all of more recently added
toolbar buttons actually work.
Specific changes include:
Added partial keymap support. (Keymaps don't yet affect what the user types
but an X11 keymap can be used to enable pasting)
Copying of text screens added
Pasting of text as keyboard input added
Copy, Paste, Reset, and Snapshot menu items now work the same as the
corresponding toolbar elements
Revamped icon handling to use Control Manager IconControls,
thus removing icon display code and greatly simplifying icon click handling code
while adding better behaviours (icons that darken when clicked, track mouse movement,
and only do something if the mouse is released atop of them as well as gaining
the ability to be disabled)
Tweaked Paste toolbar and menu items to only be enabled if key mapping is in use AND the
clipboard contains text
Tweaked Copy and Snapshot toolbar and menu elements to only be enabled if
the screen mode is text.
Tweaked User Keys toolbar element to only be enabled if there are user keys
defined to be sent
Tweaked Configure toolbar element to only be enabled if a tty is available
(as in the emulator was started from a terminal)
Respaced toolbar icons to match Aqua Toolbars
Disabled menu items that are not currently handled (undo, clear, cut, disk eject)
Full screen backdrop resettled all across the screen
Fixed the callback interface so that when a Panic needs to ask the user about continuing
it actually works appropriately.
----------------------------------------------------------------------
bx_shadow_num_c able to handle pointers to 64 bit values. This
allows x86-64 and wxWindows to coexist.
- I had a number of duplicate constructors for bx_shadow_num_c,
with an without the description arg. I eliminated the ones
that had no description, and also removed the min/max arg from
all. I still need a bunch of constructors though, for
Bit64u*, Bit64s*, Bit32u*, Bit32s*, Bit16u*, Bit16s*, Bit8u*, Bit8s*.
Having all these constructors allows us to write
new bx_shadow_num (bxid, name, description, &value)
for basically any integer variable. They are all handled by the same class.
- these changes led to minor touchups in cpu/init.cc and iodev/keyboard.cc
- modified:
configure main.cc cpu/init.cc iodev/keyboard.cc
gui/siminterface.cc gui/siminterface.h
X11 keymap files. This okay since the keysym values are identical. The "AltGr"
key on European keyboards doesn't work with wxGTK 2.3.3 because the keysym
GDK_Mode_switch is not handled in wxGTK.
- German keymap table for wx and wxgtkkeys.h are no longer needed
different versions of the code for wxWindows and non-wxWindows and the GDB
stub did not accept any command line options at all.
- IMPORTANT CHANGE: the quick start option used to cause two things:
1) read the bochsrc immediately, 2) start simulation immediately without
going into the config interface. This has changed in a subtle way.
Now, we always try to read the bochsrc immediately. Then if the quick
start option is on, we start the simulation immediately.
- add "Restore Factory Default Configuration" in text config menu. It was
already there in wx. Now the default choice is always "5. Begin simulation"
and because the bochsrc is always read now, this works.
- When the user chooses "Read configuration file" from either text mode
or wx interfaces, reset all bochs parameters first, then read in the
new file. This means that every time you read a configuration file
you are starting from a consistent "blank slate".
- move much of the code from bx_do_text_config_interface into bx_init_main
so that wxWindows and non-wxWindows code uses the same logic. There was
only a tiny bit left in bx_do_text_config_interface so I eliminated it.
- move the "help" message into a separate function print_usage()
- detect all flags (cmdline args that start with -) in a loop, instead of
a big if/else. This makes it easy to add others.
- fix problem with Carbon gui, so that -psn arg gets ignored
- print usage if you type -h, --help, or if flags are not recognized
- code that called io->set_log_action (that sets the log action for all
devices) was only called if the configuration interface was on; I'm not
sure why. Now it is called all the time.
- the wxWindows equivalent of main() is called MyApp::OnInit. Now OnInit
and main() are very similar. They both call bx_init_siminterface, then
bx_init_main (and quit if it fails), then show the config interface if
quickstart is off, and then simulate.
- modified: main.cc gui/control.cc gui/wxmain.cc
specific to X windows. I changed a few names of variables and methods to
sound less X windows specific, for example in the BXKeyEntry struct
the "xwinKey" field is now called "hostKey".
- remove the hacks in bx_keymap_c::loadKeymap that checked that every
keysym started with "XK_". Now I can still make that check, but it
is done in x.cc's convertStringToXKeysym() instead.
- in sdl.cc, load the keymap in specific_init function. I had to
create a conversion function from SDL key names to SDLkey values.
I created a table of key names and associated values, and I just
do a strcmp on each name. It's not a fast algorithm obviously but this
conversion only has to be done for maybe 200 keys at startup time.
- added a key map file for SDL called sdl-pc-us.map. Since this has
basically all the SDLK_* symbols defined, it is a good starting point
if you need to make any other keymaps.
- modified: gui/keymap.cc gui/keymap.h gui/sdl.cc gui/x.cc iodev/keyboard.cc
- added: gui/sdlkeys.h gui/keymaps/sdl-pc-us.map
wxLog::SetActiveTarget (new wxLogStderr ());
which used to be inside #ifdef __WXDEBUG__ ... #endif. This fixes the
problem of tons of little debug message dialogs appearing in wxwindows
libraries built without debug support.
- This reverts revision 1.61. I cannot figure out why I had trouble back on
Sept 27, because now both my debug and release libraries work ok with the
SetActiveTarget line.
the toolbar button and the mouse capture shortcuts (F12 and middle button)
call ToggleMouse(). The only difference is that the first time you
press the toolbar button it gives a little message about mouse capture
and how to turn it off.
- modified: gui/wx.cc gui/wxmain.cc gui/wxmain.h
Quit while the simulation was running. I used to just do
wxFrame::Close(TRUE) in the wxwindows thread, but the simulation
thread would keep on running even after the window had disappeared.
If the simulation thread sent any messages to the gui, it could
segfault. Now, when you click on Quit it asks the simulator to
quit, but does not close the gui. When the simulator thread finally
quits, THEN it calls wxFrame::Close(TRUE) from the sim_thread (with
appropriate gui mutex). Such tricks are only needed when the
simulation is running. I hope this will fix bug #616142: "wx: crash
from events after gui shutdown".
- move MyFrame::closing flag out into a global variable wxBochsClosing
so that it will be valid even when the MyFrame is deleted. See
comments on in wxmain.h.
- when wxBochsClosing is set, don't create any new windows. If any
errors appear, just print them to stderr because the gui is just
about to be closed.
- fix comment in SimThread::Entry to talk about longjmp instead of
kill_bochs_request
- (minor) move contents of DefaultCallback2 into DefaultCallback. It
doesn't refer to the wxApp at all. This is a bit safer in case it
gets called when the wxApp is in the process of being deleted.
- modified: gui/wxmain.cc gui/wxmain.h
This must be done carefully though, because the call to SDL_WarpPointer
generates a mouse motion event of its own. To work around this, I have
added code that should ignore motion events generated by SDL_WarpPointer.
This should fix bug [ 619283 ] SDL: os mouse pointer leaves the window.
On Linux, SDL 1.2.3 it works fine.
bx_list_c can now be displayed as either a wxStaticBox with the
child parameters inside, or as a wxNotebook with each child
parameter in a separate tab. (The children can also be lists of
course.) The default display is the wxStaticBox type, but if you
set the option bit bx_list_c::USE_TAB_WINDOW in the list,
ParamDialog will use the wxNotebook display instead.
- to get the param trees working, I created a new struct
AddParamContext, which is passed to AddParam(). This struct is
critical when AddParam calls itself recursively to display lists
within lists.
- use the wxNotebook display feature for the ATA0,1,2,3 controller
dialog box. Now instead of being hundreds of pixels tall, it is
reasonable height with three different tabs. This fixed bug
#619074: "wx: ATA interface editor too tall" and was the whole
reason I started messing with this at all.
plus some minor cleanups
- when I added the enum constant bx_list_c::USE_TAB_WINDOW, I also
removed the BX_ prefix from all the other enum constants that are
used in parameter options in siminterface.cc. Since these constants
are enums within a class, there is no possibility of namespace
conflicts so the prefix is not needed.
- added wxADJUST_MINSIZE to all wxChoice controls, since that tells
wxWindows to adjust its size to the length of the longest string.
- instead of calling SetSize or SetSizeHints on every textcontrol with
a hardcoded width, I am using just two wxSize specifications for
everything: either normalTextSize or longTextSize.
- edit names of a few menus and params. For example now instead of
the tab saying "Master ATA device on channel 0" it will say
"First HD/CD on channel 0".
Modified Files:
main.cc gui/control.cc gui/gui.cc gui/siminterface.cc gui/siminterface.h
gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc
to be signed instead of unsigned, it was looking up color values
like wxBochsPalette[-126] instead of wxBochsPalette[130]. This affected
any colors in the palette between 128 and 255. I simply hanged newBits
to signed, and it fixed bug #618462: wx: 256 color modes not working properly
- I am still not satisfied with the way that wxWindows maps colors on an
8-bit display, but that is a different issue.
after the palette changes. This makes the iodev/vga.cc code do the
right thing. This also fixes the toolstar splash screen, but at a
fraction of the cost of the solution in rev 1.37.
need to be updated. This was impossible before, because we only stored the
RGB values in wxScreen. I added a new array called wxPixel that stores the
8-bit color index that should be displayed. Now if the VGA palette changes,
I use wxPixel data to reconstruct wxScreen using the new palette.
- this fixes the display of the splash screen of the Toolstar disk, since
it relied on drawing the picture and then fading the colormap from back
up to the normal values. I was hoping it would fix the splash screen of
win95 too, but it does not.
so that windows types can be used in fields, for example in cdrom.h:
#ifdef WIN32
HANDLE cdrom_interface::hFile;
#endif
- since every file includes bochs.h, I removed includes of <windows.h>
everywhere else
- modified: bochs.h cpu/extdb.cc gui/win32.cc gui/wx.cc iodev/cdrom.cc
iodev/eth_win32.cc iodev/floppy.cc
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
conditionally include <windows.h>. This may seem like a drastic step
for just one little type, but I expect before long we may want to use
other symbols like VK_F12 which are also in windows.h. In a cygwin
compile this is required.
on the wxWindows interface. There are many more changes here than
absolutely required to fix the memory leaks. Instead, I've tried to
clean things up so that it does the right thing, and is easier to
read and maintain.
- For events that the text mode interface is going to ignore anyway, I #ifdefed
the event creation code instead of calling new and then delete.
- now all synchronous events in siminterface.cc are created as local variables
on the stack. Some of them were allocated with new before, and yes some of
them leaked.
- now I ignore the result of sim_to_ci_event (&event). It was always
returning a pointer to the input event anyway. This makes the event
sending code simpler.
- wxmain.cc:
- in the BxEvent handling functions, now all cases "break" down to common
code at the end which deletes async events. This is easier to read than
having each case handle the delete individually.
- in OnLogMsg, do not delete the event here because it is now handled
in the common code of OnSim2CIEvent instead.
- thanks to Christophe for pointing out the location of the worst
memory leak.
- make bx_init_main return -1 if any parse errors occur.
- wxWindows: if bx_init_main returns -1, don't even show the application
window. You'll get an error dialog and then it exits. So far this
only happens if you run with -q and the parse fails.
- non-wxWindows: if bx_init_main returns -1, just exit. So far this
only happens if you run with -q and the parse fails.
- with these changes, handling of bochsrc parse errors seems to work
as you would expect. And it certainly doesn't go into an infinite
recursive loop, as it used to!
- a little more testing and I can close
bug 614175: infinite panic loop if bochsrc buggy
- modified: main.cc gui/siminterface.h gui/wxmain.cc
and into wxmain.cc, like other actions.
- set a default siminterface callback for the whole application, which is used
whenever the simulator is not running. This is important when the wx code
calls simulator or param code and triggers a BX_PANIC or something.
The default callback is responsible for displaying error messages which
appear while reading the bochsrc, for example.
- move the implementation of BX_SYNC_EVT_LOG_ASK and BX_ASYNC_EVT_LOG_MSG
into a separate function OnLogMsg(). In the future, OnLogMsg() may be called
from the application default callback on errors.
- modified: gui/wx.cc gui/wxmain.cc gui/wxmain.h
- Features :
. number of active channels defined at boot-time config
. new options in bochsrc
. up to 8 devices support (disks or cdroms)
. up to 4 cdrom devices can be changed at runtime config
. wxwindows config interface
parameter values associated with the dialog and updated the wxWindows
controls. At the time I didn't realize that I was overriding
wxWindow::Refresh() which repaints the window. Later, I renamed the method
to CopyParamToGui() to make it more clear, but many of the callers in
wxmain.cc continued to call Refresh(), which now reverted to the parent class
wxWindow::Refresh(). Since there was no compile error I didn't notice for a
while, but it caused the ParamDialogs to repaint themselves constantly but
never actually change their values. This is now fixed by changing those
method calls to CopyParamToGui().
started using a wxTimer to trigger the redraws. Now instead of calling
MyPanel::OnPaint directly, I call Refresh() instead. This makes the Windows
display work correctly.
I'm not sure why this wasn't needed before, but after switching to
wxWindows 2.3.3 it seems to be important.
- in a wxLogDebug() call I was trying to pass a struct instead of a string.
Fixed that.
'char_changed'. These variables are currently only used by the win32 gui for
the update of the font bitmaps. SDL and wxWindows do not use the variables
since they are using the charmap data directly
- free text snapshot memory when the user has cancelled the dialog
- write text snapshot file in binary mode (disables the LF -> CRLF conversion
in cygwin)
- MyPanel::blankCursor
- MyFrame::panel
- AdvancedLogOptions::action (2d array of wxChoice *'s)
- ParamDialog::idHash, ParamDialog::paramHash, and ParamStructs
- file dialog in BrowseTextCtrl
- fix illegal use of a wxObject. I had been clearing the ParamStruct
with memset(), but I forgot that ParamStruct was a subclass of wxObject
so I was trashing the wxObject fields too! Instead I created a
ParamStruct constructor that clears the pointers to NULL.
- comment out debug output from AdvancedLogOptionsDialog::SetAction
- modified files: gui/wx.cc gui/wxdialog.cc gui/wxdialog.h
gui/wxmain.cc gui/wxmain.h
interface) by using get/set_default_log_action. This has very minimal effect
on the behavior of the text config interface.
- modified: main.cc gui/control.cc
time, so I've tried to improve it. Now the logfunctions class has a
static field default_onoff[] which represents the default actions for
each kind of log message. Default_onoff[] is initialized with static
data so it should be valid by the time it's used. This can be reached by
static accesors logfunctions::set_default_action and
logfunctions::get_default_action. It seemed appropriate to put the defaults
inside the logfunctions class, rather than in bx_options or siminterface.
However, to make them accessible to the config interface, I added similar
methods in siminterface that map to the accessors in logfunctions.
- logio.cc had two different definitions of LOG_THIS for different halves
of the file, which was ugly and confusing. (LOG_THIS is needed for BX_INFO,
BX_DEBUG, etc.) I removed the first definition and fixed the minor compile
problems that ensued. In the initializers for iofunctions, everything
is complicated because of the unpredictable order that constructors get
called. They must use this->log to print things, because genlog hasn't
been initialized yet.
- now if SIM->set_log_action(int mod, int level, int action) is called
with mod<0, it sets the action for all modules/devices instead of just one.
- modified: bochs.h logio.cc main.cc gui/siminterface.cc gui/siminterface.h
- LogOptionsDialog: show the "no change" option. When options other than
"no change" are selected, set both the default log action and the
specific log action for all devices.
- AdvancedLogOptionsDialog: store the wxChoice*'s in a 2d array since I
have to refer to them later.
- since both the log options and advanced log options dialogs needed to
create many wxChoices using similar rules, I moved the creation code
into a utility function makeLogOptionChoiceBox.
- I finally discovered the wxADJUST_MINSIZE option to wxSizer::Add(),
which solves some layout problems that I was having with wxChoices.
With this setting, the wxChoice will automatically grow to the size of
the largest string that can be selected.
- improve sizing of the scrollWin according to the desired size of the panel
that contains all the wxChoices.
- add sketches for proposed dialog that combines both LogOptionsDialog and
AdvancedLogOptionsDialog using tabs
set_text_charbyte()
- vga: store the address of the active charmap in the new variable
charmap_address
- vga: text mode hack removed. The write modes, operations and masks must be
used in text mode too.
- sdl: clear_screen() is not necessary when the charmap has changed
- win32: update only the changed font bitmaps before drawing the text
- All mouse events in the VGA window go to MyPanel::OnMouse. Middle mouse
button and F12 both toggle mouse capture. OnMouse queues an event
for the simulation thread to process. The simulation thread calls
bx_devices.keyboard->mouse_motion() when it sees the event on the queue.
- add IFDBG_VGA around some display debug code. All wx mouse debug code
is controlled by IFDBG_MOUSE.
- modified: gui/wx.cc gui/wxmain.cc gui/wxmain.h
the wxwindows thread, it just sets a boolean flag needRefresh. Meanwhile, a
wxTimer running in wall clock time (as opposed to sim time) triggers a
repaint only if the the boolean is true.
- now MyRefresh is implemented by just setting needRefresh=true.
- make graphics_tile_update call MyRefresh.
- make dimension_update call MyRefresh.