Misc ROM Hack Help with extracting sounds from The Sims 2 DS

Eggrens

New Member
OP
Newbie
Joined
Mar 27, 2023
Messages
3
Trophies
0
Age
19
XP
24
Country
Canada
I'm new in regards to this kind of stuff, but I'm trying to find a way to extract sounds from The Sims 2 DS. I did some looking around before asking here, I have Tinke and VGMTrans installed already and I've looked at the file directory for the .nds file, but I can't find any .SDAT or other sound files.

Curiously there's a SoundData.rom file that I think has what I'm looking for but I'm not sure how I can get anything from it. I tried putting it into VGMTrans and it detects music files, all of them are called "VGMSampColl" with PS1 format, but when I extract them to WAV they're all very short static sounds. I attached a screenshot of the file directory and VGMTrans. Any help with this would be great :)
 

Attachments

  • Screenshot 2023-03-26 201713.png
    Screenshot 2023-03-26 201713.png
    112.3 KB · Views: 85

LandonAndEmma

Active Member
Newcomer
Joined
Aug 31, 2021
Messages
28
Trophies
0
Age
17
XP
199
Country
United States
Push the uncompress button on sounddata.rom in tinke.
Post automatically merged:

Also don't use vgmtrans to extract sound effects if the game does use sdat, use nitro studio 2 deluxe.
 

Eggrens

New Member
OP
Newbie
Joined
Mar 27, 2023
Messages
3
Trophies
0
Age
19
XP
24
Country
Canada
Push the uncompress button on sounddata.rom in tinke.
Post automatically merged:

Also don't use vgmtrans to extract sound effects if the game does use sdat, use nitro studio 2 deluxe.
Pressing the unpack button on the file doesn't work, Tinke says: "The uncompression was unsuccessful. Are you sure it is a compressed file?". I checked the debug messages as well:

Could not decompress using the HUFF; Object reference not set to an instance of an object.
Could not decompress C:\Users\owner1\Documents\! - 3DS stuff + ROMS\Tinke\Temp1\ladrjwa5.jtrSoundData.rom; no matching compression method found.
The uncompression was unsuccessful. Are you sure it is a compressed file?
at Tinke.Acciones.Unpack(Int32 id)
 

LandonAndEmma

Active Member
Newcomer
Joined
Aug 31, 2021
Messages
28
Trophies
0
Age
17
XP
199
Country
United States
Okay... you can get it if the sdat is loaded in the ram but it's very very hard to understand, so for now, I doubt that we can get it.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
I see this has .bik files which are video files of the rad bink format (very popular in games for many years, fewer examples on the DS though so thanks for that). I grabbed one and it had its own audio embedded within it.

Anyway SoundData.rom is probably a good start but it is not a standard extension, sometimes different extensions are used but seemingly not the case here when I open it in a hex editor.
Said hex editor has very little either as far as file names or interesting strings, though it did appear uncompressed in large portions of it (lots of repeating runs of values).

I did a raw import into audacity (the DS uses PCM wave and ADPCM wave at hardware level for a lot of things so you can do that sort of thing. To do it press file then import then raw and you will be given options) and was presented with a bunch of sound effects and other audio stings (sometimes several seconds in length). I was just doing educated guesses* as to the import values though (space is tight and audio is unnecessary so you tend to not get glorious 44KHz as much as 10KHz through 22 or thereabouts and often mono.
The entire latter half of the thing when imported that way was unintelligible as well which tends to indicate another format, probably ADPCM so I did that (vox ADPCM in this case).
Got a whole bunch of sims gibberish (was hoping for background music but hey), some 34 minutes of it which is insane.
Scanned through a good chunk of the rest but background music seems thin on the ground so far compared to what looks fairly common in a random gameplay video I saw. Still a fair bit of ear splitting noise though even later into the file so might be there under a different guise.

*you can also load it into desmume, open the audio channel viewer and it will tell you what frequency something is being decoded at to further educate your guesses.

Next step would be to figure out if the rest of the format (all the repeated and uncompressed data early on in the file is a good bet, didn't hear anything that would indicate such things in the files/starting the files themselves) has any indicators of the file type. With the amount of samples here I would kind of expect it but also if the first half is one type and the latter another then it might be down to code and what it picks (audio effects pcm, them talking gibberish adpcm,) or possibly auto detection.
The file ends at 015D652C so probably going to be the full 32 bit pointers here.
I have to run though so that will be up to you.
File location, file size, some kind of data about the format might be what I expect to see. The data might be a separate table as well.

Edit. Had a quick look at the hex with an eye to pointers. Possibly straight 32 bit pointers at the start (flipped for endianness of course) and possibly ending at 41D4 with 085D 5D01 which when flipped is 015D 5D08 which is more than close enough to the end of the file. 4213 files if that is the case, give or take any header stuff.

If it is 41D4 for the first file the earlier pointers don't appear to reflect that so they might be offset (see it often enough, usually starts counting at the end of the pointer section or start of the file data proper).
Starting at 6ABE I am also seeing a lot of repeated data (24 byte pattern, a strange number for a repeat but in some ways makes things more likely) which might be a frequency-volume-duration-bit depth-format type sort of table, length of it also chimes reasonably well with the possible pointers.
1D664 the nature of the data changes again (24 byte repeating pattern vs 4 so dividing 1D664-6ABE by 6 gives 1 6BA6 or 15,515 decimal so possibly more entries than the pointers indicated.
C862 on the other hand the original pattern holds for so same general approach is 3995 decimal which is too far out again for my taste (fractional amount out might be I missed a couple of entries, this much less so).
 

Eggrens

New Member
OP
Newbie
Joined
Mar 27, 2023
Messages
3
Trophies
0
Age
19
XP
24
Country
Canada
Interesting, thanks! I put the rom into desmume and got a sample rate of 32728 Hz from the audio viewer. Importing the raw sounddata file into audacity with that sample rate gave some nice results too.

When encoded as vox adpcm at that sample rate, many of the sims' voice lines come through pretty clearly at the correct speed compared to how they are in-game, though it also seems like each voice line also has a duplicate that is sped up. I also noticed that there seems to be some small parts of the pcm half of the file that are encoded as vox adpcm, as there's some sound effects and background ambience that come through clearly in those parts.

Checking the pcm half of the file with 32728 Hz with signed 8-bit pcm, it gave back various instrument samples and audio stings like you mentioned. Still a bit of ear splitting noise in between occasionally (I assume those are the adpcm bits or something else).

Should also mention that there's a github project fork floating around -- 'stocker2s3m' by ryanpenfold -- that aims to convert some of this sounddata.rom format (which can also be found in Sims The Urbz DS's rom since it was composed by the same person, Ian Stocker) into s3m format; it suggests that the pcm part seems to be encoded as both 16bit and 8bit. As of 6 months ago though, the project hasn't made any new findings and it's still a work in progress it seems.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
I don't know the most about S3M as a low level format but it is usually uttered in the same breath as MOD and IT and such like, which is to say sequenced audio (others playing along think midi, though considerably more adaptable) usually aimed at embedded hardware. I similarly don't see many people opt for it as a format just for fun (neither particularly useful for playback, archival nor further editing) so that would make me wonder if there are some of such streams in the file somewhere -- I would not necessarily have noted them as more than random noise, and the video I saw could have had its background music be S3M/sequenced rather than wave.

Sped up duplicates I would guess at one of three things.
1) Some kind of developer leftover (if there are however many thousand samples the desire to pick and choose when it is within size requirements... leave it in becomes a very real option).
2) Some kind of cut down mode. Too many things playing on screen so have a cheaper to decode one that might not sound bad when layered up. Could also be the other way and was supposed to be stereo or something and you effectively duplicated each segment.
3) Some kind of ease of decode for different scenarios. If you are familiar with older consoles then think duplicating things over different banks but here more the option to grab whatever version works best for the audio engine/mode running at the time trading off instead for space.

A quick test might be if the pointers are figured out then corrupt a bunch of them (either the files themselves or maybe just the pointers, copy and paste working data or pointers rather than outright random being my suggestion) and see what happens as a result in the file.
 

RyanPenfold

New Member
Newbie
Joined
Nov 17, 2023
Messages
1
Trophies
0
Age
19
Location
East Sussex, UK
XP
3
Country
United Kingdom
I don't know the most about S3M as a low level format but it is usually uttered in the same breath as MOD and IT and such like, which is to say sequenced audio (others playing along think midi, though considerably more adaptable) usually aimed at embedded hardware. I similarly don't see many people opt for it as a format just for fun (neither particularly useful for playback, archival nor further editing) so that would make me wonder if there are some of such streams in the file somewhere -- I would not necessarily have noted them as more than random noise, and the video I saw could have had its background music be S3M/sequenced rather than wave.
So, not sure on the rules of necroposting... and it's probably late, however I did swap the soundfiles files Urbz, Sims 2 and Spyro on the DS have, and all three use the same sound engine. It worked (except for crashing where audio data was missing for each part of each game - Sims 2/Spyro data missing voices, and Sims 2/Urbz crashing when entering your flat in your hotel).

I believe now that it is a format developed by Amaze Entertainment (the developer for said 3 games), and therefore is probably not exclusive to S3M formats. One common consistency I found is the header starting with
Code:
28 00 00 00
from comparing the first couple of bytes of each file. However, the three subsequent 32-bit chunks are completely different.

Edit. Had a quick look at the hex with an eye to pointers. Possibly straight 32 bit pointers at the start (flipped for endianness of course) and possibly ending at 41D4 with 085D 5D01 which when flipped is 015D 5D08 which is more than close enough to the end of the file. 4213 files if that is the case, give or take any header stuff.
I'm inclined to agree here. I believe that there is a high number of relative headers to each set of data, however modifying the first 4-5 sets of pointers changes a high number of information, leading me to believe it's related to the header or something.



Still, the instrument data for The Sims 2 DS is in PCM8 format, and around 11KHz to 32KHz, with the vast majority being around 16KHz. Some data is 16-Bit, however I am trying to identify where each pointer sits within the file, and whether it points to audio or not (through trial and error)
 

RhianeTurton

New Member
Newbie
Joined
Apr 13, 2024
Messages
1
Trophies
0
Age
16
XP
2
Country
United States
So, not sure on the rules of necroposting... and it's probably late, however I did swap the soundfiles files Urbz, Sims 2 and Spyro on the DS have, and all three use the same sound engine. It worked (except for crashing where audio data was missing for each part of each game - Sims 2/Spyro data missing voices, and Sims 2/Urbz crashing when entering your flat in your hotel).

I believe now that it is a format developed by Amaze Entertainment (the developer for said 3 games), and therefore is probably not exclusive to S3M formats. One common consistency I found is the header starting with
Code:
28 00 00 00
from comparing the first couple of bytes of each file. However, the three subsequent 32-bit chunks are completely different.


I'm inclined to agree here. I believe that there is a high number of relative headers to each set of data, however modifying the first 4-5 sets of pointers changes a high number of information, leading me to believe it's related to the header or something.



Still, the instrument data for The Sims 2 DS is in PCM8 format, and around 11KHz to 32KHz, with the vast majority being around 16KHz. Some data is 16-Bit, however I am trying to identify where each pointer sits within the file, and whether it points to audio or not (through trial and error)
Did you manage to do it?? Ive been searching for optimum alfreds voice clips forever
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Just 6 but dual band 6 lol