ROM Hack Discussion Astral Chain ROM Hacking Bible

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
This is thread not for cheats, but for getting every file extracted and reverse engineer most important files.
Don't upload anything here that can be treated as legal property (clean textures and meshes especially).

ROMFS
romfs has five types of files:
.wem - single audio WWise file
.bnk - container with multiple audio WWise files
.wai - WWise file containing informations about audio files
.bk2 - bink video format
.pkz - zstd archives containing table, file names and data.

.pkz can be unpacked with this QuickBMS script (made by xentax user - link)
Code:
# Astral Chain . pkz extract
# By Dave, 2019
IDString "pkzl"
ComType ZSTD

Goto 0x10
Get ITEMS Long
Get FILE_ENTRY Long

XMath NAME_TABLE "FILE_ENTRY + (ITEMS * 0x20)"

For A = 1 to ITEMS

Goto FILE_ENTRY
Get NAME_OFFSET Long
Get JUNK Long
Get SIZE Long
Get JUNK Long
Get OFFSET Long
Get JUNK Long
Get ZSIZE Long
Math NAME_OFFSET + NAME_TABLE
Goto NAME_OFFSET
GetDSTring FILENAME 0x10

Clog FILENAME OFFSET ZSIZE SIZE
# Log FILENAME OFFSET ZSIZE # Use this line to get compressed output instead

Math FILE_ENTRY + 0x20

Next A

PKZ archive
And what we can get from it:

.bin - strings used in game like characters names or dialogues, unreadable in current state
.bnvib - vibrations data
.dat - uncompressed archives made with table, file names and data.
.dtt - as .dat, but made for purpose of separating bigger files from .dat for faster loadings, for example .wtp files
.eff - effect files (whatever that means)
.evn - .dat structure
.vat - vertex animation texture
.vfd - vectorfield data
.wta - contains informations about textures in .wtp and properties of models
.wtp - textures container

.wtb - unknown
.epb - unknown

DAT archive
For unpacking DAT type archives, you can use this script (without proper filenames):
Code:
idstring "\x44\x41\x54\x00"
get filecount long
get TABLE_OFFSET long
GET FILE_FORMAT_TABLE long
GET FILENAMES_OFFSET long
set NAME ""
GoTo TABLE_OFFSET
get SIZE_LAST_FILE asize
for x = 1 < filecount
   get offset long
   get size long
   math size - offset
   log NAME offset size
   set NAME ""
   math TABLE_OFFSET + 4
   GOTO TABLE_OFFSET
next x
get offset long
math SIZE_LAST_FILE - offset
set NAME ""
log NAME offset SIZE_LAST_FILE

in DAT files we can find (based on real filenames, not guessed by quickbms script above):
.bnk - archive for WWise audio files
.col - properties of models/textures
.csv - file containing binary data and some comma-separated values
.evn - .dat structure
.ftb - contains informations about font
.ktb - contains informations about font
.mtg - MessageTagSetting
.sar - XML binary file
.wmb - mesh
.wta - contains informations about textures in .wtp and properties of models
.wtp - container for textures

.bxm - unknown
.eft - unknown
.epb - unknown
.est - unknown
.gad - unknown
.hkx - unknown
.mot - unknown
.pso - unknown (shader related)
.seq - unknown
.sop - unknown
.uvd - unknown
.uid - unknown
.vso - unknown (shader related)

I was trying to get little fun with exefs and I found 2 things that maybe someone will be interested to dig more (they are breaking function, so expect game to unexpectedly crash just in case):
Based on 1.0.1 version of game
Coloring some texts (I didn't test if this is related to color GUI)
Code:
710091b384 08  00  38  1e    fcvtzs     w8,s0
to
Code:
710091b384 df  f2  00  71    cmp        w22 ,#0x3c
2019082917101700-257FD939428E4BFE6BF9E2F559D5037A.jpg 2019082917092200-257FD939428E4BFE6BF9E2F559D5037A.jpg 2019082917093900-257FD939428E4BFE6BF9E2F559D5037A.jpg 2019082917100000-257FD939428E4BFE6BF9E2F559D5037A.jpg
Blocking loading informations about Police Station (so no walls made by map, only wall limiting whole scene) and audio related to it
Code:
710056227c e0 03 13 aa    MOV    X0, X19
to
Code:
710056227c 1F F1 00 71    cmp    w8, #0x3c
2019082917152900-257FD939428E4BFE6BF9E2F559D5037A.jpg 2019082917151700-257FD939428E4BFE6BF9E2F559D5037A.jpg
Yes, this is Police Station

If someone will find more info about how to open prioprietary files, I will add it next to file type.
 
Last edited by masagrator,

wangch

Well-Known Member
Member
Joined
Apr 12, 2019
Messages
132
Trophies
0
Age
30
XP
429
Country
United States

Is romfs the file that NAC unpacked and unpacked? Can I find all the item codes through this file?
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
After I decompress the xci, I get a NAC file, decompress the NAC file, and then I get a romfs. bin file. Are you talking about this file?
Nope. I mean files in romfs. You are using probably old tutorial, because noone is using romfs.bin nowadays.
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
Any chance of an unlocked framerate mod for this? I'd like to see if it might actually hit 60FPS Oc'd. :)
For now no chances, because I can't see anything that can unlock framerate. I only found how to change speed of rendering gameplay and HUD. Cutscenes are still with the same pace.
 
  • Like
Reactions: Khodeus

phonz

Well-Known Member
Member
Joined
May 1, 2018
Messages
278
Trophies
0
XP
1,868
Country
Canada
For now no chances, because I can't see anything that can unlock framerate. I only found how to change speed of rendering gameplay and HUD. Cutscenes are still with the same pace.

disassembling main, you can find references to performance modes iirc. Might just be left over stuff from the engine though? Or I might be crazy and thinking of a different game.
Or maybe that's what you were playing with as well?
 

orangpelupa

Well-Known Member
Member
Joined
Aug 7, 2009
Messages
388
Trophies
1
XP
1,183
Country
Indonesia
@masagrator

thanks a ton! have you found whats responsible for the dynamic resolution and framerate? wanna lock the res and try making it run @ 60fps :D

btw the UI color is change-able inside the game. Dunno we can choose arbitrary color or not. Many options are srtill locked


It’s a shame that the intro song isn’t available in japenese :c
IIRC, mine was in Japanese, complete with JP staff names
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
I didn't check resolution. I tried everything I could for FPS and only found that animations speed for gameplay is taking 1/60 float and one function is multiplying it by two. I couldn't disable FPS lock.

--------------------- MERGED ---------------------------

Sorry, wrong. I mixed other game with this multiplyier and float. For speed animations it's using getsystemtickfrequency(). Multiply it by two and you have 1s rendered in 60 frames, but because of lock it slows down game twice.
 
Last edited by masagrator,

orangpelupa

Well-Known Member
Member
Joined
Aug 7, 2009
Messages
388
Trophies
1
XP
1,183
Country
Indonesia
I didn't check resolution. I tried everything I could for FPS and only found that animations speed for gameplay is taking 1/60 float and one function is multiplying it by two. I couldn't disable FPS lock.

--------------------- MERGED ---------------------------

Sorry, wrong. I mixed other game with this multiplyier and float. For speed animations it's using getsystemtickfrequency(). Multiply it by two and you have 1s rendered in 60 frames, but because of lock it slows down game twice.

hmm i wonder if the lock can be disabled thru realtime cheat in edizon. gotta need to learn edizon again, has been months since last time i use it hahaha
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    Batman joined the Trans Justice League
    +2
  • Sicklyboy @ Sicklyboy:
    based af
    +2
  • Sonic Angel Knight @ Sonic Angel Knight:
    Forget the base, get on the roof.
  • K3Nv2 @ K3Nv2:
    Is that a bat in your buckle or are you just happy to have me
  • Psionic Roshambo @ Psionic Roshambo:
    Wonder "Woman" lol you wonder if they are a woman?
  • Psionic Roshambo @ Psionic Roshambo:
    The Riddler has questions...
  • K3Nv2 @ K3Nv2:
    Played a little of snow day glad I didn't spend $30
  • K3Nv2 @ K3Nv2:
    It's asthetic is okay maybe a good $10 grab
  • Psionic Roshambo @ Psionic Roshambo:
    Lol is it a game about doing cocaine?
  • K3Nv2 @ K3Nv2:
    Probably in pvp
  • Psionic Roshambo @ Psionic Roshambo:
    I tried Balders Gate II on the PS2 a few minutes ago, not bad lol
  • Psionic Roshambo @ Psionic Roshambo:
    My back catalog of games is like that scene at the end of Indiana Jones where the arc of the covenant is being stored in a giant ass warehouse
  • K3Nv2 @ K3Nv2:
    At least I can will my game catalog to family members
    +1
  • K3Nv2 @ K3Nv2:
    It's your problem now bitches
  • Psionic Roshambo @ Psionic Roshambo:
    Put it in your will that in order to receive any money they have to beat certain games, hard games and super shitty games...
  • Psionic Roshambo @ Psionic Roshambo:
    Say 20 bucks per Ninja Gaiden on the NES lol 60 bucks for all 3
  • Psionic Roshambo @ Psionic Roshambo:
    People you like "Beat level 1 of Ms Pacman" lol
  • K3Nv2 @ K3Nv2:
    Hello kitty ds is required
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Beat Celebrity Death Match on the PS1 omg tried it earlier today .... Absolutely trash
  • Psionic Roshambo @ Psionic Roshambo:
    Like -37 out of 10
  • Psionic Roshambo @ Psionic Roshambo:
    One of the worst games I have ever played
  • K3Nv2 @ K3Nv2:
    Make them rank up every cod game out
  • K3Nv2 @ K3Nv2:
    "Now I know why he took his own life"
    K3Nv2 @ K3Nv2: "Now I know why he took his own life"