Wild Arms 3 (*.BIN)

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

aluigi wrote:have you already checked this topic?
http://forum.xentax.com/viewtopic.php?f=16&t=11486


Aluigi is there any way to decompress this ? Or is it only possible from the save state ?
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

quickbms script to decompress files.
Needs to add support for extracting sub archives (align data to 0x800 after last file and start over again)
Run this first for now.

Code: Select all

getdstring DIV 4
goto 0
for
findloc OFFSET string DIV
print "%OFFSET%"
getdstring TMP 0x20
findloc SIZE string DIV
goto SIZE
math SIZE - OFFSET
log "" OFFSET SIZE
next

then you can do this
quickbms.exe -d -F "*.dat" "C:\Users\Downloads\Wild Arms 3 (USA)\Wild Arms 3 (USA)\STG\test.txt" "C:\Users\Downloads\Wild Arms 3 (USA)\Wild Arms 3 (USA)\BTL\1" "C:\Users\Downloads\Wild Arms 3 (USA)\Wild Arms 3 (USA)\BTL\2"

Code: Select all

comtype LZSS0
savepos BASE
findloc FILES string "\x00\x00\x00\x00"
math FILES / 4
print "%FILES%"
for i = 0 < FILES
get OFFSET long
math OFFSET - 0x1D00000
putarray 0 i OFFSET
next i
math FILES - 1
for i = 0 < FILES
set j i
math j + 1
getarray OFFSET 0 i
getarray SIZE 0 j
math SIZE - OFFSET
if SIZE > 0
math OFFSET + BASE
log MEMORY_FILE OFFSET SIZE
get TSIZE long MEMORY_FILE
get SIZE asize MEMORY_FILE
print "%TSIZE%"
if TSIZE > 0x1FFFFF || TSIZE < 0
log "" 0 SIZE MEMORY_FILE
else
math SIZE - 4
clog "" 4 SIZE TSIZE MEMORY_FILE
endif
endif
next i
Last edited by chrrox on Wed Feb 03, 2021 6:41 pm, edited 5 times in total.
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

This bat file was in there interesting

Code: Select all

BOVER   =$(BTL_PATH)\over\make

AARGS   =   /p /ows+ /oc+ /m /ol?      # /l <-> /p
MARGS   =   -x-

EFFIDX      =   $01D00000   # ADR address
EFFADR      =   $01D00100   # BIN address

.PATH.bin   =   bin
.PATH.bi2   =   bin
.PATH.s0   =   dat
.PATH.o0   =   tmp
.PATH.bmp   =   bmp;..\monster\bmp
.PATH.tim   =   bmp
.PATH.tx4   =   tmp
.PATH.twh   =   tmp
.PATH.mdl   =   mdl
.PATH.anm   =   anm
.PATH.fam   =   anm
.PATH.bne   =   bne
.PATH.msh   =   msh
.PATH.vu1   =   vu
.PATH.vu2   =   vu
.PATH.mt1   =   vu
.PATH.mth   =   vu
.PATH.mt2   =   vu
.PATH.v1p   =   tmp
.PATH.v2p   =   tmp
.PATH.bnp   =   tmp
.PATH.bx8   =   tmp
.PATH.pal   =   tmp
.PATH.anp   =   tmp
.PATH.bxp   =   tmp
.PATH.dmy   =   dmy
.PATH.anx   =   anx
.PATH.anz   =   tmp
.PATH.mss   =   dat
.PATH.msb   =   bin
.PATH.adm   =   adm
.PATH.bwh   =   tmp
.PATH.hd   =   ..\..\snd\btlse
.PATH.ton   =   bmp;..\monster\bmp

.bne.mt1:
   mkpkt $*.bne msh\$&.msh -Ovu\$&
   $(CV) -ptmp\$&.v1p vu\$&.vu1
.bne.mth:
   mkpkt $*.bne msh\$&.msh -Ovu\$& -H
   ren vu\$&.mt1 $&.mth
   $(CV) -ptmp\$&.v1p vu\$&.vu1
.bne.mt2:
   mkpkt $*.bne msh\$&.msh -D -Ovu\$&
   $(CV) -ptmp\$&.v2p vu\$&.vu2

.tim.tx4:
#   midb $*.tim tmp\$&.tx4 -O544
   @$(CV) -p$@ $(**:.tim=.tim/$220~$11800)
.tim.pal:
   setstp $*.tim -Otmp\$&.tip
   @$(CV) -t$@ tmp\$&.tip/$14~$200
.tim.twh:
   midb $*.tim tmp\$&.twh -O0 -S16

.bmp.bx8:
   @$(CV) -c$@ $(**:.bmp=.bmp/$436~$10000)
#   @$(CV) -p$@ $(**:.bmp=.bmp/$436~$10000)
.bmp.pal:
   @$(CV) -t$@ $(**:.bmp=.bmp/$36~$200)
.bmp.bwh:
   midb $*.bmp tmp\$&.bwh -O16 -S16

.s0.o0:
   @$(AS) $(AARGS) dat\$&.s0,$@

.anm.bxp:
#   anmbox bne\$&.bne msh\$&.msh anm\$&.anm -otmp\$&

.anx.anz:
   anx2anz $*.anx tmp\$&.anz

.mss.msb:
   msscv $*.mss bin\$&.msb

# Šî–{ƒ‚ƒfƒ‹
.adm.mdl:
   adm2mdl -x- -n -d:$(BTL_PATH)\over $*
   anmbox bne\$&.bne msh\$&.msh anm\$&.anm -otmp\$&

# adm‚©‚çanpƒf[ƒ^‚ðì‚é(ƒAƒjƒ‚Ì‚Ý)
.adm.anm:
   adm2mdl -x- -n -d:$(BTL_PATH)\over $*.adm
   anmbox bne\$&.bne msh\$&.msh anm\$&.anm -otmp\$& -FB4 -FM4

.adm.fam:
   adm2mdl -x- -n -d:$(BTL_PATH)\over $*.adm
   anmbox bne\$&.bne msh\$&.msh anm\$&.anm -otmp\$&
   ren anm\$&.anm $&.fam



looks like the 3d models use ps2 vif tags.
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

After several hours no luck. I didnt get nothing from the .bin files. So i deleted the 1st byte of 00 in each .bin then it started extracting. I then tried to use the run command you mentioned but kept getting this error. I still dont know if this is correct. I've reached out to several people for help with no luck. They all say the script is bad. Which clearly its not. Can you please tell me or explain a little better on how to run both files. I see it says .txt in your command. Is that the script you wrote. I called it script.bms in my image. Im just a little lost on the process I think.
Image

Then I did something here and now the files look right. I remember .213 is anim. Did the tool work here ?
Image

Then I decided to just dump all the bins and run a bat on the files and got this.
Image

After awhile I think might of got it still not sure.
Image
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

Run it on the original iso files
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

chrrox wrote:Run it on the original iso files


I ran then 1st script on the .iso and got 44,102 files. Then I try to run the 2nd script on the folder of .dat's and get this error.
Image
It created folders 0-299. With nothing in them.
Image
Sorry for the confusion but I'm not really sure what to do or if this is correct. I posted another picture of my run commands.
Still haven't been able to get it working. :cry:

I now put all the files to the iso into a folder called _ISO and ran the scirpt on that folder. Getting .dats now so hopefully this is correct.
Image

Dont think it is though since im at 100K files.
Image
Last edited by DJ Normality on Thu Feb 04, 2021 10:48 pm, edited 1 time in total.
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

extract the iso with 7zip
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

chrrox wrote:extract the iso with 7zip

Image

Like so ?
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

Well I extracted contents I think. Still not sure if this is correct. Here are my STGMAP folder and my BTLMEP folder along with my extracted folders.
Image
I run the 2nd script on the folder and get the same error still. Sorry chrrox. I dont see what I'm doing wrong or the instructions aren't clear to me.
Image
What are the output files suppose to be ?
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

try it on a BTL folder file
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

Same error
Image

When i run the script on the folder i dont get a BTLODT.BIN folder. I have to manually remove the 1st set of 00 in the file then it reads. But then 2nd script still fails.
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

17 hours later. I again asking for help here. The first script is #1 second is #2.
I downloaded 7zip just to see if there was something special about it. There's not.
I ran #1 script on the files. I do get folders. 2. But they are BTLODT.
Image
These are the only 2 folders I get. Now If I erase the 1st bye of 00 in the other .BIN files.
I do get .dat files. But script #2 fails to convert the .dats. As seen in previous pictures.
The only thing I get from the #1 script from the BTL folder is 2 folders.
Image
This is whats inside. Just .mwo files. No dats. In both folders.
But if i run the script on the files I removed the 1 byte of 00 from i see .dat .213's.
Which i know 213 to be .anim's. So I looks like it is cutting something right. I just dont know why this is so confusing.
You mentioned align to 0x800 at the end of the files. What files ?
And how come when I remove the 1 byte of 00's at the beginning of the archives that don't work on script #1 they suddenly work ?
Can you please just lay out the instructions so a "dummy" like myself can understand them. Apparently I'm missing something here.
Thank you for your time and effort. I really a appreciate you helping me but as of now this hasn't really helped me since I dont understand the process.
Ive reached out to 3 others for help and they all say they dont understand whats going on.
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

run this on all the files the iso extracted and extract them into their own folders.

Code: Select all

getdstring DIV 4
goto 0
for
findloc OFFSET string DIV
print "%OFFSET%"
getdstring TMP 0x20
findloc SIZE string DIV
goto SIZE
math SIZE - OFFSET
log "" OFFSET SIZE
next
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

Then try just running this on one of the extracted files.

Code: Select all

comtype LZSS0
savepos BASE
findloc FILES string "\x00\x00\x00\x00"
math FILES / 4
print "%FILES%"
for i = 0 < FILES
get OFFSET long
math OFFSET - 0x1D00000
putarray 0 i OFFSET
next i
math FILES - 1
for i = 0 < FILES
set j i
math j + 1
getarray OFFSET 0 i
getarray SIZE 0 j
math SIZE - OFFSET
if SIZE > 0
math OFFSET + BASE
log MEMORY_FILE OFFSET SIZE
get TSIZE long MEMORY_FILE
get SIZE asize MEMORY_FILE
print "%TSIZE%"
if TSIZE > 0x1FFFFF || TSIZE < 0
log "" 0 SIZE MEMORY_FILE
else
math SIZE - 4
clog "" 4 SIZE TSIZE MEMORY_FILE
endif
endif
next i
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

I have many times. All I get is 2 folders BTLMEP and BTLOVL both consists of .mwo files. Thats all script #1 exports for me. I uploaded my BMS log so you can see for yourself in export.txt. There is no BTLODT folder. I even scanned just the BTL folder in export2.txt.
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Wild Arms 3 (*.BIN)

Post by chrrox »

i can’t help the scripts work you can make a new script from looking at these. its lzss0 compression for files.
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

Ok thank you for being patient with me. I'm going to try to d/l a different iso see if thats my issue. Thanks again for everything.
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Wild Arms 3 (*.BIN)

Post by DJ Normality »

chrrox wrote:i can’t help the scripts work you can make a new script from looking at these. its lzss0 compression for files.


I got it all working and everything is pretty much loose now. Can you please tell me how to go about reversing the animations/bones. I watched this video on Lzss0 about the shifting bytes and how the data is stored. But how would I go about in extracting these values ? Do you know of a way to do it ? Im willing to pay money for a tool if possible. I really would like to put this title to rest.
I see .ANM in the files and bne1 which i think are bones. And fam files which I think are "frames". Still not sure. If you could assist in this i would be very grateful. Im going crazy here trying to solve this. Please if you know of anything that would help.
DrifterThief127
Posts: 9
Joined: Sun Mar 12, 2017 8:34 pm

Re: Wild Arms 3 (*.BIN)

Post by DrifterThief127 »

DJ Normality wrote:I got it all working and everything is pretty much loose now. Can you please tell me how to go about reversing the animations/bones. I watched this video on Lzss0 about the shifting bytes and how the data is stored. But how would I go about in extracting these values ? Do you know of a way to do it ? Im willing to pay money for a tool if possible. I really would like to put this title to rest.
I see .ANM in the files and bne1 which i think are bones. And fam files which I think are "frames". Still not sure. If you could assist in this i would be very grateful. Im going crazy here trying to solve this. Please if you know of anything that would help.

I'm interested in this as well, since I too am looking to putting this title behind us.