mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-09-25 11:25:36 +00:00
Add Uthernet II support and make Uthernet I a Card. (PR #1047)
. tfe.cpp renamed to Uthernet1.cpp. . add class NetworkBackend: common to both U1 and U2 cards, and abstracts Windows/Linux backends. . modernise error message if WPCAP.DLL is not installed.
This commit is contained in:
@@ -21,7 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "StdAfx.h"
|
||||
#include "Card.h"
|
||||
|
||||
#include "Tfe/tfe.h"
|
||||
#include "Uthernet1.h"
|
||||
#include "Uthernet2.h"
|
||||
#include "Mockingboard.h"
|
||||
#include "ParallelPrinter.h"
|
||||
#include "z80emu.h"
|
||||
@@ -71,9 +72,6 @@ void DummyCard::InitializeIO(LPBYTE pCxRomPeripheral)
|
||||
case CT_GenericPrinter:
|
||||
PrintLoadRom(pCxRomPeripheral, m_slot);
|
||||
break;
|
||||
case CT_Uthernet:
|
||||
tfe_InitializeIO(pCxRomPeripheral, m_slot);
|
||||
break;
|
||||
case CT_GenericClock:
|
||||
break; // nothing to do
|
||||
case CT_MockingboardC:
|
||||
@@ -124,9 +122,6 @@ void DummyCard::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
|
||||
case CT_Z80:
|
||||
Z80_SaveSnapshot(yamlSaveHelper, m_slot);
|
||||
break;
|
||||
case CT_Uthernet:
|
||||
tfe_SaveSnapshot(yamlSaveHelper, m_slot);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +137,6 @@ bool DummyCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version)
|
||||
return Phasor_LoadSnapshot(yamlLoadHelper, m_slot, version);
|
||||
case CT_Z80:
|
||||
return Z80_LoadSnapshot(yamlLoadHelper, m_slot, version);
|
||||
case CT_Uthernet:
|
||||
return tfe_LoadSnapshot(yamlLoadHelper, m_slot, version);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -186,13 +179,15 @@ std::string Card::GetCardName(const SS_CARDTYPE cardType)
|
||||
case CT_SAM:
|
||||
return SAMCard::GetSnapshotCardName();
|
||||
case CT_Uthernet:
|
||||
return tfe_GetSnapshotCardName();
|
||||
return Uthernet1::GetSnapshotCardName();
|
||||
case CT_FourPlay:
|
||||
return FourPlayCard::GetSnapshotCardName();
|
||||
case CT_SNESMAX:
|
||||
return SNESMAXCard::GetSnapshotCardName();
|
||||
case CT_VidHD:
|
||||
return VidHDCard::GetSnapshotCardName();
|
||||
case CT_Uthernet2:
|
||||
return Uthernet2::GetSnapshotCardName();
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
@@ -236,7 +231,7 @@ SS_CARDTYPE Card::GetCardType(const std::string & card)
|
||||
{
|
||||
return CT_GenericHDD;
|
||||
}
|
||||
else if (card == tfe_GetSnapshotCardName())
|
||||
else if (card == Uthernet1::GetSnapshotCardName())
|
||||
{
|
||||
return CT_Uthernet;
|
||||
}
|
||||
@@ -260,6 +255,10 @@ SS_CARDTYPE Card::GetCardType(const std::string & card)
|
||||
{
|
||||
return CT_VidHD;
|
||||
}
|
||||
else if (card == Uthernet2::GetSnapshotCardName())
|
||||
{
|
||||
return CT_Uthernet2;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("Slots: Unknown card: " + card); // todo: don't throw - just ignore & continue
|
||||
|
Reference in New Issue
Block a user