Homebrew WIP libusbhsfs - USB Mass Storage Class Host + Filesystem Mounter static library.

blawar

Developer
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
please dont forget your Lithium :grog:

Tinfoil and Lithium do not use this library, they use my own UMS implementation which I have to update to support NTFS. I will get to it eventually, but it is not a priority atm.

--------------------- MERGED ---------------------------

Finally, it's working good with my 2TB seagate NTFS hard drive.... thanks a lot

Don't thank me, all I did was recompile. Any idiot can do that. This is DMC's work.
 
Last edited by blawar,

minomore

Well-Known Member
Member
Joined
Dec 25, 2015
Messages
104
Trophies
0
Age
37
XP
1,640
Country
thanks to all who worked on this amazing development, any chance of getting this on the key switch apps.... ie retroarch, pplay etc??
 

UnT7oh

Well-Known Member
Newcomer
Joined
Mar 18, 2017
Messages
88
Trophies
0
XP
377
Country
United States
pPlay would be great but the developer seems completely inactive on Switch projects.

m4xw is against adding UMS device support because it may further encourage piracy in RetroArch.

Uh what? First of all that makes no sense at all, secondly USB support gives a huge boost in flexibilty, sharing your setup between different devices and so on.
 

DarkMatterCore

Finding my light.
OP
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,604
Country
Spain
Uh what? First of all that makes no sense at all, secondly USB support gives a huge boost in flexibilty, sharing your setup between different devices and so on.
Nonetheless, that's his personal view on this matter, which I decided to respect. In the end, he's totally free to decide what to implement into RA.

In all fairness, he did say that even though he despises a feature like this, he might accept a PR if libusbhsfs becomes a devkitPro portlib, which is totally impossible because of fincs' stance on this matter.
 
Last edited by DarkMatterCore,

blawar

Developer
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
Next to no chance for RetroArch. Probably doable for pplay.

pPlay requires a PHD in the dark arts and a blood sacrifice to compile. While technically it is possible, functionally I do not think anyone but the author who appears to have abandoned the project would try to compile that.

Retroarch is begging to be forked if they won't add it:
4quwp3.jpg
 

ShroomKing

Somebody
Member
Joined
Mar 3, 2017
Messages
470
Trophies
0
Age
29
Location
in bed
XP
1,963
Country
United States
@DarkMatterCore can you provide an aarch64 build of ntfs-3g please? i can't compile it due to some mac dependency checking problem. I have all dependencies but makepkg doesn't find them and i don't have a linux machine atm.
ntfs-3g.png
 

blawar

Developer
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
@DarkMatterCore can you provide an aarch64 build of ntfs-3g please? i can't compile it due to some mac dependency checking problem. I have all dependencies but makepkg doesn't find them and i don't have a linux machine atm.
View attachment 238567

If you want the entire libusbhsfs lib file, here it is:

unzip and place the .a file in /opt/devkitpro/portlibs/switch/lib/ I believe. Copy the h file from his repo to /opt/devkitpro/portlibs/switch/include/

--------------------- MERGED ---------------------------

@DarkMatterCore can you provide an aarch64 build of ntfs-3g please? i can't compile it due to some mac dependency checking problem. I have all dependencies but makepkg doesn't find them and i don't have a linux machine atm.
View attachment 238567

Here is the ntfs package though (unzip it, gbatemp wont let me upload xz files)
 

Attachments

  • libusbhsfs.zip
    560.8 KB · Views: 200
  • switch-libntfs-3g-2017.3.23-2-any.pkg.tar.xz.zip
    210.7 KB · Views: 206

ShroomKing

Somebody
Member
Joined
Mar 3, 2017
Messages
470
Trophies
0
Age
29
Location
in bed
XP
1,963
Country
United States
If you want the entire libusbhsfs lib file, here it is:

unzip and place the .a file in /opt/devkitpro/portlibs/switch/lib/ I believe. Copy the h file from his repo to /opt/devkitpro/portlibs/switch/include/

--------------------- MERGED ---------------------------



Here is the ntfs package though (unzip it, gbatemp wont let me upload xz files)
Thanks, libntfs-3g.a is what i was looking for.

Both ISC and GPLv2 redistributable packages of the library are available in the release page: https://github.com/DarkMatterCore/libusbhsfs/releases/latest (just in case). These are generated by Makefile rules.
Yes but those only have libusbhsfs.a.
If i understood correctly i also need to link the libntfs-3g if i want to use ntfs
 
  • Like
Reactions: DarkMatterCore

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,375
Trophies
0
XP
2,762
Country
Colombia
m4xw is against adding UMS device support because it may further encourage piracy in RetroArch.
I will never understand m4xw, it makes incredible port of emulators, but to say that the USB support is piracy, when the ports of the emulators are already it. Anyway, I hope someone else is encouraged to make their own port with this great addition to USB drives, which apparently works more and more wonderfully and that eventually is the solution to the bottlenecks suffered by some emulators to load ROMs from MicroSD .

--------------------- MERGED ---------------------------

pPlay requires a PHD in the dark arts and a blood sacrifice to compile. While technically it is possible, functionally I do not think anyone but the author who appears to have abandoned the project would try to compile that.

Retroarch is begging to be forked if they won't add it:
4quwp3.jpg
I think it's the only thing I can ask of you. Fork the code and create your own implementation. Sure, if you've worked with emulators before. Don't forget about PPSSPP
 

DarkMatterCore

Finding my light.
OP
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,604
Country
Spain
Code:
2020-12-20 08:29:16 -> usbHsFsMountParseMasterBootRecordPartitionEntry: Found Linux partition entry with type 0x83 at LBA 0x800 (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiReadLogicalUnitBlocks: Reading 0x2 block(s) from LBA 0x802 (0x400 byte[s]) (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiSendRead10Command: Sending command (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiSendCommandBlockWrapper: Data from CBW to send (interface 1347682304, LUN 0):
55534243630c316c0004000080000a28000000080200000200000000000000
2020-12-20 08:29:16 -> usbHsFsScsiReceiveCommandStatusWrapper: Data from received CSW (interface 1347682304, LUN 0):
55534253630c316c0000000000
2020-12-20 08:29:16 -> usbHsFsMountInspectExtSuperBlock: Found EXT superblock at LBA 0x802 (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsMountRegisterDevoptabDevice: Available device ID: 0 (interface 1347682304, LUN 0, FS 0).
2020-12-20 08:29:16 -> usbHsFsMountRegisterDevoptabDevice: Failed to get pointer to devoptab interface! (interface 1347682304, LUN 0, FS 0).
Only the EXT devoptab interface is missing now.
 

TotalJustice

Well-Known Member
Member
Joined
Jan 28, 2017
Messages
443
Trophies
0
Age
26
XP
2,602
Country
United Kingdom
Code:
2020-12-20 08:29:16 -> usbHsFsMountParseMasterBootRecordPartitionEntry: Found Linux partition entry with type 0x83 at LBA 0x800 (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiReadLogicalUnitBlocks: Reading 0x2 block(s) from LBA 0x802 (0x400 byte[s]) (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiSendRead10Command: Sending command (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiSendCommandBlockWrapper: Data from CBW to send (interface 1347682304, LUN 0):
55534243630c316c0004000080000a28000000080200000200000000000000
2020-12-20 08:29:16 -> usbHsFsScsiReceiveCommandStatusWrapper: Data from received CSW (interface 1347682304, LUN 0):
55534253630c316c0000000000
2020-12-20 08:29:16 -> usbHsFsMountInspectExtSuperBlock: Found EXT superblock at LBA 0x802 (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsMountRegisterDevoptabDevice: Available device ID: 0 (interface 1347682304, LUN 0, FS 0).
2020-12-20 08:29:16 -> usbHsFsMountRegisterDevoptabDevice: Failed to get pointer to devoptab interface! (interface 1347682304, LUN 0, FS 0).
Only the EXT devoptab interface is missing now.
nice work as always mate
 

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,375
Trophies
0
XP
2,762
Country
Colombia
Code:
2020-12-20 08:29:16 -> usbHsFsMountParseMasterBootRecordPartitionEntry: Found Linux partition entry with type 0x83 at LBA 0x800 (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiReadLogicalUnitBlocks: Reading 0x2 block(s) from LBA 0x802 (0x400 byte[s]) (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiSendRead10Command: Sending command (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsScsiSendCommandBlockWrapper: Data from CBW to send (interface 1347682304, LUN 0):
55534243630c316c0004000080000a28000000080200000200000000000000
2020-12-20 08:29:16 -> usbHsFsScsiReceiveCommandStatusWrapper: Data from received CSW (interface 1347682304, LUN 0):
55534253630c316c0000000000
2020-12-20 08:29:16 -> usbHsFsMountInspectExtSuperBlock: Found EXT superblock at LBA 0x802 (interface 1347682304, LUN 0).
2020-12-20 08:29:16 -> usbHsFsMountRegisterDevoptabDevice: Available device ID: 0 (interface 1347682304, LUN 0, FS 0).
2020-12-20 08:29:16 -> usbHsFsMountRegisterDevoptabDevice: Failed to get pointer to devoptab interface! (interface 1347682304, LUN 0, FS 0).
Only the EXT devoptab interface is missing now.
Which of all the partition types has the best speed?
 

DarkMatterCore

Finding my light.
OP
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,604
Country
Spain
Which of all the partition types has the best speed?
It's probably between any supported FAT filesystem and any supported EXT filesystem, but I haven't done any proper benchmarks. Both FatFs and lwext4 offer very little I/O overhead, since they were both designed with microcontrollers in mind. Furthermore, lwext4 offers a built-in block cache system that may help speed up certain operations - this feature isn't available in FatFs.

NTFS-3G, on the other hand, is a full fledged driver designed with PC operating systems in mind, making it more complex to work with than both FatFs and lwext4. Considering the amount of data it processes from NTFS volumes, I'd say it's the supported library with the most overhead. It offers a way to define user-provided functions to handle block cache, which may help speed up write operations a bit, but I haven't looked too much into it.
 
Last edited by DarkMatterCore,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: