PS3 [Research] Coldboot MP3 hack (experimental WIP)

DeViL303

Developer
PSX-Place Supporter
Experimental Coldboot MP3 hack:

I posted about this already, but think its worth a thread. This could be used to save space on flash in CFW.

With just a few simple 2 byte patches and one file swapped we can have the PS3 play MP3s instead of AC3s for coldboots (and probably gameboots - untested)

Step 1: you replace the libac3dec.sprx with a copy of libmp3dec.sprx in dev_blind\sys\external\


Step 2: Patch custom_render_plugin.sprx lke this:

upload_2020-2-11_18-30-50.png


upload_2020-2-11_18-31-11.png


Then put your mp3s on flash in dev_blind\vsh\resource. You can delete the ac3s.
upload_2020-2-11_18-31-30.png



This needs to be explored more to see what unwanted side effects there are from swapping this file, There will most likely be issues with movies with ac3 audio.
 
Last edited:
HDD is no problem, I have loaded large 30 minute ac3s from hdd before. Not sure about usb. I can test in a while and report back.
 
Looks like I mixed up some files, I had my libac3dec.sprx swapped for libmp3dec.sprx. Need to do some more testing.

I've edited the first post to remove the bit about vsh.self.
 
Last edited:
Looks like I mixed up some files, I had my libac3dec.sprx swapped for libmp3dec.sprx. Need to do some more testing.

When you have finished your tests it would be nice if you could upload the binaries already patched.

I would love to test the MP3 feature on my Rebug 4.84.2

I suppose that it isn't a problem if the MP3/ACC file is missing... IIRC it was possible to remove/rename the coldboot files in dev_flash to boot in mute mode, although I normally use the command mute coldboot in boot_init.txt script of webMAN MOD.
 
Looks like I mixed up some files, I had my libac3dec.sprx swapped for libmp3dec.sprx. Need to do some more testing.

Isn't a way to nuke the

<FireEvent object="event:native:/anim_coldboot_Finished" />

that stops the boot sound in the sprx?
 
@aldostools So yeah I messed up, the first vsh.self patch is not required, what actually is making mp3 work is that I replaced the libac3dec.sprx with a copy of libmp3dec.sprx and edited the extension in custom render plugin to "mp3".

I guess if this sprx was swapped on flash, but then webman remapped it back to its original after booting then it would work ok. Otherwise there will probably be side effects when you try play a movie with ac3 sound.

There is probably somewhere else that is deciding which sprx gets used at boot, if we could change that then there would be no side effects, that is what I was trying to do in vsh.self, but I must have the wrong place/file.

Anyway here is what I know so far. If you put this attached libac3dec.sprx on flash in dev_flash\sys\external\ , and also put the attached custom_render_plugin.sprx into dev_flash\vsh\module\ then the ps3 will try to play dev_hdd0\tmp\coldboot.mp3 at boot. I have also edited the path for the gameboot to dev_hdd0\tmp\gameboot.mp3

Note: the attached libac3dec.sprx is just the libmp3dec renamed, so that much of the patch would work on HEN/OFW. The custom_render_plugin.sprx will not work on OFW.

upload_2020-2-12_14-4-14.png


Isn't a way to nuke the

<FireEvent object="event:native:/anim_coldboot_Finished" />

that stops the boot sound in the sprx?


That separate "Background audio on XMB patch" does still work with mp3 in the same way...but it still has the issue with the mouse pointer and xmb clicks not playing so its not perfect.
 

Attachments

Last edited:
Stuff that is still to be tested:
  • will movies with ac3 sound play properly if the files are swapped
  • Do people with 5.1 sound setups need to also replace/remap the libac3dec2.sprx
  • can we remap the file back to a copy of the original using webman, or is this file only loaded once at boot
  • Try to find where the call is made to the ac3 plugin, and edit it there instead for a better patch.

HDD paths and USB paths do work, usb did not work for me sometimes, I think this might be due to the speed of the stick and how fast it initializes.
 
@aldostools now that we know the system can play mp3 at boot instead, I wonder can we force the system to keep the libac3dec.sprx loaded somehow after the xmb has loaded? ,so the audio stays playing. I can make it stay playing by removing the "coldboot finished" line from the animation script in the rco, but that has other unwanted effects.

We almost have background music on xmb working, just a couple of webman mod remaps could do it with no system patches. That's If webman is loaded early enough in the boot process?
 
Last edited:
@aldostools now that we know the system can play mp3 at boot instead, I wonder can we force the system to keep the libac3dec.sprx loaded somehow after the xmb has loaded? ,so the audio stays playing. I can make it stay playing by removing the "coldboot finished" line from the animation script in the rco, but that has other unwanted effects.

We almost have background music on xmb working, just a couple of webman mod remaps could do it with no system patches. That's If webman is loaded early enough in the boot process?

Could you try remapping libac3dec.sprx to libmp3dec.sprx, wait 10 seconds, then remove the mapping?

It can be done using the script commands in boot_init.txt

My hypothesis is that once the mp3 is loaded and start playing, the mapping could be removed. So the movies are not affected.

Another option is remap libac3dec.sprx to libmp3dec.sprx using boot_init.txt, then use a custom combo to remove the mapping.

ATM I cannot use the console to test myself.
 
Could you try remapping libac3dec.sprx to libmp3dec.sprx, wait 10 seconds, then remove the mapping?

It can be done using the script commands in boot_init.txt

My hypothesis is that once the mp3 is loaded and start playing, the mapping could be removed. So the movies are not affected.

Another option is remap libac3dec.sprx to libmp3dec.sprx using boot_init.txt, then use a custom combo to remove the mapping.

ATM I cannot use the console to test myself.

Aldo can we set a script to load music in background?
 
Aldo can we set a script to load music in background?

There isn't any command to play music in wMM. However, with DeViL303's mod it is possible to remap any MP3 to the coldboot.mp3 (or .ac3) when the system starts using the script boot_init.txt.

What I mean in my post above is that once the music starts, I think it is possible to remove the mappings (10 seconds later) and the music should continue playing.
 
@aldostools I didn't have much time to test this, but does not seem to work. Maybe I am doing something wrong or maybe webman mod is not loaded early enough... not sure.

Code:
map /dev_flash/sys/external/libac3dec.sprx=/dev_flash/sys/external/libmp3dec.sprx
map /dev_flash/vsh/resource/coldboot_stereo.ac3=/dev_flash/vsh/resource/coldboot_stereo.mp3
map /dev_flash/vsh/resource/coldboot_multi.ac3=/dev_flash/vsh/resource/coldboot_stereo.mp3

I had not bothered with the delay and unmap yet to keep it simple.
 
@aldostools I didn't have much time to test this, but does not seem to work. Maybe I am doing something wrong or maybe webman mod is not loaded early enough... not sure.

Code:
map /dev_flash/sys/external/libac3dec.sprx=/dev_flash/sys/external/libmp3dec.sprx
map /dev_flash/vsh/resource/coldboot_stereo.ac3=/dev_flash/vsh/resource/coldboot_stereo.mp3
map /dev_flash/vsh/resource/coldboot_multi.ac3=/dev_flash/vsh/resource/coldboot_stereo.mp3

I had not bothered with the delay and unmap yet to keep it simple.

I don't have much time either... I don't recall if the order of the parameters is inverted, it could be tried.
You can try also changing the order of the lines.,

webMAN is loaded early enough because the command "mute coldboot" works (it remaps the coldboot files to a dummy file).

if the VSH is patched to use mp3, I think you only would need to redirect the sprx

Or you could do it the opposite... have the files already patched or swapped, then use the script to "unpatch" the files, redirecting them to the original files.

In this case, the timing is irrelevant because the redirection could be done few seconds later.
 
I did get to test this a small bit more and it seems that the libac3dec.sprx is only loaded once at boot up. So this means if we swap the file on flash or with a remap we can not swap it back. When its swapped for the libmp3dec it causes a freeze if you try to play a movie with AC3 sound

I think there must be a patch that can done somewhere that will change the plugin that gets calledto play the coldboot. If we can edit it in the correct place it should be fine.

Also we CAN edit the sprx path in vsh.self too, but it has the same freezing issue with ac3 movies.
 
In ps3mapi section of wMM, you have the option of load sprx. Have you tried to load libac3dec.sprx manually before play a movie with ac3?

If loading the sprx manually works, it could be loaded via boot_init.txt or autoexec.bat
 
In ps3mapi section of wMM, you have the option of load sprx. Have you tried to load libac3dec.sprx manually before play a movie with ac3?

If loading the sprx manually works, it could be loaded via boot_init.txt or autoexec.bat
Ok, so i have the sprx swapped on flash and have the mp3 coldboot working, That is where I am starting from.

Now I am trying to load the real ac3 sprx via webMAN. I thought I had better use the same name as the original? So I added a copy of libac3dec.sprx into the dev_flash/sys/internal/ folder so I could use the same name.

When I try to remap that I get a freeze when I click load. Is this what I should be doing?

upload_2020-3-4_0-48-37.png


Then I thought maybe I had it wrong by using the same name as the original as maybe you can not load a plugin with the same name as one that is already loaded so I tried with another name as a test. That does not work either. Freeze as soon as i click load.

upload_2020-3-4_0-52-39.png



These plugins are approx the same size, I wonder could we replace the loaded plugin in RAM?

edit: actually no damn, the mp3 plugin is a few bytes smaller
 
Back
Top