- chipmem read/write limit and dma write size fixed - Windows 95 driver works now
This commit is contained in:
parent
7d93afc866
commit
ecabb60da8
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ne2k.cc,v 1.25 2001-11-06 20:30:09 fries Exp $
|
||||
// $Id: ne2k.cc,v 1.26 2001-12-20 19:44:16 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -41,7 +41,7 @@ bx_ne2k_c::bx_ne2k_c(void)
|
||||
{
|
||||
put("NE2K");
|
||||
settype(NE2KLOG);
|
||||
BX_DEBUG(("Init $Id: ne2k.cc,v 1.25 2001-11-06 20:30:09 fries Exp $"));
|
||||
BX_DEBUG(("Init $Id: ne2k.cc,v 1.26 2001-12-20 19:44:16 vruppert Exp $"));
|
||||
// nothing for now
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ bx_ne2k_c::chipmem_read(Bit32u address, unsigned int io_len)
|
||||
return (retval);
|
||||
}
|
||||
|
||||
if ((address >= BX_NE2K_MEMSTART) && (address <= BX_NE2K_MEMEND)) {
|
||||
if ((address >= BX_NE2K_MEMSTART) && (address < BX_NE2K_MEMEND)) {
|
||||
retval = BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART];
|
||||
if (io_len == 2) {
|
||||
retval |= (BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 1] << 8);
|
||||
@ -256,7 +256,7 @@ bx_ne2k_c::chipmem_write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
if ((io_len == 2) && (address & 0x1))
|
||||
BX_PANIC(("unaligned chipmem word write"));
|
||||
|
||||
if ((address >= BX_NE2K_MEMSTART) && (address <= BX_NE2K_MEMEND)) {
|
||||
if ((address >= BX_NE2K_MEMSTART) && (address < BX_NE2K_MEMEND)) {
|
||||
BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART] = value & 0xff;
|
||||
if (io_len == 2)
|
||||
BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 1] = value >> 8;
|
||||
@ -330,8 +330,10 @@ bx_ne2k_c::asic_write(Bit32u offset, Bit32u value, unsigned io_len)
|
||||
switch (offset) {
|
||||
case 0x0: // Data register - see asic_read for a description
|
||||
|
||||
if (io_len != (1 + BX_NE2K_THIS s.DCR.wdsize))
|
||||
BX_PANIC(("dma write, wrong size %d", io_len));
|
||||
if (io_len != (1 + BX_NE2K_THIS s.DCR.wdsize)) {
|
||||
BX_ERROR(("dma write, wrong size %d fixed", io_len));
|
||||
io_len = 1 + BX_NE2K_THIS s.DCR.wdsize;
|
||||
}
|
||||
|
||||
if (BX_NE2K_THIS s.remote_bytes == 0)
|
||||
BX_PANIC(("ne2K: dma write, byte count 0"));
|
||||
@ -1217,7 +1219,7 @@ bx_ne2k_c::rx_frame(const void *buf, unsigned io_len)
|
||||
void
|
||||
bx_ne2k_c::init(bx_devices_c *d)
|
||||
{
|
||||
BX_DEBUG(("Init $Id: ne2k.cc,v 1.25 2001-11-06 20:30:09 fries Exp $"));
|
||||
BX_DEBUG(("Init $Id: ne2k.cc,v 1.26 2001-12-20 19:44:16 vruppert Exp $"));
|
||||
BX_NE2K_THIS devices = d;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user