PS3 Exfat Support

there is an argument I didn't talk about, it's "int phys" . I have no idea what it is. Maybe @aldostools , you know what it is ? it's set to 1 when we use it to mount an iso.

About CaptainCPS manager, are you asking if it's working ? Yes, it is.
You know you can just add a button in your file manager, just add the cobra lib to your project and use this function (ofc exFAT function instead of ntfs) https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/main.c#L17819
 
Last edited:
there is an argument I didn't talk about, it's "int phys" . I have no idea what it is. Maybe @aldostools , you know what it is ? it's set to 1 when we use it to mount an iso.

About CaptainCPS manager, are you asking if it's working ? Yes, it is.
You know you can just add a button in your file manager, just add the cobra lib to your project and use this function (ofc exFAT function instead of ntfs) https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/main.c#L17819

thanks for the pointers. I wanted to use something 'simple' enough to help me debug isses and the simple ntfs iso mounter seemed like a good approach.
 
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

made a few tests and it seems my ssd is not too fragmented:
--
fs on '0:/' drive: 0, type: 4
sector size: 512, cluster size [sectors]: 256, size of an FAT [sectors]: 14336
number of FAT entries (number of clusters + 2): 1831418, number of FATs (1 or 2): 1
last cluster: -1, free clusters: -1
capacity: 223GB
FS: '0:/BIA HH.iso' size: 4495MB, 4714219520B
reading 4714219520B from file '0:/BIA HH.iso'.. please wait
current sector: 0, dirsect 19201
finished recording 1 sector entries from sector 14120960 (0xd77800) to sector 23328512 (0x163f700)
section[0]=0xd77800 size[0]=0x8c7ea4
last sector is at 23328420 (0x163f6a4)
file size is 9207460 sectors total, 4714219520B on disk vs 4714219520B actual
--
section[0]=0xd77800 size[0]=0x8c7ea4
only 1 section found, from sector 0xd77800, for 0x8c7ea4 sectors. makes sense?
 
made a few tests and it seems my ssd is not too fragmented:
--
fs on '0:/' drive: 0, type: 4
sector size: 512, cluster size [sectors]: 256, size of an FAT [sectors]: 14336
number of FAT entries (number of clusters + 2): 1831418, number of FATs (1 or 2): 1
last cluster: -1, free clusters: -1
capacity: 223GB
FS: '0:/BIA HH.iso' size: 4495MB, 4714219520B
reading 4714219520B from file '0:/BIA HH.iso'.. please wait
current sector: 0, dirsect 19201
finished recording 1 sector entries from sector 14120960 (0xd77800) to sector 23328512 (0x163f700)
section[0]=0xd77800 size[0]=0x8c7ea4
last sector is at 23328420 (0x163f6a4)
file size is 9207460 sectors total, 4714219520B on disk vs 4714219520B actual
--
section[0]=0xd77800 size[0]=0x8c7ea4
only 1 section found, from sector 0xd77800, for 0x8c7ea4 sectors. makes sense?

Only 1 section is valid and ideal!

You can try creating the .ntfs[PS3ISO] manually in HxD.

typedef struct
{
uint64_t device; // (0x10300000000000AULL+(n)) /* For 0-5 */
uint32_t emu_mode; // 1=PS3, 4=EMU_PSX, 5=EMU_BD, 6=EMU_DVD
uint32_t num_sections; // 1 section
uint32_t num_tracks; // 1 track
} __attribute__((packed)) rawseciso_args;
+
uint32_t section_start // initial sector = 0xd77800
uint32_t section_size // 0x8c7ea4 <- I think it needs +1 unless the last sector already have +1
 
Last edited:
  • Like
Reactions: tps
one test with a fragmented file:
--
fs on '0:/' drive: 0, type: 4
sector size: 512, cluster size [sectors]: 256, size of an FAT [sectors]: 14336
number of FAT entries (number of clusters + 2): 1831418, number of FATs (1 or 2): 1
last cluster: -1, free clusters: -1
capacity: 223GB
FS: '0:/file_write.bin' size: 159MB, 166723584B
reading 166723584B from file '0:/file_write.bin'.. please wait
current sector: 0, dirsect 19200
finished recording 5 sector entries from sector 42496 (0xa600) to sector 1244416 (0x12fd00)
section[0]=0xa600 size[0]=0x200
section[1]=0xa900 size[1]=0x500
section[2]=0xaf00 size[2]=0xb900
section[3]=0x16900 size[3]=0x18300
section[4]=0x104800 size[4]=0x2b500
last sector is at 1244416 (0x12fd00)
file size is 325632 sectors total, 166723584B on disk vs 166723584B actual
 
Only 1 section is valid and ideal!

You can try creating the .ntfs[PS3ISO] manually in HxD.

typedef struct
{
uint64_t device; // (0x10300000000000AULL+(n)) /* For 0-5 */
uint32_t emu_mode; // 1=PS3, 4=EMU_PSX, 5=EMU_BD, 6=EMU_DVD
uint32_t num_sections; // 1 section
uint32_t num_tracks; // 1 track
} __attribute__((packed)) rawseciso_args;
+
uint32_t section_start // initial sector = 0xd77800
uint32_t section_size // 0x8c7ea4 <- I think it needs +1 unless the last sector already have +1

what should happen after I run this customized?
from what I see it prepares files like /dev_hdd0/tmp/wmtmp/%s.ntfs[%s]
who takes care of reading these and when?
thanks
 
there is an argument I didn't talk about, it's "int phys" . I have no idea what it is. Maybe @aldostools , you know what it is ? it's set to 1 when we use it to mount an iso.

About CaptainCPS manager, are you asking if it's working ? Yes, it is.
You know you can just add a button in your file manager, just add the cobra lib to your project and use this function (ofc exFAT function instead of ntfs) https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/main.c#L17819

thanks @Zar !
that worked and fflib_file_to_sectors is working ;-)=
as simple as this:
void cobra_MountISO()
{
int i;

uint8_t *plugin_args = malloc(0x20000);
uint32_t *sections = malloc(MAX_SECTIONS * sizeof(uint32_t));
uint32_t *sections_size = malloc(MAX_SECTIONS * sizeof(uint32_t));
rawseciso_args *p_args;
memset(sections, 0, MAX_SECTIONS * sizeof(uint32_t));
memset(sections_size, 0, MAX_SECTIONS * sizeof(uint32_t));
memset(plugin_args, 0, 0x10000);

int parts = sidx;
//int parts = ps3ntfs_file_to_sectors(GamPath, sections, sections_size, MAX_SECTIONS, 1);
memcpy (sections, sects, sizeof(uint32_t) * parts);
memcpy (sections_size, nsect, sizeof(uint32_t) * parts);

if (parts > 0 && parts < MAX_SECTIONS)
{
p_args = (rawseciso_args *)plugin_args;
p_args->device = 0x10300000000000a;//USB_MASS_STORAGE(NTFS_Test_Device(&GamPath[1]));
p_args->emu_mode = EMU_PS3;
p_args->num_sections = parts;
p_args->num_tracks = 0;
memcpy (plugin_args + sizeof(rawseciso_args), sections, parts * sizeof (uint32_t));
memcpy (plugin_args + sizeof(rawseciso_args) + (parts * sizeof (uint32_t)), sections_size, parts * sizeof(uint32_t));
cobra_unload_vsh_plugin(0);
if (cobra_load_vsh_plugin (0, "/dev_hdd0/game/MANAGUNZ0/USRDIR/sys/sprx_iso", plugin_args, 0x10000) == 0) return;
}
}
need to clean it up and publish it
 
what should happen after I run this customized?
from what I see it prepares files like /dev_hdd0/tmp/wmtmp/%s.ntfs[%s]
who takes care of reading these and when?
thanks

The file is used by webMAN MOD to list the NTFS games on XMB, and mount them using Cobra and the internal "rawseciso" service.

The file should be named like: /dev_hdd0/tmp/wmtmp/my game.iso.ntfs[PS3ISO]

My version of prepNTFS performs an automatic refresh of the game list. deank's prepNTFS requires a manual refresh using SELECT+L3.
 
The file is used by webMAN MOD to list the NTFS games on XMB, and mount them using Cobra and the internal "rawseciso" service.

The file should be named like: /dev_hdd0/tmp/wmtmp/my game.iso.ntfs[PS3ISO]

My version of prepNTFS performs an automatic refresh of the game list. deank's prepNTFS requires a manual refresh using SELECT+L3.

that's what I thought. since I cannot run webmanmod due to overheating issues, I used the simpler test as suggested by Zar
 
thanks. and I think I might be done, at least for now.
if I'm not mistaken, the ExFAT lib is now on par with the NTFS/EXT3 lib when it comes to functionality required by file managers, including ISO mounting (I've already tested it working).
Have you tryed to play around with the "netiso" feature ?
Im asking about it because several reasons, is very related with rawseciso, and the backup managers derivated from iris (irisman, managunz, etc...) doesnt supports netiso, if you build a sample code in your filemanager to support netiso it could be ported later to irisman and managunz

The other thing i would love to see is what you mentioned some posts ago about creating libraries separated for each filesystem and a common API "to glue them all" and to pave the road for the posible implementations of other filesystems in the future (or to work in them in a modular way trying to improve performance)
By reading your previous posts i guess doing something like that would be a big amount of work, but would be awesome, a complete revolution, lol

Dunno, i wish you continue doing more experiments and reviewing other low level code used in PS3 scene, at this point is obvious you are good at it :encouragement:
 
Have you tryed to play around with the "netiso" feature ?
Im asking about it because several reasons, is very related with rawseciso, and the backup managers derivated from iris (irisman, managunz, etc...) doesnt supports netiso, if you build a sample code in your filemanager to support netiso it could be ported later to irisman and managunz

The other thing i would love to see is what you mentioned some posts ago about creating libraries separated for each filesystem and a common API "to glue them all" and to pave the road for the posible implementations of other filesystems in the future (or to work in them in a modular way trying to improve performance)
By reading your previous posts i guess doing something like that would be a big amount of work, but would be awesome, a complete revolution, lol

Dunno, i wish you continue doing more experiments and reviewing other low level code used in PS3 scene, at this point is obvious you are good at it :encouragement:

I don't think there is nothing additional to improve in netiso. It's a very simple net protocol between the manager and ps3netsrv.
It's well documented. It only needs some dedication to implement it in the managers.

In IRISMAN, I realized that it required to implement a netiso client to discover the games, a netiso plugin to emulate the SCSI driver (like rawseciso plugin does for NTFS) and a module to configure the remote IP and other settings. As all these netiso modules were already implemented in webMAN MOD, my approach was to read the XML generated by webMAN MOD instead of duplicate the code.

So IRISMAN can handle netiso games. It only requires webMAN MOD running in background as a service :)
 
Hello guys i see that you are doing great and working really hard on this Project so my question is, do you know if its ready to be used to mount games on exfat format and will be only just ISO ones or maybe JB format games (folder games) thanks in advance and have a nice day
 
Hello guys i see that you are doing great and working really hard on this Project so my question is, do you know if its ready to be used to mount games on exfat format and will be only just ISO ones or maybe JB format games (folder games) thanks in advance and have a nice day

the ExFat lib is now ready to support mounting of ISO games as I've tested it.
@aldostools will probably update IRISMAN/WebmanMOD to support mounting ISO from ExFAT.

I personally wouldn't support JB format. PS3 games are cheap on ebay and even amazon. if you like a game I'd say buy the disc and export the ISO.
 
I don't think there is nothing additional to improve in netiso. It's a very simple net protocol between the manager and ps3netsrv.
It's well documented. It only needs some dedication to implement it in the managers.

In IRISMAN, I realized that it required to implement a netiso client to discover the games, a netiso plugin to emulate the SCSI driver (like rawseciso plugin does for NTFS) and a module to configure the remote IP and other settings. As all these netiso modules were already implemented in webMAN MOD, my approach was to read the XML generated by webMAN MOD instead of duplicate the code.

So IRISMAN can handle netiso games. It only requires webMAN MOD running in background as a service :)
Is a good compromise, but for that specific feature irisman depends of webman, and webman depends of cobra
I think is better when the things works in a standalone way without dependencies if posible, this is one of the reasons why i liked the original mamba implementation
 

Similar threads

Back
Top