Several minor cleanups to prepare for more network cards.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* 86Box An emulator of (mostly) x86-based PC systems and devices,
|
||||
* using the ISA, EISA, VLB, MCA, and PCI system buses,
|
||||
* roughly spanning the era between 1981 and 1995.
|
||||
* VARCem Virtual ARchaeological Computer EMulator.
|
||||
* An emulator of (mostly) x86-based PC systems and devices,
|
||||
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||
* spanning the era between 1981 and 1995.
|
||||
*
|
||||
* This file is part of the 86Box Project.
|
||||
* This file is part of the VARCem Project.
|
||||
*
|
||||
* Implementation of the following network controllers:
|
||||
* - 3Com Etherlink II 3c503 (ISA 8-bit).
|
||||
* Implementation of the 3Com Etherlink II 3c503 (ISA 8-bit).
|
||||
*
|
||||
* Version: @(#)net_3c503.c 1.0.7 2019/05/02
|
||||
* Version: @(#)net_3c503.c 1.0.8 2019/05/06
|
||||
*
|
||||
* Based on @(#)3c503.cpp Carl (MAME)
|
||||
*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Definitions for the 3Com series of ethernet controllers.
|
||||
*
|
||||
* Version: @(#)net_3com.h 1.0.3 2019/05/02
|
||||
* Version: @(#)net_3com.h 1.0.4 2019/05/06
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -36,9 +36,7 @@
|
||||
# define NET_3COM_H
|
||||
|
||||
|
||||
#if 0
|
||||
extern const device_t el1_device;
|
||||
#endif
|
||||
extern const device_t el2_device;
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implementation of the network module.
|
||||
*
|
||||
* Version: @(#)network.c 1.0.20 2019/05/03
|
||||
* Version: @(#)network.c 1.0.21 2019/05/07
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -60,6 +60,9 @@
|
||||
#include "network.h"
|
||||
|
||||
|
||||
#define ENABLE_NETWORK_DUMP 1
|
||||
|
||||
|
||||
typedef struct {
|
||||
mutex_t *mutex;
|
||||
|
||||
@@ -359,11 +362,13 @@ network_tx(uint8_t *bufp, int len)
|
||||
{
|
||||
ui_sb_icon_update(SB_NETWORK, 1);
|
||||
|
||||
#if defined(WALTJE) && defined(_DEBUG) && defined(ENABLE_NETWORK_DUMP)
|
||||
#if defined(WALTJE) && defined(_DEBUG) && ENABLE_NETWORK_DUMP
|
||||
{
|
||||
char temp[8192];
|
||||
hexdump_p(temp, bufp, len);
|
||||
DBGLOG(2, "NETWORK: >> len=%d\n%s\n", len, temp);
|
||||
char temp[16384];
|
||||
hexdump_p(temp, 0, bufp, len);
|
||||
pclog_repeat(0);
|
||||
DEBUG("NETWORK: >> len=%i\n%s\n", len, temp);
|
||||
pclog_repeat(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -379,11 +384,13 @@ network_rx(uint8_t *bufp, int len)
|
||||
{
|
||||
ui_sb_icon_update(SB_NETWORK, 1);
|
||||
|
||||
#if defined(WALTJE) && defined(_DEBUG) && defined(ENABLE_NETWORK_DUMP)
|
||||
#if defined(WALTJE) && defined(_DEBUG) && ENABLE_NETWORK_DUMP
|
||||
{
|
||||
char temp[8192];
|
||||
hexdump_p(temp, bufp, len);
|
||||
DBGLOG(2, "NETWORK: << len=%d\n%s\n", len, temp);
|
||||
char temp[16384];
|
||||
hexdump_p(temp, 0, bufp, len);
|
||||
pclog_repeat(0);
|
||||
DEBUG("NETWORK: << len=%i\n%s\n", len, temp);
|
||||
pclog_repeat(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* it should be malloc'ed and then linked to the NETCARD def.
|
||||
* Will be done later.
|
||||
*
|
||||
* Version: @(#)network_dev.c 1.0.2 2019/05/02
|
||||
* Version: @(#)network_dev.c 1.0.5 2019/05/12
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -61,9 +61,15 @@
|
||||
#include "../../ui/ui.h"
|
||||
#include "../../plat.h"
|
||||
#include "network.h"
|
||||
#include "net_3com.h"
|
||||
#ifdef USE_ARTISOFT
|
||||
#include "net_arti.h"
|
||||
#endif
|
||||
#ifdef USE_IBMPCNET
|
||||
#include "net_ibm.h"
|
||||
#endif
|
||||
#include "net_ne2000.h"
|
||||
#include "net_wd80x3.h"
|
||||
#include "net_3com.h"
|
||||
|
||||
|
||||
static const struct {
|
||||
@@ -74,12 +80,22 @@ static const struct {
|
||||
{ "internal", NULL },
|
||||
|
||||
/* ISA cards. */
|
||||
#ifdef USE_ARTISOFT
|
||||
{ "arti_e2m", &arti_e2m_device },
|
||||
{ "arti_a2m", &arti_a2m_device },
|
||||
#endif
|
||||
#ifdef USE_IBMPCNET
|
||||
{ "ibm_pcnet", &ibm_pcnet_device },
|
||||
#endif
|
||||
{ "ne1k", &ne1000_device },
|
||||
{ "ne2k", &ne2000_device },
|
||||
#if 0
|
||||
#ifdef USE_EL1
|
||||
{ "3c501", &el1_device },
|
||||
#endif
|
||||
{ "3c503", &el2_device },
|
||||
#ifdef USE_EL3
|
||||
{ "3c509", &el3_device },
|
||||
#endif
|
||||
{ "ne2kpnp", &rtl8019as_device },
|
||||
{ "wd8003e", &wd8003e_device },
|
||||
{ "wd8013ebt", &wd8013ebt_device },
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Video7 VGA 1024i emulation.
|
||||
*
|
||||
* Version: @(#)vid_ht216.c 1.0.3 2019/05/10
|
||||
* Version: @(#)vid_ht216.c 1.0.4 2019/05/11
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -885,7 +885,7 @@ ht216_writew(uint32_t addr, uint16_t val, void *priv)
|
||||
addr &= svga->banked_mask;
|
||||
addr = (addr & 0x7fff) + dev->write_bank[(addr >> 15) & 1];
|
||||
if (dev->ht_regs[0xcd]) {
|
||||
write_common(dev, addr, val);
|
||||
write_common(dev, addr, val & 0xff);
|
||||
write_common(dev, addr+1, val >> 8);
|
||||
} else
|
||||
svga_writew_linear(addr, val, &dev->svga);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Makefile for Windows systems using the MinGW32 environment.
|
||||
#
|
||||
# Version: @(#)Makefile.mingw 1.0.86 2019/05/05
|
||||
# Version: @(#)Makefile.mingw 1.0.88 2019/05/12
|
||||
#
|
||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
#
|
||||
@@ -681,6 +681,21 @@ ifeq ($(DEV_BRANCH), y)
|
||||
DEVBROBJ += cassette.o
|
||||
endif
|
||||
|
||||
ifeq ($(EL1), y)
|
||||
OPTS += -DUSE_EL1
|
||||
DEVBROBJ += net_3c501.o
|
||||
endif
|
||||
|
||||
ifeq ($(PCNET), y)
|
||||
OPTS += -DUSE_IBMPCNET
|
||||
DEVBROBJ += net_ibmpcnet.o
|
||||
endif
|
||||
|
||||
ifeq ($(ARTI), y)
|
||||
OPTS += -DUSE_ARTISOFT
|
||||
DEVBROBJ += net_arti2m.o
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Makefile for Windows using Visual Studio 2015.
|
||||
#
|
||||
# Version: @(#)Makefile.VC 1.0.70 2019/05/05
|
||||
# Version: @(#)Makefile.VC 1.0.72 2019/05/12
|
||||
#
|
||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
#
|
||||
@@ -598,6 +598,21 @@ ifeq ($(DEV_BRANCH), y)
|
||||
DEVBROBJ += cassette.obj
|
||||
endif
|
||||
|
||||
ifeq ($(EL1), y)
|
||||
OPTS += -DUSE_EL1
|
||||
DEVBROBJ += net_3c501.o
|
||||
endif
|
||||
|
||||
ifeq ($(PCNET), y)
|
||||
OPTS += -DUSE_IBMPCNET
|
||||
DEVBROBJ += net_ibmpcnet.o
|
||||
endif
|
||||
|
||||
ifeq ($(ARTI), y)
|
||||
OPTS += -DUSE_ARTISOFT
|
||||
DEVBROBJ += net_arti2m.o
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user