mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-02-06 09:30:20 +00:00
Fix for both Uthernet cards not reading I/O $Csxx space as floating-bus. (#1321)
This commit is contained in:
parent
f516423772
commit
6e8d79ddde
@ -816,7 +816,7 @@ static BYTE __stdcall IO_Cxxx(WORD programcounter, WORD address, BYTE write, BYT
|
||||
if ((address >= APPLE_SLOT_BEGIN) && (address <= APPLE_SLOT_END))
|
||||
{
|
||||
const UINT uSlot = (address>>8)&0x7;
|
||||
if (uSlot != 3)
|
||||
if (IS_APPLE2 || uSlot != SLOT3)
|
||||
{
|
||||
if (ExpansionRom[uSlot])
|
||||
IO_SELECT |= 1<<uSlot;
|
||||
@ -841,7 +841,7 @@ static BYTE __stdcall IO_Cxxx(WORD programcounter, WORD address, BYTE write, BYT
|
||||
if (IO_SELECT && IO_STROBE)
|
||||
{
|
||||
// Enable Peripheral Expansion ROM
|
||||
UINT uSlot=1;
|
||||
UINT uSlot = SLOT1;
|
||||
for (; uSlot<NUM_SLOTS; uSlot++)
|
||||
{
|
||||
if (IO_SELECT & (1<<uSlot))
|
||||
@ -907,8 +907,8 @@ static BYTE __stdcall IO_Cxxx(WORD programcounter, WORD address, BYTE write, BYT
|
||||
const UINT uSlot = (address>>8)&0x7;
|
||||
const bool bPeripheralSlotRomEnabled = IS_APPLE2 ? true // A][
|
||||
: // A//e or above
|
||||
( !SW_INTCXROM && // Peripheral (card) ROMs enabled in $C100..$C7FF
|
||||
!(!SW_SLOTC3ROM && uSlot == 3) ); // Internal C3 ROM disabled in $C300 when slot == 3
|
||||
( !SW_INTCXROM && // Peripheral (card) ROMs enabled in $C100..$C7FF
|
||||
!(!SW_SLOTC3ROM && uSlot == SLOT3) ); // Internal C3 ROM disabled in $C300 when slot == 3
|
||||
|
||||
// Fix for GH#149 and GH#164
|
||||
if (bPeripheralSlotRomEnabled && !IsCardInSlot(uSlot)) // Slot is empty
|
||||
@ -1001,7 +1001,7 @@ void RegisterIoHandler(UINT uSlot, iofunction IOReadC0, iofunction IOWriteC0, io
|
||||
IORead[uSlot+8] = IOReadC0;
|
||||
IOWrite[uSlot+8] = IOWriteC0;
|
||||
|
||||
if (uSlot == 0) // Don't trash C0xx handlers
|
||||
if (uSlot == SLOT0) // Don't trash C0xx handlers
|
||||
return;
|
||||
|
||||
//
|
||||
|
@ -333,8 +333,13 @@ pcap_t * TfePcapOpenAdapter(const std::string & interface_name)
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
#if 1
|
||||
// TC: Don't take the first adapter, as this could be any NIC (eg. WAN miniport, Bluetooth, loopback etc)
|
||||
return NULL;
|
||||
#else
|
||||
/* just take the first adapter */
|
||||
TfePcapDevice = TfePcapAlldevs;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -361,7 +366,7 @@ pcap_t * TfePcapOpenAdapter(const std::string & interface_name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(g_fh) fprintf(g_fh, "PCAP: Successfully opened adapter: '%s'\n", TfePcapDevice->name);
|
||||
if(g_fh) fprintf(g_fh, "PCAP: Successfully opened adapter: '%s' (%s)\n", TfePcapDevice->name, TfePcapDevice->description);
|
||||
|
||||
tfe_arch_enumadapter_close();
|
||||
return TfePcapFP;
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "Tfe/tfesupp.h"
|
||||
#include "Tfe/NetworkBackend.h"
|
||||
#include "Tfe/PCapBackend.h"
|
||||
#include "../Windows/Win32Frame.h"
|
||||
|
||||
/* Makros for reading and writing the visible TFE register: */
|
||||
#define GET_TFE_8( _xxx_ ) \
|
||||
@ -1017,6 +1018,13 @@ void Uthernet1::InitializeIO(LPBYTE pCxRomPeripheral)
|
||||
{
|
||||
RegisterIoHandler(m_slot, TfeIo, TfeIo, TfeIoCxxx, TfeIoCxxx, this, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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);
|
||||
Win32Frame::GetWin32Frame().FrameMessageBox("Reconfigure the Interface via 'Ethernet Settings'.", "Uthernet 1 interface isn't valid!", MB_ICONEXCLAMATION | MB_SETFOREGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
void Uthernet1::Reset(const bool powerCycle)
|
||||
|
@ -1469,7 +1469,7 @@ BYTE __stdcall u2_C0(WORD programcounter, WORD address, BYTE write, BYTE value,
|
||||
|
||||
void Uthernet2::InitializeIO(LPBYTE pCxRomPeripheral)
|
||||
{
|
||||
RegisterIoHandler(m_slot, u2_C0, u2_C0, nullptr, nullptr, this, nullptr);
|
||||
RegisterIoHandler(m_slot, u2_C0, u2_C0, IO_Null, IO_Null, this, nullptr);
|
||||
}
|
||||
|
||||
void Uthernet2::getMACAddress(const uint32_t address, const MACAddress * & mac)
|
||||
|
Loading…
x
Reference in New Issue
Block a user