PS3 [Research] Modifying the Gaia Visualization (custom_render_plugin/earth.qrc)

And just for completion... this is projection gall-peters
Code:
C:\>planettool.exe --output gall-peters "test_gallpeters_1024.png" --input latlong "test.png" --rotate 0 45 0 --size 1024
493aC4K.png
 
Last edited:
We've made some huge jumps over the past week. The guys have been hard at it working on pushing what we can do with the info & tools we have. :star:
Myself I feel like I've made some good progress over the past 2 days. This morning I was able to get building from a folder working & the new file matches the original 100% :triumphant:
Capture.PNG
 
We've made some huge jumps over the past week. The guys have been hard at it working on pushing what we can do with the info & tools we have. :star:
Myself I feel like I've made some good progress over the past 2 days. This morning I was able to get building from a folder working & the new file matches the original 100% :triumphant:
View attachment 23511

Awesome, nice one lad.
 
Chris_spxl said:
Life with playstation had high resolution earth maps, and a night earth map too, maybe it would help to have those files, it even had an auto launch feature like an screen saver, you can even control the rotation etc.. it was very nice, info here: https://www.psdevwiki.com/ps3/Life_with_PlayStation
and here
I am thinking about this comment again..
@all : Does anyone know here know much about the Life With Playstation aka Folding at Home earth visualization?

I suspect it used Gaia. See all these references to cities, I can not think of any place these are used in the music visualization or even could be used. Unless they were planning on adding some extra features but then removed them due to a lack of space. I also extracted the FAH pkg and it all sprx files really and I could not not see anything that could be the visualization.

If this is true it might be easy enough to add back some of those features, maybe add place names, even just controlling the camera and rotation would be great.

upload_2020-2-3_12-3-36.png
 
Last edited:
That's perfect, I need the dummies in the template to be as small as is possible to make, because if a modder injects a file smaller than what is there, you end up with corruption as it keeps reading after the end of the file.
 
That's perfect, I need the dummies in the template to be as small as is possible to make, because if a modder injects a file smaller than what is there, you end up with corruption as it keeps reading after the end of the file.
Have you tryed with smaller pixel dimensions ?, that could be another min limit. I made a "JPG dummy playkit" incase you want to try
DOWNLOAD ---> http://s000.tinyupload.com/index.php?file_id=53591244358722816991

Are included:
Dummy 512x512 0x000000.jpg
Dummy 512x512 0xFFFFFF.jpg
Dummy 512x512 0x808080.jpg
Dummy 256x256 0x000000.jpg
Dummy 256x256 0xFFFFFF.jpg
Dummy 256x256 0x808080.jpg

Incase the ones at 256x256 works i could make more at smaller sizes
 
I have not tried any smaller, i will wait for pink1s tools as I am hex editing these manaually and its a pain doing extra tests.

Also as the current jpgs are mostly zeros they compress a lot anyway.
 
that could be another min limit.
I just injected all 1KB black jpgs, and 2 all black 312 byte DDS files. This is the smallest earth.qrc known to man at this time at 296KB. about 85% smaller than the original. What I am going to do is have this on flash incase the webman mod redirect does no work for any reason. With all my other QRCs on HDD.

I think we could go even smaller if we wanted by dummying/remapping all jpgs to one, and all DDS to one, and also some of the vpo/fpo files are most likely not in use.

Note: This attached QRC was made with my current WIP BAT and template so if you unpack it with zlib it will be 72MB.
 

Attachments

Anybody know of a small command line tool for converting png to jpeg? I could use imagemagick if I cant find a lightweight tool but its 32MB so would rather not.
 
Last edited:
@Berion you might know of a single lightweight exe (preferably) that can convert from PNG to JPG in best quality, I dont need compression for this step

So far I have imagemagick, seems to need about 40MB of extra shit just to run, tonnes of dlls and exes. I also have FFMPEG that can do it and is a single exe but I can not get it to make lossless or full quality jpgs, and its 65MB too.
 
Last edited:
Here is where I am at with the QRC injector now. I can release it like this.


Its starting to get slow, but this stuff just takes time I guess. :) about 6 minutes now for the full set of files. I was recording though with OBS, so it might be a bit quicker for others.

Compressing is very slow now as its a 72MB template.

It takes a flatmap_clouds.png, flatmap_ground.png, flatmap_specular.png and converts them to cubemap, then to JPG and injects them. It also injects a stars.png as DDS if it exists.

It also checks all for JPGs with the same names if it finds no PNGs.
 
Last edited:
@DeViL303

bear with me as I really do not know much about the QRC format itself, or how the lines and other files actually work within the system. Although I have managed to get things extracted from looking at wiki and referencing your batch file, which helped a lot.

I have been playing a bit with the debugger and trying your idea of getting earth and other qrc files playing while on xmb.....with mixed results lol

Patching the custom_render_plugin gives some interesting results, but a few issues, including the lines SPU thread always staying active and being prominent.

I tried a few things like not unloading or stopping the qgl_gaia_app, but it ends up just creating many instances of the same sprx in memory, which will eventually crash the system.

Being that there is an ELF file involved, or multiple, i was thinking that a new qrc would ultimately need built to actually replace the lines.qrc with another one.I just recently seen @pink1 post about creating the qrcf files, which is awesome!

I have some notes taken from the process i was going through, i will post below. I will see if i can get anything useful, as far as a patch or something, but i cannot guarantee that will go smooth! I did find a few useful breakpoints for when gaia is loading, unloading, changing scenes, and loading assets.

qrc magic
51 52 43 43 00 08 9A E0
51 52 43 43 00 08 9A XX




seems that the custom_render_plugin is responsible for loading and unloading qgl_gaia_app and calling exports for it




----------------------------------------------------------

Lines runs in spu thread

Type Status Name PC Details GUID Filename
SceQglLines (1 SPU Thread(s)) Running ID 0x4010200 Priority = 0xFA



----------------------------------------------------------

qglbase.sprx

Text Segment 0x970000
Data Segment 0x9E0000


BP 0x009720C0

LOAD:00000000000020C0 lwz r0, 0x4D4(r9)
LOAD:00000000000020C4 b UNK_LINES_QRC_FILENAME_1



0x970000+0x4CDA0=0x009BCDA0



----------------------------------------------------------

custom_render_plugin.sprx

Text Segment 0xC20000
Data Segment 0xB10000





Loading Plugin (export)

Branch To loading qgl_gaia_app.sprx
00C2C8B0 4BFFFDB0 b 0x00C2C660


BP 0x00CAB2A8
Loading plugin
LOAD:000000000008B2A8 _qgl_gaia_app_CD39A330

Refs (0xC20000+offset)
LOAD:00000000000037AC bl _qgl_gaia_app_CD39A330

r3 and r4 are pointers to what looks like gaia arguments for planet
r5-r7 other planet values?
r8 unknown pointer
r9 temp value put into r10 shifted (vsh handle?)
r12 temp memory?
r13 ptr to ptr unknown 0 value?

r0=0000000000C237A4 r8=00000000200401C8 r16=0000000000000000 r24=0000000000000000
r1=00000000D0008E50 r9=0100002A00000000 r17=0000000000000000 r25=0000000000000780
r2=0000000000B1BD60 r10=000000000100002A r18=0000000000000000 r26=0000000000000438
r3=00000000202B1100 r11=0000000000000000 r19=0000000000000000 r27=0000000000000000
r4=00000000202B1D08 r12=0000000020040000 r20=0000000000000000 r28=00000000200A4504
r5=0000000000000130 r13=0000000010007060 r21=0000000000000000 r29=00000000202B1100
r6=0000000000000001 r14=0000000000000000 r22=0000000000000000 r30=00000000200A4500
r7=0000000000005FD6 r15=0000000000000000 r23=0000000000000000 r31=00000000200A4500

xer=0000000020000000 ctr=0000000000603994 lr=0000000000C237B0 fpscr=BE224400

cr=28000022 cr0=EQ cr1=LT cr2= cr3= cr4= cr5= cr6=EQ cr7=EQ

pc=0000000000CAB2A8 li r12,0x0





Loading Textures and assets (export)

BP 0x00CAB270
Called when initially loading textures
Called directly after initial plugin loading and when starting a new track, triggering gaia
LOAD:000000000008B270 _qgl_gaia_app_C913B489

Refs (0xC20000+offset)
LOAD:000000000001716C bl _qgl_gaia_app_C913B489
LOAD:00000000000171F8 bl _qgl_gaia_app_C913B489
LOAD:00000000000178D0 bl _qgl_gaia_app_C913B489
LOAD:0000000000017908 bl _qgl_gaia_app_C913B489
LOAD:0000000000017B48 bl _qgl_gaia_app_C913B489
LOAD:0000000000017BD4 bl _qgl_gaia_app_C913B489
LOAD:0000000000017CE8 bl _qgl_gaia_app_C913B489
LOAD:0000000000017D4C bl _qgl_gaia_app_C913B489


Writes data to 0x202ACD80 in memory when loading


r3 unknown pointer
r4-r7 unknown values

r10 pointer
00CB0000 45 79 65 00 00 00 00 00 45 6E 76 52 6F 74 00 00 Eye.....EnvRot..
00CB0010 53 68 61 64 6F 77 50 61 72 61 6D 73 00 00 00 00 ShadowParams....
00CB0020 4C 75 6D 69 6E 61 6E 63 65 50 61 72 61 6D 73 00 LuminanceParams.
00CB0030 52 65 66 72 61 63 74 50 61 72 61 6D 73 00 00 00 RefractParams...
00CB0040 53 75 70 65 72 53 61 6D 70 6C 69 6E 67 00 00 00 SuperSampling...
00CB0050 4E 6F 72 6D 61 6C 4D 61 70 00 00 00 00 00 00 00 NormalMap.......
00CB0060 45 6E 76 4D 61 70 00 00 44 69 66 66 75 73 65 4D EnvMap..DiffuseM
00CB0070 61 70 00 00 00 00 00 00 42 61 63 6B 67 72 6F 75 ap......Backgrou
00CB0080 6E 64 4D 61 70 00 00 00 54 65 78 74 75 72 65 32 ndMap...Texture2
00CB0090 44 4F 62 6A 65 63 74 00 63 6F 6D 6D 6F 6E 3A 3A DObject.common::
00CB00A0 47 65 74 43 6F 6D 6D 6F 6E 48 65 61 70 28 29 00 GetCommonHeap().
00CB00B0 4E 4F 20 53 53 20 20 20 20 28 4E 4F 20 53 48 41 NO SS (NO SHA
00CB00C0 44 29 00 00 00 00 00 00 43 48 45 41 50 20 53 53 D)......CHEAP SS
00CB00D0 20 28 4E 4F 20 53 48 41 44 29 00 00 00 00 00 00 (NO SHAD)......
00CB00E0 46 55 4C 4C 20 53 53 20 20 28 4E 4F 20 53 48 41 FULL SS (NO SHA
00CB00F0 44 29 00 00 00 00 00 00 4E 4F 20 53 53 20 20 20 D)......NO SS
00CB0100 20 00 00 00 00 00 00 00 43 48 45 41 50 20 53 53 .......CHEAP SS
00CB0110 20 00 00 00 00 00 00 00 46 55 4C 4C 20 53 53 20 .......FULL SS

r11 and r12 varies

r0=0000000000000100 r8=8000000000564000 r16=0000000000000000 r24=0000000000B14398
r1=00000000D0008ED0 r9=0000000000000002 r17=0000000000000000 r25=0000000000000000
r2=0000000000B1BD60 r10=0000000000CB0000 r18=0000000000000000 r26=00000000D0009FD0
r3=00000000202A5080 r11=00000000202A5080 r19=0000000000000000 r27=0000000000000000
r4=0000000000000000 r12=80000000003B4680 r20=0000000000000000 r28=00000000200A3980
r5=0000000000000000 r13=0000000010007060 r21=0000000000000000 r29=0000000000000000
r6=0000000000000001 r14=0000000000000000 r22=0000000000000000 r30=00000000D0008F80
r7=0000000000000085 r15=0000000000000000 r23=0000000000000000 r31=00000000202A5080

xer=0000000000000000 ctr=0000000000000000 lr=0000000000C37170 fpscr=BE264400

cr=24004044 cr0=EQ cr1=GT cr2= cr3= cr4=GT cr5= cr6=GT cr7=GT

pc=0000000000CAB270 li r12,0x0





Changing Scenes (export)

BP 0x00CAB238
00CAB238 39800000 li r12,0x0

Gets called when changing scenes, during playing music
LOAD:000000000008B238 _qgl_gaia_app_824658CC

Refs (0xC20000+offset)
LOAD:00000000000100E0 bl _qgl_gaia_app_824658CC


On Scene Change (r11 varies)

r0=0000000001A7C81C r8=0000000010000060 r16=0000000000000000 r24=0000000000000000
r1=00000000D0008F40 r9=0000000000000002 r17=0000000000000000 r25=0000000000000000
r2=000000000123B2D0 r10=0000000010000080 r18=0000000000000000 r26=00000000D0009FD0
r3=000000002021BC00 r11=FFFCC90AC7D1DD7F r19=0000000000000000 r27=0000000000000000
r4=0000000010007060 r12=00000000012325D4 r20=0000000000000000 r28=0000000000746398
r5=0000000010007060 r13=0000000010007060 r21=0000000000000000 r29=0000000000000003
r6=0000000000000000 r14=0000000000000000 r22=0000000000000000 r30=000000002005FA80
r7=000000001000007C r15=0000000000000000 r23=0000000000000000 r31=000000002021BC00

xer=0000000000000000 ctr=0000000001A7C81C lr=0000000000C300E4 fpscr=BE204400

cr=22004044 cr0=EQ cr1=EQ cr2= cr3= cr4=GT cr5= cr6=GT cr7=GT

pc=0000000000CAB25C bctrl






Stopping plugin (export)

BP 0x00CAB858
00CAB858 39800000 li r12,0x0

LOAD:000000000008B858 _sysPrxForUser_sys_prx_stop_module

Refs (0xC20000+offset)
LOAD:00000000000034E8 bl _sysPrxForUser_sys_prx_stop_module

BP 0x00C234E8
00C234E8 48088371 bl 0x00CAB858


r0=0000000000C24534 r8=00000000D0008EE8 r16=0000000000000000 r24=0000000000000000
r1=00000000D0008E70 r9=0000000000B12C68 r17=0000000000000000 r25=0000000000000000
r2=0000000000B1BD60 r10=00000000200A9654 r18=0000000000000000 r26=00000000D0009FD0
r3=0000000023231D16 r11=0000000000B108E0 r19=0000000000000000 r27=00000000200A503C
r4=0000000000000000 r12=00000000009E29AC r20=0000000000000000 r28=00000000200A4500
r5=0000000000000000 r13=0000000010007060 r21=0000000000000000 r29=0000000023231D16
r6=00000000D0008EE0 r14=0000000000000000 r22=0000000000000000 r30=0000000000000000
r7=0000000000000000 r15=0000000000000000 r23=0000000000000000 r31=0000000000000008

xer=0000000020000000 ctr=0000000000C23550 lr=0000000000C24534 fpscr=AEA04400

cr=28000024 cr0=EQ cr1=LT cr2= cr3= cr4= cr5= cr6=EQ cr7=GT

pc=0000000000C234E8 bl 0x00CAB858







Unloading plugin (export)

BP 0xCAB970
00CAB970 39800000 li r12,0x0

LOAD:000000000008B970 _sysPrxForUser_sys_prx_unload_module

Refs (0xC20000+offset)
LOAD:0000000000003508 bl _sysPrxForUser_sys_prx_unload_module

BP 0xC23508
00C23508 48088469 bl 0x00CAB970


Do not NOP unload plugin (BAD IDEA! NOT STABLE! WILL KEEP OPENING NEW INSTANCES)
00C23508 60000000 nop

Plugin stays loaded after pressing circle or PS button, but still switches to lines.qrc on exit




Patching out all the plugin stop/unload has same result basically, with multiple instances being opened and still loading lines.qrc on exit
Also can crash (DATA_HTAB_MISS) after a few open/close music player

00C23540 7C832378 mr r3,r4
00C23544 60000000 nop PIPE
00C23548 7C832378 mr r3,r4
00C2354C 60000000 nop PIPE
00C23550 7C832378 mr r3,r4
00C23554 60000000 nop PIPE
00C23558 7C832378 mr r3,r4
00C2355C 60000000 nop




----------------------------------------------------------

qgl_gaia_app.sprx

Text Segment 0x1BD0000
Data Segment 0x1230000


Type Status Name PC Details GUID Filename
SceQglGaia (1 SPU Thread(s)) Running ID 0x4010400 Priority = 0xFA




Type Status Name PC Details GUID Filename
0x230F0F18 gaia_app_module Attrib = 0x00000000, Start = 0x012322FC, Stop = 0x01232304, Segments = 0x00000002 /dev_flash/vsh/module/qgl_gaia_app.sprx


gets unloaded when pressing PS button or circle to exit music player



----------------------------------------------------------


audioplayer_plugin.sprx

Text Segment 0x19F0000
Data Segment 0x11C0000

stays loaded when pressing PS button to exit music player and music stays playing

gets unloaded when pressing circle to exit music player


----------------------------------------------------------


soundvisualizer_plugin.sprx

Text Segment 0x1350000
Data Segment 0x1370000


stays loaded even when pressing circle to exit music player
 

Attachments

Similar threads

Back
Top