Commit Graph

474 Commits

Author SHA1 Message Date
Bryce Denney
aac59e68ae - add more detail on the ping problems I'm seeing 2002-03-09 01:33:46 +00:00
Bryce Denney
b1835f1dc3 - add instructions for setting it TAP 2002-03-09 01:23:21 +00:00
Bryce Denney
6eea8f1bea - panic if the ethernet module cannot be found. If they continue, use
null module instead.
2002-03-09 01:05:41 +00:00
Bryce Denney
9a177ba518 - add configure test for ethertap. On systems which have a header file
called <linux/netlink.h> the ethertap module will be defined.  If other
  OSes turn up that also have ethertap, we can change the test.
- in eth_tap.cc, I replaced the calls to GPL code from maconlinux with
  my own stuff.
2002-03-09 01:04:49 +00:00
Bryce Denney
612a155e18 - add ethertap interface for Linux 2002-03-09 00:38:53 +00:00
Bryce Denney
3a01642790 - add debug warning when you throw out small packets 2002-03-09 00:28:07 +00:00
Bryce Denney
1e42e99914 - apply patch from Mike Lerwill:
There is a problem with the existing function rx_timer_handler. It can
  retrieve multiple packets from winpcap but returns when it finds one with
  the source mac address address instead of ignoring it and processing any
  remaining packets.

  Replacing the function with the one in the attached file rectifies this.

  With this I can browse the network fairly well from the guest NT4 and indeed
  see the guest NT4 from other machines on the network.
2002-03-08 18:46:54 +00:00
Bryce Denney
3a20b2bdde - clean up comments slightly 2002-03-08 18:41:33 +00:00
Bryce Denney
4ec5b4a967 - add UINT ReadTimeOut to the ADAPTER struct, reported by
Mike Lerwill <Mike@ml-solutions.co.uk>
- at the moment we only use hFile so the other pieces of the ADAPTER struct
  don't affect how this code turns out.  However, it would be safer to include
  the winpcap header file instead of hardcoding the structures, which are bound
  to change over time.
2002-03-08 16:37:01 +00:00
Bryce Denney
6b11183d70 - the check for "auto transmit disable" was checking the wrong bit.
We should really be using #defines or enums to give these constants
  a proper name!  Thanks to Peter Tattam <peter@jazz-1.trumpet.com.au>
  for the bug report.
2002-03-08 08:33:37 +00:00
Bryce Denney
a62ec06005 - check in revision that Psyon mailed to me March 6 2002-03-07 02:23:54 +00:00
Bryce Denney
4a976dcb0a - add null check on devices->ioapic->untrigger_irq, suggested by
William Lee Irwin III <wli@holomorphy.com>
2002-03-06 21:52:16 +00:00
Bryce Denney
7a5921fe56 - remove extra \n 2002-03-06 15:56:27 +00:00
Christophe Bothamy
11ed519a07 - Deleted a "debug" include <X11/...>
- BX_KEY_PRINT_SCREEN and BX_KEY_SCROLL_LOCK were defined twice
2002-03-06 14:04:42 +00:00
Christophe Bothamy
1c0a1360bf - cosmetic change 2002-03-06 09:19:36 +00:00
instinc
32c40d0b55 commented out the diagnostic code, no use using 10 jumps for nothing, and it will take less time to re-enable it in the future than using those if(0) 2002-03-06 01:19:50 +00:00
Bryce Denney
d653699cd3 - add "return BX_SOUND_OUTPUT_OK;" to avoid compile error in VC++5
"not all control paths return a value".  This was suggested in bug #523697.
2002-03-05 17:22:59 +00:00
Stu Grossman
3f73e3f33e Fix receiver poll frequency to really be 100ms. This actually gives about an
11% speedup to the emulator when serial I/O is enabled.
2002-03-05 15:40:23 +00:00
Bryce Denney
e50a1be21b - commit serial port patch from Stu Grossman <grossman@juniper.net>
Here are the patches (without the serial name fix).  Let me know if you want
  me to change that.  Oh, FYI, my changes also open up the com1 terminal in raw
  mode, which makes the emulation much more accurate.  You'll also notice that
  I added infrastructure for com2->4 in the option parsing.  I didn't add it to
  the serial code, as I think a bunch of things need to be untangled before
  that can work.
2002-03-03 06:03:29 +00:00
Volker Ruppert
8e3e768922 - 'eject cd' support for linux (patch from Petr Stehlik <pstehlik@sophics.cz>)
- ReadCDSector() (for win32 ASPI) returns 1 if target status is okay
- win32 ASPI version of insert_cdrom() checks media status using ReadCDSector()
2002-03-02 11:31:18 +00:00
Volker Ruppert
ad4808cbda - checked in floppy timer 'idle' patch from Jeroen Janssen <japj@darius.demon.nl>
- just return without a panic when no floppy command is pending
2002-02-27 18:16:30 +00:00
Volker Ruppert
6aafdccd5e - applied patch from Dave Poirier <eks@void-core.2y.net>
- call lower_irq() after reading port 0x60, not port 0x64
  - RETURN() macro removed
2002-02-23 09:32:49 +00:00
Gregory Alexander
055d8fa719 Fix a warning. 2002-02-21 21:16:06 +00:00
Gregory Alexander
2e632a4294 BIG fix for initial counts of zero. 2002-02-21 20:56:18 +00:00
Bryce Denney
fa29b378b4 - commit patch from Dave Poirier to fix
Bug #490570: OUTB set and command 0xaa encountered
2002-02-21 20:26:48 +00:00
Gregory Alexander
eca4aa0720 Fixed the PIT gate and improved the PIT printing options. 2002-02-21 19:22:42 +00:00
Christophe Bothamy
7b6f19f1d2 - small bug fix in ATAPI command 0x42 (read sub-channel). 2002-02-12 16:03:00 +00:00
Volker Ruppert
e321b7bc9b - old IRQ handling functions are disabled now 2002-02-11 08:50:28 +00:00
Volker Ruppert
30ea11e08d - reset function clears DMA and IRQ line 2002-02-09 13:22:43 +00:00
Gregory Alexander
cfab846fe1 More #define changes. 2002-02-08 22:27:51 +00:00
Gregory Alexander
49e715178d More updates to the realtime PIT code. 2002-02-08 05:18:14 +00:00
Gregory Alexander
6b0dca1508 Fix using 1/4 speed. 2002-02-08 02:57:27 +00:00
Gregory Alexander
57273620e6 Added an experimental realtime PIT to the mix.
This is basically the opposite of the slowdown timer.  Instead
of trying to keep the PIT ticks in sync with bochs time, we
keep them in sync with REAL time.  This is bad because it creates
unreproducible fails, but it's good if you want to run bochs at
maximum speed on your machine.  However, bochs will take all of
the available resources from the machine also.

DO NOT use this with the slowdown timer.  Results would be
unpredictable.
2002-02-07 21:22:55 +00:00
Volker Ruppert
ba58065da8 - call dimension_update() only after a dimension change
(patch from Dave Poirier <eks@void-core.2y.net>)
2002-02-07 19:04:30 +00:00
Christophe Bothamy
716e461c9d - enabled dword IO. Tiny performance increase 2002-02-07 17:43:06 +00:00
Bryce Denney
db0a934ae3 - move include cdrom_beos.h to top of file where it belongs 2002-02-07 17:38:33 +00:00
Bryce Denney
8fe590fb2b - removed a dependency on /usr/include/math.h. System headers should never
be in the list!  Oops.
2002-02-07 17:18:44 +00:00
Volker Ruppert
ca5a805aff - behaviour of floppy command 'sense interrupt status' after reset fixed
(DLX linux boots again)
- new function raise_interrupt() sets variables and calls raise_irq()
2002-02-06 18:51:48 +00:00
Volker Ruppert
1d9861fc59 - implementation of the text mode snapshot function 2002-02-04 20:31:35 +00:00
Volker Ruppert
2d5a9bd459 - new sense key SENSE_UNIT_ATTENTION for media change
- set sense key and raise an interrupt after inserting cdrom media
- atapi command 'eject disk' implemented
2002-02-03 20:49:44 +00:00
Volker Ruppert
84b649831e - new cdrom button in the headerbar
- changing cdrom media in a Bochs session now possible
- don't eject cdrom when the guest OS has locked the drive
2002-02-01 16:46:27 +00:00
Gregory Alexander
dcdc5b2624 Minor fix to raise/lower irq code. 2002-01-31 17:26:26 +00:00
Gregory Alexander
05983c7a48 Changes to the pit wrapper code that should help synchronization some. 2002-01-31 17:18:38 +00:00
Gregory Alexander
26e6452142 Preparing for another pit time sync upgrade. 2002-01-31 16:52:00 +00:00
Volker Ruppert
0b6ab60780 - IOAPIC calls added in functions raise_irq() and lower_irq() (untested) 2002-01-30 18:33:41 +00:00
Christophe Bothamy
ac91aa0d3c . changes to enable El-Torito boot. It is disabled by default in rombios.c 2002-01-30 10:30:52 +00:00
Volker Ruppert
ad072e2bc6 - implementation of the edge triggered IRQ mode
- new functions raise_irq() and lower_irq()
- all trigger_irq() / untrigger_irq() calls are replaced by the new functions
- REMARK: timer IRQ handling is not correct but it works
- TODO: IOAPIC IRQ handling needs to be changed
2002-01-29 17:20:12 +00:00
Volker Ruppert
2933948216 - set the media status for the siminterface to 'ejected' if cdrom is not present 2002-01-27 21:58:41 +00:00
Volker Ruppert
e472507616 - set_media_status() sets the media state for the simulation interface too 2002-01-27 21:56:53 +00:00
Volker Ruppert
4ed537308c - read access to the status registers clears the IRQs 2002-01-27 00:41:38 +00:00
Volker Ruppert
4d4be62283 - specific EOI doesn't clear the IRR bit
- service_master_pic() / service_slave_pic() do clear the IRR bit
- new IRQ signal handling prepared
2002-01-26 12:03:55 +00:00
Volker Ruppert
6461cb2ab9 - new IRQ signal handling prepared 2002-01-26 12:03:10 +00:00
Volker Ruppert
7aac4bfb3d - reading status register C clears the IRQ
- use BX_CMOS_THIS instead of class_ptr-> (the way other devices do)
2002-01-26 10:00:08 +00:00
Volker Ruppert
81bbbd27b2 - clear DSP.irqpending only if the value of mixer register 0x82 is 0
- use conversion type %d for logfile (Cygwin doesn't know %i)
2002-01-25 20:31:42 +00:00
Volker Ruppert
70ac9ca440 - clear IRQ if no unmasked interrupts are pending 2002-01-25 20:31:00 +00:00
Volker Ruppert
dde7bd3a61 - CGA mode 320x200 implemented - thanks to Sebastien Béchet
<bechets@ifsic.univ-rennes1.fr>
2002-01-24 20:30:45 +00:00
Volker Ruppert
a373e8dc12 - software reset doesn't clear selected data rate
- IRQ is cleared when the result phase is complete
2002-01-23 20:23:07 +00:00
Volker Ruppert
d22d280571 - interrupt handling improved (only loopback works for now)
- interrupt reasons modem status change and receiver line status change added
- number of data bits is considered now
- REMARK: Windows 95 driver still makes trouble
- TODO: real serial communication, FIFO, second serial port
2002-01-20 16:35:32 +00:00
Volker Ruppert
a9c1b785f0 - when checking the presence if diskd, check the presence of diskc, too
- clear IRQ after reading status register 0x1f7
- unused variable 'alloc_length' removed
- some messages fixed
2002-01-20 12:38:35 +00:00
Volker Ruppert
2d48b07d80 - unnecessary BX_PANICs removed, some others changed to BX_ERROR 2002-01-20 00:28:09 +00:00
Volker Ruppert
d07f5a13ad - new function control_HRQ() changes the state of HRQ / cascade DRQ if necessary
- calling control_HRQ() in function DRQ() and after a write access to DMA mask
  or request register
2002-01-18 16:33:47 +00:00
Volker Ruppert
1073eaf524 - sending data to printer causes a BX_ERROR when offline
- untrigger_irq() seems to be necessary, so I add it again
2002-01-18 16:33:07 +00:00
Volker Ruppert
2892dbdb08 - track0 bit added to the result of the 'get status' command
- length of 'configure' floppy command fixed
- busy flag is set until the result of a read/write command is complete
- read/write access to unsupported address causes a BX_ERROR, not a BX_PANIC
- commented BX_INFO statements removed
2002-01-17 21:20:12 +00:00
Volker Ruppert
aa4b1dd80f - service_slave_pic() checks the special mask of slave not master 2002-01-15 20:42:51 +00:00
Volker Ruppert
b061db9cd7 - mixer reset does not reset the IRQ/DMA settings
(Linux OSS driver resets the mixer after configuring IRQ/DMA)
- write timer ticks into logfile, not the localtime
2002-01-13 17:07:14 +00:00
Volker Ruppert
6d0adac941 - address decrement feature added
- set TC in autoinit mode too
- set mask bit on TC if not in autoinit mode
2002-01-13 17:06:33 +00:00
Volker Ruppert
26a2731a19 - return value of MCR fixed
- unnecessary untrigger_irq() calls removed
2002-01-08 20:31:14 +00:00
Volker Ruppert
395ef2f5c7 - obsolete variable 'alt_pressed' removed 2002-01-08 19:00:06 +00:00
Volker Ruppert
f9fdee7ed5 - 16-bit DMA mode fixed (VOC file output works) 2002-01-05 10:30:24 +00:00
Volker Ruppert
4b759265e9 - deassert HRQ if no DRQ is pending
- fixed boundary check for 16-bit DMA
- removed unnecessary comments
2002-01-05 10:28:49 +00:00
Volker Ruppert
45f11e30b2 - implementation of cascade mode (channel 4) 2002-01-02 10:00:54 +00:00
Volker Ruppert
df10d56fe4 - recognize edge/level bit in ICW1, messages updated 2001-12-31 08:38:08 +00:00
Volker Ruppert
d6a1ec5fd9 - removed unnecessary untrigger_irq() call 2001-12-31 08:36:48 +00:00
Volker Ruppert
d5b13d3131 - second set of changes to bochs floppy support.
* floppy command 'format track' implemented
  * read and write operations with MT=0 are working now
    (function 'increment_sector()' updated)
  * result code of floppy command 'get status' fixed
  * flag FS_MS_DIO is not set while the 'configure' floppy command is pending
2001-12-28 16:38:13 +00:00
Volker Ruppert
a8e9c246c7 - variables for 'format track' and MT=0 support added 2001-12-28 16:36:45 +00:00
Volker Ruppert
328bd4fb84 - fixed the behaviour of some floppy commands (Windows 95 driver works now)
* diskette controller data register returns last result if no new data
    is available
  * reset will be activated when the reset bit is changed to normal operation
  * reset sets the error bits in status register 0
  * write access to port 0x3f4 will cause a BX_ERROR now
  * unsupported and invalid floppy commands are setting the error status bit
    'invalid command' - BX_PANIC not necessary
  * flag FS_MS_DIO is not set while a floppy command is pending
  * floppy command 'specify': cause a BX_ERROR when non-DMA mode is selected
  * floppy command 'sense interrupt status' returns an error is no interrupt
    is pending
  * floppy command 'read ID' sets the 'busy' flag and returns no data if the
    motor is not on
  * removed SIMX86 section (not defined in bochs)
  * define variable 'sTemp' for win32 only
2001-12-27 09:30:31 +00:00
Volker Ruppert
84f0593409 - added variable 'pending_irq' (needed for 'sense interrupt status' 2001-12-27 09:28:53 +00:00
Volker Ruppert
87e705a553 - implementation of transfer type 0 (verify) - dma write without writing to memory 2001-12-26 14:56:15 +00:00
Volker Ruppert
3492a93d8f - write wave and midi data in binary mode
- adlib registers enabled (OPL emulation still not complete)
- fixed a warning in function opl_data()
- write current time into sb16 logfile
2001-12-22 13:30:10 +00:00
Christophe Bothamy
0f6a92235a - updated keyboard with mf1, mf2 and mf3 scancodes set handling
- Added scancode translation table and BX_KEY to scancode table
- completed BX_KEYS list
2001-12-22 00:00:33 +00:00
Bryce Denney
cbd68598a3 - apply patch.memleaks-tominac from Darko Tominac <darko.tominac@zg.tel.hr>
which fixes some potential memory leaks
2001-12-21 19:33:18 +00:00
Volker Ruppert
f004e340e8 - asic_write: dma write size and remote bytes fixed (thanks to Mike Lerwill)
- read_handler: fixed a warning
2001-12-21 11:56:52 +00:00
Volker Ruppert
ecabb60da8 - chipmem read/write limit and dma write size fixed - Windows 95 driver works now 2001-12-20 19:44:16 +00:00
Volker Ruppert
384d4f1cce - added Windows(tm) keys to the German keymap 2001-12-19 19:15:12 +00:00
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
Bryce Denney
595d6a0132 - now I know that 0xe7 is flush cache so I improved the comments somewhat
- if an unknown command comes along and triggers a BX_PANIC and they
  choose the continue, call command_aborted().
2001-08-15 20:54:36 +00:00
Bryce Denney
f0c45a6f0e - make it clear that it's only used for cdrom_amigaos.cc. 2001-08-15 20:32:16 +00:00
Bryce Denney
06a7658f88 - changed #ifdefs to #ifs. Even when the new PIT is unused, there will
still be a definition of BX_USE_NEW_PIT=0 in config.h.
2001-08-15 20:23:58 +00:00
Bryce Denney
aca0d3fae8 - apply BIOS patch from Barry Allard to check the boot signature
- fiddle with I/O handler for port 0x401 to allow BIOS to write a
  complete panic message
2001-08-15 04:56:00 +00:00
Bryce Denney
c2df8d4f7d - remove newlines from BX_PANIC and similar statements. it is implied. 2001-08-14 06:48:03 +00:00
Bryce Denney
eaf4a5f9b6 - remove the include of "type.h" that was added with Psyon's cdrom patch. 2001-08-14 05:01:49 +00:00
Bryce Denney
4f10d657ce - last function never returned a value 2001-08-14 04:56:11 +00:00
Bryce Denney
f229ae1afd - a right shift by 12 was accidently written as one greater than instead of two 2001-08-14 04:53:32 +00:00
Bryce Denney
b483593107 - add case for IDE command 0xe7 so that it doesn't panic when installing
win2000
2001-08-13 15:58:35 +00:00
Bryce Denney
1540695f17 - for big endian machines I reversed the bit fields in interrupt_reason.
This was pointed out by Nicholai Benalal.
2001-08-13 15:48:13 +00:00
Bryce Denney
6b6acdc376 - add scsi_commands.h for Amiga CDROM support, from Nicholai Benalal
<nicholai@chello.se>
2001-08-13 15:35:54 +00:00
Bryce Denney
aa671e6e51 - add CDROM support for Amiga, from Nicholai Benalal <nicholai@chello.se> 2001-08-13 15:33:59 +00:00
Todd T.Fries
53ae809632 cleanup debug stuff 2001-07-10 17:20:36 +00:00
Gregory Alexander
c9d18333c0 More preprocessor controls. 2001-07-05 23:55:22 +00:00
Gregory Alexander
6052b0054b Put the new PIT back in. The whole thing should be ifdef'd
out when not in use.
2001-07-02 01:21:59 +00:00
Gregory Alexander
fc0ee2dc3e Added compiler define to use the new PIT.
Also added a hack to keep the OpenBSD timer problem from filling the log.

The new PIT seems to work, but until some
enhancements are made to the way the timers
and devices.cc work, it'll be slower than
the old one.
2001-07-01 20:49:46 +00:00