Commit Graph

2844 Commits

Author SHA1 Message Date
Bryce Denney
a188b157de - change Bit64u sectors to a Bit64s, to avoid VC++ compile error.
It says it can't convert a 64 bit unsigned to a double.  Hmm.
2002-11-15 18:14:08 +00:00
Bryce Denney
add9107dae - add BOCHSAPI to bxICache_c 2002-11-15 18:12:04 +00:00
Bryce Denney
983b8f0962 - the #define of off_t to "long" was causing problems when compiling
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.
2002-11-15 18:11:40 +00:00
Bryce Denney
5744c1cb90 - include "ltdl.h" with quotes, instead of <ltdl.h> with <>'s. It's
supposed to be a local header file, not a system header file.
2002-11-15 18:09:37 +00:00
Bryce Denney
94cf7eff9a - add --enable-optimizations, so that release binaries will be compiled
with Kevin's speedups
2002-11-15 18:07:54 +00:00
Bryce Denney
ea5472d7c8 - update VC++ workspace. renamed gui/control.cc to textconfig.cc,
added cpu/sse*.cc, etc.
2002-11-15 18:01:51 +00:00
Stanislav Shwartsman
3217759a75 Implemented
PSHUFLW_VqWqIb, PSHUFHW_VqWqIb instructions
2002-11-15 17:34:47 +00:00
Stanislav Shwartsman
da8a2a71b1 Fixed bug PSHUFW instruction 2002-11-15 17:02:06 +00:00
Bryce Denney
1ef126611f - update test form so that it mentions current versions! 2002-11-15 16:44:15 +00:00
Bryce Denney
9022439b17 - fix spelling of "library" 2002-11-15 16:14:01 +00:00
Stanislav Shwartsman
62e362afc2 just typo 2002-11-15 15:55:36 +00:00
Stanislav Shwartsman
34dd74fe6c Fixed BUG in PMADDWD instruction 2002-11-15 15:51:12 +00:00
Stanislav Shwartsman
189f64b533 SSE2 shifts uses as count only low 64 bits of XMM register/mem128 2002-11-15 14:48:24 +00:00
Bryce Denney
3f07ce86d6 - change startup behavior so that if you don't type any command line args,
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.
2002-11-15 14:47:58 +00:00
Bryce Denney
7cb3c606fe - when you reset the options, change the default to Edit Options 2002-11-15 14:38:57 +00:00
Stanislav Shwartsman
d4426dc60b More bugfix in SSE 2002-11-15 14:33:44 +00:00
Bryce Denney
4e3d70d613 - if user chooses "Restore factory default configuration" then print a
message saying what it has done.
2002-11-15 13:26:15 +00:00
Bryce Denney
1bd7226b6f - change definition of BX_QUICK_START and friends into an enum, and
add more detailed comments about what they do.
2002-11-15 13:22:06 +00:00
Stanislav Shwartsman
88ce9917e6 Replace BX_PANIC to BX_INFO for FXSAVE/FXRSTOR instruction
because their is required for booting Windows with SSE enabled.
2002-11-15 13:10:06 +00:00
Stanislav Shwartsman
121de7d960 Fixed bug with decoding of Group15 2002-11-15 13:05:19 +00:00
Stanislav Shwartsman
ccbc8e0ef7 MOVAPS/MOVAPD have a different exceptions 2002-11-15 12:44:39 +00:00
Bryce Denney
4a7303c896 - update all bioses to current rombios.c
- 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
2002-11-14 20:05:57 +00:00
Bryce Denney
58bcf51ad8 - no longer create biosconfig.h with one line extracted from config.h.
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
2002-11-14 20:04:38 +00:00
Volker Ruppert
3d3deeb5fc - replaced memcpy() in pci_read() by a more portable code. This should fix the
problems with PCI on big-endian machines.
2002-11-14 20:02:58 +00:00
Stanislav Shwartsman
65b8712d04 More tuning of SSE 2002-11-14 19:59:29 +00:00
Bryce Denney
1bd9a44a9e - plugins are now called libbx_NAME.so for unix and bx_NAME.dll for win32.
- 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
2002-11-14 18:45:49 +00:00
Bryce Denney
53642bd5dd - change version numbers to prepare for 2.0 prerelease #1. 2002-11-14 18:17:29 +00:00
Bryce Denney
09dc13d0f8 - add BOCHSAPI on a bunch of extern variable declarations 2002-11-14 05:14:10 +00:00
Bryce Denney
1af54f9f12 - add definition of BX_PLUGGABLE in wx.cc and wxdialog.cc, since they
have to import DLL symbols from the main executable.

Modified Files:
  gui/wx.cc gui/wxdialog.cc
2002-11-14 05:13:40 +00:00
Bryce Denney
8d7da6be35 - win32 applications get the whole command line in one long string.
Add a new function "split_string_into_argv" that chops up the
  string into individual args, and understands the rules of single
  and double quotes.
2002-11-14 05:12:28 +00:00
Bryce Denney
edf1b23a05 - check for NULL before using pluginSB16Device. 2002-11-14 02:32:33 +00:00
Bryce Denney
95e62bd80d - apply patch [ 632278 ] Carbon.cc Detabbing
from Jeremy Parsons (brefin)
2002-11-14 01:40:11 +00:00
Stanislav Shwartsman
7ccf1de78f According to the Intel (and AMD) manuals a lot different SSE/SSE2 opcodes has EXACTLY the same operation.
Deleted first three redundant opcodes (move integer data):
   MOVLPS_VpsMq   (0f 12) = MOVLPD_VsdMq   (66 0f 12)
   MOVLPS_MqVps   (0f 13) = MOVLPD_MqVsd   (66 0f 13)
   MOVHPS_VpsMq   (0f 16) = MOVHPD_VpdMq   (66 0f 16)
   MOVHPS_MqVps   (0f 17) = MOVHPD_MqVpd   (66 0f 17)

Until under examination:
XORPS,XORPD
ORPS,ORPD
ANDPS,ANDPD
ANDNPS,ANDNPD
MOVUPS,MOVUPD
2002-11-13 22:24:03 +00:00
Stanislav Shwartsman
968b2744f4 According to the Intel (and AMD) manuals a lot different SSE/SSE2 opcodes
has EXACTLY the same operation.

Deleted first three redundant opcodes:
   MOVAPS_VpsWps  (0f 28) = MOVAPD_VpdWpd  (66 0f 28)
   MOVAPS_WpsVps  (0f 29) = MOVAPD_WpdVpd  (66 0f 29)
   MOVNTPS_MdqVps (0f 2b) = MOVNTPD_MdqVpd (66 0f 2b)

Until checking:
XORPS,XORPD
ORPS,ORPD
ANDPS,ANDPD
ANDNPS,ANDNPD
MOVUPS,MOVUPD
MOVLPS,MOVLPD
MOVHPS,MOVHPD
2002-11-13 21:35:17 +00:00
Stanislav Shwartsman
5803e20240 Changed policy of SSE/SSE2 checking 2002-11-13 21:00:05 +00:00
Volker Ruppert
84b4cf6d4c - converted sb16 device to a plugin
- moved sb16 presence check to devices.cc
- added special make rules for the sb16 and the lowlevel sound support
2002-11-13 18:39:41 +00:00
Volker Ruppert
675f140e37 - the name of the object file for the lowlevel sound support is now stored in
SOUNDLOW_OBJS. The value of SB16_OBJS is now 'sb16.o' if SB16 support is
  enabled. These changes are necessary before converting the SB16 to a plugin.
2002-11-12 21:07:17 +00:00
David Guarneri
801382a498 Added some tips in the Mailing List Etiquette 2002-11-12 08:40:28 +00:00
Christophe Bothamy
e359cfc5d3 - fix [ 628663 ] double panic from cmos get_timeval. As Volker said :
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.
2002-11-11 22:01:08 +00:00
Christophe Bothamy
052ee134b7 - fix [ 629606 ] BX_WITH_TERM affects ^C handling :
. 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.
2002-11-11 17:09:57 +00:00
Christophe Bothamy
1a089af9ea - set "Installing Windows ME" inside Windows ME section 2002-11-11 14:29:01 +00:00
Bryce Denney
4ece9f81fb - when printing the release description string, handle excessively long lines
with a panic instead of printing 2^30 spaces before and after it
2002-11-11 14:10:24 +00:00
Bryce Denney
873561ec5b - use %{_mandir} instead of hardcoded usr/share/man, so that it works
on systems where _mandir points to something else.
2002-11-11 13:13:16 +00:00
Bryce Denney
d4b31a2d4b - add --enable-all-optimizations. This file is used to make all release
RPMs, and we certainly want Kevin's speedups to get in by default.
2002-11-11 13:10:51 +00:00
Christophe Bothamy
2816af1e43 - the driver name has been included in the user documentation. So I remove this patch. 2002-11-11 12:49:22 +00:00
Christophe Bothamy
4c177f4ab6 - add VLB-IDE support section in Win95 chapter 2002-11-11 12:48:03 +00:00
David Guarneri
749ce27f51 Fixed docbook/sgml errors 2002-11-11 02:33:24 +00:00
Christophe Bothamy
c8ec66b4c0 - fix typos 2002-11-10 14:39:32 +00:00
Volker Ruppert
24eaffd453 - dma read/write functions of floppy and sb16 are now private members of the
device objects
- sb16: function opl_timerevent() and variables currentdma8 and currentdma16
  are now private members of the device object
2002-11-10 10:14:55 +00:00
Volker Ruppert
95699f5a46 - removed initialization of the PCI plugins from init() since it is done by
bx_init_plugins()
2002-11-10 08:12:12 +00:00
Volker Ruppert
01027b46c9 - converted devices pci and pci2isa to plugins
- moved PCI presence check to devices.cc
- moved initialization of the PCI register arrays from constructor to init()
- PCI macros updated
2002-11-09 20:51:40 +00:00
Stanislav Shwartsman
6c6519a73d Implemented SSE2 integer instructions:
PMULHW_VdqWdq
PMULHUW_VdqWdq
PMULLW_VdqWdq
MOVNTI_MdGd

Somedoby that is the difference between MOVNTPD, MOVNTPS, MPVNTDQ instructions ?
2002-11-09 19:22:00 +00:00
Christophe Bothamy
81eca54b51 - fix [ 625696 ] text config menu: default can be wrong.
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
2002-11-09 14:12:10 +00:00
Volker Ruppert
52e703d8e8 - replaced all #if BX_WITH_WX sections by a check for the active config
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.
2002-11-09 06:41:34 +00:00
Christophe Bothamy
4f843a183e - add check if cdrom.ready before reading another block. (this should not happen, but...) 2002-11-08 22:14:55 +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
Stanislav Shwartsman
bc0463f08a Implemented
PSRLDQ_WdqIb
PSLLDQ_WdqIb
instructions
2002-11-08 21:09:17 +00:00
Christophe Bothamy
4139916e92 - floppy patches from Alex Thiel, from the mailing list. 2002-11-08 20:44:09 +00:00
Stanislav Shwartsman
790430bf22 #UD exception condition for SSE instructions fixed 2002-11-08 20:27:42 +00:00
Stanislav Shwartsman
3cd6f7282d Alloc setting OFXCSR (bit9) of CR4 in SSE/SSE2 enabled 2002-11-08 20:26:12 +00:00
Stanislav Shwartsman
a814c00278 MOVD_EdVd: bugfix 2002-11-08 17:50:20 +00:00
Stanislav Shwartsman
0df9c9af85 Implemented integer SSE2 instructions:
PSRLW_PdqIb
PSRLD_PdqIb
PSRLQ_PdqIb
PSLLW_PdqIb
PSLLD_PdqIb
PSLLQ_PdqIb
PSRAW_PdqIb
PSRAD_PdqIb
PSRLW_VdqWdq
PSRLD_VdqWdq
PSRLQ_VdqWdq
PSRAW_PdqWdq
PSRAD_PdqWdq
PSLLW_VdqWdq
PSLLD_VdqWdq
PSLLQ_VdqWdq
PMOVMSKB_GdVRdq
PMULUDQ_VdqWdq
PMINUB_VdqWdq
PMINSW_VdqWdq
PMAXUB_VdqWdq
PMAXSW_VdqWdq

Fixed bug in the PMINUB_PqQq and PMAXUB_PqQq SSE instructions
2002-11-08 17:47:46 +00:00
Stanislav Shwartsman
c98b30af0c Changed BX_INFO to BX_PANIC for still not implemented SSE2 instruction
I just forgot to change the BX_INFO before ...
2002-11-08 14:35:03 +00:00
Stanislav Shwartsman
2f214c34ed Fixed compilation problem ... 2002-11-08 14:26:04 +00:00
Stanislav Shwartsman
1ec420be74 Implemented SSE2 integer instructions:
PADDUSB_VdqWdq
PADDUSW_VdqWdq
PSUBSB_VdqWdq
PSUBSW_VdqWdq
PADDSB_VdqWdq
PADDSW_VdqWdq
PSADBW_VdqWdq
PUNPCKLBW_VdqWq
PUNPCKLWD_VdqWq
PUNPCKLDQ_VdqWq
PUNPCKLQDQ_VdqWq
MOVDQA_VdqWdq
2002-11-08 14:23:34 +00:00
Volker Ruppert
942c4c6c36 - added parentheses in function bx_real_sim_c::get_first_cdrom()
BUG: this function should be called if you press the wx cdrom button
2002-11-08 13:18:05 +00:00
Stanislav Shwartsman
4363745725 Implemented SSE2 integer instructions:
PACKSSDW_VdqWdq
PUNPCKHDQ_VdqWq
PUNPCKHWD_VdqWq
PUNPCKHBW_VdqWq
PUNPCKHQDQ_VdqWq
MOVD_EdVd
MOVD_VdqEd
2002-11-08 12:47:24 +00:00
Stanislav Shwartsman
b200ff2058 Implemented several integer SSE2 instructions (similar to the MMX):
PACKSSWB_VdqWq
PCMPGTB_VdqWq
PCMPGTW_VdqWq
PCMPGTD_VdqWdq
PACKUSWB_VdqWdq
PCMPEQB_VdqWdq
PCMPEQW_VdqWdq
PCMPEQD_VdqWdq
PADDQ_VdqWdq
PSUBUSB_VdqWdq
PSUBUSW_VdqWdq
PAND_VdqWdq
PANDN_VdqWdq
PAVGB_VdqWdq
PAVGW_VdqWdq
POR_VdqWdq
PXOR_VdqWdq
PSUBB_VdqWdq
PSUBW_VdqWdq
PSUBD_VdqWdq
PSUBQ_VdqWdq
PADDB_VdqWdq
PADDW_VdqWdq
PADDD_VdqWdq
PADDQ_VdqWdq
2002-11-07 22:41:34 +00:00
Christophe Bothamy
92f04bdd0b - fix "if ((addr < 0xB0000) | (addr > 0xB7FFF)) return;" bug, thanks to Kazuo Fox Dohzono 2002-11-07 22:02:13 +00:00
Christophe Bothamy
48200d4936 - compile rombios.c r1.78 2002-11-07 21:58:19 +00:00
Christophe Bothamy
5d7b0701df - clean up in and out keyboard buffer before self test 2002-11-07 21:57:27 +00:00
Jonathan S. Shapiro
5d46a86614 Patched the make-rpm script to work when rpmbuild exists.
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.
2002-11-07 16:00:14 +00:00
Jonathan S. Shapiro
7b394f037e Change disassembly printout to print the *physical* as well as the
logical address when performing disassembly. When you know the physical
address, the pbreak command spontaneously becomes much more useful.
2002-11-07 15:58:05 +00:00
Jonathan S. Shapiro
eb21a1ef5c Kevin looked at the push_64() change and thinks its reasonable, so I'm
switching the BX_PANIC to a BX_INFO.
2002-11-07 15:42:14 +00:00
Jonathan S. Shapiro
1893bf78e1 Disassembly now picks up the current 16/32 bit mode from CS register
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.
2002-11-07 15:32:38 +00:00
Jonathan S. Shapiro
0aac231adb Changed push_32() and push_64() to issue SS(0) for a push outside of
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'.
2002-11-07 14:02:47 +00:00
Christophe Bothamy
b5b78258bf - remove extrneaous CDROM feature entry
- add tuntap configuration section
- add debug with gdb stub section
- convert The Hurd install doc from Bruno Bonfils
- add Install japanese Win95 section
2002-11-05 22:11:57 +00:00
Bryce Denney
2492b63694 - minor fixes and updates in chapter 1 2002-11-05 18:11:04 +00:00
Bryce Denney
fb601bbbc5 - merge David's changes from 1.52 back in, leaving Christophe's changes alone 2002-11-05 17:46:39 +00:00
Bryce Denney
6aa9c11e00 - revert back to 1.51 since David accidently removed Christophe's changes 2002-11-05 17:45:05 +00:00
David Guarneri
8d6772798d Added section "Install Windows 95 From Floppies" taken from old documents written by Kevin. Plan to add section "Install Windows 95 with CD-ROM" in the near future. 2002-11-05 08:19:36 +00:00
Christophe Bothamy
b8fc42d6a7 - compile rombios.s r1.77 2002-11-04 23:57:53 +00:00
Christophe Bothamy
70b7d13763 - remove patch.keyboard-biosinit-asulmicki
- 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
2002-11-04 23:56:56 +00:00
Volker Ruppert
f375a0743b - the value of the command register must be always 0x00 (BX_ERROR fixed) 2002-11-04 17:29:12 +00:00
Peter Tattam
4addb73d99 External debugger patches.
Formatting problem in printf()
2002-11-04 05:38:12 +00:00
Peter Tattam
1bb5040031 Miscellaneous patches for Tattam's External Debugger.
- 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
2002-11-04 05:27:26 +00:00
Christophe Bothamy
d9c8cb51f5 - move Win LE install tips from misc.txt fo user.dbk
- Features :
  - add enhanced bios
  - add Multiple ATA channels
  - fix harddrive and cdrom
  - add info about keyoard mapping
  - add link to tuntap config
  - add PCI
  - add Copy and Paste
- add reference to openprojects.net IRC channel
- bochsrc :
  - add optromimage[1-4] paragraph
  - add example of LGPL vgabios
  - add ata[0-3] paragraph
  - add ataX-[master|slave] paragraph
  - change boot: options
  - add logprefix: paragraph
  - complete ne2k paragraph
  - add user_shortcut: paragraph
- Tips and techniques
  - convert internal debugger doc from html
  - add Bios Tips section (to be completed)
- expand guest os chapter
  - add WinME info from misc.txt
  - add titles of other doc to be included
2002-11-03 23:24:42 +00:00
Christophe Bothamy
b201195a06 - change BIOS name
- add optromimage[1-4] paragraph
- add LGPL vgabios example
- fix typos
- add explanation about bios translation
- change boot: syntax
- add logprefix: paragraph
- fix ips table
- add ne2k: paragraph
- add floppy_bootsig_check:: paragraph
- add user_shortcut: paragraph
2002-11-03 23:08:16 +00:00
David Guarneri
cd30dc8e29 Made some corrections; separated "Will Bochs Work for Me" into two sections:
* Is Bochs Right For Me?
and
* Will Bochs Work For Me?
This provided a better transition between "Who Uses Bochs?" and "Will Bochs Work For Me?"
2002-11-03 20:05:02 +00:00
Volker Ruppert
2deef745e6 - added new DEV_* macros for PCI functions in plugin.h
- memory code: direct PCI memtype function calls replaced by DEV_* macros
- PCI devices: direct i/o register function calls replaced by DEV_* macros
2002-11-03 17:17:11 +00:00
David Guarneri
22e5070d1a Ran a spell check on user.dbk
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.
2002-11-03 08:38:33 +00:00
Volker Ruppert
f73ddd4298 - libdir (usr/lib) disabled for now. We can enable it when plugins are enabled
by default.
2002-11-03 08:29:47 +00:00
Volker Ruppert
c5c535da28 - updated description of "user_shortcut" 2002-11-03 08:29:03 +00:00
David Guarneri
d357ef0ba5 Added "BOCHS Rocks!!!" to the end of the misc.txt file. 2002-11-02 16:51:18 +00:00
David Guarneri
83d970dbe9 *** empty log message *** 2002-11-02 16:48:32 +00:00
Bryce Denney
3d09154007 - testing 2002-11-02 16:45:00 +00:00
Volker Ruppert
706ed98f39 - changed mandir to /usr/share/man according to FHS
- added libdir (usr/lib) to the list of files
2002-11-02 16:09:36 +00:00
Stanislav Shwartsman
0e60aa8232 We will need integer saturation functions also in SSE2 instructions 2002-11-02 12:35:33 +00:00
Stanislav Shwartsman
22d292d83f Detalized XMM register definition for BIG/LITTLE endian systems 2002-11-02 12:09:27 +00:00
Bryce Denney
0c734d9a4d - commit patch [ 629157 ] MacOSX Carbon Plugin Cleanup
by Jeremy Parsons <brefin@mac.com>
- modified: configure.in configure Makefile.in main.cc
2002-11-01 17:53:52 +00:00
Bryce Denney
428b686df6 - commit patch [ 630863 ] Fix and integrate MacOSX cdrom
by Jeremy Parsons <brefin@mac.com>
  http://sourceforge.net/tracker/index.php?func=detail&aid=630863&group_id=12580&atid=312580
- modified: iodev/cdrom.cc configure.in configure
- removed: iodev/cdrom_osx.cc
2002-11-01 16:36:27 +00:00
Bryce Denney
8ab3a76bbf - remove tabs 2002-11-01 16:30:53 +00:00
Bryce Denney
1533c6df2c - remove tabs 2002-11-01 15:28:41 +00:00
Bryce Denney
6663c6e806 - fix segfault in "info linux" command0 2002-11-01 15:22:20 +00:00
Bryce Denney
c6d6b17c9a - fix wxWindows on win32, which was broken when we added plugin support.
- 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
2002-11-01 15:19:48 +00:00
Bryce Denney
692ee03065 - add "--export-all-symbols" to the dlltool line that produces bochs.def.
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.
2002-11-01 13:44:43 +00:00
Bryce Denney
9dfbfdde8f - patch from Hartmut Birr to adjust win32 search path order. 2002-11-01 13:21:12 +00:00
Bryce Denney
c0573cfe0a - add win32 specific print code, so that we can see the exact error that
Windows produces.  This is SOMETIMES more useful than just saying
  "can't open".
2002-11-01 13:02:15 +00:00
Gregory Alexander
2b1feccd4e Typecasts help compile with VisualAge. 2002-10-30 23:58:03 +00:00
Gregory Alexander
33fb7c544f Moved things around and cleaned up the options a bit. 2002-10-30 23:54:29 +00:00
Christophe Bothamy
a15a0c5e80 This patch adds VGA write mode 2 support and includes various speed improvements posted by the author on the ml.
Please see patch content for detailed description of the changes.
2002-10-30 23:54:15 +00:00
Christophe Bothamy
a01e80c8d7 This patch adds real-bios-like keyboard init code.
However, it does not work, due to inaccuracies in Bochs
  keyboard model.
2002-10-30 22:44:28 +00:00
Christophe Bothamy
55fa06db79 - fix type of the counter used when waiting for signals in ata_reset. It may be > 0xff 2002-10-30 22:42:42 +00:00
Christophe Bothamy
ae220149ea - add wait states during disks reset, so the BIOS can reliably detect them.
patch from Adam Sulmicki.
2002-10-30 21:47:11 +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
Peter Tattam
ac49ea2418 Patch to fix DOS based packet drivers that use an odd count for the NE2000
DMA.  Should print error message but allow to continue.  (bochs log will
show DMA underrun for the last byte transferred).
2002-10-30 11:11:26 +00:00
Gregory Alexander
fc61a0522a Added support for run-time configuration of realtime PIT. 2002-10-29 22:26:32 +00:00
Bryce Denney
a6aa9afd67 - rename "control" to "textconfig". It was named when we called it
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
2002-10-29 20:18:32 +00:00
Bryce Denney
d8798fb799 - rename control.cc revision 1.66 to textconfig.cc 2002-10-29 20:17:05 +00:00
Bryce Denney
4442c9d28b - rename control.h revision 1.8 to textconfig.h 2002-10-29 20:16:04 +00:00
Bryce Denney
29875502af - warnings are all inside #ifdef __GNUC__ blocks now 2002-10-29 18:00:15 +00:00
Bryce Denney
f68a301b95 - revert to rev 1.7. I didn't mean to check in the previous rev, but
I only noticed just now.
2002-10-29 07:00:01 +00:00
Bryce Denney
e1db4c80bb - spelling fix in docs 2002-10-29 04:35:41 +00:00
Christophe Bothamy
a972ac9cdc - patch from Hartmut Birr, to create compressed image files up to 32GiB (NTFS only). 2002-10-28 21:46:21 +00:00
Christophe Bothamy
78f41adef1 - patch from Hartmut Birr :
. offset for the lseeks within the disk image class changed from byte to sector units.
  . support for disk up to 32GiB under Win32 (NTFS only).
2002-10-28 21:42:59 +00:00
Gregory Alexander
0201b362e1 Make the libtool --mode=link explicit for the main bochs link call.
This fixes a problem with linking under AIX.
2002-10-28 19:40:23 +00:00
Gregory Alexander
0987a6b2d8 bximage is a C program, not a C++ program.
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.
2002-10-28 19:19:46 +00:00
Gregory Alexander
0e390b33f6 Double semicolons are confusing VisualAge. 2002-10-28 18:36:53 +00:00
Bryce Denney
fe7e2f5912 - add srcdir and VPATH 2002-10-28 08:42:28 +00:00
Bryce Denney
98e37268fc - include standard path variables in gui and iodev. We were missing
libdir, which is now used as the PLUGIN_PATH.
2002-10-28 08:42:06 +00:00
Bryce Denney
8dc67c7623 - cygwin experiment. Since dlltool cannot accept any -I's or -L's,
I'm trying to split the link command into one variable of LDFLAGS
  and another variable of just objs and libs.
2002-10-28 08:24:24 +00:00
Bryce Denney
73c234b351 - add makefile rule for building SDL dll. It links the plugin with
the SDL library.
2002-10-28 08:20:12 +00:00
Bryce Denney
e164274d4a - add reference to page about -mno-cygwin option in cygwin 2002-10-28 07:36:57 +00:00
Bryce Denney
cb1c6b9db6 - remove tabs from dbg_main.cc
- put proper BX_CPU_LEVEL checks around uses of cr0-4
- fill in help message for "info"
2002-10-28 07:03:02 +00:00
Bryce Denney
8b8feb695b - fix [ 628806 ] debug: x/c prints unprintable chars
- example output:
  0xffff0 <bogus+240>: \xEA  [   \xE0 \0   \xF0  0    6    /
  0xffff8 <bogus+248>:  2    3    /    9    9   \0   \xFC \0
2002-10-28 06:31:05 +00:00
Gregory Alexander
dc46dfa784 Made PIT runtime configurable, except haven't added the bx_option line. 2002-10-28 05:55:47 +00:00
Bryce Denney
883442544c - we've been compiling a few extraneous plugins: wxdialog and wxmain.
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
2002-10-28 05:49:42 +00:00
Bryce Denney
fa56678dc0 - for win32 DLL plugin build, link with $(CDROM_OBJS) instead of writing
cdrom.o explicitly.  This makes it so that cdrom.o is only linked in
  when the configure script enables it.
2002-10-28 05:26:09 +00:00
Christophe Bothamy
b8bbe1c7c2 - compile rombios.c r1.74 2002-10-28 00:18:40 +00:00
Bryce Denney
db750f8234 - to make the "idle hack" compile again, add virtual function sim_is_idle
to bx_gui_c and to bx_x_gui_c.
2002-10-27 23:33:13 +00:00
Christophe Bothamy
d5443fcba3 - change offset of the answer to the identify device query where current disk geometry is read.
Thanks to Adam Sulmicki
2002-10-27 23:04:59 +00:00
Bryce Denney
4f53ba4e39 - bx_gui is now a pointer, so it needs to be 'bx_gui->' not 'bx_gui.' 2002-10-27 22:26:34 +00:00
Christophe Bothamy
ffc3d88be3 - compile rombios.c r1.73 2002-10-27 21:27:00 +00:00
Christophe Bothamy
814d8b69ef - add "none", "lba", "rechs", "large", "auto" translation
- 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
2002-10-27 21:25:33 +00:00
Christophe Bothamy
bd04f51748 - remove tabs from source code
- 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
2002-10-27 21:17:03 +00:00
Bryce Denney
8ff15654e8 - add #ifs around use of cr0-4, which didn't all exist on earlier cpus 2002-10-27 15:15:12 +00:00
Bryce Denney
1dfbe73deb - let's try "bx_cdrom" instead of "bx_cdom" 2002-10-27 13:28:30 +00:00
Volker Ruppert
e6348a579e - print an error message when the logfile cannot be opened and use stderr in
that case
2002-10-27 13:20:25 +00:00
Gregory Alexander
cc48301722 Fix for bug #628957
I accidentally left a debug define turned on.
2002-10-27 06:02:47 +00:00
Bryce Denney
954b737dda - apply MacOSX "About Box Patch" from Jeremy Parsons (Br'fin). This fixes
bug [ 626261 ] About Box is awkwardly outdated
2002-10-26 22:06:37 +00:00
Bryce Denney
ddd7d1c173 - there are three different actions related to cdrom. One for --enable-cdrom,
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.
2002-10-26 21:51:19 +00:00
Bryce Denney
dd7ad0449d - add missing LOG_THIS to fix compile problem reported by Timothy Schepens 2002-10-26 21:03:21 +00:00
Bryce Denney
99aa099b67 - we renamed the term 'VGA library' to 'display library' a while ago. I
fixed some lingering references to vga library.
2002-10-26 13:22:47 +00:00
Bryce Denney
4717b9bf13 - remove obsolete makefile 2002-10-26 13:19:06 +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
79831381de - fix compile problem in old PIT 2002-10-26 03:57:19 +00:00
Bryce Denney
31adc410b7 - fix compile problems in iodebug 2002-10-26 03:53:22 +00:00
Bryce Denney
35b51e3e4f - fix the register trace output which has had EBX, ECX, and EDX values
switched around ever since 1.61 when we started using accessors.  Ooops.
2002-10-25 20:04:40 +00:00
Stanislav Shwartsman
b84f0bd0f2 This was not a cleanup. Those macros were intentionally
there to offer a way to substitute more efficient code
to do the RMW cases.  At the moment, they just map to
the normal functions.

Sorry, restored the previous version ...
2002-10-25 18:26:29 +00:00
Stanislav Shwartsman
a0c1fd60e6 Just little cleanup of macro duplicating an existing code 2002-10-25 17:23:34 +00:00
Bryce Denney
48acd53db4 - all #warnings are now inside #ifdef __GNUC__ ... #endif
Modified Files:
    ltdl.c main.cc plugin.cc cpu/cpu.cc cpu/debugstuff.cc
    cpu/exception.cc cpu/fetchdecode64.cc cpu/init.cc
    cpu/paging.cc gui/siminterface.cc gui/wxmain.cc
    iodev/harddrv.cc
2002-10-25 12:36:44 +00:00
Bryce Denney
eba25386fd - change some #warnings into comments 2002-10-25 12:28:34 +00:00
Bryce Denney
c34fe7ea12 - add tests for plugins and various devices 2002-10-25 12:23:35 +00:00
Bryce Denney
357cf9845f - in rev 1.24 I broke the compile, because I was missing BX_CPU_THIS_PTR
before "mem".  This is fixed now.
2002-10-25 11:54:42 +00:00
Bryce Denney
13d1113b36 - this has been checked in now. removing. 2002-10-25 11:49:27 +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
605b88ec2f - the plugin merge broke all sorts of things in this patch. I cleaned
it up and this version applies cleanly again.  If testing goes well
  I will commit it ASAP.
2002-10-25 03:40:57 +00:00
Bryce Denney
6aa472fdb0 - add some tests that enable SSE
- add CFLAGS and CXXFLAGS, set to "-g -O2 -Wall"
2002-10-25 02:50:06 +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
d8aace9898 Remove the patch from CVS. To get the final plugins patch, do
cvs upd -p -r1.1 patches/patch.final-from-BRANCH_PLUGINS.gz > patch.gz
Then gunzip it and read it!

If all you are looking for is the change log, I will save you the trouble
and paste it in right here...

----------------------------------------------------------------------
Patch name: patch.plugins
Date: Thu Oct 24 16:19:04 EDT 2002
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)

GENERAL NOTES
- All the work on this patch was done in a CVS branch called BRANCH_PLUGINS.
  It was made into a patch mostly for documentation purposes.  You can find
  more details on many things mentioned here in the CVS logs for
  BRANCH_PLUGINS.
- Generally, this patch touches so many files and so many important variables
  that any file that has NOT been test-compiled might not compile anymore.
  We have tried to test every file, but there are some that we just can't
  test without help from others because we don't have every platform avaiable.
  During the bugfix/release process for 2.0 I hope we can get somebody to
  compile every file so that we don't release a broken 2.0.
- WARNING: I didn't diff the configure script, since it will almost always be
  rejected.  You must run autoconf after applying this patch.

USING PLUGINS
- add new configure option --enable-plugins, which turns on plugin support
- added 2 new bochsrc options that let you select which configuration
  interface and which display library you want to use:
    config_interface: control
    display_library: sdl
  There is one restriction though: if you want to use wxWindows at all,
  then it must be selected as both the config_interface and the
  display_library.  These two are not separable.  There could be
  strange interactions between other combinations of libraries that we
  haven't discovered yet.
- now you can configure with several different --with-* options at once,
  and select between them at runtime.  This works with or without plugins
  enabled.  Example:  configure --with-x11 --with-sdl --with-term.
  To choose between them use "display_library: name" in the bochsrc
- add new configure options --with-all-libs which tries to detect all the
  display libraries that can be compiled on your machine, and enables them
  all.  If the detection fails, you can always write a bunch of
  --with-PACKAGE options yourself.
- when you run Bochs, it needs to know where to find its plugins.  For now
  if the plugins are not stored in a default system library path, you need to
  set the LTDL_LIBRARY_PATH environment to a colon-separated list of
  directories to search in to find the plugins.  When you first build
  Bochs, all the plugins are in gui/* and iodev/*.  So this command would
  work (sh syntax):
      LTDL_LIBRARY_PATH=`pwd`/gui:`pwd`/iodev;  export LTDL_LIBRARY_PATH
  There is a slight variation for win32: use a semicolon instead of a
  colon to separate the directories in the list, and the directories should
  start with a drive letter and colon.  Example
      d:/bochs/plugins;d:/bochs-2.0/plugins

PLATFORMS
- on Win32 platforms, plugins currently work in Cygwin/MinGW but some more
  work is needed to support VC++.  The makefiles build .DLL files for
  the plugins using gcc and a program called dlltool.  Remember to
  use semicolons to separate dir names in LTDL_LIBRARY_PATH, and to
  list absolute directories starting with a drive letter.
- on MacOS X, plugins will only work correctly if you install the
  "dlcompat" library.  Dlcompat is part of the OpenDarwin project.
- Bochs plugins work on Linux and Solaris without any extra work.

CONFIGURE AND MAKE
- makefiles in gui and iodev directories have some new options and targets
  for building plugins.  First the object files are sorted into two groups,
  pluggable and non-pluggable.  When you are compiling with plugins, each of
  the pluggable object files is added to the list to compile as plugins.
  If plugins are disabled, all objects are put into a list to compile
  normally.
- remove MDEFINES from top level makefile
- add LDFLAGS to the @LINK@ variable that is set by configure
- add several plugin-related make targets in toplevel, gui, and iodev
  makefiles
- use libtool to build libraries: both static and shared.  Except on win32,
  libtool doesn't do the job so we just use gcc directly with help from
  a program called dlltool.
- use libtool's tiny LTDL library to provide a cross-platform interface
  to the functions that load shared libraries.  The LTDL sources are included
  in the Bochs source code now (ltdl.h and ltdl.c), and also the configure
  script generates ltdlconf.h.  Bryce has done some minor-to-medium intensity
  hacking on LTDL to make it work at all.  To see the changes, do cvs diff
  -r1.1.2.1 -r1.1.2.2 ltdl.c or look at the CVS logs of
  bochs-testing/plugin-test/libltdl/ltdl.c for details.
- add "BOCHSAPI" to every variable, function, and class that any plugin
  will need, for building win32 DLLs.  The BOCHSAPI macro is used
  for DLL building on win32 platforms.  In config.h it is defined as
  __declspec(dllexport), or __declspec(dllimport), or empty.  Config.h
  knows if it should be importing or exporting symbols by the BX_PLUGGABLE
  macro which is defined in all plugin files.

PLUGIN CONFIGURATION INTERFACES AND DISPLAY LIBRARIES
- a configuration interface is a set of menus that lets you change Bochs's
  settings.  You can choose between two configuration interfaces:
  the text mode menus, and the wxWindows graphical interface.
- A display library is the code that shows text and graphics on the
  virtual Bochs screen.  There are many different display libraries
  to choose from, for example X11, win32, BeOS, Carbon(MacOSX), SDL, etc.
  Except for wxWindows, all display libraries look pretty similar.  They
  create a window with a toolbar full of buttons at the top.
- The wxWindows port is BOTH a configuration interface and a display library.
  It has menus and dialog boxes (the config interface) and also a toolbar and
  virtual Bochs screen.
- now the standard main() is used ALL the time, even for wxWindows which
  used to define its own main in the IMPLEMENT_APP macro.  Now we always
  start in main(), and wxWindows uses the IMPLEMENT_APP_NO_MAIN macro.  It
  parses the command line and possibly the configuration file, then according
  to the setting of the param BXP_SEL_CONFIG_INTERFACE it starts the text
  config interface (control) or the wxWindows config interface (loading a
  plugin if necessary).  Now the config interface is responsible for
  starting the simulation at the appropriate time (by calling
  SIM->begin_simulation()), instead of returning and letting main start the
  simulation.  See cvs log for main.cc 1.156.2.14 for more details.
- wxmain.cc's MyApp::OnInit function is called later in the startup
  process than it used to be.  Now main() does the first few steps, such
  as calling bx_init_main(), and starts up the configuration interface
  when it's ready.  This means that the config interface does not get
  to control the messages that appear during command line parsing or
  loading of the .bochsrc.  It may have to change in the future.
- configuration interfaces now must define an initialization function that
  calls SIM->register_configuration_interface with a callback function.
  The callback function is called whenever Bochs needs a simulation
  interface.  This allows us to easily select between them, even when
  support for multiple config interfaces is compiled in.  wxWindows
  has been made into a plugin, but so far control.cc (the text config
  interface) has not due to some difficulties linking bochs without it.
- Bryce intends to rename control.cc to textconfig.cc or something more
  appropriate when the branch merge is done.  When it was created, it was
  called a "control panel" but now that term has been replaced by a
  "configuration interface".
- Each display library file (gui/win32.cc, gui/x.cc, etc.) defines a C++ class
  that descends from bx_gui_c.  bx_gui_c declares some of its methods virtual
  so that the child class can redefine the methods.  The virtual methods are:
  specific_init, text_update, graphics_tile_update, handle_events, flush,
  clear_screen, palette_change, dimension_update, create_bitmap,
  headerbar_bitmap, replace_bitmap, show_headerbar, get_clipboard_text,
  set_clipboard_text, mouse_enabled_changed_specific, and exit.  Also,
  each file needed a plugin_init, which creates an object of the right
  type and sets the global "bx_gui" to it, and a plugin_fini which
  (theoretically) cleans up afterward.  These turned out to be so similar
  that they are defined in a macro called IMPLEMENT_GUI_PLUGIN_CODE(gui_name).
  (As usual, wxWindows is different and needs its own plugin_init and fini
  since it provides both a configuration interface and a display.  It
  registers a config interface and calls MyPanel::OnPluginInit, which is
  in wx.cc, to create a bx_wx_gui_c and set the bx_gui pointer.)
- removed the first argument of bx_gui::specific_init method because it
  is no longer static.  In a virtual method, you always know who "this" is.
- bx_gui::get_sighandler_mask() and bx_gui::sighandler() are always present,
  defined as virtual methods that do nothing.  In term.cc only, they are
  redefined to do whatever term needs to do with them.  This solves problems
  with undefined symbols when you enable term support.
- The various display libraries used to all redefine bx_gui methods instead
  of virtual methods of their own subclass.  This made it impossible to
  compile multiple guis at once.  Because they are all child classes with
  different names, any number can be linked into a binary at once.  This was
  important for plugins, but even without plugins it allows us to compile
  in support for many display libraries and select them at runtime.
- in siminterface, added register_configuration_interface and
  configuration_interface.  The register method is called by the
  init function of a configuration interface (control.cc or wxmain.cc)
  to tell siminterface what function to call when someone wants to start
  the config interface.  To start it, you call configuration_interface(),
  which calls the callback function set up by that init function.
- in siminterface, is_sim_thread, set_sim_thread_func.  These replace the
  global isSimThread function.  I had to make something that was
  1) available if wxWindows was compiled in, compiled as a plugin and
  either loaded, or not., and 2) did not have any link time references
  to wxWindows files.  As with other things, when wxWindows initializes
  it calls SIM->set_sim_thread_func() with a callback function.  When
  anyone calls SIM->is_sim_thread() it calls the callback function, or if
  it hasn't been installed yet it always returns true.

PLUGIN DEVICES
- Plugin devices are not as uniform as plugin display libraries.  There
  are many of them that interact, some provide special functions that other
  devices can call like bx_pic::raise_irq(), and some have to be initialized
  before or after others.  Our implementation of plugin devices works like
  this:
  - each device provides a plugin_init method and a plugin_fini method
  - the plugin_init method can initialize any number of devices and they
    should be "registered" by calling BX_REGISTER_DEVICE_DEVMODEL().
  - all plugin devices descend from a class called bx_devmodel_c.  The devmodel
    class is made up of virtual functions which tell the operations that we
    should be able to do on ANY device.  The real implementation of a device,
    in a child class, will override these methods to implement the real
    behavior of that device.  As an example, the C++ class heirarchy for the
    keyboard device looks like this:

      logfunctions
      |
      +-- bx_devmodel_c
          |
          +-- bx_keyb_stub_c
              |
              +-- bx_keyboard_c

    Logfunctions provides logging capabilities.  bx_devmodel_c provides a
    uniform interface for dealing with any device without even knowing which
    one it is.  bx_keyb_stub_c defines the interfaces that all external
    functions and objects can use, but the implementation of those interfaces
    just does a panic saying that you forgot to load the keyboard plugin.
    Finally, bx_keyboard_c implements all of the missing methods.
  - for devices that provide special functions that other devices can call, we
    make a "stub" class in iodev/iodev.h which has virtual functions that just
    print a panic or warning message.  The real device will create a subclass
    of the stub, which redefines the virtual methods with the actual
    implementation.  This means that we can install an instance of the stub if
    the plugin is not loaded to catch any calls to the device (it's that
    or a segfault).  When the plugin is loaded, we replace the stub with a
    pointer to the real class.  Virtual functions are equivalent in performance
    to setting up function pointers, but the syntax is cleaner and the compiler
    helps to enforce correct usage.
  - because of limitations of shared libraries on some systems such as
    Solaris, it is not safe to rely on global variable constructors being
    called.  So if you write "bx_my_device device;" as a global variable,
    on Solaris the constructor(s) for bx_my_device will not ever be called.
    That's why in the plugin_init function we explictly create the object
    with the "new" operator.
  - every file that can be compiled as a plugin should define BX_PLUGGABLE
    before including config.h.  This is used when building win32 DLLs.
- in plugin.h, define macros for basically every inter-device function,
  for example DEV_dma_register_8bit_channel, BX_MEM_READ_PHYSICAL,
  DEV_hd_read_handler, etc.  The macros are used everywhere instead
  of the direct call to the device, because the macros are designed to
  do the right thing even if the plugin is not loaded.  This is necessary
  even for devices that will always be loaded, but we want to make them
  into a plugin.  Otherwise we can't link bochs because of references to
  undefined symbols.
- in iodev/devices.cc, device plugins are loaded if they are needed.  At
  the moment we still load almost all of them all the time, but it doesn't have
  to be that way.  Serial and Parallel devices are loaded only if they
  are enabled in the bochsrc/config interface.  Devices that can be compiled
  as plugins are called plugin*.  Devices that have not been converted to
  plugins still have their old names like sb16, pit, ne2k.  At the end
  of the bx_devices::init() function we call bx_init_plugins() which
  calls the init function of devices created in plugins.  (Not every
  device, see core plugins vs. optional plugins.)  At the end of
  bx_devices::reset() we call bx_reset_plugins() which calls the reset
  function of devices created in plugins.
- core plugins vs. optional plugins vs. user plugins
  - core plugin: These are so fundamental that Bochs can't even initialize
    without them, for example the CMOS.  The user can substitute his own
    equivalent plugin to replace the CMOS, but he cannot say "Don't load the
    CMOS at all."  Core plugin devices are initialized and reset explictly by
    code in iodev/devices.cc, since the initialization order for some of them
    is critical.  They are currently NOT added to the device list in
    pluginRegisterDevice and pluginRegisterDeviceDevmodel, so that the plugin
    system does not call init() and reset().  If a core plugin cannot be found,
    Bochs will panic.
    (NOT DONE) In the bochsrc we could easily provide a way for the user to
    replace a core plugin with a different plugin that implements the same C++
    interface.  This is not implemented yet.  Example bochsrc line:
      replace_core_plugin: old=pic, new=mypic
  - optional plugin: These can be loaded or not, without affecting Bochs's
    ability to start up and simulate.  Initialization and reset for all
    optional plugins are handled by bx_init_plugins() and bx_reset_plugins(),
    which are now called from bx_devices_c::init() and bx_devices_c::reset().
    Bochs knows how to configure optional plugins at compile time, and they are
    loaded only if the configuration settings enables the device.  Examples:
    serial, parallel.  See the call to is_serial_enabled() in iodev/devices.cc.
    There are some "optional" plugins that you might not ever want to leave
    out, like vga.  Maybe the term optional is not clear and we need to think
    of a better name.  Bochs will panic if an optional plugin cannot be found.
    If the plugin was compiled, then it should be available at runtime too!
  - (NOT DONE) user plugin: These are plugins that Bochs does not know
    anything about at compile time.  The user asks Bochs to load a plugin
    using just its filename.  It loads the plugin and (somehow) gets
    information about what settings the user can configure.  The settings are
    adjusted by either bochsrc lines or the user interface, and then the
    device can be used.  User plugins will probably not be supported until
    after v2.0.
  - These categories might change over time, and more may be added.  We have
    to start somewhere.
- the keyboard timer handler used to control all sorts of things that had very
  little to do with the keyboard!  For example, it would call SIM->periodic()
  and bx_gui->handle_events() to make the gui update when it was supposed to.
  This has been moved into iodev/devices.cc instead.  It didn't really belong
  in the keyboard model, and what if you wanted to simulate with no keyboard
  one day?
- in devices.cc, added the concept of a default I/O handler.  Before, the
  "unmapped" device was initialized first and it would register every single
  I/O port in the whole 64k address space, then other devices would claim the
  ones that they needed.  Now it works differently.  Now, the unmapped device
  registers the default I/O read handler and the default I/O write handler,
  which are represented by BX_DEFAULT_IO_DEVICE.  This is from an email
  conversation with Christophe
  >   Sooner or later, we will need to unregister some ioport handler, because
  > some ports can be moved around the io architecture (for example the PCI
  > IDE Bus Master ioports).  Bochs can not do this at the moment.
  > ...
  >   When another device claims the io address, we change the handler
  > number to the one of the new function.  This behaviour is compatible with
  > the old one.
  >   But when we'll need to unregister an io address handler, we will just
  > reset the handler number to BX_DEFAULT_IO_HANDLER so unmapped is called
  > again when the io port is accessed.
  >   This way, we can have Bochs devices register/unregister/re-register
  > their handlers.
- device init() methods no longer have an argument.  We used to pass in
  a pointer to the global variable bx_devices, which each device would
  (usually) dutifully store and use instead of using the global symbol,
  but it wasn't helping much.  If we start to simulate more than one
  PC at once (who knows? it might happen) then maybe we'll add it back.

BUG FIXES THAT ENDED UP IN THE PLUGIN BRANCH
(maybe should be checked in separately?)
- gdbstub should not call bx_parse_cmdline anymore
- check SIM->get_init_done before calling DEV_kbd_paste_delay_changed.
- in all makefiles move $(BX_INCDIRS) to the front.  Otherwise you can
  accidently get config.h or other important includes from libraries
  when they put -Ipath into CFLAGS.
- add semicolon to the end of a BX_INFO for XADD_EdGd in arith32.cc
- make control.cc ignore BX_ASYNC_EVT_REFRESH and BX_ASYNC_EVT_DBG_MSG
  instead of sending them to default: which prints a warning.
- remove memset(&s, 0, sizeof(s)) in bx_keyb_c constructor.  This memset
  was wiping out some of the fields of the parent class (logfunctions).

Patch was created with:
  cvs diff -u
Apply patch to what version:
  cvs checked out on DATE, release version VER
Instructions:
  To patch, go to main bochs directory.
  Type "patch -p0 < THIS_PATCH_FILE".
----------------------------------------------------------------------
2002-10-24 20:43:08 +00:00
Bryce Denney
cf73a42456 This patch contains all the diffs from the CVS branch called BRANCH_PLUGINS,
and a very detailed description of what was changed.  These changes will
be checked into the CVS trunk momentarily.

Then I will remove the patch, but it will stay around in CVS history
forever as documentation of what we have done.
2002-10-24 20:37:37 +00:00
Bryce Denney
026e0da7fe - removed. This is highly obsolete now. 2002-10-24 20:09:49 +00:00
Bryce Denney
6f49d51996 - avoid crash if BX_CPU_C::debug() called while mem is NULL 2002-10-24 06:26:37 +00:00
Bryce Denney
491b05d4bc - add missing BX_CMOS_THIS to fix the previous rev 2002-10-23 19:37:36 +00:00
Bryce Denney
279901987c - extra {}'s no longer needed now that Volker cleaned up the char* mess
in rev 1.29
2002-10-23 18:59:25 +00:00
Bryce Denney
ab70c14ec6 - print time value that was used for this simulation, in case you want to
set time0 later to duplicate it
2002-10-23 15:50:59 +00:00
Bryce Denney
ffba22d72b - make BX_MAX_TIMERS a function of the number of processors, since each
processor's local apic registers one.  Now BX_MAX_TIMERS is
  (15+BX_SMP_PROCESSORS)
2002-10-23 15:13:10 +00:00
Volker Ruppert
c43564368a - remove trailing spaces from text snapshot
- incrementing variable txt_addr simplified
2002-10-22 17:30:54 +00:00
Bryce Denney
070603cb4d - in gdbstub, the cpu and memory were referred to in some nonstandard ways
such as bx_cpu and bx_mem.  I changed them to BX_CPU(0) and BX_MEM(0).
- we still don't have correct support for debugging with multiple processors,
  so I added a check in bochs.h that will abort the compile if you try
  on GDBstub and processors>1.  If/when gdbstub supports multiple processors
  we can remove this check.
- also I brought attention to, but did not fix, the line that sets
  sockaddr.sin_len = sizeof(sockaddr).  On Linux, sockaddr.sin_len does
  not exist so we have to remove the line.  Since Stu Grossman added this line,
  I've asked him to test without the line and let me know if it works.
- modified: gdbstub.cc, bochs.h
2002-10-22 12:50:56 +00:00
Christophe Bothamy
957e1b5abe - fix bug [ 625676 ] VC++ do not support S_ISBLK. Block devices are not supported on win32 anyway. 2002-10-21 23:51:49 +00:00
Bryce Denney
b43ca82b5e - in debug message, mention WHICH reserved register was written 2002-10-21 16:57:35 +00:00
Bryce Denney
7f8b965243 ----------------------------------------------------------------------
Patch name: patch.macosx-console-launch-script
Author: Jeremy Parsons <brefin@mac.com>
Date: Wed Oct 16 2002

Detailed description:

Since the Carbon gui does not yet have a console window of its own, then it
can't be configured from the gui (only the command line) and stdout/stderr both
go to the console. As a shortcut, I offer this patch consisting of this file and

build/macosx/script.data
build/macosx/script.r
build/macosx/bochs.applescript

script.data and script.r are taken from a script compiled into an application.
Flattened out to be checked in. (osacompile can produce runnable scripts, but
wants to create them for the classic environment, so I use these files as part
of a workaround)

When bochs.app is built, it also builds bochs.scpt. To use bochs.scpt you put
both bochs.app and bochs.scpt into the directory with your bochsrc.txt.

bochs.scpt is an applescript that when run notes the current directory, then
tells the terminal application to open a window, cd to the current directory,
and run bochs from the commandline.
----------------------------------------------------------------------

Modified Files:
  Makefile.in
Added Files:
  build/macosx/bochs.applescript build/macosx/script.data
  build/macosx/script.r
2002-10-21 11:38:38 +00:00
Bryce Denney
37be797307 - bochsdbg is an OPTIONAL install target. I build a bochsdbg.exe manually
when making windows releases, and copy it into the build directory.
  However, since some make programs (e.g. freebsd)  are giving errors when
  bochsdbg is not found (in Linux it just gives a little warning), I have tried
  to do it in a more clean way.  I put bochsdbg into an "optional" install
  list, and put a minus before the line that installs optional files.  This
  should cause make to ignore any errors that occur while trying to install the
  optional ones.
2002-10-21 11:28:37 +00:00
Bryce Denney
9297b17797 - in main.cc make the bochsrc parser a little more lenient about
empty pathnames, zero cylinders, etc.  It doesn't seem fair to allow
  people to write out bochsrcs that they cannot read back in without
  patching them up by hand!
- in harddrv.cc add the equivalent checks with BX_PANICs so that at least
  we don't start simulating with incomplete device configuration.
- make a few error messages more clear
- modified: main.cc iodev/harddrv.cc
2002-10-21 11:22:26 +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
8047b68ba2 - in a recent revision, I made bx_param_num_c::get() return a 64 bit
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
2002-10-21 01:05:53 +00:00
Bryce Denney
984905c73a - revert previous rev. There is nothing dangerous about it, but I
decided to make bx_param_num_c::get() return 32bit integers again
  instead of trying to find every single case that was broken when
  I changed bx_param_num_c::get() to return a 64bit integer.
- as soon as get() returns 32 bit values again, the changes in the previous
  rev is are unnecessary.
2002-10-21 00:59:17 +00:00
Bryce Denney
78f4f9a1e5 - add int typecast to fix segfault, which was caused when I turned all
integer parameters into 64 bit values.
2002-10-21 00:34:04 +00:00
Volker Ruppert
f88e594dc2 - do a dimension update in text mode when the maximum scan line register has
changed. This changes the font height of the gui.
2002-10-20 13:18:21 +00:00
Stanislav Shwartsman
466a3226f5 FXSAVE/FXRSTOR stubs defined in sse.cc 2002-10-19 21:47:28 +00:00
Stanislav Shwartsman
277f14dd76 Implemented PMOVMSKB_GdPRq instruction (SSE) 2002-10-19 21:46:07 +00:00
Stanislav Shwartsman
63ac78d496 Implemented MOVNTQ instruction 2002-10-19 21:28:50 +00:00
Stanislav Shwartsman
82c879717c add prepareSSE for SSE2 only. SSE2 only not allowed by configure script but for debug issues it may be useful to enable SSE2 only ... 2002-10-19 21:01:24 +00:00
Stanislav Shwartsman
6cd078b777 Add opcode name to the information message in case of MMX/SSE/SSE2 instruction is not supported 2002-10-19 20:58:18 +00:00
Stanislav Shwartsman
21201bc237 Add opcode name to the information message in case of MMX/SSE/SSE2 instruction is not supported 2002-10-19 20:16:42 +00:00
Bryce Denney
8263030457 - remove call to "put()" which is no longer accessible now that eth_pktmover_c
doesn't descend from logfunctions anymore.
2002-10-19 19:14:57 +00:00
Christophe Bothamy
fd81d2c4cb - compile bios from rombios.c r1.70 2002-10-19 17:09:25 +00:00
Christophe Bothamy
17faa94c65 - add a pushad_regs_t structure, similar to pusha_regs_t
- change int 15 function to get a pushad_regs_t parameter
  instead of the registers enumeration
- change in int 15 references to 32bits,16bits and 8 bits
  registers to their pushad_regs_t counterpart
2002-10-19 17:08:17 +00:00
Volker Ruppert
3b75ad3200 - function reset() clears the IRQ line 2002-10-19 08:21:24 +00:00
Bryce Denney
1f44d32cff ----------------------------------------------------------------------
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.
----------------------------------------------------------------------
2002-10-18 11:46:19 +00:00
Christophe Bothamy
869519eef6 - This patch is not needed for block device access, so I remove it 2002-10-18 10:29:46 +00:00
Bryce Denney
d87480bb03 - SIM->debug_get_next_command () can return null. Now when it does,
we avoid the segfault!  The NULL in charptr_ret will cause the
  debugger read loop to quit.
2002-10-17 15:48:55 +00:00
Christophe Bothamy
9be41f5f55 - add check forbiding block devices if --enable-split-hd 2002-10-17 07:04:45 +00:00
Bryce Denney
69da0e6c28 - 2nd try to get this delete line right. delete [] charptr_ret. 2002-10-16 22:20:32 +00:00
Stanislav Shwartsman
c5f0ef8c76 Removed duplicated definition of BX_SEG_REGS 2002-10-16 22:10:07 +00:00
Stanislav Shwartsman
ee0ec5908e Removed the patch because it was already implemented by other way 2002-10-16 21:55:27 +00:00
Bryce Denney
d401c8e23b - fix incorrect use of delete ptr in text mode debugger. It should
say "delete [] text" since it is an array of chars.
2002-10-16 21:37:06 +00:00
Bryce Denney
8be0d6089b - I did "delete ptr" instead of "delete ptr[]". Thanks to sandos and
our good friend valgrind.
2002-10-16 21:32:56 +00:00
Bryce Denney
4fc294ce2b - I was having compile problems because when BX_DEBUGGER==0 the declaration
of the DebugLogDialog class was turned off by an #if.  Now the methods are
  turned off by the same condition.
2002-10-16 20:39:43 +00:00
Bryce Denney
b33bd11321 - minor cleanup of output messages and help 2002-10-16 20:19:36 +00:00
Volker Ruppert
21b8955a4e - userbutton shortcut feature improved. The shortcut string can be a combination
of these key names: "alt", "ctrl", "del", "esc", "f1", "f4", "tab", "win".
  Up to 3 keys can be pressed at a time.
2002-10-16 19:50:27 +00:00
Bryce Denney
9d44d4e473 - the check for wxWindows/debugger/readline is obsolete, so I removed it 2002-10-16 19:42:24 +00:00
Bryce Denney
f6c637aa8a - upgrade bx_param_num to use 64 bit values, so that I could make
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
2002-10-16 19:39:27 +00:00
Bryce Denney
ac9f370975 - shouldn't have default values for method parameters in the .cc! oops.
Thanks to sandos for pointing this out.
2002-10-16 19:27:17 +00:00
Stanislav Shwartsman
194952a53d Merged BOCHS-SSE branch 2002-10-16 17:37:35 +00:00
Bryce Denney
7313a837d4 - let configure script find the stinkin compiler. Br'fin says that
C++ links were failing because this script set CXX=cc.
2002-10-16 16:35:19 +00:00
Volker Ruppert
35225ed64d - the keyboard mapping feature for wxbochs (wxGTK version) now works with the
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
2002-10-16 16:32:55 +00:00
Christophe Bothamy
75ae39ed8b - update to the blkgetsize patch :
There was a POTENTIAL RISK for your HARDDISKS with the previous
patch because it updated the concat_image_t object (BX_SPLIT_HD is on
by default). The behaviour of BX_SPLIT_HD is to open all filenames
incrementing the last letter. Guess what follows /dev/hda ?

You may now access block devices from within bochs, only
if --disable-split-hd is configured.

It has only been tested on linux and a WinNT guest.

There are issues with the current bios CHS translating scheme and
the guest OS translating scheme. For example my compaq system translates
a physical     38792/16/63 20GiB harddrive to
a logical      2586/240/63, which does not follow the bitshift algorithm.
I had to find a different PCHS that would translate in a compatible LCHS
I still have to investigate further, but I'm afraid everything I can do
will break some systems or the others.

Those issues should be explained in the documentation.
2002-10-16 14:40:46 +00:00
Christophe Bothamy
4ec9e8d5b1 - compiled rombios.c rev1.69 2002-10-16 14:05:28 +00:00
Christophe Bothamy
ec595a7d9b - limit the logical chs heads count for disks > 8GiB to 256
- limit the logical chs cylinders count for disks > 8GiB to 1024
- fix a missing parameter in a BX_INFO
2002-10-16 14:04:41 +00:00
Christophe Bothamy
80caacdb40 - compiled rombios.c rev 1.68 2002-10-16 07:40:09 +00:00
Christophe Bothamy
fcc1cd5195 - add int15 function 0xe820 (from osmaker)
- add int15 function 0xe801 (from Hartmut Birr)
- add amount of extended memory in 64KiB block to cmos regs 0x34 and 0x35
2002-10-16 07:38:37 +00:00
Bryce Denney
f05b2649f4 - on WIN32 platforms, ask user to press a key before it exits. Otherwise,
if you run it by double-clicking, the window will disappear before
  you have a chance to read it.
2002-10-15 20:47:43 +00:00
Bryce Denney
0afccdd6a2 - this is in cvs now 2002-10-15 17:41:40 +00:00
Bryce Denney
37a3d48c0a - In second rev of this patch, I fixed Carbon compile problems that I
created in the first rev.  When you're talking to Carbon libraries,
  of course you should use Boolean instead of bx_bool.  My global
  search and replace missed such subtleties.
2002-10-15 17:24:05 +00:00
Volker Ruppert
5e2cbe04bf - implementation of the keyboard mapping feature for wxbochs (wxGTK version)
- German keymap table for wxbochs (wxGTK version)
2002-10-15 16:48:10 +00:00
Bryce Denney
383f2a5700 - add patch that replaces all Booleans with Bochs specific type bx_bool.
This avoids naming conflicts, since no other library is likely to
  use bx_bool.
- I will apply this before release 2.0, but not until the feature freeze
  has begun, because it will break almost every patch.
2002-10-15 05:50:41 +00:00
Bryce Denney
2271ef7779 - update info for Bernd Korz 2002-10-15 05:17:19 +00:00
Bryce Denney
d1196d1996 - clean up the command line argument parsing. Before, we had two slightly
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
2002-10-14 13:37:20 +00:00
Bryce Denney
bb9fd8ae22 - strncpy not guaranteed to null terminate, so do it. 2002-10-14 13:31:25 +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
Bryce Denney
d39ccd1003 - no longer needed now that wxWindows 2.3.3 is released 2002-10-13 22:08:42 +00:00
Christophe Bothamy
b0972a74a4 - deleted since it's been included in main code long ago 2002-10-13 21:59:34 +00:00
Christophe Bothamy
87337ac2a2 - delete patch as it's been included in main code long ago 2002-10-13 21:58:24 +00:00
Volker Ruppert
ae0bb040d9 - in VERR / VERW function: changed BX_ERROR to BX_DEBUG. According to the i386
opcode description there is no error present.
2002-10-13 15:34:49 +00:00
Volker Ruppert
90e861cf97 - 3 missing GDK keysyms added 2002-10-13 11:07:44 +00:00
Volker Ruppert
df6512abd5 - check for the platform WIN32 instead of the gui
- FIXME: the symbols 'BX_WITH_MACOS' and 'macintosh' both appear in the floppy
  code. I don't know what's okay there.
2002-10-13 09:40:05 +00:00
Volker Ruppert
0a89fc3352 - sequencer reset bits renamed to 'reset1' and 'reset2'
- default value of the sequencer reset bits is 1 (no reset)
- sequencer reset flag 1 resets the charmap select register when cleared
- skip the screen update when the sequencer is in reset mode (h/v sync and
  video ram refresh are disabled in that case)
- don't clear the memory update flag before the update is done
- skip the text screen update when the character height is set to 1 (MSL = 0)
- sequencer debug messages updated
2002-10-13 08:14:31 +00:00
Volker Ruppert
53ceefc3c7 - keysym for the "AltGr" key added (SDLK_RMETA = BX_KEY_ALT_R) 2002-10-12 13:10:09 +00:00
Volker Ruppert
8eafe97e14 - check for the platform __BEOS__ instead of the gui
- fixed a warning
2002-10-12 13:09:32 +00:00
Volker Ruppert
fb6fe521a2 - the "AltGr" key on European keyboards works now (wxbochs on win32 only) 2002-10-12 09:04:50 +00:00
Stanislav Shwartsman
b4f1a57924 Merged BOCHS-SSE branch with latest main trunk sources 2002-10-11 17:56:56 +00:00
Kevin Lawton
491ca837f9 Fixed double quadword routines to work for little or big endian hosts. 2002-10-11 16:18:00 +00:00
Kevin Lawton
cffded3829 Simple implementations of the new double quadword functions in
access.cc for SSE[2] implementation by Stanislav.
2002-10-11 13:55:26 +00:00
Bryce Denney
14f9f230a8 - in OR_ALIb the local variable "sum" was changed to "result" but the
non-host-asm line at the end still said "sum".  Fixed.
2002-10-11 13:50:14 +00:00
Bryce Denney
be8db98f49 - applied in cvs 2002-10-11 13:21:34 +00:00
Bryce Denney
909b3104d9 - replace autoconf standard AC_SYS_LARGEFILE with wxWindows's AC_SYS_LARGEFILE
that actually works.
- modified: configure.in configure
- added:: aclocal.m4
2002-10-11 13:21:15 +00:00
Bryce Denney
d54402bfbd - this patch creates a new configure test which detects largefiles flags
correctly.  It is based on code from wxWindows, so I have asked
  Vadim Zeitlin for permission to include it.
2002-10-11 05:01:38 +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
Volker Ruppert
445638e312 - new German keymap for SDL on X11 2002-10-10 18:30:16 +00:00
Volker Ruppert
a68e648853 - use keyboard mapping for keyup messages too 2002-10-10 18:02:08 +00:00
Bryce Denney
af6299e1d4 - make menu text more clear: now it says "Debug Console" instead of "Show Log"
- modified: gui/wxmain.cc gui/wxmain.h
2002-10-10 15:44:34 +00:00
Volker Ruppert
45720388bf - fixed some keymap entries 2002-10-09 18:08:42 +00:00
Volker Ruppert
e6f50cfabb - ascii chars are always Bit8u values (Bit32s has generated negative values for
codes > 0x7f)
2002-10-09 17:49:44 +00:00
Stanislav Shwartsman
30060682c1 Removed duplicate depencies list for mmx.cc 2002-10-08 21:31:56 +00:00
Stanislav Shwartsman
718d6e9814 Little bug fix 2002-10-08 21:30:50 +00:00
Bryce Denney
f133c6d1d0 - avoid a potential deadlock: if waiting for a sync response, stop waiting
if the gui wants to close.
2002-10-08 18:28:58 +00:00
Christophe Bothamy
cf33240efc This patch adds Tekram DC280E VLB-IDE support to Bochs.
This card has 2 ata channels, so this would be better
than the promise DC2300.  It also has drivers for win95,
available on tekram website.

Many thanks to Volker for fixing the interrupt bug!
It solved the problem I had with this patch...
2002-10-08 15:02:23 +00:00
Peter Tattam
b968c4e5c8 Latest round of patches/fixups to get 64 bit emulation further.
This is an interim update to allow others to test.

We have userland code running!!! (up to a point)

Able to start executing "sash" as /sbin/init in userland from linux 64 bit
kernel until it crashes trying to access a null pointer.  No kernel panics
though, just a segfault loop.
2002-10-08 14:43:18 +00:00
Bryce Denney
faff1d8715 - There can be no doubt that this is thoroughly out of date. 2002-10-08 07:29:21 +00:00
Bryce Denney
2fe9b943b6 - tweak parameters, at request of Bernd Korz 2002-10-08 07:09:58 +00:00
Bryce Denney
c74b8c55fc - add key mapping for SDL gui, to demonstrate/verify that key mapping is not
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
2002-10-08 06:14:53 +00:00
Kevin Lawton
b8d7f5c88e Moved the asm() statements from the arithmetic instruction emulation
into inline functions with asm() statements in cpu.h.  This cleans
  up the *.cc code (which now doesn't have any asm()s in it), and
  centralizes the asm() code so constraints can be modified in one
  place.  This also makes it easier to cover more instructions
  with asm()s for more efficient eflags handling.
2002-10-07 22:51:58 +00:00
Bryce Denney
0dd8da13d5 - Always enable the line that does
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.
2002-10-07 17:18:04 +00:00
Volker Ruppert
d460ec396a - harddisk controller interrupt must be enabled after a reset and the
completion of a read or write operation
- int13_harddisk function 0x00 calls ata_reset()
2002-10-07 16:16:04 +00:00
Bryce Denney
77a2d3fc89 - fix bug 619320 "wx: clicking mouse enable btn different". Now both
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
2002-10-07 04:49:50 +00:00
Bryce Denney
84c33ec824 - I was getting occasional thread bugs and crashes when I click on
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
2002-10-07 04:01:00 +00:00
Kevin Lawton
d7a16521c4 Replaced "return;" statements associated with bx_guard.special_unwind_stack
hack with longjmp() back to cpu.cc main decode loop, and added a
  check in there to return control when bx_guard.special_unwind_stack
  is set (compiling with debugger enabled only).

If in the debugger you try to execute further instructions
  (which you shouldn't), other fields need to be reset I would
  think, such as EXT and errorno, and have to make sure ESP/EIP
  are corrected properly.  Basically, this hack is only good
  for examining the current situation of a nasty fault.
2002-10-06 22:08:18 +00:00
Kevin Lawton
c6350caa48 Removed several "#if BX_CPU_LEVEL < 2" clauses, since stack64.cc
is only compiled for x86-64.
2002-10-06 21:38:02 +00:00
Stu Grossman
81f089da2e - Fix several bugs with uninitialized fields in sockaddr_in. Now this code
works under FreeBSD.
- Fix some formatting problems with long lines.
- Cleanup wait_for_connect().  Only set SO_REUSEADDR once.  Reuse sockaddr for
  bind() and accept().
- Turn on TCP_NODELAY to speed up GDB remote protocol transactions.
- In bx_gdbstub_init(), remove `Communicating...' message.  Add a `Waiting...'
  message just before calling wait_for_connect() to give the user some idea
  that the emulator is waiting for something.
2002-10-06 20:43:02 +00:00
Volker Ruppert
3c769207e2 - fixed some warnings at BX_INFO, BX_PANIC, BX_ERROR and BX_DEBUG 2002-10-06 20:19:03 +00:00
Bryce Denney
849bb18274 - remove example lines that have # comments. the parser can't handle them. 2002-10-06 19:39:20 +00:00
Volker Ruppert
75ba36cb15 - fixed some warnings at BX_INFO, BX_PANIC, BX_ERROR and BX_DEBUG 2002-10-06 19:38:54 +00:00
Bryce Denney
555e1d03e1 - set the quit context to NULL after it is no longer usable. I don't want
anybody jumping back because the pointer was still lying around.
- modified: gui/wxmain.cc main.cc
2002-10-06 19:21:05 +00:00
Bryce Denney
c818baa0c9 - modified every I/O device so that it will not re-register its timers
if init() is called a second time.  This allows me to restart a
  simulation (wxwindows interface only) without restarting the whole
  application.
- modified: iodev/*.cc
2002-10-06 19:04:47 +00:00
Kevin Lawton
2baf4372d1 Got rid of Ctrl-M's in exception.cc, introduced with the
implementation of SYSCALL.
2002-10-06 18:05:21 +00:00
Bryce Denney
6dff398915 - remove tabs 2002-10-06 17:49:11 +00:00
Kevin Lawton
361835824c unregisterTimer() really frees the timer slot. Added a new field
in pc_system.h to flag each timer slot as being allocated or not.
  register_timer*() functions will claim a free slot if one
  exists before using one at the end of the list.  This will allow
  for this function to be called repeatedly and not have to run
  out of timer slots.
2002-10-06 17:29:22 +00:00
Bryce Denney
8ebc11df90 - use SDL_WarpPointer to keep the mouse from going outside the window.
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.
2002-10-06 17:17:14 +00:00
Kevin Lawton
8ef1a6b8b0 Added a function to un-register a bochs timer, in case a component
wants to free up that resource.

  unsigned unregisterTimer(int timerID);

Pass in the timer index received from the register function.  A return
  of 1 means success.  NOTE: you must make sure the timer is deactivated
  first.  Call deactivate_timer() to be sure.  A return of 0 means
  failure, though a panic is really generated.

For now, this function does not really free up the slot, but will soon.
2002-10-06 14:55:06 +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
346e2747d3 - fixed up ParamDialog to correctly handle "trees" of parameters. A
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
2002-10-06 02:37:28 +00:00
Bryce Denney
fdadda0ba8 - remove tabs 2002-10-05 23:11:59 +00:00
Volker Ruppert
d2c286797e - missing conditions for lower_irq() added:
* hardware reset
  * setting software reset bit to 1
  * writing to command register
2002-10-05 19:40:51 +00:00
Bryce Denney
78b179d97c - if we're going to print "dimension update", might as well say what the
new values are
2002-10-05 18:27:24 +00:00
Bryce Denney
f5e351f12d - fix serious color bug in UpdateScreen. Because it considered newBits
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.
2002-10-05 18:15:00 +00:00
Bryce Denney
b147067051 - palette_change must return 1 to indicate that a screen update is needed
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.
2002-10-05 17:45:48 +00:00
Bryce Denney
7f8482cc93 - revert previous revision 1.37. There is a really easy solution which
I will check in instead.
2002-10-05 17:42:51 +00:00
Bryce Denney
494d0784ac - when the colormap changes, any existing pixels on the screen of that color
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.
2002-10-05 17:24:20 +00:00
Volker Ruppert
7158dd8a11 - result data of the ATAPI command 'inquiry' fixed. The strings are padded with
spaces now.
- BX_PANIC at 'read multiple sectors' changed to BX_ERROR
2002-10-05 16:49:03 +00:00
Kevin Lawton
b1d2f7ae48 Added a return value to handleAsyncEvent() so that requests to
exit out of cpu_loop() and back to the caller can be honored.
  Previously, code in this function was a part of cpu_loop so
  a "return;" would already do that.  Now, a value is passed
  back to cpu_loop() to denote such a request, and then a return
  is executed from cpu_loop().

  I haven't tested this yet, but previously I must have broke
  certain debugging requests by moving the code to a separate
  function and not fixing the "return;" statements.
2002-10-05 14:51:25 +00:00
Bryce Denney
89cf45ec2d - remove tabs 2002-10-05 12:40:34 +00:00
Bryce Denney
f7b3ba2a76 - removed this patch because it was complete junk 2002-10-05 12:24:59 +00:00
Bryce Denney
4650017086 - remove AC_MSG_NOTICE([using $WX_CONFIG as ...]) because it looked like
an error message even though it was perfectly normal.
2002-10-05 12:07:51 +00:00
Peter Tattam
db0a37824c Fixed elusive APIC interrupt problems when bochs compiled for P6 or later.
Symptom:  Linux kernel 2.4.19 would hang in random places.  CPU still
running, but in dle loop.

Cause: if APIC interrupt occurred while a PIC interrupt was pending, the
PIC interrupt would be lost.  This is because either an APIC or PIC
interrupt would trash any pending interrupt event because INTR is only a state,
not an event queue.

Temporary fix: reworked apic.cc to have it's own copy of INTR state. cpu.cc now
checks for both cpu.INTR and local_apic.INTR.

Need to do further research to see if local_apic and pic can be integrated in such
a way as properly manage the combined effects of both devices accessing INTR state.
2002-10-05 10:25:31 +00:00
Volker Ruppert
4bdd5acaeb - calculation of the number vertical tiles added for all graphics modes.
- screen height of the graphics mode 640x350 fixed
2002-10-05 08:04:28 +00:00
Kevin Lawton
0d22bbafc2 Added a new function writeEFlags() which takes a 32-bit eflags
value and a change-mask, rather than passing all the boolean
  change flags as arguments.

Recoded the POPF instruction in flag_ctrl.cc to use the
  new writeEFlags() function, and to make it more sane.

Also, the old write_flags() and write_eflags() functions
  redirect to writeEFlags() for now.  Later, when we get
  back in a development mode, it would be better to make
  all calls use the new function and get rid of the old ones.
2002-10-05 06:33:10 +00:00
Bryce Denney
315e7064a2 - limit should be a 20-bit field, not a 16-bit field, coming from
bits 19:16 of high and then 15:0 of low.  This fixes
  bug #597737: info gdt broken: incorrect segment length
2002-10-04 23:16:48 +00:00
Bryce Denney
57e1762aa8 - fix register trace output. We want to print 0 or 1 for every boolean
flag, so it needs to call the getB accessor, not the get accessor.
2002-10-04 23:01:56 +00:00
Bryce Denney
d754550d47 - a boolean variable is represented by just 1 bit, 0=false or 1=true. We have
been using the Boolean type for a number of multi-bit fields on the
  assumption that it is actually many bits wide.  However, this assumption is
  unsafe and has caused some bugs that are hard to track down.
- in the Carbon library on MacOS X, Boolean is defined to be an unsigned char.
  This has been causing some of the EFLAGS accessors to fail (bits 8-31)
  because they depended on Boolean being 32 bits wide.  I changed these
  accessors to return Bit32u instead.  I believe that this will finally fix
  [ 618388 ] Unable to boot under MacOS X.
- It would be possible to create a bochs specific type for booleans (bx_bool),
  but it's cleaner to simply use "Boolean" when we actually mean a 1-bit true
  or false field, and Bit8u/Bit32u when it is a multibit field.
2002-10-04 22:25:22 +00:00