Fix some .SB0 [TMNT GC/PS2]

This commit is contained in:
bnnm 2017-12-03 20:25:50 +01:00
parent cdcedc6fd1
commit 407aa141bd

View File

@ -571,6 +571,22 @@ static int config_sb_header_version(ubi_sb_header * sb, STREAMFILE *streamFile)
return 1; return 1;
} }
/* Myst IV Demo (2004)(PC) (final game is different) */
if (sb->version == 0x00100000 && is_sb0) {
sb->section1_entry_size = 0x68;
sb->section2_entry_size = 0xa4;
sb->external_flag_offset = 0x24;
sb->num_samples_offset = 0x34;
sb->sample_rate_offset = 0x44;
sb->channels_offset = 0x4c;
sb->stream_type_offset = 0x50;
sb->stream_name_offset = 0x54;
sb->has_internal_names = 1;
return 1;
}
/* Prince of Persia: Warrior Within (2004)(PC) */ /* Prince of Persia: Warrior Within (2004)(PC) */
if (sb->version == 0x00120009 && is_sb0) { if (sb->version == 0x00120009 && is_sb0) {
sb->section1_entry_size = 0x6c; sb->section1_entry_size = 0x6c;
@ -761,5 +777,36 @@ static int config_sb_header_version(ubi_sb_header * sb, STREAMFILE *streamFile)
return 1; return 1;
} }
/* TMNT (2007)(PS2) */
if (sb->version == 0x00190002 && is_sb1) {
sb->section1_entry_size = 0x48;
sb->section2_entry_size = 0x5c;
sb->external_flag_offset = 0;
sb->channels_offset = 0x28;
sb->sample_rate_offset = 0x2c;
//sb->num_samples_offset = 0x34 or 0x3c /* varies */
sb->extra_name_offset = 0x44;
sb->stream_type_offset = 0x48;
sb->has_extra_name_flag = 1;
return 1;
}
/* TMNT (2007)(GC) */
if (sb->version == 0x00190002 && is_sb3) { /* same as 0x00190003 */
sb->section1_entry_size = 0x68;
sb->section2_entry_size = 0x6c;
sb->external_flag_offset = 0x28; /* maybe 0x2c */
sb->channels_offset = 0x3c;
sb->sample_rate_offset = 0x40;
sb->num_samples_offset = 0x48;
sb->stream_type_offset = 0x5c;
sb->extra_name_offset = 0x58;
return 1;
}
return 0; return 0;
} }