.gin and .abk sound formats (Need for Speed mw 2005)(help)

Codecs, formats, encoding/decoding of game audio, video and music
Tropod
Posts: 6
Joined: Sat Sep 05, 2015 2:36 am

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by Tropod »

V12-POWER wrote:It's up to you - I can't code for sht

Yeah I'm not that fantastic either, I'm better once I've learnt/understood format with working code. I've been mostly trying to get my head around the last 4 pages, though I've a better grasp now than I did 2 weeks ago. And have managed to make use of info/help you guys have provided here, has most certainly helped! So if there's anything I can assist with (ie abk files) let me know :).

Can't believe there's assembly code in abk files :shock:.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

Tropod wrote:Can't believe there's assembly code in abk files :shock:.


I see that for the first time too.

You can help if you can tell which sounds play wrong in Simcity, and how they are supposed to play.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

V12-POWER wrote:It's up to you


I think we start from making some tool that just replaces the existing sounds, and maybe later changing some properties in data segment.
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by V12-POWER »

id-daemon2 wrote:
V12-POWER wrote:It's up to you


I think we start from making some tool that just replaces the existing sounds


perfect. I'll help in any way which does not requires coding, but we can contact the guys from gtrcars if we ever need more coders
Tropod
Posts: 6
Joined: Sat Sep 05, 2015 2:36 am

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by Tropod »

id-daemon2 wrote:
Tropod wrote:Can't believe there's assembly code in abk files :shock:.


I see that for the first time too.

You can help if you can tell which sounds play wrong in Simcity, and how they are supposed to play.


For the most part they sound ok.
On a side note, the SC4 abk files contain "SYNC" within the PT header and I can't seem to find a reference to this anywhere?
kickstart
Posts: 43
Joined: Fri Dec 19, 2014 7:45 am

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by kickstart »

Is that now possible, that we can get the sound-files from nfs-mw?
I just remember, that the were relay good and today, you can use it for mush other sims ;-)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

id-daemon2 wrote:I think we start from making some tool that just replaces the existing sounds


It seems the main question here will be: do we need to change sample rate?

Almost all engine sounds are 22050, that is default rate. If we need to change that, we have to rebuild the whole PT header part. This will take more time. If not, we can only change properties.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

Tropod wrote:For the most part they sound ok.


If possible, let's find out which ones and why. This may also affect NFS files.

Tropod wrote:On a side note, the SC4 abk files contain "SYNC" within the PT header and I can't seem to find a reference to this anywhere?


These correspond to general PT structure and they don't have any effect as I can see.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

kickstart wrote:Is that now possible, that we can get the sound-files from nfs-mw?
I just remember, that the were relay good and today, you can use it for mush other sims ;-)


Yes, you can get all sounds now with tools provided on page 1.
kickstart
Posts: 43
Joined: Fri Dec 19, 2014 7:45 am

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by kickstart »

id-daemon2 wrote:And this is ABK decoder.

Thank you so much!!
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by V12-POWER »

id-daemon2 wrote:
id-daemon2 wrote:I think we start from making some tool that just replaces the existing sounds


It seems the main question here will be: do we need to change sample rate?

Almost all engine sounds are 22050, that is default rate. If we need to change that, we have to rebuild the whole PT header part. This will take more time. If not, we can only change properties.


I think that we have the option to use 44.1khz as the sample rate - since most of the games use it (im talking about rfactor, gtr2, rfactor 2, ac, r3e)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

I found why stereo files decoded wrong. Both NFS & SimCity tools will be updated.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

Tool updated (stereo files fixed): viewtopic.php?f=6&t=1567

Now I can proceed with encoding.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

Some corrections to the ABK structure description before I start rebuilding it.

8-11 -> byte 10 - number of code sections
32-35 -> "BNKl" section offset
36-39 -> "BNKl" section size
48-51 -> code segment relocation table offset
52-55 -> data segment relocation table offset
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

I'm writing this just to inform you on the progress.

The code to rebuild PT header is ready and working with all new offsets. Now its time to change the actual samples.
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by V12-POWER »

id-daemon2 wrote:I'm writing this just to inform you on the progress.

The code to rebuild PT header is ready and working with all new offsets. Now its time to change the actual samples.


great job bro, really. take your time to do this
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

Its almost finished. Now I can replace all samples with any samplerate and size. Just need to add SX.exe conversion call now and you will test it ;)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

It's time to try the first public version of ABK encoder. I played the very first Need for Speed long ago in 1995, when it was all new, then NFS 2,3,4 and Porshe. I'm glad I can do something for the community, hope you'll like it.

Usage:

ABK_insert [ABK file] [wav file] [sample № to replace]

Use it on engine ABKs. Never tested on anything else. Use mono 16-bit files only.

Numbers correspond to those we found before. 1,2 = idle, 3,4 = down throttle so on. Also note that 2000/4000/8000 rpm nominals may not be the same for all cars.

SX.exe must be in the same dir.

You need to run the tool several times to replace sounds you want. Every time it will output a file with additional "m" in the end, so you won't lose the original file. Make batch files if you need.
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by V12-POWER »

FUAAAAAARRRRKKKKKKKKKK, dream come true bro. fkin brilliant!!!
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: .gin and .abk sound formats (Need for Speed mw 2005)(help)

Post by id-daemon »

So inform me if it works for you, then I proceed with GIN encoder