public uint SPEED_Read32(uint addr) { switch (addr) { default: Log_Error("*Unknown 32bit read at address " + addr.ToString("x") + " value " + dev9.Dev9Ru32((int)addr).ToString("X")); return(dev9.Dev9Ru32((int)addr)); } }
//this can return a false positive, but its not problem since it may say it cant recv while it can (no harm done, just delay on packets) public virtual bool RxFifoCanRx() { //check if RX is on & stuff like that here //Check if there is space on RXBD if (dev9.Dev9Ru8((int)DEV9Header.SMAP_R_RXFIFO_FRAME_CNT) == 64) { Log_Error("Delay recive, RXBD Full"); return(false); } //Check if there is space on fifo int rd_ptr = (int)dev9.Dev9Ru32((int)DEV9Header.SMAP_R_RXFIFO_RD_PTR); int space = dev9.rxFifo.Length - ((dev9.rxFifoWrPtr - rd_ptr) & 16383); if (space == 0) { space = (dev9.rxFifo.Length); } if (space < 1514) { Log_Error("Delay recive, RXFIFO Full"); return(false); } //int soff = (int)((DEV9Header.SMAP_BD_RX_BASE & 0xffff) + dev9.rxbdi * SMAP_bd.GetSize()); //SMAP_bd pbd = new SMAP_bd(dev9.dev9R, soff); //if (!((pbd.CtrlStat & DEV9Header.SMAP_BD_RX_EMPTY) != 0)) //{ // return false; //} //we can recv a packet ! return(true); }