Uthernet I/II: Activate DEV SELECT I/O even if NIC interface is not valid (PR #1324)

This commit is contained in:
TomCh 2024-08-17 21:20:00 +01:00 committed by GitHub
parent 4786de0cc7
commit fd93396162
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 14 deletions

View File

@ -1013,17 +1013,13 @@ void Uthernet1::InitializeIO(LPBYTE pCxRomPeripheral)
{
const std::string interfaceName = PCapBackend::GetRegistryInterface(m_slot);
networkBackend = GetFrame().CreateNetworkBackend(interfaceName);
if (networkBackend->isValid())
{
RegisterIoHandler(m_slot, TfeIo, TfeIo, TfeIoCxxx, TfeIoCxxx, this, NULL);
}
else
if (!networkBackend->isValid())
{
// Interface doesn't exist or user picked an interface that isn't Ethernet!
// . So setup as a "null" card: I/O reads from floating bus & writes go to null
RegisterIoHandler(m_slot, IO_Null, IO_Null, TfeIoCxxx, TfeIoCxxx, this, NULL);
GetFrame().FrameMessageBox("Uthernet interface isn't valid!\nReconfigure the Interface via 'Ethernet Settings'.", "Uthernet Interface", MB_ICONEXCLAMATION | MB_SETFOREGROUND);
}
RegisterIoHandler(m_slot, TfeIo, TfeIo, TfeIoCxxx, TfeIoCxxx, this, NULL);
}
void Uthernet1::Reset(const bool powerCycle)

View File

@ -1470,17 +1470,13 @@ void Uthernet2::InitializeIO(LPBYTE pCxRomPeripheral)
{
const std::string interfaceName = PCapBackend::GetRegistryInterface(m_slot);
myNetworkBackend = GetFrame().CreateNetworkBackend(interfaceName);
if (myNetworkBackend->isValid())
{
RegisterIoHandler(m_slot, u2_C0, u2_C0, IO_Null, IO_Null, this, nullptr);
}
else
if (!myNetworkBackend->isValid())
{
// Interface doesn't exist or user picked an interface that isn't Ethernet!
// . So setup as a "null" card: I/O reads from floating bus & writes go to null
RegisterIoHandler(m_slot, IO_Null, IO_Null, IO_Null, IO_Null, this, nullptr);
GetFrame().FrameMessageBox("Uthernet II interface isn't valid!\nReconfigure the Interface via 'Ethernet Settings'.", "Uthernet Interface", MB_ICONEXCLAMATION | MB_SETFOREGROUND);
}
RegisterIoHandler(m_slot, u2_C0, u2_C0, IO_Null, IO_Null, this, nullptr);
}
void Uthernet2::getMACAddress(const uint32_t address, const MACAddress * & mac)