ROM Hack Discussion Astral Chain ROM Hacking Bible

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,312
Trophies
3
XP
12,108
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,312
Trophies
3
XP
12,108
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,312
Trophies
3
XP
12,108
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,873
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,312
Trophies
3
XP
12,108
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
  • The Real Jdbye @ The Real Jdbye:
    especially Nintendo because they only ever lower the price of games when they do a greatest hits/platinum hits/players choice re-release
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, and the HD collections released for 7th gen consoles too
  • The Real Jdbye @ The Real Jdbye:
    but they don't seem to have done any of those for the switch yet and maybe never will
  • ColdBlitz @ ColdBlitz:
    I think we all forgot breath of the wild released for the wii u tbh
    +1
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, tbh the HD collections are more justified since they include more than just 1 game per copy
  • Xdqwerty @ Xdqwerty:
    @SylverReZ I read that non-binary people identify as a blend of male and female. The point is i think i'm a blend of those and thus non binary
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Non-binary people are those who don't identify themselves exclusively as male or female.
  • cearp @ cearp:
    I don't identify as anything, unless I need to get on a plane then I show ID
    +3
  • AncientBoi @ AncientBoi:
    👈 [homo, queer, fag, coksuqr, etc......]
    +3
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I meant that I read that they can also identify as what i mentioned
    +2
  • BigOnYa @ BigOnYa:
    I identify as Long Rod Johnson, cause a cat called me that once.
    +2
  • AncientBoi @ AncientBoi:
    [takes a 👀 in your pants] Liar :angry:
    +3
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, and thus that would make me non binary since i feel like a blend of both male and female
    +1
  • AncientBoi @ AncientBoi:
    @Xdqwerty only time will tell, what/whom you are. At 14, its a bit early to "Define" yourself. :)
    +3
  • Psionic Roshambo @ Psionic Roshambo:
    I only recently have learned who I am and how much I am capable of and I'm 50 lol
    +3
  • Psionic Roshambo @ Psionic Roshambo:
    A thousand epiphanies and unbelievable pain and growth.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I wish I could sum it up for children to understand but it truly takes living a lifetime of learning
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    It's more than knowledge it's understanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Both are required
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, ask chatgpt or Google gémini to summarize it
  • Psionic Roshambo @ Psionic Roshambo:
    Lol summarize life's lessons
  • BigOnYa @ BigOnYa:
    My wifey tells me all the time "You need to grow the fuck up." Which I don't understand, cause I'm full grown already.
    +2
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, she means grow more
    +1
  • Xdqwerty @ Xdqwerty:
    Yawn
    Xdqwerty @ Xdqwerty: Yawn