01-02-2018, 08:01 AM
(04-28-2017, 05:31 PM)Ge-Force Wrote: @NRoach44
OPL (or other homebrew software) network featured won't work.
I believe the issue is due to smap emulation issues in the plugin, however I haven't been able to figure out the cause of the issue, and finding documentation about dev9 hardware has not been easy.
This issue is caused by the ps2sdk's smap module (which is based on the newer ps2eth's smap module, named "smap") when sending a packet, as the pointer field of the buffer descriptor (BD_ptr->pointer) is being set (*) without adding SMAP_TX_BASE (set to 0x1000 at line 295 of ps2sdk's smapregs.h header file) (**) to it.
(*): ps2sdk's iop/network/smap/src/xfer.c, line 138 (link)
Code:
BD_ptr->pointer=BD_data_ptr;
SMAP_REG8(SMAP_R_TXFIFO_FRAME_INC)=0;
(**): ps2sdk's common/include/smapregs.h, line 295 (link)
Code:
#define SMAP_TX_BASE 0x1000
The older ps2eth's smap module (currently named "smap-linux") does add SMAP_TXBUFBASE (set to 0x1000 at line 55 of ps2eth's smap-linux/smap.c source file) (****) to the pointer field of the buffer descriptor (pTXBD->pointer) (***)
(***): ps2eth's smap-linux/smap.c, line 1828 (link)
Code:
pTXBD->pointer=pSMap->TX.u16PTREnd+SMAP_TXBUFBASE;
SMAP_REG8(pSMap,SMAP_TXFIFO_FRAME_INC)=1;
(****): ps2eth's smap-linux/smap.c, line 55 (link)
Code:
#define SMAP_TXBUFBASE 0x1000
Adding SMAP_TX_BASE to the pointer field of the buffer descriptor (as done in the older ps2eth's smap module) fixes this issue.
Code:
BD_ptr->pointer=BD_data_ptr+SMAP_TX_BASE;
SMAP_REG8(SMAP_R_TXFIFO_FRAME_INC)=1;
This change applies for:
ps2sdk: iop/network/smap/src/xfer.c, line 138 (link)
ps2eth (newer smap module): smap/xfer.c, line 139 (link)
open-ps2-loader (smap-ingame module): modules/network/smap-ingame/xfer.c, line 236 (link)