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.

[questions] WRC 1 - DVD.[BIN/DAT]

Featured Replies

  • Author
  • Localization

AnonBaiter, posted Fri Jun 29, 2018 5:23 pm (36294)


okay, so i've already written a .bms script out of the DVD.[BIN/DAT] format as seen in WRC: World Rally Championship
the thing is, i want to apart the hashing algorithm as seen in the EVO_OPT4.IRX file into the .bms script - back when i did this i never knew i was pushing myself this hard just for this
Code:
set test01 string "game_intro.str"
strlen name_size test01

log memory_file10 0 0
putct test01 string -1 memory_file10
goto 0 memory_file10

math hash_a_value == 0x7ab7
math hash_b_value == 0x6a2f
math hash == 0

for sb = 0 < name_size
   get string_byte byte memory_file10
   putarray 1 sb string_byte
next sb

for x = 0 < name_size
   getarray string_byte 1 x
   xmath hash1 "(((hash_a_value << 24) | (hash_b_value >> 24)) string_byte) & 0x7fffffff"
   putarray 0 0 hash1
next x
here's said IRX file for anyone interested
also included is a part of said IRX file i'm trying to adapt into the .bms language
  • Author
  • Localization

aluigi, posted Sun Jul 01, 2018 4:56 am (36325)


Not sure if yours is a request about bms or reverse engineering, from the bms side you don't need to use memory files and array, just getvarchr.
You can even make a C function and calling it with the "tcc" prototype of calldll.

If you need help with reverse engineering I suggest you searching those constants on a search engine:
"31415" "27183"
  • Author
  • Localization

AnonBaiter, posted Sun Jul 01, 2018 6:35 pm (36344)


holy shit this is *SPAM* startling
they used the most basic shit you can ever find regarding hashing algorithms, i don't even think it's worth posting some random links for

anyway see if i'm getting close enough with this
Code:
math alpha == 0x7ab7
math beta == 0x6a2f
math hash == 0
math table_size == 0x7fffffff

set test01 string "game_intro.str"
strlen name_size test01

for sb = 0 < name_size
   getvarchr string_byte test01 sb byte
   xmath hash "hash * alpha"
   xmath hash "((hash string_byte) % table_size)"
   xmath alpha "(alpha * beta) % (table_size - 1)"
   putarray 0 0 hash
   putarray 1 0 alpha
next sb
  • Author
  • Localization

AnonBaiter, posted Sun Jul 01, 2018 8:33 pm (36346)


second try
Code:
math alpha == 0x7ab7
math beta == 0x6a2f
math hash == 0
math table_size == 0x7fffffff

set test01 string "game_intro.str"
strlen name_size test01

for sb = 0 < name_size
   getvarchr string_byte test01 sb byte
   xmath alpha "(alpha * beta) % (table_size - 1)"
   xmath hash "((alpha * hash) string_byte) % table_size"
   putarray 0 0 alpha
   putarray 1 0 hash
next sb
at this point i might be trying to pick off the MIPS code(hash_function.txt) to flesh this out
  • Author
  • Localization

mtik333, posted Sat Mar 14, 2020 7:32 am (54624)


Hi, sorry for "digging out" this thread after such time, but have you managed to achieve something here? I wanted to fetch game soundtrack from the archive file, but it seems that this is the only thread trying to solve mystery behind game files.
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.