[HELP] I'm trying to write a BMS Script

Doubts, help and support about QuickBMS and other game research tools
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

[HELP] I'm trying to write a BMS Script

Post by Tgames »

Hi everyone.

I'm trying to write a BMS Script for Atlantis The Lost Tales (PS1 Version) to extract content from LNK Archives.
They seems to be similar to BIG FILES archives.

I'm starting from this script written for BIG FILES archives :

Code: Select all

IDString 0 "BigFile 1.00" ;
SavePos S 0 ;
Math S += 4 ;
GoTo S 0 ;
Get FileNum Long 0 ;
Get DataSize Long 0 ;
Get DataStartL Long 0 ;
Get DataStartH Long 0 ;
For T = 1 to FileNum ;
Get StringSize Long 0 ;
Get U1 Long 0 ;
Get Size1 Long 0 ;
Get Size2 Long 0 ;
Get Size3 Long 0 ;
Get R1 Long 0 ;
Get ROff Long 0 ;
Get U2 Long 0 ;
GetDString FN StringSize 0 ;
Math ROff += DataStartL ;
Log FN ROff Size1 0 0 ;
Next T ;


BIG FILES example (PC) :

Code: Select all

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  42 69 67 46 69 6C 65 20 31 2E 30 30 00 00 00 00  BigFile 1.00....
00000010  0E 00 00 00 E8 86 07 00 C0 02 00 00 00 00 00 00  ....è†..À.......
00000020  0F 00 00 00 A8 17 5D 00 DF B5 00 00 DF B5 00 00  ....¨.].ßµ..ßµ..
00000030  DF B5 00 00 00 00 00 00 00 00 00 00 C0 17 5D 00  ßµ..........À.].
00000040  57 41 56 5C 43 52 41 4B 5F 31 2E 41 50 43 00 0F  WAV\CRAK_1.APC..
00000050  00 00 00 E8 17 5D 00 A1 D0 00 00 A1 D0 00 00 A1  ...è.].¡Ð..¡Ð..¡
00000060  D0 00 00 00 00 00 00 DF B5 00 00 00 18 5D 00 57  Ð......ßµ....].W
00000070  41 56 5C 43 52 41 4B 5F 32 2E 41 50 43 00 0F 00  AV\CRAK_2.APC...
00000080  00 00 28 18 5D 00 ED C3 00 00 ED C3 00 00 ED C3  ..(.].íÃ..íÃ..íÃ
00000090  00 00 00 00 00 00 80 86 01 00 40 18 5D 00        ......€†..@.].


LNK Files Example (PS1)

Code: Select all

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  00 E0 F2 82 28 E0 F2 82 00 00 00 00 00 00 00 00  .àò‚(àò‚........
00000010  00 00 00 00 18 00 00 00 0F 00 00 00 00 00 00 00  ................
00000020  43 44 31 5F 41 30 31 2E 44 45 46 00 89 3F 3F 3F  CD1_A01.DEF.‰???
00000030  60 05 00 00 43 44 31 5F 41 30 32 2E 44 45 46 00  `...CD1_A02.DEF.
00000040  00 20 16 A1 D0 08 00 00 43 44 31 5F 41 30 33 2E  . .¡Ð...CD1_A03.
00000050  44 45 46 00 46 00 60 82 D0 0B 00 00 43 44 31 5F  DEF.F.`‚Ð...CD1_
00000060  41 30 34 2E 44 45 46 00 E8 83 FF FF 70 0F 00 00  A04.DEF.èƒÿÿp...
00000070  43 44 31 5F 41 30 35 2E 44 45 46 00 74 45 83 C0  CD1_A05.DEF.tEƒÀ
00000080  A0 12 00 00 43 44 31 5F 41 30 36 2E 44 45 46 00   ...CD1_A06.DEF.
00000090  C8 01 D0 3B F0 15 00 00                          È.Ð;ð...


They seems really similar.
What i need to change to start to read CD1_A01.DEF etc ?

Full LNK File : https://we.tl/t-g2OWmfKZjF

Best Regards.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [HELP] I'm trying to write a BMS Script

Post by aluigi »

Similar files???

Anyway the BigFile format has been covered by the following script:
http://aluigi.org/bms/zerozone.bms
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: [HELP] I'm trying to write a BMS Script

Post by Tgames »

aluigi wrote:Similar files???

Anyway the BigFile format has been covered by the following script:
http://aluigi.org/bms/zerozone.bms


No i'm not working on the BigFile, i'm working on the LNK File (it's this LNK File i want to extract).

The LNK seems to have the same structure with all files and pointer listed in the beginning (maybe i've wrong but i found similarities between the two)

The LNK is the package format for the Playstation Version in opposite to BIGFile format for the PC Version.

What i trying to do it's to change the BMS Script used for BigFile to work with LNK Files.

Any idea what i need to change ?

I'm not work on the BigFile, it's just for the example to compare with the LNK File.

It's exactly the same game BUT in the Playstation version there are no BIGFile, it's LNK Files.

They both store the same content and same data but with different formats.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [HELP] I'm trying to write a BMS Script

Post by aluigi »

Very confusing, why didn't you just open a topic in the Game Archive section about the LNK files?
The format requires some work.
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: [HELP] I'm trying to write a BMS Script

Post by Tgames »

It's opened here :

viewtopic.php?f=9&t=11447

Can you try to make a script for this format please ?

Thanks.