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.

Amnesia: Memories [root.pfs] [Windows]

Featured Replies

  • Author
  • Localization

Delacroix, posted Sun Nov 29, 2015 12:47 pm (10191)


While I'm having my hands full with these Ys files from the other day, here's another cookie:

root.pfs
root.pfs.000 (possibly an index file)
  • Author
  • Localization

Delacroix, posted Mon Nov 30, 2015 11:06 am (10213)


OK, I determined what root.pfs.000 actually is. It's a patch file.

This means that everything put there will take priority over root.pfs and therefore...

It is very possible to translate the game. However...

The specifics of quickBMS (files need to be either same size or smaller in order to be replaced) essentially prohibits from making a patch archive. Unless I am mistaken?

Is there a way to create a new pfs.000 archive from scratch using QuickBMS or do we need a program written to deal with this?

Translation of the game involves both text and image editing.
  • Author
  • Localization

aluigi, posted Wed Dec 02, 2015 12:42 pm (10245)


Some fields are unknown so I can't make a rebuilder.
Anyway I don't like to make rebuilders in any case, I tried for Amnesia simply because the format is simple (for extraction) but without those missing fields it's useless.
  • Author
  • Localization

aluigi, posted Wed Dec 02, 2015 12:52 pm (10246)


Anyway, in case you want to try but I'm sure it will not work:
Code:
set KEY binary "\x28\x4B\xA5\xF9\x78\xF0\x3A\x99\x98\xA3\xCD\xC9\x92\xCF\x8C\xB8\x0D\x76\x3A\xE5"

log MEMORY_FILE 0 0
log MEMORY_FILE2 0 0

append

putdstring "pf8" 3 MEMORY_FILE
put 0 long MEMORY_FILE
put 0 long MEMORY_FILE
savepos BASE_OFF MEMORY_FILE
math BASE_OFF 4
for i = 0
    scandir "." NAME SIZE
    if NAME == ""
        break
    endif
    string NAME <<= 2   # remove .\
    if NAME != "root.pfs.000"
        putarray 0 i NAME
        putarray 1 i SIZE
        strlen NAMESZ NAME
        xmath BASE_OFF "BASE_OFF 4 NAMESZ 4 4 4"
        math i 1
    endif
next
math FILES = i
for i = 0 < FILES
    getarray NAME 0 i
    getarray SIZE 1 i
    print "INPUT FILE: %NAME% %SIZE|x%"
    open "." NAME

    strlen NAMESZ NAME
    put NAMESZ long MEMORY_FILE
    putdstring NAME NAMESZ MEMORY_FILE
    put 0 long MEMORY_FILE
    savepos OFFSET MEMORY_FILE2
    math OFFSET BASE_OFF
    put OFFSET long MEMORY_FILE
    put SIZE long MEMORY_FILE

    encryption xor KEY 0 20
    log MEMORY_FILE2 0 SIZE
    encryption "" ""
next i

put 0 long MEMORY_FILE

goto 3 MEMORY_FILE
get INFO_SIZE asize MEMORY_FILE
math INFO_SIZE - 7
put INFO_SIZE long MEMORY_FILE
put FILES long MEMORY_FILE

get SIZE asize MEMORY_FILE2
log MEMORY_FILE 0 SIZE MEMORY_FILE2

append

get SIZE asize MEMORY_FILE
log "root.pfs.000" 0 SIZE MEMORY_FILE

Usage:
quickbms script.bms "" folders_with_the_files

The file root.pfs.000 will be created in the same folder of the input files.
  • Author
  • Localization

Delacroix, posted Wed Dec 02, 2015 6:36 pm (10256)


...

I shit you not, Luigi, you are awesome. I'll try it out impromptu and hit you back with the result!

EDIT: Result is that game runs in the background, its process taking up maybe 6 MB of memory and nothing is going on. I assume that this would still need some work.
  • Author
  • Localization

aluigi, posted Wed Dec 02, 2015 7:32 pm (10259)


The only missing thing is the data between the information of the files and the data of the file, so just the part that is not clear yet.
Oh well, at least I tried :)
  • Author
  • Localization

Delacroix, posted Wed Dec 02, 2015 7:41 pm (10260)


Yes, you did, and maybe either you or someone else will figure out the last part. I'm keeping my fingers crossed. :-)
  • Author
  • Localization

Veshurik, posted Sun Oct 29, 2017 2:37 pm (27823)


Hello, guys! Found that topic on the Net.

I just interesting how I can extract the .pfs files.
I tried to use asmodean tool, but it doesn't help - nothing to extract.

I just want to extract files from demo version of Abnormal Lovers.

Thank you for the advice!
  • Author
  • Localization

aluigi, posted Sun Oct 29, 2017 5:01 pm (27829)


The problem of this pfs format is that without the algorithm that generates the key (since I guess they are generated in such way) then everytime it's necessary to "guess" the key in some way, something on which I'm no longer interested.

Anyway have you tried the following script?
http://aluigi.org/bms/norn9.bms

It implements a way to guess the key most of times, maybe you are lucky :)
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.