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.

PAC file from Alpine Racer 3 (Namco PS2)

Featured Replies

  • Author
  • Localization

Shiruba, posted Tue Sep 06, 2022 10:22 pm (73363)


Hello, I discovered this game has Klonoa (a Namco character) in it so I wanted to get the voice clips from the files.

Game : Alpine Racer 3
Platform : PS2 (also on Arcade but I extracted the files from the PS2 version)

For the file structure, the music and videos are in their own directories and are extractable. The rest is in a directory named "DAT". In it there are lots of .PAC files. All these files have "DPAC" as header when opened with an hex editor. So after some research I found DPAC is a format from Yuke and downloaded the script from this link : http://aluigi.altervista.org/bms/yuke.bms
The script didn't give any error but prints "0 files found in 0 seconds". So it's a failure but I guess the file structure is similar or at least easy to understand because I've checked quickly and there are some filenames that appear sometime.

I don't know if there are differences between every .PAC so I included every of them in the following link :
https://drive.google.com/file/d/1qRAf3c ... sp=sharing

Thanks.
  • Author
  • Localization

BloodRaynare, posted Wed Sep 07, 2022 2:44 am (73366)


Or you can use this BMS script that I wrote specifically for this game:

ar3_pac.bms
Note: Doesn't work on DJ1.PAC to DJ5.PAC. That one has a different TOC spec.
Note2: If you are looking for voices, check the LANG1.PAC.


Code:
math TOC = 0x800

IDString "DPAC"
get TOC_SZ long
get PAC_SZ long
get OFF_ADD_MUL long
get UNK long
goto TOC

xmath TOC_END "TOC TOC_SZ"
math TOC_END - 8

math OFF_ADD_MUL 1
math OFF_ADD_MUL * 0x800

getdstring DIRNAME 4
get UNK long
do
   savepos CURRPOS
   getDstring FNAME 4
   get OFFSET short
   get SIZE short
   
   string TEST_CHAR_1 = FNAME
   string TEST_CHAR_2 = FNAME
   string TEST_CHAR_3 = FNAME
   string TEST_CHAR_4 = FNAME
   
   string TEST_CHAR_1 - 3
   
   string TEST_CHAR_2 - 2
   string TEST_CHAR_2 < 1
   
   string TEST_CHAR_3 - 1
   string TEST_CHAR_3 < 2
   
   string TEST_CHAR_4 < 3
   
   math OFFSET * 0x800
   math SIZE * 0x100
   math OFFSET OFF_ADD_MUL
   
   if OFFSET < PAC_SZ
      xmath OFFSET_TMP "OFFSET - 4"
      savepos TOC
      goto OFFSET_TMP
      get ZERO_CHECK long
      goto TOC
   endif
   
   if TEST_CHAR_1 > "~" || TEST_CHAR_2 > "~" || TEST_CHAR_3 > "~" || TEST_CHAR_4 > "~"
      continue
   elif TEST_CHAR_1 < " " || TEST_CHAR_2 < " "  || TEST_CHAR_3 < " "  || TEST_CHAR_4 < " "
      continue
   elif OFFSET > PAC_SZ
      continue
   elif ZERO_CHECK != 0
      continue
   else
      string NAME = DIRNAME
      string NAME \
      string NAME FNAME
      string NAME .
      log NAME OFFSET SIZE
   endif
while CURRPOS < TOC_END


And here's the TXTH file for the adp file (save this as ".adp.txth" then put it on the same directory as the .adp files)

Code:
subsong_count = @0x04
base_offset = 0x10
subsong_spacing = 0x10

data_size = @0x00
start_offset = (subsong_count * 0x10) base_offset @0x04
sample_rate = @0x0a$2

codec = PSX
channels = 1

num_samples = data_size
loop_flag = auto


Use foobar2000 with vgmstream plugin to play the file.
If foobar2000 shows a "?" duration, Make sure the "Enable unknown exts" is checked in the vgmstream's foobar preferences.
  • Author
  • Localization

Shiruba, posted Wed Sep 07, 2022 1:36 pm (73370)


Thank you very much! I was already familiar with foobar2000 and .txth so all the explanations weren't needed but in case another person would like to do the same it's very well explained.
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.