PS2Netbox / PS2USB network adapter

I create two products. One called PS2Netbox ,the other ,PS2USB network adapter.
PS2Netbox is designed for ps2 slim ( but can be used with ps2 fat with network adapter).
It use a simple network protocol for high speed communication. It can load and play game at almost like HDD on ps2 fat with network adapter.

PS2USB network adapter , is designed for PS2 Fat . With this adapter you can connect a variety of high-speed USB 2.0 interface storage devices.

Both of them use a custom OPL .
Players format harddisk with Exfat format , drag and drop game ISO to OPL\DVD or OPL\CD folder. No other settings is needed.

With PS2USB , you do not need fmcb or modic ,plug it to ps2 fat and power up , OPL will start with game list.

With PS2Netbox ,you need fmcb or mod-ic to start OPL.

Any suggestion are welcome !
can you make it support USB DVDROM load normal PS/PS2 disc ?
Maybe EXT2 file system also might be a good thing to add.
I don't know how other systems (Linux, etc.) deals with exFAT.
Here is a mod by @s0ck3t with this file system:
https://sourceforge.net/projects/e2opl/?source=navbar.

Here is also quote from @spiderman at PSX-Scene:
I'm curious if you can share the source code of your modified OPL variants.
The Raspberry Pi 3 Model B may be a good target for the low-overhead simple network protocol, as it also has a ethernet connection, and costs about 30 GBP.

I'm also curious if it's possible to add a coprocessor to the expansion bay bus and replace/emulate most of the tasks of the IOP, but I'll research more on this topic first.
It's a great thing you made, I saw it on Aliexpress (if I am correct). Maybe you should try to use SD cards instead USB—HDD? It's much more smaller and cheaper solution. For Slim mostly.
Linux support exfat too .
If we have the source code, things get easy . If do not ,it is very hard .
No I will not share the source code ,I need money for my baby.

Using a generic arm cpu sounds good ,but one cannot get speed like ps2netbox.
No , It spend me one year , I do not want to change the hardware.
From the other thread:
Ah okay, thanks.

I am curious: given that we have WinHIIP to install games onto the HDD unit, why did you not implement the ps2usb as a compatible network (ATA) adaptor? Would it not have been an easier way to gain compatibility with all existing homebrew software?

But compared to a USB disk, I think that would be more expensive.

Just by looking at the pins that are part of that 110-pin connector, it hints of some unholy control over the PlayStation 2 sub-bus. I'm curious to see if anybody will build a DVD Emulator that works from it.

But because the IOP is generally only concerned with I/O, it may not have much of a purpose.
If you mean to provide new high-speed hardware that requires little interaction from the IOP, that would probably fit with the IOP's original design.

This was perhaps something that Sony should have done for the Ethernet interface. Particularly with the lack of CRC-computation by the hardware and scatter-gather DMA (which oddly, the USB channel might have been designed to support!). This caused the only solution for fast networking to be to involve the EE.
I always thought that Linux have problem with this file system (exFAT & NTFS).

EXT2 contains a mechanism to prevent significant data fragmentation.
Maybe it will also be a good alternative for those who uses OPL through USB,
if somehow it will be added to OPL.

Source code of SMS can be found here:
http://members.casema.nl/eugene_plotnikov/ (creator of a SMS Eugene Plotnikov, source can be found at the bottom of the screen),

https://bitbucket.org/doctorxyz/sms, https://github.com/doctorxyz/sms (@doctorxyz repos)

https://bitbucket.org/belek666/sms (@belek666 repo).
Hackers may think WinHiip is good enough , but to a player , Winhiip is too too complex to use .

There is a project called e2opl https://sourceforge.net/projects/e2opl

Thank you ! After I have done with POPStarter ,maybe or may not , I will port SMS to my hardware .After all, I have spent one year on PS2. I need to start a new product.
It is not super user-friendly, but a better program can be written. Or you could change OPL (since you are modifying it) to not expect APA). But that is not what I wanted to ask.

What I meant to ask is why you would prefer to emulate the HDD, rather than making a compatible adaptor that can allow existing software to support it. By choosing this route, it means that only software that you modify/build will support your hardware. And your modified builds will only support your hardware, rather than supporting the official hardware (user must download a specific build).

Anyway, your work is amazing. I only ask these questions out of curiosity, nothing more. Thank you for talking about your work.
If your goal is to only support specific software, it is also fine because your end-users will stay satisfied if their needs are met.
I know, I've recently tried it:
http://psx-scene.com/forums/f150/open-ps2-loader-project-v0-9-3-a-62141/index793.html#post1216377.
Unfortunately latest version is from 27-12-2014, so it's quite old.
That's why I was thinking about adding it to OPL.

Anyway your product (PS2NetBox) seems to be a fantastic alternative to NA.
Thanks, maybe someday I'll have chance to buy\try it.
Regards
1) Making a compatible adapter is very complex and hard to change.
This is the difference between HARDware and SOFTware.
2) Using official OPL sounds good ,but a custom build give more chance to communicate with user. This is very important to a commercial / home-brew product .
I reckon a custom server instead of SMB would allow ethernet to go much faster, especially if you use an exploit to run ppc code in deckard in the later slim ps2 (I might be imagining it, but I believe the ppc runs faster than EE).
USB of PS2 is 1.1, maximum read speed is almost 500-600KB/s ,reading speed of ps2netbox is almost 6MB/s( 10 times faster than usb),almost at a speed like harddisk .
So nice
Run with PS3 FAT, for run OPL from USB port (OPL increase the retrocompatibilty....)
Thanks to @sp193 and @kHn ,PS2Netbox/PS2USB support for Popstarter have done!
One can play PS1 game like this :
1) Format disk to ExFat file system.
2) Create Folder OPL , OPL\SYS,OPL\PS1, OPL\SYS\POPS,
3) Copy Popstater.ELF POPS_IOX.PAK to OPL\SYS\POPS.
4) Copy Game.VCD to OPL\PS1
5) Popster's IGR texture : IGR_BG.TM2, IGR_NO.TM2 & IGR_YES.TM2 shoud copy to OPL\SYS\POPS.
6) For PS2USB , insert U-disk , power on ps2, PS1 Game list will be displayed .
For PS2Netbox ,Launch custom OPL (using FMCB or uLaunchElf) ,PS1 Game list will be displayed.

Have fun !
Isn't 6MB/s still very slow? How did you measure the speed?

Maximus32 has done some tests with the Ethernet and HDD interfaces of the PlayStation 2: http://psx-scene.com/forums/f19/speed-testing-storage-devices-157395/.
For i.Link/IEEE1394, I got about 50MB/s (likely less, since 400Mbit is 50MBps) if we ignored the byte-swapping problem. 7MB/s when I use the IOP to byte-swap all data.... so this difference may be caused by me making a mistake, or perhaps my enclosure was faster.
The i.Link DMA controller is very intelligent, so nearly nothing has to be done by the IOP (which can explain the ATA-like performance).

He was also doing work for PS2Linux. Since PS2Linux does processing on the EE and low-level SIFCMD can be used to transfer data to/from the IOP, he got even better speeds:
ATA (25-30MB/s): http://psx-scene.com/forums/f167/porting-linux-2-6-ps2-67806/index67.html#post1207494
SMAP (6-8MB/s): http://psx-scene.com/forums/f167/porting-linux-2-6-ps2-67806/index75.html#post1211680

With NETMAN (the Network Manager), which uses SIFRPC to communicate between EE and IOP, I got about 5MB/s with a custom TCP/IP-based protocol for HDLGameInstaller.

So we're losing performance due to the IOP & SIF. But that is okay.
I am just mentioning the numbers, in case you really only got 6MB/s from the interface on the IOP-side (without the SIF and without higher-level protocols that may worsen performance).
I measured the speed by using logic analyzer to capture data on ide bus when game is loading.
It is about 6MB/s。This is not a serious technical result.
There are many idle gap between data transfer , so I think network transfer speed is not a critical fact .
When playing with PS2Netbox , some user said ,it is fast than harddisk with ps2 fat .
Because I create a game cache so no need to scan game list on every boot .Some user said it is slightly slow than hard disk with ps2 fat.



By the way, If you are still code for OPL ,You may try this idea, In application mode ,
if game.vcd instead of app.elf is detected,just launch popstarter.elf using this run from memory method.
I think this is simple than too too many popstarter.elf .

Code:
elfldr.c
int main(int argc, char *argv[])
{
    if(argc>0)
    {
        if(    (argv[0][0]=='m')
            && (argv[0][1]=='e')
            && (argv[0][2]=='m')
            && (argv[0][3]==':')
          ){
              // boot from memaddr ;
            unsigned  n=_strtoui(&(argv[0][4]));
            RunLoaderElf(argv[1],(void*)n);
            BootError(argv[0]);  
          }
    }
    return main_old(argc-1,argv+1);
}
void RunLoaderElf(char *filename,void *pElf)
{
    u8 *boot_elf;
    elf_header_t *eh;
    elf_pheader_t *eph;
    void *pdata;
    int ret, i;
    char *argv[2];


    /* NB: LOADER.ELF is embedded  */
    boot_elf = (u8 *)pElf;
    eh = (elf_header_t *)boot_elf;
    if (_lw((u32)&eh->ident) != ELF_MAGIC)
        while (1)
            ;
    eph = (elf_pheader_t *)(boot_elf + eh->phoff);

    /* Scan through the ELF's program headers and copy them into RAM, then
                                    zero out any non-loaded regions.  */
    for (i = 0; i < eh->phnum; i++) {
        if (eph[i].type != ELF_PT_LOAD)
            continue;

        pdata = (void *)(boot_elf + eph[i].offset);
        memcpy(eph[i].vaddr, pdata, eph[i].filesz);

        if (eph[i].memsz > eph[i].filesz)
            memset(eph[i].vaddr + eph[i].filesz, 0,
                   eph[i].memsz - eph[i].filesz);
    }

    /* Let's go.  */
    SifInitRpc(0);
    SifExitRpc();
    FlushCache(0);
    FlushCache(2);

    argv[0] = filename;
    ExecPS2((void *)eh->entry, 0, 1, argv);
}
[code]

Original thread: https://assemblergames.com/threads/ps2netbox-ps2usb-network-adapter.67985/