ps2homebrew / Open-PS2-Loader

Game and app loader for Sony PlayStation 2
https://ps2homebrew.github.io/Open-PS2-Loader/
Academic Free License v3.0
2.24k stars 280 forks source link

[FR] FireWire/i.Link Driver for loading games through i.Link port on PlayStation 2 in OPL. #350

Closed SkyNet75 closed 3 years ago

SkyNet75 commented 3 years ago

OPL is very usefull piece of software and we all love to use and want to improve it by adding unique features which it never had before and one of those to my honest opinion is adding FireWire/i.Link Driver in order people would have more possibilities to load their own back ups the way they like. So far OPL has USB, Ethernet(SMB), HDD in Settings Menu to be activated, but in past SP193 added support in now outdated ps2ESDL loader for FireWire/i.Link driver and results are actually look very good and impressive if to look at compatibility table made by one user and from France here:

https://docs.google.com/spreadsheet/ccc?key=0AkthiKwj1VJMdFZSelJhOUVIMTQ3dE9WaU5IN09ZYWc#gid=0

And if to take into account that it was only beginning of development of this driver, imagine guys how much more game compatibility would grow if that driver would become belonging to family of OPL and would further worked on?

Plus more possibilities for people to load their games is better, maybe someone will love to use his i.Link cable and FireWire hdd lying nearby. I would be very appreciative to you Guys if you would accomplish mine and many others people dream to make i.Link driver to be present in Settings menu of OPL. Thank you so much.

rickgaiser commented 3 years ago

There have already been test builds of OPL with iLink support, so you dream might come true one day. The key to this and many other drivers is the BDM (Block Device Manager). It separates the file system (FAT32) from the block devices (USBMASS, iLink, SIO2SD, ...). Then from the OPL GUI the idea was to rename USB to BDM, then whatever is plugged in will show up there. All these parts are already working to some extend, but they have too many issues to be implemented in the main OPL just yet. Another thing to keep in mind, besides game compatibility, is the iLink drive compatibility. This was poor with PS2ESDL, and since it's the same codebase being used for BDM, it has the same drive compatibility.

USB BDM block device driver: https://github.com/ps2dev/ps2sdk/tree/master/iop/usb/usbmass_bd iLink BDM block device driver: https://github.com/ps2dev/ps2sdk/tree/master/iop/iLink/IEEE1394_bd SIO2SD BDM block device driver (WIP): https://gitlab.com/ps2max/ps2sdk/-/tree/sio2sd/iop/memorycard/sio2sd_bd FAT32 BDM filesystem: https://github.com/ps2dev/ps2sdk/tree/master/iop/fs/bdmfs_vfat BDM manager: https://github.com/ps2dev/ps2sdk/tree/master/iop/fs/bdm OPL with BDM support (WIP): https://gitlab.com/ps2max/Open-PS2-Loader/-/tree/bdm-2020

Since I really would like sio2sd to be added to OPL, I've been working recently to get BDM in a proper working state. Once it is, iLink will simply be a bonus feature.

Note that it will also be more easy to add more filesystems, like the EXT2 sample that once existed. Adding it as a BDM driver will give all block devices EXT2 support, automatically.

TnA-Plastic commented 3 years ago

I feel that the "page plugin system"-idea (only showing a device or APPS-page, if either the device or the "per apps page config" is found) would be a good stepping stone for BDM (along some other things, like replacing the PS1-Page of certain OPL-Forks).

SkyNet75 commented 3 years ago

Sounds very interesting idea to use BDM as base and just connect drivers and devices to it. I just wonder , to your opinion for how many percent BDM is complete in current state? So technically it gives almost unlimited possibilties and we could see potentially in future ntfs or exfat file systems if somebody could implement them? I saw some FireWire hdd drives enclosures on Amazon and have some hdds around, just wonder if those could be compatible enough? I think those been OWC Mercury, acomdata on amazon... How about HDD size supported on ps2? REcently it was achieved 2TB hdd to format and to be used on ps2. Do you think this BDM system would allow to use on PS2 sata hdds 3TB, 4 TB and higher? Is it possible to add higher than 48bit lba?

rickgaiser commented 3 years ago

I just wonder , to your opinion for how many percent BDM is complete in current state?

I saw some FireWire hdd drives enclosures on Amazon and have some hdds around, just wonder if those could be compatible enough? I think those been OWC Mercury, acomdata on amazon...

Most old enclosures work. Most new enclosures do not work. I do not have a list of compaible devices at hand, but the enclosures WITH USB probably do not work. The enclosures with ONLY iLink have the highest probability of working.

How about HDD size supported on ps2? REcently it was achieved 2TB hdd to format and to be used on ps2. Do you think this BDM system would allow to use on PS2 sata hdds 3TB, 4 TB and higher? Is it possible to add higher than 48bit lba?

Support is EXACTLY the same as for USB. Same SCSI commands, same FAT32 driver. I have not investigated possibilities for larger drives.

AKuHAK commented 3 years ago

I saw some FireWire hdd drives enclosures on Amazon and have some hdds around, just wonder if those could be compatible enough? I think those been OWC Mercury, acomdata on amazon...

SATA Chipset based on Oxford 934 are compatible Oxford 911 for example isn't compatible

SkyNet75 commented 3 years ago

I just wonder why compatibility is not so good? From tech point of view ther should be no difference if you connect to old enclosure through s400 or to new one with FireWire800 ports and and run FireWire800 ports in s400 speed?

also I thought that to buy enclosure which has also usb port would be good idea in order to make it more universal solution but looks like it was wrong assumption?

AKuHAK hot to find out before buy enclosure which chip is inside in order to be on safe side?

Also lets say development will go further and i/Link compatibility will improve more and more--do you think that those incompatible now enclosures will become compatible? If I rememebr correctly many of them on amazon have usb port...

AKuHAK commented 3 years ago

@SkyNet75 This driver was developed by @sp193 mostly as a proof of concept. It was tested only on that chipset due to a lack of interest from the community. Of course, this driver can do more. For example, Official PS2 Linux has normal support for it - not only for a specific chipset but almost any i.Link device (SATA enclosures, cameras, DVD recorders, etc). Here. I don't know if someone will do it, the community is still big and active, maybe one day.

There is also a problem that Firewire port is provided on a limited amount of consoles, so it is not so interesting for the most. Years ago I was involved in the project with the goal to add Firewire ability to consoles without a firewire port, but it was proved, that such mod is impossible. PS2 side doesn't have an important chip and EE/IOP pinouts that are responsible for Firewire are disabled by chip internally.

As regarding compatibility, it is true that it is very hard to find the specifications for Firewire enclosures. You can try to search over "ps2esdl firewire" on eBay, you will find one enclosure (Lacie Porsche 160GB) for an enormous price (100 USD). Maybe there are more enclosures on this chip - I didn't investigate this.

rickgaiser commented 3 years ago

The drive I have and use to test is this one: IMG_20210115_111932 IMG_20210115_111952 IMG_20210115_113330

So we can add JMicron JMB353 to the list of supported chips. It even seems to have USB2.0 ? But not with the enclosure I have.

sp193 commented 3 years ago

I didn't intend any of it to be a POC. The issue was that I just lacked the skills to make it work. I believed that there are some hardware characteristics that need to be handled, but we just have no documentation for that. I only had one enclosure since Firewire isn't popular in Singapore and finding one in 2011 was like hunting for rare Pokemon.

Originally, I used the Sony i.Link driver (ILINK.IRX) and compatibility was already very bad. I never figured out if it was because I did not correctly interpret the SBP-2 standard correctly or the final version of SBP-2 just worked slightly differently from the freely and publicly-available draft. It got worse when I wrote my own driver (ILINKMAN.IRX). There's also a hack to make things work properly on earlier consoles, when the PS2 is the root node... but who knows why it works that way. Things worked well with the Oxford chipset in my enclosure, since it's the one I did development with.

Our i.Link interface's registers are proprietary, which means Linux will have no support for it. Although it shares similarities with the device from the LSI Lead Vehicle, clearly our device is not the same one. There also exists a Sony IEEE1394 chipset in some computers which was not ever supported by Linux, but it's not clear whether there's any link between that one and the one in the PS2: the CXD1947

Since only Sony is qualified to write a proper driver, I think it should be enough motivation for anyone to clone ILINK.IRX properly and just delete ILINKMAN from the PS2SDK. Preferably based on the ILINK.IRX module that has those additional exported functions for supporting DMA.

AKuHAK commented 3 years ago

I didn't intend any of it to be a POC.

My apologies, I tried to find a conversation on psx-scene about it but failed and write these facts from what I remember.

sp193 commented 3 years ago

Nah, no problem. It's more like: such a project went so badly that it appeared to be... like a POC. Even though the months went by and it also got committed into the PS2SDK. Occasionally, users would either post about their adventures or even write to me about them, which was how I knew that compatibility was just horrible. It might not have been strictly due to the PS2, but some of them (e.g. Prolific PL3507) might require the workarounds that Linux needed.

AKuHAK commented 3 years ago

@SkyNet75 you can grab the latest beta - Firewire is now in OPL.

Closing this issue as resolved in https://github.com/ps2homebrew/Open-PS2-Loader/pull/417

TnA-Plastic commented 2 years ago

So... We've got Firewire support since 3/4th of a year now.