Update 05/06/22: Finally, I kinda figured out how the TOC works. Here's the script (Only works for US version ATM; If asks to overwrite the same files, just do it. Reason is there are duplicate entries):
for i = 0 get FILE_ENTRY_OFF long if FILE_ENTRY_OFF == 0xffffffff break endif math FILE_ENTRY_OFF - 0xff000 get FILE_ENTRY_LEN long get FILE_ENTRY_LEN long get FILE_ENTRY_NUM long savepos TOC goto FILE_ENTRY_OFF for j = 0 < FILE_ENTRY_NUM get NAME_OFF long math NAME_OFF - 0xff000 savepos FILE_ENTRY goto NAME_OFF get NAME string goto FILE_ENTRY get UNK long get OFF_ADD long get SIZE long get ABS_OFF long math ABS_OFF + OFFSET if ABS_OFF >= FGI_SIZE break endif get ZERO long get UNK long get UNK long log NAME ABS_OFF SIZE 1 next j math OFFSET + FILE_ENTRY_LEN goto TOC next i
Last edited by BloodRaynare on Fri May 06, 2022 2:19 am, edited 2 times in total.
I think all the files in FGI.bin has all the files combined in 1 .BIN file. SLUS_202.19 has the file names (Example "/ps_db/stgall/tchunkH.bin") Since Time Crisis 3 uses the same game engine it also has FGI.bin and the elf files with the file names inside, it's the same for the arcade version, but the elf file is in the dongle. Time Crisis 4 uses the same game engine, but there packed in .CVM files which can extract with 7zip
tgm2 wrote:has this been figured out yet? i wanted to extract the quick & crash sounds, you can see their name with strings slus_202.19|grep crash
Check the updates of my initial post for the somewhat-proper BMS script. About those names, it was a part of filesystem within the SoundImg_SD_*.bin files. However, I haven't figured out yet where those names were linked to which SoundImg files within the game's executables. Anyway, if you still want to extract those sounds, you can use PSound (by using Wine since I assumed you were on a non-windows OS) then scan the SoundImg_SD_qc_english.bin (Where all the sounds for Quick & Crash minigames reside) file as a workaround.
tgm2 wrote:the guy's voice seems a bit high pitched, what's the right sample rate? and do you know where the music is stored?
From the quick look at the game's executable using ps2dis, the sample rates is 20000Hz. The musics are located in "home\chris\data\sound\bgm\VGI" directory. Use this txth scripts to play the files with vgmstream plugin + media player that supports it:
Save those scripts above as ".vgi.txth", put it on the same directory as the VGI files. Then just play it with vgmstream + a media player that supports it (like foobar2000).
JeffMakesGames wrote:I can't seem to make the script work.
error in src/file.c line 615: fdnum_open() Error: No such file or directory
Did you put both of the game's executable (SLUS_202.19) and FGI.BIN file in the same directory? Or probably you're on non-Windows OS (like Linux)? If that's the case change the filenames in "open FDSE..." lines to lowercase.
JeffMakesGames wrote:I know Time Crisis 3 also uses a FGI.BIN but I wasn't able to extract anything from it.
Crisis Zone uses something different called dummy files.
TC3 uses same method as TC2 (TOC was inside the game's executable + FGI.BIN for the bigfile), but the offset where the TOC resides is different, so I have to make a separate script for it (But I do have the script here. Only supports US and Namco System 246 aka Arcade version for now). No idea about Crisis Zone as I haven't checked that one.
TC3 uses same method as TC2 (TOC was inside the game's executable + FGI.BIN for the bigfile), but the offset where the TOC resides is different, so I have to make a separate script for it (But I do have the script here. Only supports US and Namco System 246 aka Arcade version for now). No idea about Crisis Zone as I haven't checked that one.
My FGI.BIN comes off the ps2 disc of TC3, so this script probably won't work on it.
EDIT: I am an idiot for not reading the above more clearly. "US". Just peeked inside the bms script and see it reference the FGI and loader. Tried it and it works! Thanks!
Crisis Zone is definitely a different one though. On the PS2 disc, I see a CZ.BIN (368mb) and SLUS_209.27 (3mb) but I also see 3 files that are named dummy.000, dummy.001, and dummy.002. All 3 say they are 1GB in size. I don't know if they contain any data though.
JeffMakesGames wrote:My FGI.BIN comes off the ps2 disc of TC3, so this script probably won't work on it.
EDIT: I am an idiot for not reading the above more clearly. "US". Just peeked inside the bms script and see it reference the FGI and loader. Tried it and it works! Thanks!
Crisis Zone is definitely a different one though. On the PS2 disc, I see a CZ.BIN (368mb) and SLUS_209.27 (3mb) but I also see 3 files that are named dummy.000, dummy.001, and dummy.002. All 3 say they are 1GB in size. I don't know if they contain any data though.
By your description, the data file definitely were inside CZ.BIN, but we wouldn't know how the TOC was stored. Might take a look at it later.
tgm2 wrote:has this been figured out yet? i wanted to extract the quick & crash sounds, you can see their name with strings slus_202.19|grep crash
Check the updates of my initial post for the somewhat-proper BMS script. About those names, it was a part of filesystem within the SoundImg_SD_*.bin files. However, I haven't figured out yet where those names were linked to which SoundImg files within the game's executables. Anyway, if you still want to extract those sounds, you can use PSound (by using Wine since I assumed you were on a non-windows OS) then scan the SoundImg_SD_qc_english.bin (Where all the sounds for Quick & Crash minigames reside) file as a workaround.
Looking in soundImg_SD_qc_english.bin with PSound it looks like most of sounds are there but some are missing, such as the announcer's "Ready?" "Go!" "Let's look at your overall ranking" and "Level 4 - this is the final phase, shoot the cup" sounds. PSound bug?