Commit Graph

290 Commits

Author SHA1 Message Date
Volker Ruppert
c658faf211 - direction flag added to control port, debug messages improved 2001-12-18 21:58:59 +00:00
Volker Ruppert
33f4ee6e35 - DMA-2 controller and dma16 read/write functions added 2001-12-18 13:12:45 +00:00
Volker Ruppert
5427df8b36 - fixed the vga memory read/write functions in text mode
- text mode cursor feature added
2001-12-13 18:34:30 +00:00
Christophe Bothamy
d7482737a9 . Added a keyboard_type option in the conf file
. Modified answer of keyboard controler to a keyboard-identify command
  depending on keyboard_type
. Added the keyboard_type option in bochsrc man page
2001-12-12 10:38:39 +00:00
Bryce Denney
45b303a2c0 - another small beos change from Bernd Korz. 2001-12-10 18:37:39 +00:00
Bryce Denney
dbf4e8d33e - do not panic on "OUTB set and command 0xaa encountered" 2001-12-08 14:02:57 +00:00
Bryce Denney
f82c3f9b86 - add a little bit of beos support 2001-12-08 13:07:07 +00:00
Bryce Denney
d2bf9cb219 - add support for raw CDROM under MacOS X, from
Scott Brumbaugh <scottcb@gte.net>
2001-12-07 21:56:15 +00:00
Bryce Denney
5ef3f7ca45 - add BeOS specific code from Bernd Korz 2001-12-07 18:58:24 +00:00
Volker Ruppert
aa297204b0 - setting led status works even if the keyboard is disabled 2001-12-05 20:36:03 +00:00
Bryce Denney
6a03773831 - I've had several reports of how to reproduce the 'slave OCW3 not implemented'
condition, so I've removed it now.
2001-11-27 18:15:39 +00:00
Volker Ruppert
2102016517 - MF-II identification and some missing keys added 2001-11-26 09:55:30 +00:00
Bryce Denney
e5a992a796 - master PIC ignores commands 0xc0-0xc7. This change just makes the slave
PIC ignore these same commands.  It does not implement the commands.
2001-11-19 14:41:03 +00:00
Volker Ruppert
6333bcd2a4 - changed some panics to errors, register behaviour and messages fixed 2001-11-17 18:10:54 +00:00
Volker Ruppert
820ca4b2a6 - cygwin compilation error fixed 2001-11-16 23:10:59 +00:00
Volker Ruppert
3f35c13958 Printer response works again if the config option is "enabled=0" or fopen() fails. 2001-11-15 23:35:26 +00:00
Bryce Denney
fea759a204 - apply patch.pci from Volker Ruppert. See
[ #481546 ] pci patch (Volker Ruppert) for any followups.
2001-11-14 01:39:22 +00:00
Bryce Denney
ed45dddd21 - Volker Ruppert's fix to keyboard typematic rate 2001-11-14 01:28:53 +00:00
Bryce Denney
aa13968341 - more improvements from Volker.
- fopen with "wb" so that win32 doesn't translate CRLF
    - add initmode setting
    - fix bug, fill in behavior in write handler
    - now it works for him with DOS, Linux, and Windows guests
2001-11-14 00:29:20 +00:00
Bryce Denney
3934cd370c - change a few "char"s to "const char", from Roland Mainz compile patch 2001-11-12 03:34:45 +00:00
Bryce Denney
94ba0f4ca4 - remove some "#if BX_DEBUG" lines. What are these anyway? They've
probably been treated as ifdef instead, but a sun compiler doesn't like
  them.  Anyway, they were being used around a check for irq_num > 15.
  This bounds check seems ok to do all the time, so I just removed the
  #if BX_DEBUG lines and corresponding #endifs.
2001-11-12 03:29:18 +00:00
Bryce Denney
c52fbaa3a7 - allow configuration of the parallel port in .bochsrc and the config
interface menus.  Parallel port #1 is implemented, and I left stubs for
  parallel port #2 in case we want to ever add it.  If the parallel port
  is enabled, the init method of parallel.cc does an fopen() on the output
  file.  If disabled, or if the fopen fails, the file handler remains
  NULL and no characters are printed.  There is no attempt to enable/disable
  the operation of the parallel port, only the output to a file.
2001-11-12 02:35:09 +00:00
Bryce Denney
1d94019ce0 - add comments saying who wrote most of this file
- add fflush after every character written to output file
2001-11-12 01:45:21 +00:00
Bryce Denney
a2efc4c5de - commit patch.parport from Volker Ruppert. I tested it by running
"copy FILE prn" in a freedos image.
2001-11-12 01:33:01 +00:00
Bryce Denney
0d632755fe - in read_toc, make all platforms use the same code if using_file==1. 2001-11-11 14:41:53 +00:00
Bryce Denney
88893a868d - Committed patch.pic-slave-special-mask to fix bug
[ #468340 ] pic:slave: OCW3 not implemented

  The service_master_pic() method supported special mask mode but
  service_slave_pic() did not.  I added the code to service_slave_pic().  I
  have no clear way to test that this is actually working right.  If I can put
  a gdb breakpoint in the pic.cc code and then step through and watch it work,
  I'll be more confident.
2001-11-11 00:45:42 +00:00
Todd T.Fries
25db9d70b3 this is from ece lca <ecelca@yahoo.com>:
I compiled Bochs on Linux and installed a linux
in it, but when I ping a machine on my LAN, I get
packet loss. Sometimes as much as 70% is lost.
So I read ne2k.cc, Linux 8390 driver and 8390 chip
specification. I find that 8390 command register START
bit is misused in ne2k.cc. According to the chip
specification, even if START=0, the chip does not stop
working.
2001-11-06 20:30:09 +00:00
Todd T.Fries
68309b59b6 fixes from Frode Vatvedt Fjeld. Thanks! 2001-11-06 17:14:34 +00:00
Gregory Alexander
f952b17c62 Trying to improve interactive performance.
Changed frequency on timer in pit_wrap.
Changed time quantum on slowdown_timer.

 Modified Files:
 	pit_wrap.cc slowdown_timer.cc
2001-10-11 13:01:27 +00:00
Bryce Denney
c99f9aa8ef - use @CPP_SUFFIX@ substitution to get the dependencies right for nmake too 2001-10-07 20:19:04 +00:00
Bryce Denney
c90e548019 - avoid symbol conflict on DUPLICATE by renaming it to BX_DUPLICATE 2001-10-07 14:43:59 +00:00
Bryce Denney
2283627565 - correct log message that said read_toc was returning 0. No. It returns 1. 2001-10-07 03:37:02 +00:00
Bryce Denney
5012a2ba85 - the windows implementation has been able to distinguish between raw
device and disk file for a while.  Even though its version of
  read_toc is minimal, in fact I would say broken, it lets people use
  an ISO disk file as a cdrom.
- in this revision, I wrote the "unix equivalent" of the win32 code, including
  the broken version of read_toc.  Now win32 and unix should act very similar
  when they encounter an ISO disk image.
- one important improvement is in read_toc, I have added "*length=1" for both
  win32 and unix, since otherwise the function returns random junk for the
  length of the TOC.  I also tried "*length=0" and that created the "lost
  interrupt" behavior that psyon has been trying to get rid of...I changed it
  back to *length=1 of course and left a note to him in that bug report.
2001-10-07 03:34:54 +00:00
Bryce Denney
585d11de57 - print strerror in some log message 2001-10-07 03:28:45 +00:00
Bryce Denney
8a21b1a9d6 - apply patches/patch.add-makefile-deps. I have added dependencies
which were generated with gcc -MM to the end of each Makefile.in
  so that make understands which files depend on which.  Basically,
  everything depends on bochs.h, which depends on everything, which
  is not ideal.
2001-10-07 00:33:21 +00:00
Bryce Denney
7279914d1b - don't blindly reject odd length atapi commands. There are cases when
it's really ok according to ATA-4.
2001-10-06 23:55:19 +00:00
Bryce Denney
7c82612bc9 - add strerror(errno) to open failed message
- minor tweaks
2001-10-06 17:32:58 +00:00
Bryce Denney
19b3618409 - add strerror(errno) output to a few log messages
- treat fatal network errors as panics.  Any error whose behavior is to
  close the fd and give up--it now does a BX_PANIC to say what is happening.
2001-10-06 17:31:44 +00:00
Bryce Denney
d9c708f718 - add strerror(errno) on some log messages 2001-10-06 17:30:19 +00:00
Bryce Denney
a9204c53f0 - make hard disk code return error codes when data is not available instead
of just panicing.  In particular, if the logical sector is out of bounds
  or the disk image cannot be read/written at the desired offset, we now
  abort the ATA command and return an error code.  Many of the old BX_PANIC
  messages are turned to BX_ERROR, so they will still appear in the
  log, but now the device model will try to communicate this fact to
  the OS instead of simply giving up.
2001-10-06 09:04:39 +00:00
Bryce Denney
ec6a8b3ef5 - when you write the device/head register, if the device doesn't exist or
something, we need to set the error in the status register.
2001-10-06 08:59:01 +00:00
Bryce Denney
b974699ce6 - include <windows.h> on win32 platforms so that we get a definition of
wsprintf
2001-10-05 14:01:52 +00:00
Bryce Denney
dd2ac517a6 - don't define BX_HAVE_USLEEP in here, it's set by configure! 2001-10-05 13:31:31 +00:00
instinc
7e2c49c8aa Added the control to enable/disable register tracing 2001-10-03 19:54:29 +00:00
instinc
0982e7f345 Added the ability to enable/disable instruction tracing when built with debugger support 2001-10-03 19:06:17 +00:00
Todd T.Fries
6742ab9f91 panic if networking can't be initalized (packet filter/socket)
if the user wants to use bochs as non-root, disable ne2k!
2001-10-03 14:53:22 +00:00
Bryce Denney
5d00d3073e - mention where to get winpcap 2001-10-03 13:38:17 +00:00
Bryce Denney
91c3513cae - remove hardcoded NIC id 2001-10-03 13:34:55 +00:00
Bryce Denney
daf2a9fb55 - add RCS Id to header of every file. This makes it easier to know what's
going on when someone sends in a modified file.
2001-10-03 13:10:38 +00:00
Todd T.Fries
d5ecddc64c a few output cleanups
make windows not panic bochs when probing for ne2k, still doesn't work though
2001-10-02 18:38:03 +00:00
Bryce Denney
df50cd50fd - 2 fixes: use S_IFBLK again instead of comparing the st_mode directly
- we must use #if BX_WITH_WIN32, not #ifdef because it's always defined
2001-10-01 17:23:45 +00:00
Bryce Denney
388fb0385f - commit Don Becker's fixes for win32 raw floppy and floppy disk images 2001-10-01 17:20:08 +00:00
Bryce Denney
25942a527d - add win32, coded by Don Becker. 2001-10-01 03:53:40 +00:00
Bryce Denney
c38d1a046a - add win32. Code from Don Becker. 2001-10-01 03:52:10 +00:00
Bryce Denney
ddb2c85b06 - add code from Psyon, aka Don Becker 2001-10-01 03:50:50 +00:00
Bryce Denney
a07d62fd24 - add "info ne2k" command to the debugger, which prints all the registers
of the NE2000 model.
2001-09-29 19:16:34 +00:00
Gregory Alexander
67f4ebe68d Changed OUT to OUTpin.
Modified Files:
 	pit82c54.cc pit82c54.h
2001-09-29 15:31:13 +00:00
Bryce Denney
0640ab3b04 - attempt to fix bug [ #439945 ] Floppy drive read input error checking. 2001-09-29 03:29:27 +00:00
Bryce Denney
6145266a70 - now there are BX_ERROR lines for all commands from ATA/ATAPI 3,4,5,6. 2001-09-29 02:08:11 +00:00
Bryce Denney
1a856a1726 - add BX_ERROR for every command in ATAPI-6 that bochs does not support.
I still need to do add some commands from older specs that are obsolete
  (and not listed) in ATAPI-6.
- commands that aren't in the spec will still panic.
2001-09-28 22:20:49 +00:00
Bryce Denney
c0719c7eb7 - more cleanup: clarify some log messages, add command aborted when some
atapi commands are tried on a disk, etc.
2001-09-28 07:18:55 +00:00
Bryce Denney
951014d794 - add note about where to find the spec
- fill in names from spec on various commands
- add command aborted for 0x08 device reset on disks (it's only for ATAPI)
- add command aborted for 0xe1 idle immediate
2001-09-28 07:14:50 +00:00
Bryce Denney
dd0d8a8524 - use #if BX_WITH_MACOS around fd_write too. I meant to do this the
first time...
2001-09-26 17:35:51 +00:00
instinc
e09d429117 added the output of a little information string to help the user understand why it returned to the prompt. 2001-09-26 03:07:32 +00:00
instinc
677ece7d04 added 0x8AE0 to return to prompt debugger 2001-09-26 02:52:03 +00:00
Bryce Denney
1ef0b3c6ef - use #if BX_WITH_MACOS around the special fd_read and fd_write code, since
MacOS X behaves more like unix now.
2001-09-26 00:19:44 +00:00
Bryce Denney
39aa03d622 - must use #ifdef instead of #if 2001-09-24 12:09:45 +00:00
Bryce Denney
9454441958 - add --enable-slowdown option to configure, which turns on Greg's
slowdown timer device.
2001-09-24 05:23:55 +00:00
Bryce Denney
53d483864c - use #ifs instead of #ifdefs for slowdown timer code. The
usual autoconf/configure method is to use 0 vs 1, not defined vs
  undefined to turn things on.
2001-09-24 05:08:25 +00:00
Bryce Denney
140a7a23b8 - avoid using #define LOG_THIS...#undef LOG_THIS trick, and just
call panic directly.  This solves bug [ #464258 ] LOG_THIS redefined in
  keyboard.h
2001-09-24 04:59:35 +00:00
Bryce Denney
a4ca526eee - add preprocessor tricks that undefine the OUT symbol if it's already
been defined elsewhere.  This had to be done in the old pit as well,
  so it's not a new problem by any means.
2001-09-24 02:14:05 +00:00
Gregory Alexander
3ace9e3288 Minor updates to the mouse code that may help with enable/disable problems.
Also fixed a warning in pc_system.h

 Modified Files:
 	main.cc pc_system.h iodev/keyboard.cc iodev/keyboard.h
2001-09-21 02:46:17 +00:00
Bryce Denney
6d129d771c - set a bit in the CMOS that says the processor has an FPU. This is
from patch [ #455006 ] Device byte is not initialized aptly.
  I can't give credit, because he or she did not leave a name.
2001-09-19 17:29:07 +00:00
Bryce Denney
3bba2f657f - apply patch from patches/patch.lba. This is taken from plex86 cvs
and modified for bochs.  Minimal testing so far...
2001-09-19 15:30:44 +00:00
Bryce Denney
690c4eee31 - clarify BX_INFO message 2001-09-19 15:10:38 +00:00
Bryce Denney
8c6446cf4c - only put 0xf into the 2nd hard disk field when the cdrom is not present.
This is a patch from Volker Ruppert <Volker.Ruppert@t-online.de>, who
  comments: "The fdisk command reports an unusable second harddisk if the cdrom
  is enabled. This patch helps, but I don't know if it is the right way."
2001-09-15 13:35:42 +00:00
Bryce Denney
1006cb2c6b - patch from Volker Ruppert <Volker.Ruppert@t-online.de>, who writes:
> I have inspected the header of output file and several sample MIDI files. I
  > have found two different bytes in the header. After I have changed this
  > bytes Winamp could play the output file, but it showed a track time of
  > 0:00. The Windows Media Player still doesn't like the file.
2001-09-15 13:33:16 +00:00
instinc
f89d1e6f01 added support for the debugger, it now returns to the debugger prompt 2001-09-15 00:12:40 +00:00
instinc
0a762c4023 final revision of the memory protection material 2001-09-14 22:38:06 +00:00
instinc
a10f33a8c7 Removed the structure from the class definition and used it directly in the object 2001-09-14 22:37:32 +00:00
instinc
c52ee908a8 Added range_test function, partly completed write_mem and read_mem 2001-09-14 16:21:02 +00:00
instinc
ccc7026539 Added a few more functions such as range_test 2001-09-14 16:20:30 +00:00
instinc
426982c0ec Added I/O Interface to the debugger 2001-09-14 15:01:29 +00:00
instinc
0496446814 I/O interface to the debugger functions
Allow the various debugging features to be controlled directly by the guest os
2001-09-14 14:29:21 +00:00
instinc
014fc2c10c header file for the iodebug interface 2001-09-14 14:28:23 +00:00
Bryce Denney
f04e6fe346 - apply VPATH patch from Edouard G. Parmelan, posted to list on September 1 2001-09-14 04:19:08 +00:00
Bryce Denney
55ed69273b - commit patch from David Haslam <dch@sirius.clara.co.uk>
posted to bochs-developers on Wed, 29 Aug 2001 00:08:45 +0100

  David Haslam wrote:
  > I have been looking at the keyboard problem with Minix, which for
  > those that haven't tried Minix results in every key press giving the
  > response: ^@
  >
  > I am aware of the comments in the changelog that suggest removing 2
  > keyboard ACKs in iodev/keyboard.cc, but this is a bit of a hack,
  > (which is presumably why it was never incorporated).
  >
  > The problem seems to be that the Minix keyboard driver doesn't obey
  > the rules, and Bochs doesn't model the 8042 accurately. When issuing
  > commands to set the LEDs, Minix polls the 8042 output data register
  > waiting for an ACK even though the OBF flag isn't set.
  >
  > Bochs returns zero under these circumstances, which seems to
  > trigger obscure behaviour that messes up the Minix internal
  > keyboard queue. I don't fully understand why Minix breaks, but I
  > think the fact that the ACK generates an interrupt, and Minix treats
  > it as a scan code also has something to do with it.
  >
  > In any case, I believe, the fix is for Bochs to return the output
  > buffer contents, regardless of whether the OBF flag (called outb in
  > Bochs) is set.
  >
  > I expect the real hardware allows the register to be read at anytime,
  > and with this fix we are modelling the behaviour of the hardware more
  > accurately.
  >
  > I have tested it with Minix 2.0.0. Also DOS 6.22 still works after this fix.
  > Does anyone think this will break anything else?
  >
  > This diff is against the latest CVS of iodev/keyboard.cc, version 1.29
  > The last part of the diff is a minor fix to an unrelated debug print.
2001-09-11 16:49:54 +00:00
Gregory Alexander
728252e212 Fixed a small problem in the latching code in the new pit.
Personal note: case...BREAK;

This makes OpenBSD and QNX a little happier.

Added debug messages.


 Modified Files:
 	bochs.h iodev/pit82c54.cc
2001-09-05 14:41:55 +00:00
Todd T.Fries
64ea80c050 more INFO->ERROR/DEBUG cleanups 2001-08-31 22:02:29 +00:00
Todd T.Fries
28885e4973 some INFO->DEBUG/ERROR cleanups 2001-08-31 16:06:32 +00:00
Bryce Denney
baeeb6d99c - give the "struct {} s" a type name 2001-08-30 02:04:42 +00:00
Bryce Denney
b966bf0bab - fix expression that required implicit bool->int which caused havoc on
vc++.  Now it says (boolean expression)?1:0 instead.
2001-08-30 02:02:10 +00:00
Gregory Alexander
59d9dbdd98 Another mouse fix. This one changes the model a bit to
act more like a real system.  It has some problems, but
is MUCH better than it was.


 Modified Files:
 	keyboard.cc keyboard.h
2001-08-24 13:48:05 +00:00
Gregory Alexander
6641d17c56 Improve mouse performance/responsiveness.
Modified Files:
 	keyboard.cc slowdown_timer.cc
2001-08-23 13:04:14 +00:00
Gregory Alexander
0539a04e3b Fix a filehandle leak.
Modified Files:
 	floppy.cc
2001-08-23 13:02:50 +00:00
Gregory Alexander
a1556b2495 Oh, and this one too. 2001-08-22 02:03:04 +00:00
Gregory Alexander
3b6f192a30 Remove OpenBSD debug info. 2001-08-22 02:01:23 +00:00
Gregory Alexander
dc7fe22635 Almost working version of slowdown timer. 2001-08-22 01:21:30 +00:00
Bryce Denney
6334f837e2 - now BIOS messages have prefix "BIOS" instead of "UNMP" 2001-08-21 04:10:35 +00:00
Gregory Alexander
9aa7a88028 Lots of timer stuff.
Fixed a "feature" in pc_system.cc with setting timers to small values
that can cause bochs to hang.

Significantly improved the performance of the new PIT.
It's probably ready to become the default now.

Added a preliminary implementation of the slowdown timer
that Bryce and I had talked about.
2001-08-18 03:28:23 +00:00