PS3 Exfat Support

I have fixed the issues with NTFS. Now it mounts and unmounts properly on any USB port.
Also it allows to mount NTFS and exFAT/FAT32 drives simultaneously.
https://github.com/aldostools/IRISMAN/commit/eb95a8a03bcefd8dd5889698c8a2f4afb77dfdb1
Note: it's still labeled 0.5.1. I attached a standalone version if you want to try it.

Source Code: https://github.com/aldostools/IRISMAN/tree/master/fm_exFAT

Since it's a library dependency, it's included as a sub-project of IRISMAN ;)

Am I reading this correctly, and it may very well be a better solution than prepntfs? :)
 
Am I reading this correctly, and it may very well be a better solution than prepntfs? :)

They are 2 different things. exFAT Manager is a file manager. prepNTFS is a file scanner.

In theory with the new library for exFAT we should allow the access to content stored in that file system on any application that implement it.

However, it is not as simple as is it sounds. The exFAT library uses a different interface (API) and it is required to adapt the existing applications for the new API, which is a lot of work; or merge the exFAT library into the NTFS library to simplify the usage in the applications already using the NTFS lib.

The second option is better, but it haven't been done yet. And I don't know if it will be done.
 
merge the exFAT library into the NTFS library to simplify the usage in the applications already using the NTFS lib.
The second option is better, but it haven't been done yet. And I don't know if it will be done.

I've looked into this and unfortunately there's a lot of rework to integrate all in the ntfs lib as it was not designed with this in mind.
a better approach would be a 'flexible' framework library to glue them together and allow for further addition of FS support but this means modifying again all file managers out there.. so we're back to the first issue.
the simple file manager was written with this in mind and I may extend it as a lib for this purpose but I don't see how I may find the time for this.. something simpler based on this could work but I'm also not sure it will be worth the effort in the end.
 
file_to_sectors is a function to get the sectors offsets of the iso from the usb device raw data (offset used by storage functions)



int parts = file_to_sectors( char *GamePath, u32 *sections, u32 *sections_size, u32 MAX_SECTIONS);

input : GamePath : the path of the file. For example, "/dev_usb000/GAMES/mygame.iso"
input : MAX_SECTIONS : number max of sections (allocated in memory). For example, MAX_SECTIONS = "((0x10000-sizeof(rawseciso_args))/8)"

output : parts : number of sections. For example, parts = 2
output : sections : offset of section used by the file . For example, sections[0] = 0x00223344, sections[1]=0x11223344
output : sections_size : size of each sections. For example, sections[0] = 0x800, sections[1]=0x800
 
can anybody explain the functionality behind file_to_sectors? what is it supposed to do and how?

I'd like to see how it could be implemented for exfat.
thanks

That is the function used by prepNTFS to allow backup managers see the ISOs as native files.

prepNTFS or IRISMAN call that function for every ISO scanned or processed by selection in the case of IRISMAN.
The function file_to_sectors generate 2 lists: one is the list with the address of the initial raw sectors for each segment of the ISO file passed as parameter, the other is a list with the size of each segment (consecutive raw sectors).
If the ISO is multi-part, the lists of each multi-part file are appended to the initial lists.

Then the application creates a config file with a header containing the parameters needed by "rawseciso" plugin to access the storage in raw mode and the list of raw sectors and size of segments file needed to read the whole ISO file. The config file is stored in a native file system for later use.

For these ISO stored in non-standard file systems (ntfs, ext3) the backup manager read these config files and list them as "ISO files" stored in ntfs/ext3. For instance: /dev_hdd0/tmp/wmtmp/My Game.iso.ntfs[PS3ISO] is displayed as /ntfs0:/PS3ISO/My Game.iso

When the user mounts one of these ISO files, the backup manager starts the rawseciso plugin and passes the data of config file as parameter. The rawseciso plugin acts as intermediary between Cobra and the storage device. It starts the discfile_proxy in Cobra and rawseciso plugin emulates the physical disc serving the sectors requested by the SCSI driver via Cobra's proxy.

A retail game is accessed from disc (more or less) like this:
Game <=> GameOS <=> SCSI <=> bluray driver <=> raw sectors

An ISO file stored in a standard file system (hdd0/fat32) is accessed like this:
Game <=> GameOS <=> SCSI <=> Cobra <=> cell file system <=> file data

An ISO file stored in a non-standard file system (ntfs/ext3) is accessed like this:
Game <=> GameOS <=> SCSI <=> Cobra <=> discfile_proxy <=> rawseciso plugin <=> storage device <=> raw sectors

A remote ISO is accessed like this:
Game <=> GameOS <=> SCSI <=> Cobra <=> discfile_proxy <=> netiso plugin <=> net <=> ps3netsrv <=> file system <=> file data
 
Last edited:
LOL I know... I already did it yesterday
https://github.com/aldostools/IRISMAN/commit/72407f88a2dd8cf5f91538a5961bef90e77b9eca

I also added support for selection of multiple items (your code was already prepared for that).
Also added a blink effect in the item currently selected.

I saw your commit and I just wanted to say that there was an easier way to enable it. yours seems fine but I'm not sure it covers all aspects. if you tested it working leave it as is.
 
@aldostools where can I find prepNTFS source code?
I want to validate some aspects regarding the config files you mentioned for file_to_sectors
thanks

prepNTFS standalone project
https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/prepNTFS

simplified prepNTFS used in webMAN MOD
https://github.com/aldostools/webMAN-MOD/blob/master/include/prepntfs.h

prepNTFS is also implemented in IRISMAN in 2 different modules:
https://github.com/aldostools/IRISM...e80dfb644d26d669e1ab/source/mount_game.h#L529
https://github.com/aldostools/IRISMAN/blob/d97c5f836ae2a82a62b1e80dfb644d26d669e1ab/source/utils_gamelist.h#L530

In sMAN 1.12 you will find implemented.in line 456 of main.c: static void prepNTFS(int conn_s)

BTW I found that in exFAT_Manager there is an entry for file_to_sectors
https://github.com/aldostools/IRISM...7ac5812ba735/fm_exFAT/include/iosupport.h#L54
 
prepNTFS standalone project
https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/prepNTFS

simplified prepNTFS used in webMAN MOD
https://github.com/aldostools/webMAN-MOD/blob/master/include/prepntfs.h

prepNTFS is also implemented in IRISMAN
https://github.com/aldostools/IRISMAN/blob/d97c5f836ae2a82a62b1e80dfb644d26d669e1ab/source/utils_gamelist.h#L530

In sMAN 1.12 you will find implemented.in line 456 of main.c: static void prepNTFS(int conn_s)

BTW I found that in exFAT_Manager there is an entry for file_to_sectors
https://github.com/aldostools/IRISM...7ac5812ba735/fm_exFAT/include/iosupport.h#L54

thanks. the entry in iosupport.h is for generic devopts access but requires implementation by the specific fs lib.
 
file_to_sectors is a function to get the sectors offsets of the iso from the usb device raw data (offset used by storage functions)



int parts = file_to_sectors( char *GamePath, u32 *sections, u32 *sections_size, u32 MAX_SECTIONS);

input : GamePath : the path of the file. For example, "/dev_usb000/GAMES/mygame.iso"
input : MAX_SECTIONS : number max of sections (allocated in memory). For example, MAX_SECTIONS = "((0x10000-sizeof(rawseciso_args))/8)"

output : parts : number of sections. For example, parts = 2
output : sections : offset of section used by the file . For example, sections[0] = 0x00223344, sections[1]=0x11223344
output : sections_size : size of each sections. For example, sections[0] = 0x800, sections[1]=0x800

to clarify, we're looking for offsets (start_sector) and number of sectors (sectors) used by functions like:
sys_storage_read(int fd, uint32_t start_sector, uint32_t sectors, uint8_t *bounce_buf, uint32_t *sectors_read)
which access the raw device directly - I assume that's what the scsi emulator will do.
if so, I have found a way to gather this data per file.
thanks
 
to clarify, we're looking for offsets (start_sector) and number of sectors (sectors) used by functions like:
sys_storage_read(int fd, uint32_t start_sector, uint32_t sectors, uint8_t *bounce_buf, uint32_t *sectors_read)
which access the raw device directly - I assume that's what the scsi emulator will do.
if so, I have found a way to gather this data per file.
thanks
Yes, the SCSI emulator needs the start sector of each section (or data segment) and the number of consecutive sectors (section size) to be read from the ISO.

That part is done by rawseciso plugin. You only have to get the data that it needs.
https://github.com/aldostools/IRISMAN/blob/master/rawseciso/main.c#L332
 
  • Like
Reactions: Zar
Yes, the SCSI emulator needs the start sector of each section (or data segment) and the number of consecutive sectors (section size) to be read from the ISO.

That part is done by rawseciso plugin. You only have to get the data that it needs.
https://github.com/aldostools/IRISMAN/blob/master/rawseciso/main.c#L332
perfect. thanks @aldostools
I might need your help testing this part, unless you know of a tool I could use to try this out?

I think I saw a 'simple mounter' somewhere?
 
perfect. thanks @aldostools
I might need your help testing this part, unless you know of a tool I could use to try this out?

I think I saw a 'simple mounter' somewhere?

You might adapt prepNTFS to "prepEXFAT". The project is compiled with ps3l1ght.

If you need help understanding some part of the project, just let me know.

If you get it working, the ISO should be listed in webMAN MOD when the program returns to XMB.
 
You might adapt prepNTFS to "prepEXFAT". The project is compiled with ps3l1ght.

If you need help understanding some part of the project, just let me know.

If you get it working, the ISO should be listed in webMAN MOD when the program returns to XMB.
thanks. I thought prepNTFS was only preparing cue files..
 
thanks. I thought prepNTFS was only preparing cue files..

Not only that. prepNTFS mainly creates the config files *.ntfs[PS3ISO] that are stored in the folder /dev_hdd0/tmp/wmtmp
https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/prepNTFS/source/main.c#L433

Maybe you want to use the original version by DeanK which is cleaner because it doesn't include the extra features that I added.
http://www.deanbg.com/webMAN_1.47.zip

The project is found in the folder "\dev_hdd0\ntfs_ext_iso (prepNTFS)" of the .zip
 

Similar threads

Back
Top