Commit Graph

76 Commits

Author SHA1 Message Date
Kevin Lawton
c3a74d4da0 Integrated patches/patch.promise-dc2300-vlbide from Christophe Bothamy.
From his patch file text:

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

I got Win95 running with 32-bit paging/filesystem using the
  recommended driver and these patches.  Since the patches did
  such a good job bracketing code modifications with a #define,
  they might as well become part of the current CVS code.
2002-09-24 20:02:00 +00:00
Christophe Bothamy
8ce766fc17 - fixed problem reported by Kevin. the buffer index was incremented twice when repeat-speedups is enabled 2002-09-23 21:11:51 +00:00
Christophe Bothamy
af215531f2 - fixed compile problem with --enable-repeat-speedups 2002-09-22 23:47:34 +00:00
Christophe Bothamy
440dffc803 - applied patch.4ata-channels and patch.4ata-channels.bbd
- Features :
 . number of active channels defined at boot-time config
 . new options in bochsrc
 . up to 8 devices support (disks or cdroms)
 . up to 4 cdrom devices can be changed at runtime config
 . wxwindows config interface
2002-09-22 20:56:12 +00:00
Bryce Denney
6a50742b20 - clean up ^M pollution from working in cygwin 2002-09-16 17:00:16 +00:00
Bryce Denney
d6cd93b462 - add support for Peter Tattam's external disk simulator 2002-09-12 06:49:04 +00:00
Kevin Lawton
414e97bc32 Enhanced the repeat IO accelerations (enabled by --enable-repeat-speedups)
to request bulk IO operations to IO devices which are bulk IO aware.
Currently, I modified only harddrv.cc to be aware.  I added some
fields to the bx_devices_c class for the IO instructions to
place requests and receive responses from the IO device emulation.
Devices except the hard drive, don't monitor these fields so they
respond as normal.  The hard drive now monitors these fields for
bulk requests, and if enabled, it memcpy()'s data straight from
the disk buffer to memory.  This eliminates numerous inp/outp calling
sequences per disk sector.

I used the fields in bx_devices_c so that I would not have to
disrupt most IO device modules.  Enhancements can be made to
other devices if they use high-bandwidth IO via in/out instructions.
2002-09-09 16:56:56 +00:00
Bryce Denney
7fdc7303c2 - add "void reset(unsigned type)" method to every I/O device.
Some devices already had one.  Some I had to add an empty one.
  I did a little cleaning of init() methods to make them more uniform
  but generally I left them alone.
- I also put these exact diffs into a patch "patch.iodev-add-reset"
  in case I want to revert these changes for some reason, for example
  if they break an old patch.  It should be deleted after a while.
2002-08-27 19:54:46 +00:00
Christophe Bothamy
1a7d18743f - added subcommand 0x66 (Disable reverting to power-on default)
and 0xCC (Enable reverting to power-on default) to list of unsupported
"Set Feature" subcommands.
2002-08-09 13:16:22 +00:00
Volker Ruppert
f81909361d - panic at MODE SENSE (chg) and a few audio cd functions replaced by a
BX_ERROR. The harddisk controller returns an error code until we are able to
  implement this features.
2002-08-07 08:53:01 +00:00
Christophe Bothamy
6c62d72398 - added a check on odd byte count for atapi command
- fixed problem with multiple drq atapi data transfers
2002-08-05 15:47:40 +00:00
Volker Ruppert
c3cda0a919 - separation of floppy device type and media type started. This feature needs
more work in the floppy and bios code.
- floppy and cdrom entries in the runtime config menu can be disabled if the
  drive wasn't defined in bochsrc or start menu
- floppy variable "initial_status" and cdrom variable "inserted" renamed to
  "status"
- unused variable *ips in function build_runtime_options_prompt() disabled
2002-08-04 08:42:34 +00:00
Volker Ruppert
2b2369a049 - panic at 'Read sub-channel with SubQ' replaced by a BX_ERROR. The harddisk
controller returns an error code until we are able to implement this feature.
- init_send_atapi_command(): don't panic if alloc_length is 0, use byte_count
  to set alloc_length instead
- fixed a BX_PANIC message in the io write handler for port 0x1f0
2002-07-30 09:54:26 +00:00
Volker Ruppert
4dbd597456 - panic at READ CD replaced by a BX_ERROR. The harddisk controller
returns an error code until we are able to implement this feature.
2002-07-27 18:42:31 +00:00
Volker Ruppert
397043b5e9 - odd byte count error in init_send_atapi_command() fixed: a byte count of
0xffff must be decremeted to 0xfffe
- ATAPI command code added to odd byte count error message
2002-07-19 13:32:49 +00:00
Christophe Bothamy
43f7efce45 - 32bits access flag for atapi devices (word 48 of identify packet device)
- fixed io_len check on port != 0x1f0 : must be 1 byte
2002-07-11 07:44:32 +00:00
Volker Ruppert
6aa5eed1ec - panic at MODE SENSE (curr) replaced by a BX_ERROR. The harddisk controller
returns an error code until we are able to implement this features.
2002-07-07 18:51:49 +00:00
Volker Ruppert
afca461cf3 - reading port 0x01f0 with drq==0 causes a BX_ERROR, not a BX_PANIC. The return
value after the error is set to 0. This fixes the problem with the netbsd 1.5
  rescue disk (SF bug #419415)
2002-06-29 08:54:11 +00:00
Christophe Bothamy
17fe31ad4d - reverted to before patch.blkdevsize inclusion, because compilation fails on WIN32.
It will be included back when we know which platforms handle the GETBLKSIZE ioctl right
2002-06-28 21:34:30 +00:00
Christophe Bothamy
fcc5bd67cb - added patch for block device size detection from Ph. Marek
- included it in the main branch as it is only active with block devices
2002-06-26 16:45:27 +00:00
Christophe Bothamy
b84c82e80c - changed the floppy_bootsig_check syntax to be more logical. the syntax is now :
floppy_bootsig_check: disabled=[0|1]. It is not disabled by default.
  Sorry for any inconvenience it could cause
- changed the default (if cmos reg is 0) behavior for the floppy boot signature
  check, so the new bios is compatible with older bochs binaries (useful if we
  want to use the new bios when we release 1.4.1) :
  1 : disabled
  0 : enabled
- added info at launch time about the boot device and the floppy boot signature
  check
- added a "LBA capable" flag in the ata controller
2002-05-04 16:00:40 +00:00
Christophe Bothamy
a2fc610355 - included "patch.harddrv-sco-osr5" from Carl Sopchak 2002-05-03 08:17:18 +00:00
Christophe Bothamy
cd50268e2f - added a floppy_bootsig_check option to .bochsrc that will be used to enable/disable the 0xaa55 signature check ONLY for floppy-boot
- stored the boot signature check flag in cmos reg 0x38
- the rombios that is able to handle that flag will be uploaded later
2002-04-23 07:44:34 +00:00
Bryce Denney
7306746f0b - fd was never initialized, then the close() method read it. Thanks
valgrind.
2002-04-09 15:52:02 +00:00
Christophe Bothamy
fcd6f99391 - fixed cmos info on 2nd disk landing zone. 2002-03-25 01:47:13 +00:00
Volker Ruppert
8263d15e76 - renamed update_floppy_status_buttons() to update_drive_status_buttons() since
it handles the cdrom status too
2002-03-17 20:57:54 +00:00
Christophe Bothamy
7b6f19f1d2 - small bug fix in ATAPI command 0x42 (read sub-channel). 2002-02-12 16:03:00 +00:00
Christophe Bothamy
716e461c9d - enabled dword IO. Tiny performance increase 2002-02-07 17:43:06 +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
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
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
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
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
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
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
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
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
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
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
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