Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

[PC] Need For Speed: Porsche Unleashed music extracting VIV

Featured Replies

  • Author
  • Localization

igoryek, posted Sun Apr 23, 2023 11:12 am (76516)


Hello.

after using ea_big4.bms on zzzymus.viv from PC version of the game, which contains music, i've got files without extensions.

https://mega.nz/folder/ZJdESBBB#nY8XPDSklbWAURoLNaPm-A

found this info about .VIV

Code:
====================================
7. Sound Effects in .BNK/.VIV Files
====================================

Most of sound effects and speech files (and sometimes ASF music files) are
stored in .BNK and .VIV resource files. The .BNK file may contain several
sounds. BNKs of older version have the following header:

struct OldBNKHeader
{
  char   szID[4];
  WORD   wVersion;
  WORD   wNumberOfSounds;
  DWORD dwFirstSoundStart;
  DWORD dwSoundsArray[wNumberOfSounds];
};

For the newer BNK files the header is:

struct NewBNKHeader
{
  char   szID[4];
  WORD   wVersion;
  WORD   wNumberOfSounds;
  DWORD dwFirstSoundStart;
  DWORD dwSoundSize; // = total filesize - dwFirstSoundStart
  DWORD dwUnknown;   // seems to contain small number <20 or -1
  DWORD dwSoundsArray[wNumberOfSounds];
};

szID -- string ID, always "BNKl".

wVersion -- for old version this is 0x0002, for new version -- 0x0004.

wNumberOfSounds -- number of sounds stored in .BNK file.

dwFirstSoundStart -- the starting position of the first sound audio data
relative the BNK file beginning. There's no real use of this...

dwSoundsArray -- the array of (wNumberOfSounds) DWORDs. Each of these is the
shift to the PT header describing the separate sound in .BNK relative to the
starting position of this DWORD. That is, if such DWORD (dwShift) starts at
the position (dwShiftPos) (relative to the start of .BNK), the correspondent
PT header starts at the position: dwPTHeaderPos=dwShiftPos dwShift.
Note that some DWORDs in this array are zeroes that means they correspond to
no sound. Remember that PT header starts with the "PT\0\0" signature.

So, (dwSoundsArray) points to a number of PT headers in .BNK, which follow the
BNK header. Each of these PT headers describe a separate sound in .BNK.
Refer to the .ASF file description for details on dealing with PT headers.
Note that some PT headers do not contain (dwChannels), (dwSampleRate),
(dwCompression) data. I use the default value if it's omitted in the header:
mono, 22050 Hz, unknown compression. In any case, PT header for .BNK sound
should contain values for (dwNumSamples) and (dwDataStart). (dwDataStart) is
the starting position of sound data relative to the start of .BNK file. Sound
data itself has no additional headers and in case of EA ADPCM compression
(dwCompression==0x07) should be decoded just like "SCDl" block data (following
ASFChunkHeader). As to the size of the sound data, just use (dwNumSamples) and
stop playback of the sound when it's exhausted.

As to .VIV files these seem to be multi-data resources. In particular, they
can contain .BNK/.ASF files. So, if you want to play sounds from a .BNK file
contained within .VIV, just search .VIV for "BNKl" string ID and that will
be just the .BNK file described above. Note that all (dwDataShifts) given in
PT headers in .BNK are always positions relative to the start of .BNK file,
that is, if .BNK is in .VIV, they will be relative to the start of "BNKl"
signature you found in .VIV. To play .ASF file from .VIV you may just search
for "SCHl" string ID and that'll mark the beginning of .ASF file, while
the end will be marked by "SCEl" block.


can someone look at them, please?
files are played in foobar2000 but are they .asf?
  • Author
  • Localization

BloodRaynare, posted Sun Apr 23, 2023 12:04 pm (76518)


I'll assume that this is about the PS1 version.

igoryek wrote:
can someone look at them, please?
files are played in foobar2000 but are they .asf?


Yeah, pretty much. This game and High stakes music files are extensionless when unpacked but they are ASF/MUS files indeed. The audio data was encoded with Sony ADPCM audio codec.
  • Author
  • Localization

igoryek, posted Sun Apr 23, 2023 12:43 pm (76519)


BloodRaynare wrote:
I'll assume that this is about the PS1 version.
Yeah, pretty much. This game and High stakes music files are extensionless when unpacked but they are ASF/MUS files indeed. The audio data was encoded with Sony ADPCM audio codec.

oops, forgot to mention from which version i've extracted the files. fixed.

thank you for your reply.
so i can simply add '.asf'?
  • Author
  • Localization

BloodRaynare, posted Sun Apr 23, 2023 1:23 pm (76520)


igoryek wrote:
oops, forgot to mention from which version i've extracted the files. fixed.

thank you for your reply.
so i can simply add '.asf'?


Oh, it was from the PC version? I though only the PS1 games that has the extensionless ASF/MUS files, at least in High Stakes.
Yeah, you can add the ASF extension.
  • Author
  • Localization

igoryek, posted Sun Apr 23, 2023 2:07 pm (76521)


BloodRaynare wrote:
Oh, it was from the PC version? I though only the PS1 games that has the extensionless ASF/MUS files, at least in High Stakes.
Yeah, you can add the ASF extension.


yes, PC version: GameData/Music/zzzymus.viv.

thank you.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.