FindLoc MEMORY_FILE

Doubts, help and support about QuickBMS and other game research tools
zgoro
Posts: 16
Joined: Sat May 02, 2020 12:46 pm

FindLoc MEMORY_FILE

Post by zgoro »

Hi guys,

Regarding FindLoc, I'd love to ask how to pass a dynamic byte array stored in MEMORY_FILE to a variable:

The idea would be on a loop, to log each binary array into a MEMORY_FILE, after each line is logged, start a second loop to scan for duplicates.

I've thought about findLoc current line array from the beginning of file until current line but unable to pass it into a variable.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FindLoc MEMORY_FILE

Post by aluigi »

Unfortunately I don't have a solution for handling arrays.
Sometimes I have formats that use a "combo" of hashes and filenames that obviously require a long operation like search the hash and replace with the filename.

The only work-around I found was to store hashes as binary or hex sequence (after all it has a fixed size) and filenames followed by a dividing character (like ';') in a memory file.
Not sure if that's what you want but an example script is http://aluigi.org/bms/new_sword_legends.bms

Even if in my tests the script was very fast, it looks like it's still very slow with about 300'000 filenames:
https://www.zenhax.com/viewtopic.php?p=64017#p64017