[We love Juggler PSP] JP.A and .cnts file

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Shiruba
Posts: 10
Joined: Tue Sep 06, 2022 9:51 pm

[We love Juggler PSP] JP.A and .cnts file

Post by Shiruba »

A japanese friend asked me if I can help him with getting the files from a game called "We Love Juggler" for the PSP.
Since he doesn't speak english I'll ask in his place. So it seems most of the contents are in a file called "JP.A" whereas other files are .BIN but I think there are just file tables to locate the files and such.
After looking at the file on an hex editor, it seems the file isn't encrypted with the file structure appearing first and the files after.

The file is here : https://drive.google.com/file/d/13H6iY0 ... sp=sharing

If something isn't right I'll inform him.
Last edited by Shiruba on Sun Oct 09, 2022 6:51 pm, edited 1 time in total.
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: [We love Juggler PSP] JP.A file

Post by BloodRaynare »

Here's the script to extract your sample. The files inside are compressed with NIS LZS compression.
The script will decompress then extract the files.

we_love_juggler.bms

Code: Select all

## We Love Juggler (PSP) JP.A extractor script by BloodRaynare
## For use with QuickBMS: http://aluigi.altervista.org/quickbms.htm

comtype nislzs

IDstring "CPSA0110"
get UNK long
get FILES long
get UNK long
get UNK long
get TOC long
goto TOC

for i = 0 < FILES
	savepos TMP
	math TMP + 0x24
	get NAME_LEN byte
	getDstring NAME NAME_LEN
	goto TMP
	get UNK long
	get OFFSET long
	get ZSIZE long
	get SIZE long
	get UNK long
	get UNK long
	clog NAME OFFSET ZSIZE SIZE
next i
Shiruba
Posts: 10
Joined: Tue Sep 06, 2022 9:51 pm

Re: [We love Juggler PSP] JP.A file

Post by Shiruba »

Well my friend told me he wanted the sfx from the games, so after some research it seems the file structure after extraction is like this :
- Gui directory is explicit
- Slot is the main directory : the game is a colleciton of slot machines games and each file is for a slot machine. When there's a letter appended (_G, _O,,,) it represents a color (Green, Orange...) for the slot machine.
- Wp : these are images file for the in-game gallery and so for our case it's useless.

Every file have the .cnts extension and the header "CPSA0110" though since it's a Japanese-only game i didn't find anything interesting about this format. Are these files extractable? Thanks if they are.

The files extracted with the bms script : https://drive.google.com/file/d/1D5zl1i ... sp=sharing
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: [We love Juggler PSP] JP.A file

Post by BloodRaynare »

CNTS is basically the same as A file, just without the compression inside. Here's the script to extract the CNTS file
Directory structures aren't supported yet.

Code: Select all

## We Love Juggler (PSP) CNTS extractor script by BloodRaynare
## For use with QuickBMS: http://aluigi.altervista.org/quickbms.htm

IDstring "CPSA0110"
get UNK long
get FILES long
get UNK long
get UNK long
get TOC long
goto TOC

for i = 0 < FILES
	savepos TMP
	math TMP + 0x24
	get NAME_LEN byte
	getDstring NAME NAME_LEN
	goto TMP
	get UNK long
	get OFFSET long
	get SIZE long
	get SIZE2 long
	get UNK long
	get UNK long
	log NAME OFFSET SIZE
next i
The SFX-es are inside the PHD/PBD combo. Assumed if you haven't yet, install foobar2000 or WinAMP then install the vgmstream plugin/component (Please note that as per the websites states, the WinAMP plugin which contains the command line tool "test.exe" might flagged as a malware by the AV due to how they were compiled). Then save this script below as "phd.txth" and put it on the same directory as where'd you extracted the phd/pbd files

Code: Select all

header_file = phd
body_file = pbd

base_offset = @0x18 + 0x08
subsong_spacing = @0x00
base_offset = base_offset + 0x0c
subsong_count = @0x00
base_offset = base_offset + 0x0c

start_offset = @0x00
sample_rate = @0x04
data_size = @0x08

codec = PSX
channels = 1
num_samples = data_size
Then just play the PHD file in foobar/WinAMP.
Shiruba
Posts: 10
Joined: Tue Sep 06, 2022 9:51 pm

Re: [We love Juggler PSP] JP.A and .cnts file

Post by Shiruba »

I've edited the title to include .cnts files and I managed to get the sfx so thanks for the help!