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.
This commit is contained in:
parent
3c09fdb363
commit
c3a74d4da0
@ -580,6 +580,9 @@ typedef
|
||||
// limited i440FX PCI support
|
||||
#define BX_PCI_SUPPORT 0
|
||||
|
||||
// Promise VLBIDE DC2300 Support
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 0
|
||||
|
||||
// dynamic translation (future: not supported yet)
|
||||
#define BX_DYNAMIC_TRANSLATION 0
|
||||
#define BX_DYNAMIC_CPU_I386 0
|
||||
|
35
bochs/configure
vendored
35
bochs/configure
vendored
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Id: configure.in,v 1.124 2002/09/24 08:15:26 bdenney Exp .
|
||||
# From configure.in Id: configure.in,v 1.125 2002/09/24 18:00:21 bdenney Exp .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.53.
|
||||
#
|
||||
@ -853,6 +853,7 @@ Optional Features:
|
||||
--enable-split-hd allows split hard disk image
|
||||
--enable-ne2000 enable limited ne2000 support
|
||||
--enable-pci enable limited i440FX PCI support
|
||||
--enable-dc2300-vlb-ide enable Promise DC2300 VLB-IDE support
|
||||
--enable-4meg-pages support 4Megabyte pages extensions
|
||||
--enable-pae support Physical Address Extensions
|
||||
--enable-guest2host-tlb support guest to host addr TLB for speed
|
||||
@ -8905,6 +8906,38 @@ _ACEOF
|
||||
fi;
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for Promise DC2300 VLB-IDE support" >&5
|
||||
echo $ECHO_N "checking for Promise DC2300 VLB-IDE support... $ECHO_C" >&6
|
||||
# Check whether --enable-dc2300-vlb-ide or --disable-dc2300-vlb-ide was given.
|
||||
if test "${enable_dc2300_vlb_ide+set}" = set; then
|
||||
enableval="$enable_dc2300_vlb_ide"
|
||||
if test "$enableval" = yes; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
else
|
||||
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 0
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
fi;
|
||||
|
||||
|
||||
support_pse=0
|
||||
echo "$as_me:$LINENO: checking for 4Meg pages support" >&5
|
||||
|
@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(bochs.h)
|
||||
AC_REVISION([[$Id: configure.in,v 1.125 2002-09-24 18:00:21 bdenney Exp $]])
|
||||
AC_REVISION([[$Id: configure.in,v 1.126 2002-09-24 20:01:59 kevinlawton Exp $]])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl // Put Bochs version information right here so that it gets substituted
|
||||
@ -530,6 +530,22 @@ AC_ARG_ENABLE(pci,
|
||||
)
|
||||
AC_SUBST(PCI_OBJ)
|
||||
|
||||
AC_MSG_CHECKING(for Promise DC2300 VLB-IDE support)
|
||||
AC_ARG_ENABLE(dc2300-vlb-ide,
|
||||
[ --enable-dc2300-vlb-ide enable Promise DC2300 VLB-IDE support],
|
||||
[if test "$enableval" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BX_PDC20230C_VLBIDE_SUPPORT, 1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_PDC20230C_VLBIDE_SUPPORT, 0)
|
||||
fi],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_PDC20230C_VLBIDE_SUPPORT, 0)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
support_pse=0
|
||||
AC_MSG_CHECKING(for 4Meg pages support)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: harddrv.cc,v 1.75 2002-09-23 21:11:51 cbothamy Exp $
|
||||
// $Id: harddrv.cc,v 1.76 2002-09-24 20:02:00 kevinlawton Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -162,7 +162,7 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
char string[5];
|
||||
|
||||
BX_HD_THIS devices = d;
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.75 2002-09-23 21:11:51 cbothamy Exp $"));
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.76 2002-09-24 20:02:00 kevinlawton Exp $"));
|
||||
|
||||
for (channel=0; channel<BX_MAX_ATA_CHANNEL; channel++) {
|
||||
if (bx_options.ata[channel].Opresent->get() == 1) {
|
||||
@ -330,6 +330,14 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
}
|
||||
}
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
BX_HD_THIS pdc20230c.prog_mode = 0;
|
||||
BX_HD_THIS pdc20230c.prog_count = 0;
|
||||
BX_HD_THIS pdc20230c.p1f3_value = 0;
|
||||
BX_HD_THIS pdc20230c.p1f4_value = 0;
|
||||
#endif
|
||||
|
||||
|
||||
// generate CMOS values for hard drive if not using a CMOS image
|
||||
if (!bx_options.cmos.OcmosImage->get ()) {
|
||||
cmos->s.reg[0x12] = 0x00; // start out with: no drive 0, no drive 1
|
||||
@ -481,10 +489,68 @@ bx_hard_drive_c::read(Bit32u address, unsigned io_len)
|
||||
BX_PANIC(("Unable to find ATA channel, ioport=0x%04x", address));
|
||||
}
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
// pdc20230c is only available for first ata channel
|
||||
if (channel == 0) {
|
||||
|
||||
// Detect the switch to programming mode
|
||||
if (!BX_HD_THIS pdc20230c.prog_mode) {
|
||||
switch (port) {
|
||||
case 0x02:
|
||||
if ((BX_HD_THIS pdc20230c.prog_count == 0) || (BX_HD_THIS pdc20230c.prog_count > 2)) {
|
||||
BX_HD_THIS pdc20230c.prog_count++;
|
||||
}
|
||||
else {
|
||||
BX_HD_THIS pdc20230c.prog_count=0;
|
||||
}
|
||||
break;
|
||||
case 0x16:
|
||||
if ((BX_HD_THIS pdc20230c.prog_count == 1) || (BX_HD_THIS pdc20230c.prog_count == 2)) {
|
||||
BX_HD_THIS pdc20230c.prog_count++;
|
||||
}
|
||||
else {
|
||||
BX_HD_THIS pdc20230c.prog_count=0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
BX_HD_THIS pdc20230c.prog_count=0;
|
||||
}
|
||||
|
||||
if (BX_HD_THIS pdc20230c.prog_count == 5) {
|
||||
BX_HD_THIS pdc20230c.prog_mode = 1;
|
||||
BX_SELECTED_CONTROLLER(channel).sector_count &= 0x7f;
|
||||
BX_INFO(("Promise VLB-IDE DC2300: Switching to Programming mode"));
|
||||
}
|
||||
}
|
||||
|
||||
// Returns value when in programming mode
|
||||
if (BX_HD_THIS pdc20230c.prog_mode) {
|
||||
switch (port) {
|
||||
case 0x05:
|
||||
// Leave programming mode
|
||||
BX_HD_THIS pdc20230c.prog_mode = 0;
|
||||
BX_INFO(("Promise VLB-IDE DC2300: Leaving Programming mode"));
|
||||
// Value will be sent be normal code
|
||||
break;
|
||||
case 0x03:
|
||||
// Special programming register
|
||||
value32 = BX_HD_THIS pdc20230c.p1f3_value;
|
||||
GOTO_RETURN_VALUE ;
|
||||
break;
|
||||
case 0x04:
|
||||
// Special programming register
|
||||
value32 = BX_HD_THIS pdc20230c.p1f4_value;
|
||||
GOTO_RETURN_VALUE ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (io_len>1 && port!=0x00) {
|
||||
BX_PANIC(("non-byte IO read to %04x", (unsigned) address));
|
||||
}
|
||||
|
||||
|
||||
switch (port) {
|
||||
case 0x00: // hard disk data (16bit) 0x1f0
|
||||
if (BX_SELECTED_CONTROLLER(channel).status.drq == 0) {
|
||||
@ -953,6 +1019,26 @@ bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
BX_PANIC(("Unable to find ATA channel, ioport=0x%04x", address));
|
||||
}
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
// pdc20230c is only available for first ata channel
|
||||
if (channel == 0) {
|
||||
BX_HD_THIS pdc20230c.prog_count = 0;
|
||||
|
||||
if (BX_HD_THIS pdc20230c.prog_mode != 0) {
|
||||
switch (port) {
|
||||
case 0x03:
|
||||
BX_HD_THIS pdc20230c.p1f3_value = value;
|
||||
return;
|
||||
break;
|
||||
case 0x04:
|
||||
BX_HD_THIS pdc20230c.p1f4_value = value;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (io_len>1 && port!=0x00) {
|
||||
BX_PANIC(("non-byte IO write to %04x", (unsigned) address));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: harddrv.h,v 1.14 2002-09-22 20:56:12 cbothamy Exp $
|
||||
// $Id: harddrv.h,v 1.15 2002-09-24 20:02:00 kevinlawton Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -24,7 +24,6 @@
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
typedef enum _sense {
|
||||
SENSE_NONE = 0, SENSE_NOT_READY = 2, SENSE_ILLEGAL_REQUEST = 5,
|
||||
SENSE_UNIT_ATTENTION = 6
|
||||
@ -349,6 +348,16 @@ private:
|
||||
|
||||
} channels[BX_MAX_ATA_CHANNEL];
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
// pdc20630c is only available for 1st ata channel
|
||||
struct pdc20630c_t {
|
||||
Boolean prog_mode;
|
||||
Bit8u prog_count;
|
||||
Bit32u p1f3_value;
|
||||
Bit32u p1f4_value;
|
||||
} pdc20230c;
|
||||
#endif
|
||||
|
||||
bx_devices_c *devices;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user