ManaGunZ

PS3 ManaGunZ - PS3 Backup Manager by Zar v1.41

I was wondering if I do http 'GET' on http://localhost/sysbgm.ps3 with managunz is it going to trigger ?

Yes. That's the way prepISO (which is also psl1ght) calls webMAN MOD.

Why don't execute the function getNIDfunc directly from ManaGunZ?
Code:
static void * getNIDfunc(const char * vsh_module, u32 fnid, s32 offset)
{
  // 0x10000 = ELF
  // 0x10080 = segment 2 start
  // 0x10200 = code start
  u32 table = (*(u32*)0x1008C) + 0x984; // vsh table address
  while((u32)*(u32*)table)
  {
    u32 *export_stru_ptr = (u32*)*(u32*)table; // ptr to export stub, size 2C, "sys_io" usually... Exports:0000000000635BC0 stru_635BC0:    ExportStub_s <0x1C00, 1, 9, 0x39, 0, 0x2000000, aSys_io, ExportFNIDTable_sys_io, ExportStubTable_sys_io>
    const char *lib_name_ptr =  (const char*)*(u32*)((char*)export_stru_ptr + 0x10);
    if(strcmp(vsh_module, lib_name_ptr) == 0)
    {
      // we got the proper export struct
      u32 lib_fnid_ptr = *(u32*)((char*)export_stru_ptr + 0x14);
      u32 lib_func_ptr = *(u32*)((char*)export_stru_ptr + 0x18);
      u16 count = *(u16*)((char*)export_stru_ptr + 6); // number of exports
      for(int i = 0; i < count; i++)
      {
        if(fnid == *(u32*)((char*)lib_fnid_ptr + (i * 4)))
        {
          // take address from OPD
          return (void**)*((u32*)(lib_func_ptr) + i) + offset;
        }
      }
    }
    table += 4;
  }
  return 0;
}
 
Yes. That's the way prepISO (which is also psl1ght) calls webMAN MOD.

Why don't execute the function getNIDfunc directly from ManaGunZ?
Code:
static void * getNIDfunc(const char * vsh_module, u32 fnid, s32 offset)
{
  // 0x10000 = ELF
  // 0x10080 = segment 2 start
  // 0x10200 = code start
  u32 table = (*(u32*)0x1008C) + 0x984; // vsh table address
  while((u32)*(u32*)table)
  {
    u32 *export_stru_ptr = (u32*)*(u32*)table; // ptr to export stub, size 2C, "sys_io" usually... Exports:0000000000635BC0 stru_635BC0:    ExportStub_s <0x1C00, 1, 9, 0x39, 0, 0x2000000, aSys_io, ExportFNIDTable_sys_io, ExportStubTable_sys_io>
    const char *lib_name_ptr =  (const char*)*(u32*)((char*)export_stru_ptr + 0x10);
    if(strcmp(vsh_module, lib_name_ptr) == 0)
    {
      // we got the proper export struct
      u32 lib_fnid_ptr = *(u32*)((char*)export_stru_ptr + 0x14);
      u32 lib_func_ptr = *(u32*)((char*)export_stru_ptr + 0x18);
      u16 count = *(u16*)((char*)export_stru_ptr + 6); // number of exports
      for(int i = 0; i < count; i++)
      {
        if(fnid == *(u32*)((char*)lib_fnid_ptr + (i * 4)))
        {
          // take address from OPD
          return (void**)*((u32*)(lib_func_ptr) + i) + offset;
        }
      }
    }
    table += 4;
  }
  return 0;
}

EDIT:
By the way, why not use the spu_soundlib.h / audioplayer.h functions implemented in psl1ght.

I used the example found in C:\PSDK3v2\project\samples\fireworks3D\source
to add MP3/OGG support to IRISMAN. Check the function init_music() in main.c. Also search all lines where snd_inited.is found.

After the sound is initialized using SND_Init(spu), PlayAudio(filename, 0, AUDIO_ONE_TIME) does the job.

The call back is handled using:
if(sysUtilRegisterCallback(SYSUTIL_EVENT_SLOT0, sys_callback, NULL)==0) inited |= INITED_CALLBACK;

The audio is closed using:
sysUtilUnregisterCallback(SYSUTIL_EVENT_SLOT0); //CALLBACK
StopAudio(); //AUDIOPLAYER
SND_End(); //SOUNDLIB
 
Last edited:
I didn't know it was possible to get access to vsh with an APP, I guessed it was only with plugins...

So, Can I use all of these : https://www.psdevwiki.com/ps3/VSH_Exports directly in MGZ ?

Btw, I saw in ps1netemu "CellGamePs1Emu", "cellSysconfPs1emu", are they also a VSH export ? I googled them and I found in rpcs3 : https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp#L184

The sound lib is nice, it's in my todo list (with million others things ;))

I don't think the vsh exports can be used in psl1ght apps. But the getNIDfunc should be compatible since its a direct call to the function in memory. If I remember correctly it doesn't need the .a libraries.
 
The sound lib is nice, it's in my todo list (with million others things ;))
From all the posibles audio features that could be implemented in ManaGunz my favourite by far is the "navigation sounds". You know, a couple of "click" sounds to enable/disable options, a couple more "swip" sounds for transitions in/out in between screen modes, a "welcome" sound when ManaGunz boots, etc...
Time ago i made a list (as usually inspired in the official firmware but on steroids), and while i was thinking in it i realized it could be comflictive because technically is posible to initiate up to 3 sounds together
-Custom soundlib navigation sounds
-Custom soundlib background music
-Official XMB-ingame background music

The soundlib background music is working in Iris, doesnt have navigation sounds though, and im not sure if is ready to play both. But if we add the official XMB-ingame background music this makes a total of 3 sounds playing together
Dunno, but it makes me think in the audio chip, i dont know how the access works at low level but sending 3 requests to it to play 3 sounds together could prolapse it
 
Last edited:
@aldostools
Hi,
I started building a small portal to get access to the ird database of managunz.
I want to something simple (because i'm not fluent in html/js/css/php/mysql... etc)
So, I started doing something similar to yours that's why I would like to use your 'SortTable' and 'FilterTable' (js) functions in my page. I started to copy/paste them then I felt gulty... that's why i'm asking, now, is it ok for you if I use them ? please ?
 
@aldostools
Hi,
I started building a small portal to get access to the ird database of managunz.
I want to something simple (because i'm not fluent in html/js/css/php/mysql... etc)
So, I started doing something similar to yours that's why I would like to use your 'SortTable' and 'FilterTable' (js) functions in my page. I started to copy/paste them then I felt gulty... that's why i'm asking, now, is it ok for you if I use them ? please ?

Feel free to use anything that you need.
 
@Zar

I have an issue with the File Manager 1.41.

I tried to copy a mod over for Skyrim from an NTFS USB to the HDD and it tells me not enough space.
My HDD has over 13GB free so I know that isn't the issue.
 
  • Like
Reactions: Zar
I fixed the issue when you copy the file with filemanager : https://github.com/Zarh/ManaGunZ/commit/03bf8a71265699c16264947c00ba5b9e5140a94f

It was reported a lot, I think I'll make a v1.42 very quick (or maybe a version 1.41-Nightly)
I cant test the last ManaGunZ version yet, but i made a new version of the spanish translation, please include it in the next release
DOWNLOAD ---> https://pastebin.com/raw/nkscuUS0

...and while reading at the new strings i realized you added a bunch of new details, nice stuff :encouragement:

-------------
Btw, i also "synced" the amount and the order of the strings in the ES.txt ---> to match with ---> EN.txt (as a reference because sometimes the amount and the order of the strings doesnt matches in between languages)
This is one of the times when this little problem happened, if you compare it side by side with the previous version you are going to see i had to move one of the strings from top to bottom (it was one related with favourites as far i remember), and i also added 3 or 4 at bottom that was missing (i think it happened when you was implementing the automatic translator, never minds)
Im mentioning this because i guess the other files for the other languages are going to have that mistmatchs too
 
@Zar

I am not sure if I've asked before, but would it be possible to load extracted games from an NTFS drive?

Edit: Never mind, I see that is already does. Excellent!
 
Last edited:
  • Like
Reactions: Zar
I don't know... maybe (just because I think everything is possible with time & motivation).
But something for sure it won't be 'easy' like adding few lines in managunz :p
 
Back
Top