Ridge Racer 7 (PS3)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Ridge Racer 7 (PS3)

Post by cyberspeed »

Hello,

I included a 2mb from beginning and 2mb end of the RR7.DAT 4.87GB file that the game has.
There is no other file that the game data is on, just the one, the rest are for videos, background music, etc.
If a script for extraction can be made that would be awesome.

thank you
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

The lack of any header and tail makes me think it's just a container (some files are lzss-like compressed), that means there is a TOC or index file somewhere.
I found the list of files and there are only this DAT, few NUB (audio?) and some PAM (video?), no idea where the information are stored, only in very rare games it happened that they were located in the game executable
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

That is correct for the rest of the files, this is the folder/file structure

Code: Select all

NPUB30457\USRDIR\EBOOT.BIN 625,120 bytes OK <-PS3 main executable
NPUB30457\USRDIR\3D_txt_DE.edat 81,264 bytes OK
NPUB30457\USRDIR\3D_txt_EN.edat 67,600 bytes OK
NPUB30457\USRDIR\3D_txt_EN1.edat 59,248 bytes OK
NPUB30457\USRDIR\3D_txt_ES.edat 68,096 bytes OK
NPUB30457\USRDIR\3D_txt_FR.edat 75,184 bytes OK
NPUB30457\USRDIR\3D_txt_IT.edat 66,768 bytes OK
NPUB30457\USRDIR\3D_txt_jp.edat 77,312 bytes OK
NPUB30457\USRDIR\BGM.nub 615,863,504 bytes OK <-Background music
NPUB30457\USRDIR\Game_DJ.nub 152,147,600 bytes OK
NPUB30457\USRDIR\RR7.DAT 5,231,794,176 bytes OK <-main archive
NPUB30457\USRDIR\auroravision.pam 59,576,320 bytes OK <-video
NPUB30457\USRDIR\e3.pam 151,226,368 bytes OK <-video
NPUB30457\USRDIR\ending.pam 614,176,768 bytes OK <-video
NPUB30457\USRDIR\intro.pam 164,446,208 bytes OK <-video
NPUB30457\USRDIR\main.3d.self 7,954,496 bytes OK <-other executable for stereoscopic 3D game play
NPUB30457\USRDIR\main.self 7,822,160 bytes OK <-other executable
NPUB30457\USRDIR\menu.pam 49,606,656 bytes OK <-video
NPUB30457\USRDIR\text.edat 1,776 bytes OK
NPUB30457\USRDIR\title.pam 73,951,232 bytes OK <-video
NPUB30457\USRDIR\title2.pam 76,324,864 bytes OK <-video
NPUB30457\PS3LOGO.DAT 5,120 bytes OK
NPUB30457\PARAM.SFO 1,040 bytes OK
NPUB30457\ICON0.PNG 77,970 bytes OK
NPUB30457\ICON1.PAM 2,285,568 bytes OK
NPUB30457\PIC0.PNG 171,326 bytes OK
NPUB30457\PIC0_00.PNG 174,895 bytes OK
NPUB30457\PIC0_01.PNG 171,326 bytes OK
NPUB30457\PIC1.PNG 1,633,445 bytes OK
NPUB30457\PIC2.PNG 35,740 bytes OK
NPUB30457\PIC2_00.PNG 36,050 bytes OK
NPUB30457\PIC2_01.PNG 35,740 bytes OK
NPUB30457\SND0.AT3 289,960 bytes OK

and I attached the EBOOT.BIN executable and other files that might help.
https://mega.nz/#F!3t91DBKT!vWjtmRlJp6A9fwp914-MCg
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

I think the executables are encrypted.
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

aluigi wrote:I think the executables are encrypted.

Sorry about that, completely forgot about it.
Updated decrypted .ELFs in link above.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

I found the TOC in main.elf.
The bad news is that the compressed files are weird with an unknown format (lot of zeroes at the beginning) and algorithm.
This is the experimental script that will extract all the uncompressed files:

Code: Select all

#comtype ???
open FDSE "main.elf" 1
endian big
goto 0x0065e9f4 1
for i = 0 < 0x828
    get OFFSET long 1
    get XSIZE short 1
    get DUMMY2 short 1
    get DUMMY3 short 1
    get ZIP short 1
    get ZSIZE long 1
    get SIZE long 1
    get DUMMY7 long 1
    get DUMMY8 long 1
    get DUMMY9 long 1
    get DUMMY10 short 1
    get DUMMY11 short 1
    math OFFSET * 0x800
    math XSIZE  * 0x800
    if ZIP == 0
        log "" OFFSET XSIZE
    else
        #clog "" OFFSET ZSIZE SIZE
    endif
next i
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

aluigi wrote:I found the TOC in main.elf.
The bad news is that the compressed files are weird with an unknown format (lot of zeroes at the beginning) and algorithm.
This is the experimental script that will extract all the uncompressed files:

It only extracts 507MB out of the whole 4.87GB archive.
Should I use filecutter to get more sample from the archive, lets say 20MB from start and 20MB from end of file?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

Eh no, there is nothing I can do about the compressed files.
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

aluigi wrote:Eh no, there is nothing I can do about the compressed files.

Got it, well, thank you for looking in to the files, much appreciated.
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

Hello again Luigi, is there a chance to at least make a proper script to extract the ATRAC3(.at3) background music from it, please?
BGM (2).zip
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

As far as I can see there are just RIFF wav files in that BGM.nub.
You can use a file ripper or this script:
http://aluigi.org/bms/riff_parser.bms
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

aluigi wrote:As far as I can see there are just RIFF wav files in that BGM.nub.
You can use a file ripper or this script:
http://aluigi.org/bms/riff_parser.bms

They are ATRAC3plus 5.1ch audio with wave header, and the script will not work, anyway, thank you ;).
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

Ah, I guess you want an audio converter.
Try posting in the Audio section.
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Ridge Racer 7 (PS3)

Post by cyberspeed »

aluigi wrote:Ah, I guess you want an audio converter.
Try posting in the Audio section.

Nooooo, :) that's NOT what I meant, that's a container right? that holds the ATRAC3plus files, I meant to say that the script does not work in a proper extraction.
So I found Dragon UnPACKer 5 that extracts them based on the RIFF header the files have.
And foobar2000/vgmstream already does a wonderful job in playing/converting them just fine, or even KLiteMegaCodecPack plays them fine too ;)
And for those who do not know, the Sony Sound Forge Pro up to v11.0 imports the audios fine with the Sony ATRAC3multi/ATRAC3plus plug-in.
Anyway, thank you.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Ridge Racer 7 (PS3)

Post by aluigi »

Ah ok I understand now.
The script was meant to consider the first 4 bytes as a custom RIFF magic and being able to parse any format similar to RIFF, in BGM.nub the real RIFF starts from offset 0x3000 so it can't work.
Yes, use a file ripper in this case.
curiosally
Posts: 1
Joined: Wed Dec 15, 2021 3:11 pm

Re: Ridge Racer 7 (PS3)

Post by curiosally »

Hello, I'm new, but anyways, I've been looking the main.self file of this game, until I reached here, however seems like I was a lot late to the party after the eboot was decrypted