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.

Azurik - Rise of Perathia (Xbox) - *.xbr file names from index file

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 10:34 am (68968)


Hello!
The xbr format of this game is pretty simple but the archives themselves don't contain any file names. Instead these are listed in a different archive called "index.xbr". However I cannot find out how they correspond to one another. This has to do something with a file index but I'm pretty lost.
Can somebody take a look at these samples?
https://1fichier.com/?b46x0z3rqv39qtgmopew
The folder structure is "as-is", the index file is inside this folder - just to open it correctly.
Thanks everybody! :)
  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 11:43 am (68970)


Ok, here is what I quickly found out. The structure of the index file:
Code:
idstring "xobx"
get ENTRIES long
get ZERO long
get UNK long # 1
get TOCPOS long
get UNK long # 1
for i = 0 < ENTRIES
   get INDPOS long
   get ZERO long
next i
get UNK long # 6
get ZERO long
get FOOTOFF long # zero block after file names
getDstring IND 4 # "indx"
get UNK long # 8

goto TOCPOS
get FILES long
get VER long
for i = 0 < FILES
      get NAMEL long
      savepos BIAS
      get NAMEPOS long
      math NAMEPOS = BIAS
      savepos MYOFF
      goto NAMEPOS
      getDstring NAME NAMEL
      goto MYOFF
      get IDENT long
      get UNK long
      getDstring TYPE 4
      string NAME p "%s.%s" NAME TYPE
      print "%UNK% %IDENT% %NAME%"
next i

No idea how to get from the starting entry to the according file name or which xbr it is located.
Notes:
- UNK1 is in ascending order from 61436 to 98585 with varying differences
- UNK2 is a some index sadly not corresponding to an xbr file (30 indexes, 40 xbr files)
- UNK3 is in descending order for each corresponding index block with difference 20 each time
- in the file table, the corresponding xbr file is listed after the first file in the archive
After the table are the file names, including the names of the xbr files in between, so 40 entries more than in the above TOC.

edit 1:58pm - better code with correct file names!
  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 12:10 pm (68971)


Almost forgot the script for the xbr files:
Code:
idstring "xobx"
get VER long # ?
get ZERO long
get FILES long
get BIAS long
get TYPES long
get TYPESOFF long
get ENTRIES long
get ENTRIESOFF long
get ZERO long
get ENDOFF long
get   ENTRIES_END long
get ENTRIED_ENDOFF long
get FOLDEROFF long # ingame processing folder?
get UNK long # file index?

goto TYPESOFF
for i = 0 < TYPES
   getDstring TYPE 4
   get ID long
next i

goto ENTRIESOFF
for i = 0 < ENTRIES
   get UNK long
next i

get BNAME basename
goto 0x3c
for i = 1 <= FILES
   get OFFSET long
   math OFFSET = BIAS
   get SIZE long
   getDstring TYPE 4
   get UNK long # only 0x8, 0x10 or 0x80
   string NAME p "%s_%d.%s" BNAME i TYPE
   log NAME OFFSET SIZE
next i
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jan 11, 2022 9:21 am (68993)


Any help is highly appreciated here, folks...
  • Author
  • Localization

aluigi, posted Tue Jan 11, 2022 10:11 am (68996)


I tried the first script on index.xbr using the -B option that dumps the non-parsed content.
The result contains the names of the other xbr files but everything else is just a bunch of zeroes which mean that these strings are not referenced anywhere else.

The UNK field in index.xbr is not available in the other xbr, therefore there is no ID to use for matching the filenames.
Even the IDENT field can't be used for identifying the xbr file because the number of referred names doesn't match the files in the xbr (for example hourglass.xbr has 20 entries while "hourglass" and other "surf" types in index.xbr belong to IDENTs with many more files.
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jan 11, 2022 10:32 am (68997)


Glad to see that you're stumped as well. ;)
There has to be some way however. I mean, why would they have the index file in the first place?
  • Author
  • Localization

cic, posted Tue Jan 11, 2022 4:17 pm (69006)


aluigi wrote:
I tried the first script on index.xbr using the -B option that dumps the non-parsed content.
The result contains the names of the other xbr files but everything else is just a bunch of zeroes which mean that these strings are not referenced anywhere else.

The UNK field in index.xbr is not available in the other xbr, therefore there is no ID to use for matching the filenames.
Even the IDENT field can't be used for identifying the xbr file because the number of referred names doesn't match the files in the xbr (for example hourglass.xbr has 20 entries while "hourglass" and other "surf" types in index.xbr belong to IDENTs with many more files.
thanks :mrgreen:
  • Author
  • Localization

AlphaTwentyThree, posted Thu Jan 13, 2022 4:39 am (69044)


I'll try to get anywhere when I find the time. I'm quite motivated in this matter to be honest. If I succeed we can all profit in experience how some strange engines handle these things. :)
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.