Jump to content

Happy Feet (GameCube) .str files


Recommended Posts

If this game's engine is the same as Teen Titans, the header file for the correct audio playback for the .str/.sbk is contained inside the level .gc resource files (stuff like sample rates, audio channels, DSP ADPCM coefficients and so on).

I made a txth config text for both of them so you can play it with vgmstream-supported media players e.g. foobar2000 (assuming you have the component installed first) however it requires a table text file that points to the offset of the audio header inside the .gc file.
So I also made this QuickBMS script below to assist with that. It will create a table file named "names.txt" containing offset definition for the str/sbks by pointing this script to the gc files (Only tested with files from Teen Titans so if it was different please send the gc files here):

get FNAME basename
get FEXT extension
string FEXT l FEXT

if FEXT == "gc"
	endian big
elif FEXT == "gca"
	print "This file is only contains animation data and doesn't contain audio header data needed for .str/.sbk playback"
	cleanexit
endif

goto 0x310
get ENTRIES long
get ENTRY_OFF long

goto ENTRY_OFF

for i = 0 < ENTRIES
	get FILE_INFO long
	math FILE_TYPE = FILE_INFO
	math FILE_TYPE >> 24
	math FILE_NUMS = FILE_INFO
	math FILE_NUMS & 0xff
	get FILE_OFFSET long
	putarray 0 i FILE_OFFSET
next i

log MEMORY_FILE 0 0
math SUBSONGS = 1
math TMP_OFF = 0

for i = 0 < ENTRIES
	getarray FILE_OFFSET 0 i
	if FILE_OFFSET == 0
		continue
	endif
	xmath TMP "FILE_OFFSET + 0x4C"
	goto TMP
	getDstring PATHNAME 32
	xmath TMP "FILE_OFFSET + 0x6C"
	goto TMP
	get OFFSET long
	
	append
	if OFFSET == 0xffffffff
		string TABLES p "*%s.str: 0x%x" PATHNAME FILE_OFFSET
		put TABLES line MEMORY_FILE
	else
		math SUBSONGS_OFFSET = FILE_OFFSET
		math SUBSONGS + 1
		putarray 1 TMP_OFF SUBSONGS_OFFSET
		math TMP_OFF + 1
	endif
	append
next i

xmath TMP2 "SUBSONGS - 1"
math TMP3 = 1

for i = 0 < TMP2
	getarray SUBSONGS_OFFSET 1 i
	append
	string TABLES p "%s.sbk#%d: %d, 0x%x" FNAME TMP3 TMP2 SUBSONGS_OFFSET
	put TABLES line MEMORY_FILE
	math TMP3 + 1
	append
next i

get TXT_SZ asize MEMORY_FILE
log "names.txt" 0 TXT_SZ MEMORY_FILE

And here's the txth files itself:
gc_txth.zip


The txth, table file, and the sbk/str/gc must be in the same directory.
And then there's a few caveats. First, for the str files the directory structure must be the same like how it was on the disc. And second, you have to edit the .str.txth and change the "header_file" field to whatever .gc file names inside the desired directory.

Edited by BloodRaynare
Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...