VOGONS


First post, by songo

User metadata
Rank Newbie
Rank
Newbie

There is no problem with transfering files from/into original Xbox on (up to 7) Windows machine, it is either FTP through Filezilla (slow, unconvenient) or using Xplorer360 to put files on FATX formatted USB stick (there is a need for USB-to-Xbox converted but I've got one or two).

Problem is, I cannot replicate the second option on Linux - both USB FATX Formatter and Xplorer360 runs via Wine but they do not detect USB drive. Questions are:

Is it possible for those apps to detect USB when using Wine?
Is there a dedicated Linux software to format USB stick as FATX?
Is there any native Linux equivalent to Xplorer360?

Reply 1 of 8, by zyga64

User metadata
Rank Oldbie
Rank
Oldbie

Google helped me to find this: https://github.com/mborgerson/fatx

Which Linux distribution ?

1) VLSI SCAMP /286@20 /4M /CL-GD5422 /CMI8330
2) i420EX /486DX33 /16M /TGUI9440 /GUS+ALS100+MT32PI
3) i430FX /K6-2@400 /64M /Rage Pro PCI /ES1370+YMF718
4) i440BX /P!!!750 /256M /MX440 /SBLive!
5) iB75 /3470s /4G /HD7750 /HDA

Reply 3 of 8, by progman.exe

User metadata
Rank Newbie
Rank
Newbie

I've been using Linux for years now, and I'm still no coder, but maybe if you post the build output (or the last 10 lines or so) it'll hint at what the problem is.

I use live anti-X once in a while, it runs on an ancient laptop I have and will boot a live distro to do a full HDD dump to the LAN. Can also restore like that. Nice distro.

Anti-X has no systemd, and as a Slackware user I completely understand 😀 (I do use Debian/raspbian on the server-like machines, which both have the pottering malware). But perhaps fatx/libfatx is expecting something a bit Ubuntu-y? Not sure what you would want to do about that.....

Reply 4 of 8, by progman.exe

User metadata
Rank Newbie
Rank
Newbie

Just tried building this in a Debian 12 (bookworm) x64 virtual machine, and it looks like it should work

root@debvm:~$ apt-get install libfuse-dev cmake pkg-config
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pkg-config is already the newest version (0.29.2-1).
pkg-config set to manually installed.
The following additional packages will be installed:
cmake-data libjsoncpp24 librhash0
Suggested packages:
cmake-doc ninja-build
The following NEW packages will be installed:
cmake cmake-data libfuse-dev libjsoncpp24 librhash0
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,556 kB of archives.
After this operation, 39.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian bullseye/main amd64 cmake-data all 3.18.4-2+deb11u1 [1,725 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libjsoncpp24 amd64 1.9.4-4 [78.9 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 librhash0 amd64 1.4.1-2 [129 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 cmake amd64 3.18.4-2+deb11u1 [5,593 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 libfuse-dev amd64 2.9.9-5 [1,031 kB]
Fetched 8,556 kB in 2s (4,465 kB/s)
Selecting previously unselected package cmake-data.
(Reading database ... 113918 files and directories currently installed.)
Preparing to unpack .../cmake-data_3.18.4-2+deb11u1_all.deb ...
Unpacking cmake-data (3.18.4-2+deb11u1) ...
Selecting previously unselected package libjsoncpp24:amd64.
Preparing to unpack .../libjsoncpp24_1.9.4-4_amd64.deb ...
Unpacking libjsoncpp24:amd64 (1.9.4-4) ...
Selecting previously unselected package librhash0:amd64.
Preparing to unpack .../librhash0_1.4.1-2_amd64.deb ...
Unpacking librhash0:amd64 (1.4.1-2) ...
Selecting previously unselected package cmake.
Preparing to unpack .../cmake_3.18.4-2+deb11u1_amd64.deb ...
Unpacking cmake (3.18.4-2+deb11u1) ...
Selecting previously unselected package libfuse-dev:amd64.
Preparing to unpack .../libfuse-dev_2.9.9-5_amd64.deb ...
Unpacking libfuse-dev:amd64 (2.9.9-5) ...
Setting up libfuse-dev:amd64 (2.9.9-5) ...
Setting up libjsoncpp24:amd64 (1.9.4-4) ...
Setting up librhash0:amd64 (1.4.1-2) ...
Setting up cmake-data (3.18.4-2+deb11u1) ...
Setting up cmake (3.18.4-2+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u7) ...
root@debvm:~$ git clone https://github.com/mborgerson/fatx && cd fatx
Cloning into 'fatx'...
remote: Enumerating objects: 549, done.
remote: Counting objects: 100% (288/288), done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 549 (delta 198), reused 178 (delta 164), pack-reused 261
Receiving objects: 100% (549/549), 299.29 KiB | 2.88 MiB/s, done.
Resolving deltas: 100% (332/332), done.
root@debvm:~/fatx$ mkdir build && cd build
root@debvm:~/fatx/build$ cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
Show last 129 lines
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for one of the modules 'fuse'
-- Configuring done
-- Generating done
-- Build files have been written to: /root/fatx/build
root@debvm:~/fatx/build$ make
Scanning dependencies of target fatx
[ 5%] Building C object CMakeFiles/fatx.dir/libfatx/fatx.c.o
[ 10%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_attr.c.o
[ 15%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_dev.c.o
[ 20%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_dir.c.o
[ 25%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_disk.c.o
[ 30%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_fat.c.o
[ 35%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_file.c.o
[ 40%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_log.c.o
[ 45%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_misc.c.o
[ 50%] Building C object CMakeFiles/fatx.dir/libfatx/fatx_partition.c.o
[ 55%] Building C object CMakeFiles/fatx.dir/libfatx/ext.c.o
[ 60%] Linking C static library libfatx.a
[ 60%] Built target fatx
Scanning dependencies of target fatxfs
[ 65%] Building C object fatxfs/CMakeFiles/fatxfs.dir/fatxfs_fuse.c.o
[ 70%] Linking C executable fatxfs
[ 70%] Built target fatxfs
Scanning dependencies of target gfatx_autogen
[ 75%] Automatic MOC and UIC for target gfatx
[ 75%] Built target gfatx_autogen
Scanning dependencies of target gfatx
[ 80%] Building CXX object gfatx/CMakeFiles/gfatx.dir/gfatx_autogen/mocs_compilation.cpp.o
[ 85%] Building CXX object gfatx/CMakeFiles/gfatx.dir/main.cpp.o
[ 90%] Building CXX object gfatx/CMakeFiles/gfatx.dir/mainwindow.cpp.o
[ 95%] Building CXX object gfatx/CMakeFiles/gfatx.dir/fatxfilesystemmodel.cpp.o
[100%] Linking CXX executable gfatx
[100%] Built target gfatx
root@debvm:~/fatx/build$ cd fatxfs/
root@debvm:~/fatx/build/fatxfs$ ./fatxfs
please specify device path
root@debvm:~/fatx/build/fatxfs$ ./fatxfs --help
FATXFS - Userspace FATX Filesystem Driver

Usage: fatxfs <device> <mountpoint> [<options>]
or: fatxfs <device> <mountpoint> --drive=c|e|x|y|z|f [<options>]
or: fatxfs <device> <mountpoint> --offset=<offset> --size=<size> [<options>]

General options:
-o opt, [opt...] mount options
-h --help print help
-V --version print version

FATXFS options:
--drive=<letter> mount a partition by its drive letter
--offset=<offset> specify the offset (in bytes) of a partition manually
--size=<size> specify the size (in bytes) of a partition manually
--sector-size=<size> specify the size (in bytes) of a device sector (default is 512)
--log=<log path> enable fatxfs logging
--loglevel=<level> control the log output level (a higher value yields more output)

Disk formatting options:
--format=<format> specify the format (retail, f-takes-all) to initialize the device to
--sectors-per-cluster=<size> specify the sectors per cluster when initializing non-retail partitions (default is 128)
--destroy-all-existing-data acknowledge that device formatting will destroy all existing data

FUSE options:
-d -o debug enable debug output (implies -f)
-f foreground operation
-s disable multi-threaded operation

-o allow_other allow access to other users
-o allow_root allow access to root
-o auto_unmount auto unmount on process termination
-o nonempty allow mounts over non-empty file/dir
-o default_permissions enable permission checking by kernel
-o fsname=NAME set filesystem name
-o subtype=NAME set filesystem type
-o large_read issue large read requests (2.4 only)
-o max_read=N set maximum size of read requests

-o hard_remove immediate removal (don't hide files)
-o use_ino let filesystem set inode numbers
-o readdir_ino try to fill in d_ino in readdir
-o direct_io use direct I/O
-o kernel_cache cache files in kernel
-o [no]auto_cache enable caching based on modification times (off)
-o umask=M set file permissions (octal)
-o uid=N set file owner
-o gid=N set file group
-o entry_timeout=T cache timeout for names (1.0s)
-o negative_timeout=T cache timeout for deleted names (0.0s)
-o attr_timeout=T cache timeout for attributes (1.0s)
-o ac_attr_timeout=T auto cache timeout for attributes (attr_timeout)
-o noforget never forget cached inodes
-o remember=T remember cached inodes for T seconds (0s)
-o nopath don't supply path if not necessary
-o intr allow requests to be interrupted
-o intr_signal=NUM signal to send on interrupt (10)
-o modules=M1[:M2...] names of modules to push onto filesystem stack

-o max_write=N set maximum size of write requests
-o max_readahead=N set maximum readahead
-o max_background=N set number of maximum background requests
-o congestion_threshold=N set kernel's congestion threshold
-o async_read perform reads asynchronously (default)
-o sync_read perform reads synchronously
-o atomic_o_trunc enable atomic open+truncate support
-o big_writes enable larger than 4kB writes
-o no_remote_lock disable remote file locking
-o no_remote_flock disable remote file locking (BSD)
-o no_remote_posix_lock disable remove file locking (POSIX)
-o [no_]splice_write use splice to write to the fuse device
-o [no_]splice_move move data while splicing to the fuse device
-o [no_]splice_read use splice to read from the fuse device

Module options:

[iconv]
-o from_code=CHARSET original encoding of file names (default: UTF-8)
-o to_code=CHARSET new encoding of the file names (default: UTF-8)

[subdir]
-o subdir=DIR prepend this directory to all paths (mandatory)
-o [no]rellinks transform absolute symlinks to relative

gfatx built too

Reply 5 of 8, by songo

User metadata
Rank Newbie
Rank
Newbie

Thanks for your effort. Meanwhile I had to go back to Win7 on that PC so I'll try it once more once I reinstall Linux again, maybe some Ubuntu based this time.

BTW I'll ask why Wine could not see USB drive in various apps, is there a workaround for that? It would be much simpler to just run those tools like Xplorer360 on Linux with all their QOL features and user friendly GUI.

Reply 6 of 8, by progman.exe

User metadata
Rank Newbie
Rank
Newbie

Wine is a bit of a blind spot for me, I've not used it much in a long time. I went from using nearly all FOSS on Windows, to nearly all FOSS on FOSS... I cut the windows-only stuff whilst still on Windows.

But my thoughts are to do with a 64/32 bit thing: if your Windows program is old then it might be using 32bit WINE on 64bit Linux, which uses the 32bit linux compatibility libs for Linux. Otherwise, probably some kind of permissions thing.....

Work around? Virtualise Windows, USB pass-through.

Reply 7 of 8, by giantclam

User metadata
Rank Member
Rank
Member
songo wrote on 2023-11-17, 17:39:

BTW I'll ask why Wine could not see USB drive in various apps, is there a workaround for that? It would be much simpler to just run those tools like Xplorer360 on Linux with all their QOL features and user friendly GUI.

No, not yet. The basic problem is a program like Xplorer360 expects raw device access, using the windows device/driver APIs... however that access is unavailable as the host (linux) drivers have claimed the raw device. For this sort of thing to work, WINE would need a 'bridge' code/driver to match the windows API calls to the underlying linux hardware driver. An analogous case in WINE is wrt USB game controllers.... which typically work. That happens because the 'bridge' as it were, is the USB HID descriptors (not the device itself)... ie; the windows program doesn't have raw device access using the windows (driver) API, but instead the HID events generated by the linux game-controller driver are translated into windows USB controller HID events, and that's what the windows program sees. You cannot, for instance, run any windows program designed for that game controller (to change any settings, leds, etc etc) and have it work, because it's expecting the windows driver to provide the raw device access such programs need.

HTH

Reply 8 of 8, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

I just used the fuse fatx package the other day to pull a load of installed games from an Xbox 360 internal drive to play with the Xenia emulator... It worked perfectly.

My understanding is that it should also work fine with the OG Xbox drive, as long as it is 'unlocked'.

It comes with fuse mount integration, fsck utility and mkfs.fatx format tool.

My collection database and technical wiki:
https://www.target-earth.net