mirror of
https://github.com/thewesker/RASCSI.git
synced 2025-12-20 20:31:24 -05:00
Disabled SEL interrupt functionality so we can receive IP packets without delays. Some updates for receiving messages. Appears that the HD functionality still works, but others are untested
This commit is contained in:
@@ -460,22 +460,27 @@ void FASTCALL SCSINuvolink::SetMacAddr(BYTE *mac)
|
||||
// Receive Packet
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
void FASTCALL SCSINuvolink::ReceivePacket()
|
||||
int FASTCALL SCSINuvolink::ReceivePacket()
|
||||
{
|
||||
static const BYTE bcast_addr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
ASSERT(this);
|
||||
ASSERT(tap);
|
||||
LOGTRACE("SCSINuvolink::ReceivePacket");
|
||||
//LOGTRACE("SCSINuvolink::ReceivePacket");
|
||||
|
||||
// previous packet has not been received
|
||||
if (packet_enable) {
|
||||
return;
|
||||
}
|
||||
// // previous packet has not been received
|
||||
// if (packet_enable) {
|
||||
// LOGDEBUG("packet not enabled");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Receive packet
|
||||
packet_len = tap->Rx(packet_buf);
|
||||
|
||||
if(packet_len){
|
||||
LOGINFO("Received a packet of size %d",packet_len);
|
||||
}
|
||||
|
||||
// Check if received packet
|
||||
if (memcmp(packet_buf, mac_addr, 6) != 0) {
|
||||
if (memcmp(packet_buf, bcast_addr, 6) != 0) {
|
||||
@@ -486,16 +491,23 @@ void FASTCALL SCSINuvolink::ReceivePacket()
|
||||
|
||||
// Discard if it exceeds the buffer size
|
||||
if (packet_len > 2048) {
|
||||
LOGDEBUG("Packet size was too big. Dropping it");
|
||||
packet_len = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Store in receive buffer
|
||||
if (packet_len > 0) {
|
||||
packet_enable = TRUE;
|
||||
}
|
||||
// TransferPacket(packet_len, packet_buff);
|
||||
return packet_len;
|
||||
|
||||
// // Store in receive buffer
|
||||
// if (packet_len > 0) {
|
||||
// packet_enable = TRUE;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Get Packet
|
||||
|
||||
Reference in New Issue
Block a user