Mr. Goodliving Java Games "s" (Sound) file

Codecs, formats, encoding/decoding of game audio, video and music
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Mr. Goodliving Java Games "s" (Sound) file

Post by LolHacksRule »

EDIT: Please note I looked at Mega Millionaire here but it's also used in other Mr. Goodliving Ltd (RealArcade/GameHouse) Java games (and iOS ports of them).

The game loads the sounds from the "s" file, however for my distribution of the game the "compressed" version isn't present and the game runs on Java instead of C++ (at least on Android which is what I'm looking at), unfortunately converting the smali function that loads the sound files to Java errors the decompiler out... According to code, there's headerless ADPCM data in the file in some form. Can someone crack this sound file? Please note I renamed the file to make name sorting easier. https://anonfiles.com/5aD5efvfp8/SouthP ... ile_uncomp
Last edited by LolHacksRule on Mon Dec 12, 2022 8:32 pm, edited 1 time in total.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: South Park Mega Millionaire "s.uncomp" (Sound) file

Post by spiritovod »

Here are functions, where most work with the sound file is being done. Sampler invokes p_mixeri_readSoundFile to read into byte buffer and then invokes decodeadpcm (int version) to decode that buffer. There is also "short" version of that function, but it seems it's not used.
I advise you to convert dex to jar and use fernflower based decompiler or some wrapper for it, like bytecode viewer, to decompile dex/apk directly.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: South Park Mega Millionaire "s.uncomp" (Sound) file

Post by LolHacksRule »

I did use an online smali to Java converter but I guess its a little outdated. Thanks anyway.
LuigiMario79
Posts: 2
Joined: Wed Mar 16, 2022 12:12 am

Re: South Park Mega Millionaire "s.uncomp" (Sound) file

Post by LuigiMario79 »

Does anyone have a script for QuickBMS that I could use to decompile this filetype?
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: South Park Mega Millionaire "s.uncomp" (Sound) file

Post by LolHacksRule »

Super late, but for Android and iOS games, you can pop it into Audacity's raw data viewer with auto detect and the VOX ADPCM encoding.

It also works with Imaginationland's sound file for iOS from my testing.

Otherwise expect MIDIs and Waves.
LuigiMario79
Posts: 2
Joined: Wed Mar 16, 2022 12:12 am

Re: Mr. Goodliving Java Games "s" (Sound) file

Post by LuigiMario79 »

I just tried that with the Collapse game for android, but the resulting output is too loud and noisy, and the first music track's volume is inconsistent.

I've attached a link to the zip file with the "s.uncomp" file and the audio result after importing it. I can't attach the file directly because it's too big.
https://anonfiles.com/lag7FcQbyd/collapse_zip