Commit Graph

310 Commits

Author SHA1 Message Date
Stanislav Shwartsman
5fd21257de Remove qick TLBN invalidation code - it actually only could slow down emulation 2007-11-09 21:14:56 +00:00
Stanislav Shwartsman
e137560b14 Complete MONITOR/MWAIT implemntation (including monitoring of memory range)
Fixed PANIC in read/write Cr/Dr - should #UD with unkown register used
2007-11-01 18:03:48 +00:00
Stanislav Shwartsman
afdcadad73 Added ability to switch off bochs loging (BX_DEBUG/INFO/ERROR) 2007-10-30 18:57:46 +00:00
Stanislav Shwartsman
42fdd8a3a1 During Bochs benchmarking I figured out that hostasm actually slow down the emulation ... so remove this ugly code which also doesn't help :)
speedup flags update for some instructions - idea was taken from DT patch by h.johansson
2007-10-21 22:07:33 +00:00
Stanislav Shwartsman
ac272e9383 Changes breakpoints configure time enable macroses - reduce amount of compile-time parameters 2007-10-12 22:11:25 +00:00
Stanislav Shwartsman
8adbbcf17c Started first implementation of MONITOR/MWAIT 2007-10-11 21:29:01 +00:00
Stanislav Shwartsman
071c5c1a26 A lot of changes but everything is really trivial.
Make save/restore default feature, the configure option for save/restore removed from configure script and save/restore made available forever. All code now assume it is exists. Bochs save/restore tree previosly called "save_restore" renamed to "bochs" tree and it will be havily used everywhere, starting from save/restore and ending by various bochs debugger functions. I am going to rework debugger code to get rid of debug CPU access functions and use this "bochs" param tree instead
2007-09-28 19:52:08 +00:00
Volker Ruppert
cd3f204da9 - removed old BX_SCHEDULED_DIE_TIME code after added new benchmark option 2007-09-23 08:44:30 +00:00
Stanislav Shwartsman
91e6ca8d5c Implemented MTRR support
Fixes in #PF exception priority
2007-09-20 17:33:35 +00:00
Stanislav Shwartsman
0dc4badfbb Added SSE4A and SSE4_2 to disassembler
Implemented POPCNT instruction
2007-09-19 19:38:10 +00:00
Stanislav Shwartsman
895891b673 Implemented #AC check under configure option
Fixes in misaligned SSE support
2007-07-31 20:25:52 +00:00
Stanislav Shwartsman
58a2595bca Misaligned SSE support 2007-07-15 19:03:39 +00:00
Stanislav Shwartsman
5189cfbf10 SSE4 support 2007-04-19 16:12:21 +00:00
Stanislav Shwartsman
f6af99dead Some variables renaming + CPU vendor variable defition 2007-04-17 21:38:51 +00:00
Stanislav Shwartsman
6c139a9c8c Define LIN and PHY address size in config.h 2007-04-14 10:05:30 +00:00
Stanislav Shwartsman
b6c8275cfd remove old PIT model and always use Greg Alexander's new one 2007-04-08 21:57:06 +00:00
Stanislav Shwartsman
c24627c00f Implemented CLFLUSH instruction
Set of minor fixes for correctness
2007-01-28 21:27:31 +00:00
Stanislav Shwartsman
f8003098b1 Rename SSE4 to SSE3E to match intel docs. SSE4 coming later ;)
Fixed "last prefix" for REX in 64-bit mode
2007-01-25 19:09:41 +00:00
Stanislav Shwartsman
3fb402ee15 Forgot to checkin this file 2007-01-16 17:46:30 +00:00
Volker Ruppert
2cdd6596f1 - implementation of the PIIX4 ACPI controller started. The code is not yet
enabled and the i/o handler only generate info messages.
2006-09-24 16:58:13 +00:00
Stanislav Shwartsman
3ab94305a0 1. Fixed bug report
[ bochs-Bugs-1562172 ] TLB_init() fails to initialize priv_check array if USE_TLB 0
2. Paging is always exists for i386+
   To disable paging it is better to use normal model without special code, only by setting cr0.pg=0
2006-09-20 17:02:20 +00:00
Volker Ruppert
a3908d6e86 - moved BX_USE_MEM_SMF to all the other SMF definitions in config.h.in (should
be set to 1, since there is only one address space present)
- fixed memory object member to support the static case (SMF)
2006-09-02 12:08:28 +00:00
Stanislav Shwartsman
275ea4f7c9 - Allow to control SMP quantum value through .bochsrc CPU
option parameter. Previous Bochs version used hardcoded quantum=5
    value.
2006-06-21 20:42:26 +00:00
Stanislav Shwartsman
594b8cce47 Fixed segfault with bochs debugger but reported today 2006-05-31 17:20:52 +00:00
Stanislav Shwartsman
8b0df8e99b Merge SAVE_RESTORE branch to CVS 2006-05-27 15:54:49 +00:00
Stanislav Shwartsman
2889ed190c Removed icount guard for debugger. Implement STEPN debugger command using CPU_LOOP method capabilities 2006-04-29 09:27:49 +00:00
Volker Ruppert
52c4666465 - partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
* fixed minimum limit of signed variable types
  * don't set the initial value of shadow parameters
  * fixed range check for shadow parameters
  * added support for setting the value base (decimal/hex) of numeric shadow parameters.
    The text format hex number is now initialized in the constructor
  * added missing newline after filename for binary data
  * fixed data size of 64-bit shadow parameters
  * fixed save/restore output format of numeric parameters (signed/unsigned/64-bit)
  * cpu/init.cc: fixed macro name and added missing #undef line
2006-04-22 18:14:55 +00:00
Volker Ruppert
0396a9d86f - save state function now supported on win32 in the runtime dialog
- for the BrowseDir() function Bochs for win32 needs to be linked with SHELL32.DLL
  (currently used for the save/restore support only)
- save/restore support symbol name changed
2006-04-09 13:55:55 +00:00
Volker Ruppert
74c8c05d22 - prepared save/restore feature
- some siminterface types changed
2006-04-06 20:42:51 +00:00
Stanislav Shwartsman
7cc921d1df Prepare configure support for SSE4 implemntation (coming soon)
Rename _GAME configure macro to _GAMEPORT
2006-04-05 18:49:35 +00:00
Stanislav Shwartsman
3dd38bcd8e Declare bx_phy_address and bx_lin_address data types - should be used ALWAYS instead of blind Bit32u 2006-02-23 18:24:56 +00:00
Stanislav Shwartsman
7cfa31492c Removed --enable-pni configure option, to compile with PNI use
--enable-sse=3 instead (Stanislav Shwartsman)
2006-02-20 19:28:57 +00:00
Stanislav Shwartsman
0bf03f370d Support for DC and HT in SMP configurations
Extended format of CPU::COUNT .bochsrc option to define number of core/threads
2006-02-11 15:28:43 +00:00
Stanislav Shwartsman
6ca296de8b Move --enable-reset-on-triple-fault option to runtime CPU::reste_on_triple-fault option in .bocshrc
Cleanup and optimize parser for debugger
2006-02-01 18:12:08 +00:00
Stanislav Shwartsman
37eb82c69c Totally remove the cosimulation code from Bochs.
The Bochs anyway even doesn't compile if cosimulation configured enabled.
But in the same time the cosimulation code only disturbs to the future development of Bochs debugger, for example adding x86-64 functionality ...
For those of you who still may want to see the cosimulation code inside I put it in patch and upload it Bochs CVS patches folder. Read comments for the patch ! ----------------------------------------------------------------------
2006-01-25 22:20:00 +00:00
Volker Ruppert
a0f880b06d - show IPS value in the status bar of the Bochs window (win32 and x11)
- Bochs now compiles with BX_SHOW_IPS enabled on MSVC
2006-01-22 12:31:16 +00:00
Volker Ruppert
c56b918a8e - code cleanup: removed unused defines and structure members
- removed plugin flag 'use_devmodel_interface' (all plugins are using it)
2006-01-20 19:12:03 +00:00
Stanislav Shwartsman
2c8f6f7720 Merged patch: determine number of processors to emulate through .bochsrc 2006-01-18 18:35:38 +00:00
Stanislav Shwartsman
3dbf0f3b97 Bochs supports only ONE memory address space anyway so the code sould be optimized for this case a little (mainly in SMP configuration) 2006-01-15 19:35:39 +00:00
Stanislav Shwartsman
0211f2260c Fix configure checks 2006-01-13 11:10:29 +00:00
Stanislav Shwartsman
149a830934 Remove error for SMP config, just silently disable FAST_CALL optimization for SMF disabled 2006-01-11 19:08:10 +00:00
Volker Ruppert
e753570e1f - enable VDE networking module on Linux (same conditions as ethertap)
- eth_vde.cc compilation fix and TUN/TAP hack removed
- mentioned VDE and added example in documentation
2005-11-29 19:28:43 +00:00
Stanislav Shwartsman
631f2c6188 Backup cpu-level check for paging features at compile time (already checked in configure) 2005-11-26 21:42:28 +00:00
Stanislav Shwartsman
8c91790680 Redefine registers accessors in cpu.h
Change BxSupportPAE and BxSupportGlobalPages macros to Bochs style names
Set bx_cpu_id in BX_CPU_C constructor (safe way)
Backup cpu-level check for paging features at compile time (already checked in configure)
Some warnings and indent fixes
speed up get_segment_base method for x86-64 case
2005-11-26 21:36:51 +00:00
Stanislav Shwartsman
f1f2647819 Print VME together with other features list 2005-10-17 14:48:43 +00:00
Stanislav Shwartsman
e83c77db49 Preparing to VME implementation
DO NOT ENABLE VME option until the implementation will be completed !
2005-10-16 23:13:19 +00:00
Volker Ruppert
3edd8c0c06 - removed unused symbol BX_OVERRIDE_ASK 2005-10-13 18:40:26 +00:00
Volker Ruppert
cc59e24639 - removed BX_USE_CONFIG_INTERFACE stuff. A configuration interface is always
present and a quickstart option exists, too
- improved check for GTK 2.x (only needed if basename of wx is 'wx_gtk2')
- moved/added some deprecated configure options to the end of the script. These
  checks should force users and distrubutors to update their config options.
2005-10-03 10:28:56 +00:00
Volker Ruppert
e450b1af53 - removed obsolete configure option --enable-time0. The 'clock' runtime option
is already doing the same.
- DCC oscillator disable support added
- fixed indent mode in modified sections
2005-09-10 16:40:59 +00:00
Volker Ruppert
fd427df0d7 - RTC 12-hour mode implemented
- unsupported shutdown status values no longer cause a panic
- definition of BX_NUM_CMOS_REGS moved from config.h to cmos.h (TODO: get rid
  of this and implement 128 registers)
- indent mode fixed in modified section
2005-09-10 13:22:51 +00:00
Stanislav Shwartsman
734cc8496f Update changes and cpu/todo 2005-09-05 17:50:37 +00:00
Volker Ruppert
d4871e66a9 - fixes for Solaris 2.9 (tested with the compile farm)
* .conf.sparc fixed / cleaned up / new features added
  * flag _XOPEN_SOURCE is already defined
  * define BX_HAVE_NET_IF_H when <net/if.h> exists
2005-07-03 09:57:41 +00:00
Volker Ruppert
3d9495bb45 - implemented idle hack for the term gui (patch by H. Johansson) 2005-06-17 18:37:51 +00:00
Volker Ruppert
785662517c - the option -export-dynamic is not needed for the win32 non-plugin version
(MSVC doesn't understand this argument)
- exporting dll symbols is only needed for the win32 plugin version
2005-06-13 20:28:38 +00:00
Volker Ruppert
821ff1e87c - clarify operator precedence (needed by MSVC)
- defined symbol BOCHSAPI_MSVCONLY for special cases in MSVC
2005-06-09 17:42:34 +00:00
Stanislav Shwartsman
1514ad6f8e Forgot to update config.h.in ... 2005-03-29 22:01:22 +00:00
Stanislav Shwartsman
c2ec59f4c3 Do compile time error when compiling BX_DEBUGGER w/o BX_DISASM 2005-03-26 19:44:21 +00:00
Stanislav Shwartsman
de527e2dde Do not allow to allocate more than 2048Mb of emulated memory.
Anyway in most of systems it fails to allocated even 1024Mb and allocating more than 4096Mb causes overlap and unpredicted behaviour.
2005-03-06 21:23:38 +00:00
Volker Ruppert
2b196e5c61 - removed useless VLB-IDE support (ISA and PCI IDE are working okay)
- removed dangerous options from the harddrive code
2005-02-15 20:48:14 +00:00
Volker Ruppert
5e420c7172 - vga extension option now controls the presence of the Cirrus extension
- Cirrus and VBE support are no longer mutually exclusive
2005-02-09 22:01:19 +00:00
Volker Ruppert
eb05d1c0fb - BX_FAST_FUNC_CALL doesn't work with BX_USE_CPU_SMF = 0 (e.g. SMP version) 2005-02-05 14:54:12 +00:00
Volker Ruppert
f98ecd09b1 - changed wxWindows to wxWidgets (includes SF patch #1094407 by Alexander Schuch) 2005-01-05 19:54:32 +00:00
Stanislav Shwartsman
da24883199 Extend page directory entries to 8 byte in PAE mode when X86_64 is enabled
(prepartions to NX feature implementation)
2004-12-13 22:26:36 +00:00
Volker Ruppert
78218d8b1b - implementation of bus mouse and usb mouse started - NOT YET COMPLETE !
(SF patch #1082584 by Ben Lunt)
2004-12-11 08:35:33 +00:00
Volker Ruppert
f93b04df0b - the PCI Pseudo-NIC is now independent from the NE2000 NIC stuff. New symbol
BX_NETWORKING controls the presence of the lowlevel networking stuff.
- eth.cc: unused stuff removed
2004-10-03 20:06:12 +00:00
Stanislav Shwartsman
eb2b8a3afc Ability to enable PNI 2004-09-21 21:07:39 +00:00
Volker Ruppert
1663f995e0 - support for GNU/kFreeBSD and GNU/kNetBSD added in lowlevel iodev code (cdrom,
ne2k, sb16, etc.) (SF patch #1021758 from Robert Millan)
2004-09-11 15:39:53 +00:00
Stanislav Shwartsman
77b3886f8b Cleanup and optimize 2004-08-28 08:41:46 +00:00
Volker Ruppert
1b2769e73a - added some sanity checks in function load_ROM()
- removed unused and obsolete stuff from the memory code
2004-08-26 07:58:33 +00:00
Volker Ruppert
45ccb97021 - CL-GD 54xx SVGA emulation added (SF patch #869822 from m_suzu_abc@yahoo.co.jp)
- changes to the original svga_cirrus patch:
  * PCI memory/mmio PnP support, some emulation and compile fixes
  * ported write mode 4 + 5 and some bufixes from cirrus vga in qemu
  * new graphics API, hardware cursor support, configure option added (Robin Kay)
  * partial support for transparent bitblt and bitblt write mask
2004-08-16 08:07:23 +00:00
Volker Ruppert
d06c80cee3 - changed all iodev config macros to BX_SUPPORT_xxx
- removed incorrect SDL/ prefix from include paths (patch from Robin KAY)
2004-08-06 15:49:55 +00:00
Stanislav Shwartsman
f9bd2b74be 1. Fixed bug in FSUB instruction
2. Fixed bug

[ 989478 ] I-Cache and undefined Instruktions

The L4 microkernel uses an undefined instruction to
trap for a special requests into the kernel (LOCK NOP).
The handler fixes this up and gives the user a special
code page with syscall stubs. If you're not using the
I-Cache optimization everthing works find on bochs. But
if you enable the I-Cache (--enable-icache), then the
undefined opcode exception is thrown only once for ever
virtual address it occurs. See the demodisk of the
L4KA::pistachio
(http://www.l4ka.org/projects/pistachio/download.php).
In this case the pingpong benchmark of this demo is of
interest. Everything runs fine until the program tries
to spawn a new task for its measurements. This new task
shares the code of the creating program. But the new
task stops executing at the undefined instruction
explained above and no exception is thrown.
2004-07-29 20:15:19 +00:00
Stanislav Shwartsman
5c5b556f24 Merge softfloat-fpu-implementation_ver4_branch branch 2004-06-18 14:11:11 +00:00
Volker Ruppert
bf243f892a - added PCI IDE controller (dummy device - busmaster feature not present yet) 2004-06-09 20:55:58 +00:00
Stanislav Shwartsman
6941b82357 correct configure checks 2004-04-11 13:14:54 +00:00
Christophe Bothamy
c6d65e3694 - add check for vsnprintf availability and emulate with vsprintf if not found 2004-02-08 10:22:29 +00:00
Volker Ruppert
c3d9a977f8 - new symbol BX_USE_TEXTCONFIG controls the presence of the text mode configuration
interface. It should be set to 1 unless Bochs is compiled for wxWindows only.
- 'user_shortcut' is now available at runtime (wx version only)
2004-01-29 18:50:33 +00:00
Michael Brown
d1922bc835 Changed #ifdef MAGIC_BREAKPOINT to #if BX_MAGIC_BREAKPOINT and added a
configure script option --enable-magic-breakpoints (enabled by default).

Documented the instruction required to trigger the magic breakpoint
(xchgw %bx,%bx).
2004-01-29 17:49:03 +00:00
Daniel Gimpelevich
6c26e6a65f Introduced Frank Cornelis's PCIDEV patch. 2004-01-15 02:08:37 +00:00
Michael Brown
299947f64f Added the PCI Pseudo-NIC (pnic). Mainly useful for running Etherboot
inside Bochs.
2004-01-13 19:21:21 +00:00
Volker Ruppert
6ba47a1d7a - gameport support is now disabled by default. It can be enabled with --enable-sb16=...
or the new option --enable-gameport.
- reading gameport with joystick not present now causes a BX_DEBUG message
2003-12-26 13:53:40 +00:00
Christophe Bothamy
c7fcb049c9 - fix comments 2003-12-07 23:35:48 +00:00
Daniel Gimpelevich
fff74a6f83 Fixed incompatibility with gcc3.3, I think. 2003-11-28 15:07:29 +00:00
Stanislav Shwartsman
ac20b6405a - FXSAVE/FXRSTOR instructions should be available in P6 mode
- Added second UD2 opcode to fetchdecode
- Added RDPMC instruction to fetchdecode
- 'changes' updated
2003-10-24 18:34:16 +00:00
Daniel Gimpelevich
d920233498 I hope this will make it compile under MinGW. Thanx 2003-10-06 21:36:13 +00:00
Daniel Gimpelevich
d0c10dd46b *** empty log message *** 2003-10-02 11:33:42 +00:00
Christophe Bothamy
e856e9c46e - fix utc time for bsd, that also works for linux.
Patch by Daniel Gimpelevich
2003-10-02 07:38:00 +00:00
Volker Ruppert
88667a4759 - removed obsolete symbols (hard disk and cdrom names, dynamic translation)
- symbol BX_PROVIDE_BIOS_HOOKS removed and "romimage" description updated
- symbol BX_SUPPORT_VGA removed (VGA support is always present)
2003-09-10 16:34:56 +00:00
Christophe Bothamy
6a4e0e11ce - add checks for localtime(), timezone and daylight 2003-09-05 23:03:38 +00:00
Stanislav Shwartsman
7f570b0150 Added PNI new streaming extensions instructions
PNI could be enabled by setting BX_SUPPORT_PNI in config.h
After the feature will be fully validation I'll also add configure option.

The implemntation is ~complete. I've missed only three FPU new opcodes of FUSTTP instruction and MONITOR/WAIT instructions.

Enjoy ! ;)
2003-08-29 21:20:52 +00:00
Christophe Bothamy
9f31872f4b - implement reset on triple fault
- old behavior (panic) can be used by setting BX_RESET_ON_TRIPLE_FAULT to 0 in config.h
2003-08-24 23:39:33 +00:00
Jeroen Janssen
5a023a8ad5 applied slowdown timer crosscompile fix 2003-08-20 06:26:27 +00:00
Christophe Bothamy
832ef1209f - apply .bochsrc, cdrom, serial and ethernet patches for NetBSD
(patches by fredb, uebayasi and david laight)
2003-08-19 00:37:03 +00:00
Christophe Bothamy
fb171e482a - apply MartinS compile patch for missing function in curses 2003-08-17 23:40:39 +00:00
Alexander Krisak
45df735c30 Apply Vitaly's Vorobyov debugger patch 2003-08-04 16:03:09 +00:00
Volker Ruppert
359dce2185 - implementation of the standard PC gameport for the Linux platform
- removed gameport stubs from the SB16 code
- TODO: bochsrc option for the joystick device, implement joystick access for
  other platforms
2003-06-21 12:55:19 +00:00
Volker Ruppert
dd46d0ec71 - configure check for XPM support added
- x.cc uses the old monochrome icon if there's no XPM support present
2003-06-13 16:05:03 +00:00
Volker Ruppert
4d25b39655 - changes for better MSVC support based on patch #735990
* support for different resource compilers added (rc / windres)
  * bochs must be linked with advapi.lib for registry access
  * optimization flag changed to /Ox
  * symbols BX_HAVE_MKSTEMP, BX_HAVE_SYS_MMAN_H and HAVE_ETHERTAP must be set to 0
  * BX_HAVE_REALTIME_USEC definition fixed for MSVC
  * vmware3.h: definition of COW_Header fixed for MSVC
2003-06-06 19:57:25 +00:00
Stanislav Shwartsman
6fdecf77a1 New dependencies for CPU directory 2003-05-15 18:46:01 +00:00
Stanislav Shwartsman
1d45167e5b Merged NEW-INSTRUCTIONS branch 2003-05-15 16:41:17 +00:00
Christophe Bothamy
92c7e0e796 - add check for sys/mman.h 2003-05-06 20:15:31 +00:00
Christophe Bothamy
f43d2fe3e9 - backport of the BRANCH_HARDDISK_MODES to the main branch.
You can now choose for each disk on the ata interfaces the
  disk mode, between :
    - flat : one file flat layout
    - concat : multiple files layout
    - external : developer's specific, through a C++ class
    - dll : developer's specific, through a DLL
    - sparse : stackable, commitable, rollbackable
    - vmware3 : vmware3 disk support
    - undoable : flat file with commitable redolog
    - growable : growing file
    - volatile : flat file with volatile redolog
    - z-undoable : gziped flat file with commitable redolog
    - z-volatile : gziped flat file with volatile redolog
  A new "bxcommit" utility can merge commitable redologs to
  flat images.
2003-05-03 16:37:18 +00:00
Volker Ruppert
34df2239bc - BX_HAVE_REALTIME_USEC: replaced BX_WITH_WIN32 by the platform symbol WIN32 2003-03-11 19:45:34 +00:00
Christophe Bothamy
50efc3b8c7 - apply Conn Clark's patch.perf-regparm-cclark :
- it works only on x86 with gcc2.95+
  - uses the GCC function atribute "regparm(n)" to declare that certain
    functions use the register calling convention
  - performance improvement is about 6%
2003-03-02 23:59:12 +00:00
Christophe Bothamy
b2dbcdb993 - apply Zwane's patch.highmem patch
It can be easily removed if things go wrong on win32
2003-01-29 15:01:16 +00:00
Volker Ruppert
f25a3df39b - added minimal USB support (patch from Ben Lunt <fys@cybertrails.com>, updated
and improved by Christophe Bothamy and Volker Ruppert)

Comment from the author:

Attached is a "patch" file detailing what you need to do
to add USB support (UHCI only for now) to your existing
Bochs (2.0.xx) source code.

I use Win32 and VC++ but the source and modifications
should be platform and compiler independant.

Please let me know if this patch some how breaks the
build process of your compilation (Bochs 2.0.0 or above
only).

I would also like any feedback on how this code works
(or doesn't work) on your platform and within your
images. If you explain in as much detail as you can on
how it did or did not work, I will try to add to the source
to help it work on all platforms and images.
2003-01-28 16:58:10 +00:00
Volker Ruppert
0e847ccd13 - new macro BX_PCI_DEV() for the PCI register function
- new symbol BX_USE_PCIVGA_SMF for the experimental PCI VGA device
- pcivga.cc: removed unnecessary include statement
- pcivga.cc: fixed two warnings
- pcivga.h: removed unnecessary symbol BX_IODEV_PCIVGA_H
2003-01-23 19:31:28 +00:00
Christophe Bothamy
939b558fdf - apply patch.sysenterexit-mrieker:
- adds sysenter/sysexit support for cpu-level>=6
  - enabled by ./configure --enable-sep
2003-01-20 20:10:31 +00:00
Christophe Bothamy
e6ff0a8560 - add check for strrev and implementation if not found 2003-01-10 22:32:46 +00:00
Christophe Bothamy
eb47a8bf01 - add msdos compatibility FPU exception support (irq 13). The IGNNE pin is no handled yet.
Modified Files:
 	bochs.h config.h.in plugin.h fpu/wmFPUemu_glue.cc
 	iodev/Makefile.in iodev/devices.cc iodev/iodev.h
 Added Files:
 	iodev/extfpuirq.cc iodev/extfpuirq.h
2003-01-06 02:20:47 +00:00
Bryce Denney
0534c6531c - the preprocessor symbol BX_USE_REALTIME_PIT is obsolete. Greg has
already made the realtime PIT option into a bochsrc option.
2002-12-24 04:03:15 +00:00
Bryce Denney
8bdffcbe46 - apply patch from Peter Tattam. x86-64 requires SSE2 or it fails without
any indiciation of what went wrong.
2002-12-21 16:36:07 +00:00
Gregory Alexander
5c99750c8b Updated the realtime PIT to work with win32. 2002-12-04 19:51:51 +00:00
Bryce Denney
7382b84f8c - A new GUI is born!
add SVGALIB display library by Igor Popik <igipop@wsfiz.edu.pl>
  While it's running, you can press F12 to escape into the runtime config
  menu, and then you can change disks or quit or whatever.

  Better not try it with the bochs debugger...you could get stuck.

Modified Files:
  Makefile.in config.h.in configure configure.in main.cc
  plugin.h gui/Makefile.in
Added Files:
  gui/svga.cc
Removed Files:
  patches/patch.svgalib-gui patches/patch.svgalib-gui-f12
2002-11-21 19:26:07 +00:00
Bryce Denney
ab6cb49693 - this fixes bug #638600: need default plugin search path
- 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
2002-11-18 02:32:53 +00:00
Bryce Denney
515ffa8ecc - add BOCHSAPI_CYGONLY to insert DLL export tags in places that only Cygwin
wants them.
- modified: bochs.h config.h.in gui/siminterface.h
2002-11-15 18:31:55 +00:00
Stanislav Shwartsman
5803e20240 Changed policy of SSE/SSE2 checking 2002-11-13 21:00:05 +00:00
Christophe Bothamy
6504dd74b1 - add check for existence of sockaddr_in.sin_len in configure
- set sockaddr_in.sin_len in gdbstub.cc only if above check is ok
- change direct bx_vga object reference to DEV_vga_ in gdbstub.cc
2002-11-08 21:29:16 +00:00
Gregory Alexander
5bc28d6dfa Add a minimum IPS value at compile time.
This is used for calculating the minimum speed for the realtime PIT and for flagging errors with user IPS values.
2002-10-30 18:30:29 +00:00
Bryce Denney
441eb253f7 - remove references to obsolete hga. Now --enable-vga and --disable-vga
no longer exist.  I think configure will silently ignore them.
- modified:
    iodev/Makefile.in iodev/devices.cc iodev/iodev.h main.cc
    configure.in config.h.in configure build/batch-build.perl
2002-10-26 13:14:11 +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
cd4d17a363 - min and max in shadow params were broken recently when I changed the
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
2002-10-21 11:13:54 +00:00
Bryce Denney
c07f5836f3 - move definition of bx_address earlier, just after the Bit32u and Bit64u
types are defined.  This should ensure that bx_address is defined by
  the time it's needed.
2002-10-13 22:38:17 +00:00
Kevin Lawton
3183ab7102 Added some preliminary configure and config.h stuff for
SSE/SSE2 for Stanislav.  Also, some method prototypes and
  skeletal functions in access.cc for read/write double quadword
  features.

Also cleaned up one warning in protect_ctrl.cc for non-64 bit compiles.
  There was an unused variable, only used for 64-bit.
2002-10-11 01:11:11 +00:00
Kevin Lawton
261badee5a Added a couple macros which expand on GCC to __attribute__ directives
to give the compiler some hints:

    BX_CPP_AttrPrintf(formatArg, firstArg)
    BX_CPP_AttrNoReturn()

The first is to tell the compiler that a function receives printf-like
  arguments so it can do some smart argument checking w.r.t. the
  format string.  The 2nd tells the compiler that the function does
  not ever return; it's not used yet, but I'd like to use it on
  exception() after we fix the situation of it returning for debugging.

I fixed one parameter mismatch in cpu/ by deleting a deprecated
  debug print statement.  There are several other mismatches in
  other code modules.
2002-10-06 14:16:23 +00:00
Bryce Denney
97197e326b - clarify why Boolean is defined as unsigned char for Carbon. 2002-10-04 22:11:58 +00:00
Bryce Denney
3e797e33d1 - add symbol BX_GDBSTUB that enables gdb stub 2002-10-03 04:58:03 +00:00
Kevin Lawton
47f2e7c404 Got rid of the KPL64Hacks macro. The fixes below eliminated it.
Created 64-bit versions of some branch instructions and
  changed fetchdecode64.cc to use them instead.  This keeps the
  #ifdef pollution down for 32-bit code and made fixing them
  easier.  They needed to clear the upper bits of RIP for
  16-bit operand sizes.  They also should not have had a protection
  limit check in them, especially since that field is still
  32-bit in cpu.h, so there's no way to set nominal 64-bit values.
  The 32-bit versions were also not honoring the upper 32-bits
  of RIP.

  LOOPNE64_Jb
  LOOPE64_Jb
  LOOP64_Jb
  JCXZ64_Jb

Changed all occurances of JCC_Jw/JCC_Jd in fetchdecode64.cc to
  use JCC_Jq, which was coded already.  Both JMP_Jq and JCC_Jq are
  now fixed w.r.t. 16-bit opsizes and upper RIP bit clearing.
2002-09-27 07:01:02 +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
Bryce Denney
6ccc57320f - add sanity checks for x86-64 compiles to ensure that the required
features are enabled.  Currently checks for cpu level > 5, support
  for PAE, PGE, and PSE.
2002-09-25 03:58:40 +00:00
Kevin Lawton
c3a74d4da0 Integrated patches/patch.promise-dc2300-vlbide from Christophe Bothamy.
From his patch file text:

  > This patch adds Promise DC2300 VLB IDE Support.
  > You may find msdos and win95 drivers on the net. Look for
  > P2300W95.ZIP and DC2300VLBIDEver260b.ZIP.
  >
  > The good news is that now win95 natively sees my cdrom,
  > and that the disks are not in msdos compatibility mode any more.
  >
  > The bad news is that it works only for the first ata interface.
  >
  > I tested that patch on msdos and win95 only.
  >
  > Some info on VLB IDE can be found at http://ryston.cz/petr/vlb/

I got Win95 running with 32-bit paging/filesystem using the
  recommended driver and these patches.  Since the patches did
  such a good job bracketing code modifications with a #define,
  they might as well become part of the current CVS code.
2002-09-24 20:02:00 +00:00
Bryce Denney
3b011766fa - add --enable-ignore-bad-msr, which causes Bochs to NOT do a panic
or gpf when an unrecognized MSR is accessed.
2002-09-24 08:15:27 +00:00
Kevin Lawton
281e62d8b1 I integrated my hacks to get Linux/x86-64 booting. To keep
these from interfering from a normal compile here's what I did.
In config.h.in (which will generate config.h after a configure),
I added a #define called KPL64Hacks:

  #define KPL64Hacks

*After* running configure, you must set this by hand.  It will
default to off, so you won't get my hacks in a normal compile.
This will go away soon.  There is also a macro just after that
called BailBigRSP().  You don't need to enabled that, but you
can.  In many of the instructions which seemed like they could
be hit by the fetchdecode64() process, but which also touched
EIP/ESP, I inserted a macro.  Usually this macro expands to nothing.
If you like, you can enabled it, and it will panic if it finds
the upper bits of RIP/RSP set.   This helped me find bugs.

Also, I cleaned up the emulation in ctrl_xfer{8,16,32}.cc.
There were some really old legacy code snippets which directly
accessed operands on the stack with access_linear.  Lots of
ugly code instead of just pop_32() etc.  Cleaning those up,
minimized the number of instructions which directly manipulate
the stack pointer, which should help in refining 64-bit support.
2002-09-24 00:44:56 +00:00
Kevin Lawton
91fd4b3745 Added new configure option --enable-host-specific-asms, so the
user can turn on/off use of native host specific inline asm
  statements.  By default, this option is enabled, so you only
  need it to disable inline asms in your compile for now.

Currently only on x86+GCC environments, will inline asm()
  statements be used.  Eventually, other platforms could specify
  some asm()s; probably for endian issues such as byte-swapping
  and unaligned memory accesses.  On x86, there are some inline
  asm()s which do the arithmetic EFLAGS processing so that the
  lazy flags handling is somewhat bypassed.  Eventually, I'll
  add more, at least for the more common instructions.  This
  adds a little extra performance.
2002-09-23 17:59:18 +00:00
Bryce Denney
8213f3916a - add option BX_OVERRIDE_ASK (request by Peter T) 2002-09-23 15:28:16 +00:00
Gregory Alexander
249131fbed I added a support function to osdep.
The function gets the real time in useconds and puts it in
a Bit64u.  This function is defined when:
BX_HAVE_REALTIME_USEC is 1.

Right now, BX_HAVE_REALTIME_USEC is defined to be BX_HAVE_GETTIMEOFDAY
and bx_get_realtime64_usec is defined in terms of gettimeofday().

However, it could be defined in terms of any other method of obtaining
the current time accurate to the usecond.  That is why I moved the
function to osdep and added the new define.
2002-09-23 02:20:52 +00:00
Christophe Bothamy
440dffc803 - applied patch.4ata-channels and patch.4ata-channels.bbd
- 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
2002-09-22 20:56:12 +00:00
Bryce Denney
ac4e5bb6cf - add sanity checks
- don't allow MMX on cpu level < 5.
  - require FPU support on cpu level >= 55
  - don't allow MMX support without FPU support (moved this check from
    cpu/i387.h to config.h)
2002-09-22 16:11:12 +00:00
Bryce Denney
e41655a78c - add configure test for BX_HAVE_GETTIMEOFDAY
- hardcode BX_HAVE_GETTIMEOFDAY=0 if cross compiling for VC++
  (this part hasn't been tested)
- modified files: configure configure.in config.h.in iodev/pit_wrap.cc
2002-09-22 01:56:18 +00:00
Bryce Denney
4118b29da3 - add "#else" case for BX_CPP_AlignN() macro so that non-gcc compilers
can continue to compile.
2002-09-19 21:42:24 +00:00
Kevin Lawton
0cd7346b9c - Added an instruction cache. Size is fixed for the moment,
but if you hand edit cpu/cpu.h, and change BxICacheEntries,
  you can try different sizes.  I'll make this more flexible
  with configure.  For now, use "--enable-icache" with no parameters.

- Modified fetchdecode.cc/fetchdecode64.cc just enough so that
  instructions which encode a direct address now use a memory
  resolution function which just sticks the immediate address
  into rm_addr.  With cached instructions we need this.
2002-09-19 19:17:20 +00:00
Volker Ruppert
19c660a30c - implementation of the PCI-to-ISA bridge started. I/O ports and features are
not present yet.
2002-09-16 19:18:58 +00:00
Kevin Lawton
771b1a9558 Added big/little-endian specific declarations for the Bit128{u,s}
types in config.h.in.  It was always in little-endian order.
2002-09-15 05:29:06 +00:00
Kevin Lawton
278e27d5fe Merged proc_ctrl.cc. Also fixed a bug in CR4 reloading; we were
printing a message when a reserved bit was set, but not causing
a #GP(0).  As well, I force a new PAE support option to 1 when
Hammer support is enabled.
2002-09-14 23:17:55 +00:00
Bryce Denney
0fdbbae45b - integrate Peter Tattam's x86-64 emulation code into the main branch!
This adds a whole new directory cpu64 with the new emulation code.
  Very few changes were necessary outside cpu64.  To try it, configure
  with --enable-x86-64 and make.
- also this adds Peter Tattam's external debugger interface.
- modified files: Makefile.in bochs.h config.h.in configure.in
  load32bitOShack.cc logio.cc cpu/Makefile.in cpu/cpu.cc debug/dbg_main.cc
- added files: cpu/extdb.cc cpu/extdb.h and cpu64/*
2002-09-12 07:16:37 +00:00
Kevin Lawton
08576b24be I implemented Global pages. Though, I haven't tested them. :^)
You need to use '--enable-global-pages' to configure in support.
If you have something to boot that uses them, give them a
spin.  Really the were introduced for PPro and above, but
I haven't put in any limits.  CPUID and CR4 report the proper
bits when configured, regardless of --enable-cpu-level at the
moment.
2002-09-10 03:52:32 +00:00
uid94540
293cbc01ea Got rid of very old BX_SUPPORT_TASKING define. That originated
way back when I first added paging support.
2002-09-09 19:48:58 +00:00
Gregory Alexander
4f6039f533 Macroize BX_TLB_QUICK_INVALIDATE code.
Kevin Lawton says he doesn't get a performance benefit.

I'm not sure if I do.  Either way, the difference isn't
very large.

This code may get removed if it turns out to be useless.
2002-09-06 19:21:55 +00:00
Bryce Denney
80a3900b8b - apply a patch I've been working on
- modified files: config.h.in cpu/init.cc debug/dbg_main.cc gui/control.cc
  gui/siminterface.cc gui/siminterface.h gui/wxdialog.cc gui/wxdialog.h
  gui/wxmain.cc gui/wxmain.h iodev/keyboard.cc

----------------------------------------------------------------------
Patch name: patch.wx-show-cpu2
Author: Bryce Denney
Date: Fri Sep  6 12:13:28 EDT 2002

Description:

Second try at implementing the "Debug:Show Cpu" and "Debug:Show
Keyboard" dialog with values that change as the simulation proceeds.
(Nobody gets to see the first try.)  This is the first step toward
making something resembling a wxWindows debugger.

First, variables which are going to be visible in the CI must be
registered as parameters.  For some variables, it might be acceptable
to change them from Bit32u into bx_param_num_c and access them only
with set/get methods, but for most variables it would be a horrible
pain and wreck performance.

To deal with this, I introduced the concept of a shadow parameter.  A
normal parameter has its value stored inside the struct, but a shadow
parameter has only a pointer to the value.  Shadow params allow you to
treat any variable as if it was a parameter, without having to change
its type and access it using get/set methods.  Of course, a shadow
param's value is controlled by someone else, so it can change at any
time.

To demonstrate and test the registration of shadow parameters, I
added code in cpu/init.cc to register a few CPU registers and
code in iodev/keyboard.cc to register a few keyboard state values.
Now these parameters are visible in the Debug:Show CPU and
Debug:Show Keyboard dialog boxes.

The Debug:Show* dialog boxes are created by the ParamDialog class,
which already understands how to display each type of parameter,
including the new shadow parameters (because they are just a subclass
of a normal parameter class).  I have added a ParamDialog::Refresh()
method, which rereads the value from every parameter that it is
displaying and changes the displayed value.  At the moment, in the
Debug:Show CPU dialog, changing the values has no effect.  However
this is trivial to add when it's time (just call CommitChanges!).  It
wouldn't really make sense to change the values unless you have paused
the simulation, for example when single stepping with the debugger.

The Refresh() method must be called periodically or else the dialog
will show the initial values forever.  At the moment, Refresh() is
called when the simulator sends an async event called
BX_ASYNC_EVT_REFRESH, created by a call to SIM->refresh_ci ().

Details:
- implement shadow parameter class for Bit32s, called bx_shadow_num_c.
  implement shadow parameter class for Boolean, called bx_shadow_bool_c.
  more to follow (I need one for every type!)
- now the simulator thread can request that the config interface refresh
  its display.  For now, the refresh event causes the CI to check every
  parameter it is watching and change the display value.  Later, it may
  be worth the trouble to keep track of which parameters have actually
  changed.  Code in the simulator thread calls SIM->refresh_ci(), which
  creates an async event called BX_ASYNC_EVT_REFRESH and sends it to
  the config interface.  When it arrives in the wxWindows gui thread,
  it calls RefreshDialogs(), which calls the Refresh() method on any
  dialogs that might need it.
- in the debugger, SIM->refresh_ci() is called before every prompt
  is printed.  Otherwise, the refresh would wait until the next
  SIM->periodic(), which might be thousands of cycles.  This way,
  when you're single stepping, the dialogs update with every step.
- To improve performance, the CI has a flag (MyFrame::WantRefresh())
  which tells whether it has any need for refresh events.  If no
  dialogs are showing that need refresh events, then no event is sent
  between threads.
- add a few defaults to the param classes that affect the settings of
  newly created parameters.  When declaring a lot of params with
  similar settings it's more compact to set the default for new params
  rather than to change each one separately.  default_text_format is
  the printf format string for displaying numbers.  default_base is
  the default base for displaying numbers (0, 16, 2, etc.)
- I added to ParamDialog to make it able to display modeless dialog
  boxes such as "Debug:Show CPU".  The new Refresh() method queries
  all the parameters for their current value and changes the value in
  the wxWindows control.  The ParamDialog class still needs a little
  work; for example, if it's modal it should have Cancel/Ok buttons,
  but if it's going to be modeless it should maybe have Apply (commit
  any changes) and Close.
2002-09-06 16:43:26 +00:00