PS3 WIP/POC - Moonlight on PS3

Cruslan1

Member
Greetings, i am working on Moonlight port on PS3. I just began this for curiosity. After a while i successfully managed a working PoC on RPCS3. I use PS3L1GHT toolset, most of required tools and libraries already ported or easy to replace. In RPCS3, you can connect, pair and get stable stream. For now it has slight issues on display. On real hardware it breaks after connection establishes and stream begins. Debugging is biggest issue on this project, RPCS3 not enough for testing on real hardware, i dont have any DevKit for debugging. I wanna ask you how i can debug my app better(if possible on real hardware) and take your ideas about project. Thanks. I leave a demonstration picture for you.
 

Attachments

  • 1.png
    1.png
    1.1 MB · Views: 97
You can debug on a DEX converted retail with CFW. You will need tools that I cannot link here. I do have an old debugging thread (in my signature) that was targeted at PSN apps, but the same logic applies for debugging. The EBOOT, SPRX, other ELF files must be signed for debug.
 
You can debug on a DEX converted retail with CFW. You will need tools that I cannot link here. I do have an old debugging thread (in my signature) that was targeted at PSN apps, but the same logic applies for debugging. The EBOOT, SPRX, other ELF files must be signed for debug.

Thanks for reply. For now i have post 3.55 PS3, for now neither getting CFW capable PS3 or soldering for qCFW are not an option. Moonlight project is pretty platform-agnostic. In its core moonlight-common-c, it was quite easy to port. In ps3toolchain with PS3L1GHT either there are implementations for replacement libraries or ports of stuff. For SSL i choose PolarSSL implementation, i created basic UI with Tiny3D. I used PS3's own H264 decoder(vdec.h) to implement decoding. Sunshine uses Opus for sound but there isnt any libopus implementation for PS3 as i know.

In RPCS3 i am able to run program without issues, 1080p and 60 FPS stream handled with ease with minimal latency. Gamepad signals can be dechipered with Sunshine, you can stream your games... on RPCS3. In real hardware there were many issues that still has to be solved. I use PS3HEN Debug mode for shell output, it helped me much in progress. I can see crash dumps or issues with libraries in ease.

General progress is this;
- Network stack: Works on both PS3 and RPCS3, in streaming connection is pretty brittle at real hardware.
- UI: It has IP selection GUI, encoding details are hardcoded for testing.
- Video: Works on RPCS3 and made progress with PS3, PS3 gets image but far from ideal.
- Input: PS3 Sixaxis buttons and analogs directed to Sunshine, it works.
- Sound: PS3 don't have opus implementation, it has to be ported or rewritten for PS3.
- Overall progress: You can get clean 60 FPS stream from RPCS3, in PS3 many things has to be handled.

Main issues were those;

-> It works on RPCS3 but not correctly on PS3.
-> Network stack is too brittle on real hardware, everything has to be handled specifically for PS3.
-> Limited debugging and profiling capability, i am not sure i will have bottleneck.

My main concern was device is simply not powerful for this task but i am not sure. Sunshine-Moonlight uses UDP to deliver content but in my PoC, Real PS3 hardware cant handle in intended values. I don't know libvdec how much is capable. Frames either has to copied PPU to RSX or has to allocate memory that both can use, in any ways RSX <---> PPU connection might not enough.
Ekran Görüntüsü_20260416_134228.png


I got progress on project. Now it works constantly on PS3 and gives adequate quality with slight input lag. I believe i can build a ready project. I plan to release when it be ready.

1.png

2.png
 
Last edited by a moderator:
I got progress on project. Now it works constantly on PS3 and gives adequate quality with slight input lag. I believe i can build a ready project. I plan to release when it be ready.

View attachment 47595
View attachment 47594
You can kinda debug using debug stage2, which is debug version in hen. You can add custom DPRINTF() messages to different areas of payload, which is currently very tight, and would probably need to comment others. You can also do it with a kernel plugin running custom code.

Its not ideal, but thats how i debug hen mostly, unless there is a weird issue that requires a debugger.
 
You can kinda debug using debug stage2, which is debug version in hen. You can add custom DPRINTF() messages to different areas of payload, which is currently very tight, and would probably need to comment others. You can also do it with a kernel plugin running custom code.

Its not ideal, but thats how i debug hen mostly, unless there is a weird issue that requires a debugger.
I already began use that. It really helped fix most of bugs. Biggest complaint was Networking right now. PS3 seems cant handle high traffic UDP(its required due to moonlight's design philosophy).
 
If there any testing needed emulation or real hardware wise, am available, i have a bed setup with a ps3 and i prayed to have moonlight on my ps3 to get play my pc games on the bed.
 
Project is stalled for now. PS3L1GHT's own network implementation simply not enough for frequent UDP packages. Even though i can get display right now its not stable and has latency issues. PS3L1GHT lacks debugging tools that. External debuggers don't help. Until that project won't be released. PS3's SDK is not enough for moonlights UDP requests.
 
Back
Top