Reverse-engineer the radio format (.prs) #6

Open
opened 2019-11-24 21:48:24 +00:00 by lucidiot · 3 comments
Owner

The first 720 bytes of InternetRadioPlayerI.prs:

00000000  50 52 53 46 00 01 00 00  40 00 00 00 b8 00 00 00  |PRSF....@.......|
00000010  00 01 00 00 00 00 00 00  00 01 00 00 67 01 00 00  |............g...|
00000020  70 02 00 00 00 00 00 00  70 02 00 00 00 00 00 00  |p.......p.......|
00000030  70 02 00 00 d0 2c 00 00  00 00 00 00 00 00 00 00  |p....,..........|
00000040  00 00 00 00 02 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000050  ff ff ff ff 3c 00 00 00  3c 00 00 00 0c 00 00 00  |....<...<.......|
00000060  06 00 00 00 00 00 00 00  cd 2c 00 00 11 00 00 00  |.........,......|
00000070  03 00 00 00 17 00 00 00  19 00 00 00 31 00 00 00  |............1...|
00000080  06 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000090  ff ff ff ff ff ff ff ff  36 00 00 00 03 00 00 00  |........6.......|
000000a0  3e 00 00 00 50 00 00 00  8f 00 00 00 03 00 00 00  |>...P...........|
000000b0  99 00 00 00 21 00 00 00  bb 00 00 00 03 00 00 00  |....!...........|
000000c0  c2 00 00 00 04 00 00 00  c7 00 00 00 03 00 00 00  |................|
000000d0  d7 00 00 00 48 00 00 00  20 01 00 00 03 00 00 00  |....H... .......|
000000e0  2d 01 00 00 2d 00 00 00  5b 01 00 00 03 00 00 00  |-...-...[.......|
000000f0  63 01 00 00 03 00 00 00  00 00 00 00 00 00 00 00  |c...............|
00000100  72 61 64 69 6f 70 6c 61  79 65 72 00 69 63 6f 6e  |radioplayer.icon|
00000110  00 74 69 74 6c 65 00 49  6e 74 65 72 6e 65 74 20  |.title.Internet |
00000120  52 61 64 69 6f 20 50 6c  61 79 65 72 20 e2 85 a0  |Radio Player ...|
00000130  00 69 6e 66 6f 00 63 6f  6d 6d 65 6e 74 00 49 6e  |.info.comment.In|
00000140  74 65 72 6e 65 74 20 52  61 64 69 6f 20 50 6c 61  |ternet Radio Pla|
00000150  79 65 72 20 e2 85 a0 2e  20 54 68 69 73 20 70 6c  |yer .... This pl|
00000160  61 79 65 72 20 69 73 20  75 73 69 6e 67 20 74 68  |ayer is using th|
00000170  65 20 53 48 4f 55 54 63  61 73 74 20 64 69 72 65  |e SHOUTcast dire|
00000180  63 74 6f 72 79 20 73 65  72 76 69 63 65 2e 00 63  |ctory service..c|
00000190  6f 70 79 72 69 67 68 74  00 c2 a9 20 32 30 30 37  |opyright... 2007|
000001a0  20 53 43 45 49 20 41 4c  4c 20 52 49 47 48 54 53  | SCEI ALL RIGHTS|
000001b0  20 52 45 53 45 52 56 45  44 2e 00 61 75 74 68 6f  | RESERVED..autho|
000001c0  72 00 53 43 45 49 00 72  61 64 69 6f 70 6c 61 79  |r.SCEI.radioplay|
000001d0  65 72 5f 75 72 6c 00 68  74 74 70 3a 2f 2f 72 61  |er_url.http://ra|
000001e0  64 69 6f 2e 70 73 70 2e  64 6c 2e 70 6c 61 79 73  |dio.psp.dl.plays|
000001f0  74 61 74 69 6f 6e 2e 6e  65 74 2f 70 73 70 2f 72  |tation.net/psp/r|
00000200  61 64 69 6f 2f 70 6c 61  79 65 72 2f 50 4c 41 59  |adio/player/PLAY|
00000210  45 52 5f 49 2f 69 6e 64  65 78 2e 68 74 6d 6c 00  |ER_I/index.html.|
00000220  68 6f 6d 65 70 61 67 65  5f 75 72 6c 00 68 74 74  |homepage_url.htt|
00000230  70 3a 2f 2f 77 77 77 2e  70 6c 61 79 73 74 61 74  |p://www.playstat|
00000240  69 6f 6e 2e 63 6f 6d 2f  70 73 70 2d 61 70 70 2f  |ion.com/psp-app/|
00000250  72 61 64 69 6f 2e 68 74  6d 6c 00 76 65 72 73 69  |radio.html.versi|
00000260  6f 6e 00 31 2e 30 00 00  00 00 00 00 00 00 00 00  |on.1.0..........|
00000270  89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52  |.PNG........IHDR|
00000280  00 00 00 40 00 00 00 40  08 06 00 00 00 aa 69 71  |...@...@......iq|
00000290  de 00 00 00 09 70 48 59  73 00 00 0b 13 00 00 0b  |.....pHYs.......|
000002a0  13 01 00 9a 9c 18 00 00  0a 4d 69 43 43 50 50 68  |.........MiCCPPh|
000002b0  6f 74 6f 73 68 6f 70 20  49 43 43 20 70 72 6f 66  |otoshop ICC prof|
000002c0  69 6c 65 00 00 78 da 9d  53 77 58 93 f7 16 3e df  |ile..x..SwX...>.|
000002d0  f7 65 0f 56 42 d8 f0 b1  97 6c 81 00 22 23 ac 08  |.e.VB....l.."#..|

The PRSF header is found absolutely nowhere in file signatures lists or databases. I could not find any documentation on this file format, but it is rather clear from this dump that this file is basically the PSP's equivalent of a shortcut to a web page: the file holds some textual metadata, including a player URL, that is used by the PSP to open the radio in the browser, and a homepage URL, that is probably available as some kind of About option to PSP users. The rest of file seems to be a PNG file.

This ticket has multiple steps:

  • Document our findings on this file format
  • Write our own decoder
  • Write an encoder, then create some new radio files to see if it works

We could act in other ways on this file format:

  • Share the file's header to file signature lists/DBs? Which ones? What should be this file type's actual name?
  • Provide a new platform for users to create and share new radios, as Sony stated in the radio documentation that they wanted to let others do exactly that:

A user's development kit for creating an Internet radio player will be provided on our regional websites. The date the kit will be made available will be announced as soon as it has been decided.

About the Internet Radio

The first 720 bytes of [InternetRadioPlayerI.prs](https://www.playstation.com/psp-app/radio/player/InternetRadioPlayerI.prs): ``` 00000000 50 52 53 46 00 01 00 00 40 00 00 00 b8 00 00 00 |PRSF....@.......| 00000010 00 01 00 00 00 00 00 00 00 01 00 00 67 01 00 00 |............g...| 00000020 70 02 00 00 00 00 00 00 70 02 00 00 00 00 00 00 |p.......p.......| 00000030 70 02 00 00 d0 2c 00 00 00 00 00 00 00 00 00 00 |p....,..........| 00000040 00 00 00 00 02 00 00 00 ff ff ff ff ff ff ff ff |................| 00000050 ff ff ff ff 3c 00 00 00 3c 00 00 00 0c 00 00 00 |....<...<.......| 00000060 06 00 00 00 00 00 00 00 cd 2c 00 00 11 00 00 00 |.........,......| 00000070 03 00 00 00 17 00 00 00 19 00 00 00 31 00 00 00 |............1...| 00000080 06 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff |................| 00000090 ff ff ff ff ff ff ff ff 36 00 00 00 03 00 00 00 |........6.......| 000000a0 3e 00 00 00 50 00 00 00 8f 00 00 00 03 00 00 00 |>...P...........| 000000b0 99 00 00 00 21 00 00 00 bb 00 00 00 03 00 00 00 |....!...........| 000000c0 c2 00 00 00 04 00 00 00 c7 00 00 00 03 00 00 00 |................| 000000d0 d7 00 00 00 48 00 00 00 20 01 00 00 03 00 00 00 |....H... .......| 000000e0 2d 01 00 00 2d 00 00 00 5b 01 00 00 03 00 00 00 |-...-...[.......| 000000f0 63 01 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |c...............| 00000100 72 61 64 69 6f 70 6c 61 79 65 72 00 69 63 6f 6e |radioplayer.icon| 00000110 00 74 69 74 6c 65 00 49 6e 74 65 72 6e 65 74 20 |.title.Internet | 00000120 52 61 64 69 6f 20 50 6c 61 79 65 72 20 e2 85 a0 |Radio Player ...| 00000130 00 69 6e 66 6f 00 63 6f 6d 6d 65 6e 74 00 49 6e |.info.comment.In| 00000140 74 65 72 6e 65 74 20 52 61 64 69 6f 20 50 6c 61 |ternet Radio Pla| 00000150 79 65 72 20 e2 85 a0 2e 20 54 68 69 73 20 70 6c |yer .... This pl| 00000160 61 79 65 72 20 69 73 20 75 73 69 6e 67 20 74 68 |ayer is using th| 00000170 65 20 53 48 4f 55 54 63 61 73 74 20 64 69 72 65 |e SHOUTcast dire| 00000180 63 74 6f 72 79 20 73 65 72 76 69 63 65 2e 00 63 |ctory service..c| 00000190 6f 70 79 72 69 67 68 74 00 c2 a9 20 32 30 30 37 |opyright... 2007| 000001a0 20 53 43 45 49 20 41 4c 4c 20 52 49 47 48 54 53 | SCEI ALL RIGHTS| 000001b0 20 52 45 53 45 52 56 45 44 2e 00 61 75 74 68 6f | RESERVED..autho| 000001c0 72 00 53 43 45 49 00 72 61 64 69 6f 70 6c 61 79 |r.SCEI.radioplay| 000001d0 65 72 5f 75 72 6c 00 68 74 74 70 3a 2f 2f 72 61 |er_url.http://ra| 000001e0 64 69 6f 2e 70 73 70 2e 64 6c 2e 70 6c 61 79 73 |dio.psp.dl.plays| 000001f0 74 61 74 69 6f 6e 2e 6e 65 74 2f 70 73 70 2f 72 |tation.net/psp/r| 00000200 61 64 69 6f 2f 70 6c 61 79 65 72 2f 50 4c 41 59 |adio/player/PLAY| 00000210 45 52 5f 49 2f 69 6e 64 65 78 2e 68 74 6d 6c 00 |ER_I/index.html.| 00000220 68 6f 6d 65 70 61 67 65 5f 75 72 6c 00 68 74 74 |homepage_url.htt| 00000230 70 3a 2f 2f 77 77 77 2e 70 6c 61 79 73 74 61 74 |p://www.playstat| 00000240 69 6f 6e 2e 63 6f 6d 2f 70 73 70 2d 61 70 70 2f |ion.com/psp-app/| 00000250 72 61 64 69 6f 2e 68 74 6d 6c 00 76 65 72 73 69 |radio.html.versi| 00000260 6f 6e 00 31 2e 30 00 00 00 00 00 00 00 00 00 00 |on.1.0..........| 00000270 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 |.PNG........IHDR| 00000280 00 00 00 40 00 00 00 40 08 06 00 00 00 aa 69 71 |...@...@......iq| 00000290 de 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b |.....pHYs.......| 000002a0 13 01 00 9a 9c 18 00 00 0a 4d 69 43 43 50 50 68 |.........MiCCPPh| 000002b0 6f 74 6f 73 68 6f 70 20 49 43 43 20 70 72 6f 66 |otoshop ICC prof| 000002c0 69 6c 65 00 00 78 da 9d 53 77 58 93 f7 16 3e df |ile..x..SwX...>.| 000002d0 f7 65 0f 56 42 d8 f0 b1 97 6c 81 00 22 23 ac 08 |.e.VB....l.."#..| ``` The `PRSF` header is found absolutely nowhere in file signatures lists or databases. I could not find any documentation on this file format, but it is rather clear from this dump that this file is basically the PSP's equivalent of a shortcut to a web page: the file holds some textual metadata, including a player URL, that is used by the PSP to open the radio in the browser, and a homepage URL, that is probably available as some kind of About option to PSP users. The rest of file seems to be a PNG file. This ticket has multiple steps: * Document our findings on this file format * Write our own decoder * Write an encoder, then create some new radio files to see if it works We could act in other ways on this file format: * Share the file's header to file signature lists/DBs? Which ones? What should be this file type's actual name? * Provide a new platform for users to create and share new radios, as Sony stated in the radio documentation that they wanted to let others do exactly that: > A user's development kit for creating an Internet radio player will be provided on our regional websites. The date the kit will be made available will be announced as soon as it has been decided. > > —[About the Internet Radio](https://www.playstation.com/psp-app/radio/en/radio.html)
lucidiot added the
help wanted
discussion
labels 2019-11-24 21:48:24 +00:00
lucidiot added the
requires-hardware
label 2019-11-24 22:12:26 +00:00
Author
Owner

It turns out there is an unofficial website, http://pspradio.co.uk/, that when accessed with a PSP gives you a .xpd file: an INI file used by the PlayStation Store for DRMs according to Google. It includes just a tiny bit of metadata, enough to ask the user for confirmation for installing something, and a link to a .prs file that gives you the actual radio. This website offers a full SHOUTcast radio service.

It turns out there is an unofficial website, http://pspradio.co.uk/, that when accessed with a PSP gives you a `.xpd` file: an INI file used by the PlayStation Store for DRMs according to Google. It includes just a tiny bit of metadata, enough to ask the user for confirmation for installing something, and a link to a `.prs` file that gives you the actual radio. This website offers a full SHOUTcast radio service.
Author
Owner

I found an online copy of the Internet Radio documentation: http://72.52.6.25/pscomauth/groups/public/documents/webasset/ps_psp-internetradioplayer-dev.pdf

I also found the Internet Radio SDK, which I am re-hosting a copy on an account I control on a Nextcloud instance I trust: https://free01.thegood.cloud/s/2WbjBaQqFwopARp

Said SDK includes a Python 2 script to generate a .prs file from a simpler XML. This will be very useful for the reverse-engineering.

I found an online copy of the Internet Radio documentation: http://72.52.6.25/pscomauth/groups/public/documents/webasset/ps_psp-internetradioplayer-dev.pdf I also found the Internet Radio SDK, which I am re-hosting a copy on an account I control on a Nextcloud instance I trust: https://free01.thegood.cloud/s/2WbjBaQqFwopARp Said SDK includes a Python 2 script to generate a `.prs` file from a simpler XML. This will be very useful for the reverse-engineering.
Author
Owner

Working on the python script at https://tildegit.org/lucidiot/cxml.

RFC in writing at https://tilde.town/~lucidiot/psp/radio/rfc.txt.

Working on the python script at https://tildegit.org/lucidiot/cxml. RFC in writing at https://tilde.town/~lucidiot/psp/radio/rfc.txt.
lucidiot removed the
discussion
label 2019-12-15 22:43:17 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lucidiot/psp-research#6
No description provided.