Commentary Mod

A place for all old random modding threads.
Also, feel free to ask any questions here!
User avatar
StingRay68
Hall of Fame
Posts: 1073
Joined: Mon Jan 09, 2012 7:23 pm

Re: Commentary Mod

Postby StingRay68 » Sat Mar 23, 2013 5:03 pm

Ok, this is mainly info for slydways,
Speechmad files... control file structure. You can also find this info at the end of the audio file. I will walk you through an example afterwards. Bytes are read right to left unless otherwise specified.

2 bytes - "file name" or filetype
2 bytes - file # in the dat
1 byte - Not sure what to call this, for now control value
2 bytes - # of audio samples in the audio file
4 bytes - length of audio file. This must be a multiple of 256 bytes. Add padding at the end of the file if you need to.
1 byte - no idea, I think this is just a padding byte, but that's just a guess

For each audio sample (that you get from bytes 05-06)
2 bytes - Offset that audio sample begins at in the audio file. This number is based on blocks of 256 bytes (so # x256 bytes = offset). THESE ARE READ LEFT TO RIGHT !!!
variable bytes based on control value found at byte 04 - not sure what this does, but probably some kind of playback parameters (again a guess)

finally an end of file sequence of 4 bytes, based on control file # (4 bytes x control value)
each control file is multiple of 16 bytes, so add padding at the end if need be.

example... file 239 in speechmad2
filename/filetype 0239
audio file # 0021
control value 1
samples 4
length of audio file 00 02 1D 00
padding byte

For each audio sample (in this case 4... file 0,1,2,3)
offset for audio file 0. SCHl begins at 0 for all audio files, this should never change.
unknown playback info for file 0 = 02
offset for audio file 1 Again, read left to right. 009A hex = 154 dec. blocks. 154x256 bytes per block = 39424. In decimal you can start at byte 0, next SCHl audio sample starts at 39424
playback = 2
offset for audio file 2 0290 hex. x 256 bytes = 74240 dec. Sample starts at 74240
playback = 2
offset for audio file 3 0433 hex x 256 bytes = 110848 dec Sample starts at 110848

end of file info.
In this case, control value was 2 so there will be 2 sets of 4 byte values. 00000004 and 00000004

Re: Commentary Mod

Sponsor

Sponsor
 

User avatar
StingRay68
Hall of Fame
Posts: 1073
Joined: Mon Jan 09, 2012 7:23 pm

Re: Commentary Mod

Postby StingRay68 » Sat Mar 23, 2013 5:09 pm

I probably didn't explain the control file enough or correctly, so if you have questions i will go back and edit it

Audio file structure.

For each audio sample in the file.
4 bytes - SCHl header
4 bytes - audio sample header length.
2 bytes - PT - this is the asf file header info, runs through the rest of the 36 bytes of header info
4 bytes - SCCl header
4 bytes - header length
4 bytes - # of SCDl parts in this sample. (since computer starts at 0, you will need to +1 to this #)

For each SCDl part...

4 bytes - SCDl header
4 bytes - Offset to next SCDl part in this sample. That value includes this header. So next SCDl part would be from the beginning of this SCDl header.
4 bytes - type? not sure of what this is right now
4 bytes - padding I think
Data bytes for whatever audio this SCDl section contains

4 bytes SCE1
Then Padding for this SCHl file to length = multiple of 256 bytes



Example, file 239 in speechmad2, only doing the first sample here

SCHl
length 24 = 36 bytes
PT - this is the info for the asf audio sample
SCCl
length 0c or 12 bytes
# of SCDl pieces in here (4D hex = 77) computer starts with 0, so there are 78 pieces before we get to the next Sample SCHl ( at 39424 dec)
SCDl
offset to next SCDl from the beginning of this header (02BC)
filetype? 0A20 (again, not sure what this is right now, but it is repeated in several files so it isnt an offset)
pad

at the end of all the SCDl pieces for this sample
SCEl
then pad out for this entire length = multiple of 256 bytes

next 4 bytes should be next sample or SCHl header, (again this is at 39424 dec)

So, there you are. Now you can see why these file will require a lot of work to correct for custom audio.

I may be persuaded to write code for a util to handle custom imports... provided that you supply me game audio for Kirk Herbstreit commentary.. lol, I know a lot of work, but so is writing code to handle all this...especially since I would then have to figure out what all the asf header crap is used for ( info after 'PT' in these audio files)

User avatar
slydways
Banned
Posts: 917
Joined: Wed Jan 09, 2013 7:41 pm
Location: Alliance,Ohio ........Home of the MOUNT UNION PURPLE RAIDERS 11 Division III National Championships

Re: Commentary Mod

Postby slydways » Sun Mar 24, 2013 12:22 am

I may be persuaded to write code for a util to handle custom imports... provided that you supply me game audio for Kirk Herbstreit commentary.


Thanks , Sting...I've been on the phone all day with Kirk's agent working out the details. :lol: I have been able to put new audio into the team names for PA but am now working on a way to resize the converted .asf file to match the original so I don't have to do so much work on matching the offsets. The converters I have either convert to adpcm_ea_1 or adpcm_3 and the game( for names and commentary) is adpcm_2. Still workin' on it. Thanks for the file info...i will look it over...maybe it will help. By the way...here are some sites that may help us both combine your dat knowledge with what I have leaned about audio...

http://wiki.multimedia.cx/index.php?title=Electronic_Arts_Formats

http://wiki.multimedia.cx/index.php?title=Electronic_Arts_SCxl

http://wiki.multimedia.cx/index.php?title=Electronic_Arts_Sound_eXchange

User avatar
StingRay68
Hall of Fame
Posts: 1073
Joined: Mon Jan 09, 2012 7:23 pm

Re: Commentary Mod

Postby StingRay68 » Sun Mar 24, 2013 1:18 pm

The scxl links looks interesting. Let me look through it and see how it pertains to Madden.
The information in the PT header in those files is what is holding things up, would be nice if we had an audio guru who knew a ton about different audio formats.

User avatar
StingRay68
Hall of Fame
Posts: 1073
Joined: Mon Jan 09, 2012 7:23 pm

Re: Commentary Mod

Postby StingRay68 » Sun Mar 24, 2013 2:26 pm

PT header information

2 bytes - PT
2 bytes - Platform 00 = pc
4 bytes - no idea but doesnt seem to change from 06 01 65 FD

(Going off that info from pt patch substream)
for each "tag"
1 byte - tag
1 byte - # of bytes read (from left to right) for this tag entry

4 bytes - FF = end of PT info

example file 239 (first 8 bytes, seems not to change for madden? I only looked at a few though)
PT
Platform 00
060165fd

Tags
tag 1 = 80 - Compression version
1 byte read
02 = EA XA ADPCM R2
tag 2 = 85 - Total count of sample in stream
3 byte read
02 CC C7 = total count of samples
tag 3 = 84 - Sample rate (Hertz)
3 byte read
00 8C A0 hertz (36000)
tag 4 = A0 - Compression type
1 byte read
04 = Microtalk 10:1

FF end of file

User avatar
slydways
Banned
Posts: 917
Joined: Wed Jan 09, 2013 7:41 pm
Location: Alliance,Ohio ........Home of the MOUNT UNION PURPLE RAIDERS 11 Division III National Championships

Re: Commentary Mod

Postby slydways » Sun Mar 24, 2013 10:35 pm

The Microtalk (mt_blk) is the correct compression setting to get the imported custom file to be the same specifications as the original file in the game. After adding Microtalk to my ms-dos batch file command line, sx.exe produced an .asf file that came within 8bits of the original, It is a lot easier to replace original files when they are this close. We won't have to worry now about changing control files....just swap files. This is going to work.

User avatar
slydways
Banned
Posts: 917
Joined: Wed Jan 09, 2013 7:41 pm
Location: Alliance,Ohio ........Home of the MOUNT UNION PURPLE RAIDERS 11 Division III National Championships

Re: Commentary Mod

Postby slydways » Mon Mar 25, 2013 11:55 am

ehlomint wrote:I've got a wav file of Al Michaels saying, "The Bus". Want to replace Bettis audio with that. I've tried method above to no avail. Maybe the problem is the format of the Bus audio?

Tell me exactly what steps you took and maybe I can help.

User avatar
StingRay68
Hall of Fame
Posts: 1073
Joined: Mon Jan 09, 2012 7:23 pm

Re: Commentary Mod

Postby StingRay68 » Tue Mar 26, 2013 4:25 pm

slydways wrote:We won't have to worry now about changing control files....just swap files. This is going to work.


Lol, I see you're not done making assumptions. See how it goes and let me know.

User avatar
slydways
Banned
Posts: 917
Joined: Wed Jan 09, 2013 7:41 pm
Location: Alliance,Ohio ........Home of the MOUNT UNION PURPLE RAIDERS 11 Division III National Championships

Re: Commentary Mod

Postby slydways » Sat Mar 30, 2013 5:59 pm

Moved to College Football PC

http://collegefootballpc.com

User avatar
PML17
Hall of Fame
Posts: 1214
Joined: Mon Jul 18, 2011 5:24 pm

Re: Commentary Mod

Postby PML17 » Sat Mar 30, 2013 7:14 pm

slydways wrote:AL MICHAELS - NEW PLAYER NAME

A new name in the game...this time from Al Michaels saying..."Cassidy"



I will post a tutorial on this soon...similar to the one I just edited on Stadium Announcer Player Name.

Sweet man!
Retired from the Fourm. I check back in once a month, sorry in advance for late replies.


Return to “Archive + Q&A”

Who is online

Users browsing this forum: No registered users and 3 guests