.LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

.LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

Hello i need help with .LZS files for ToCA Race Driver 3...

i have iripper 1.9 tool to open .big files but i saw somewhere exists iripper with added LZS SUPPORT... but not possible to download anymore... help........

need to open these files / edit and save
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by aluigi »

Upload one or two of these lzs files.
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

aluigi wrote:Upload one or two of these lzs files.


sorry i didnt come here for some time.. still didnt found iRipper 1.9 which was updated for LZS... was made for Race Driver 3 but even with web.archive.org i couldnt find working download link

here are some of RD3 LZS files
https://www.mediafire.com/file/043sf9h2 ... u.lzs/file
https://www.mediafire.com/file/sus63efn ... t.lzs/file
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by aluigi »

Ok I made a script for it:
http://aluigi.org/bms/race_driver_3.bms

It automatically decompresses the LZS file and extract the JPAK archive in it.

Please let me know if there is any error.
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

aluigi wrote:Ok I made a script for it:
http://aluigi.org/bms/race_driver_3.bms

It automatically decompresses the LZS file and extract the JPAK archive in it.

Please let me know if there is any error.



Ok i extracted files from LZS, I have .TEX and .idx files, and so now how do i open them? I want edit them, then save back into LZS file from which i extracted these
8-)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by aluigi »

TEX are DDS, you can rename them if you prefer.

IDX are usually empty so ignore them.
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

aluigi wrote:TEX are DDS, you can rename them if you prefer.

IDX are usually empty so ignore them.


oh k thanks, now how do i put it back into LZS?
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

aluigi wrote:TEX are DDS, you can rename them if you prefer.

IDX are usually empty so ignore them.


successfuly edited the DDS then i renamed the extension back to .TEX
now wanna add it back into .LZS, how do i do that?
squidiskool
Posts: 25
Joined: Wed Nov 04, 2020 2:05 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by squidiskool »

Polecze wrote:
aluigi wrote:TEX are DDS, you can rename them if you prefer.

IDX are usually empty so ignore them.


successfuly edited the DDS then i renamed the extension back to .TEX
now wanna add it back into .LZS, how do i do that?

you can try using REIMPORT mode
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

squidiskool wrote:
Polecze wrote:
aluigi wrote:TEX are DDS, you can rename them if you prefer.

IDX are usually empty so ignore them.


successfuly edited the DDS then i renamed the extension back to .TEX
now wanna add it back into .LZS, how do i do that?

you can try using REIMPORT mode

i think its not working for me... can you help via discord or something?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by aluigi »

Reimporting can't work in this case because the archive is compressed itself while reimporting works when the archived files are (or aren't) compressed.

I would opt for the following solution:

1) Use the following script on MainMenu.lzs, normal extraction:

Code: Select all

comtype lzss0
idstring "LZSS"
get ZSIZE long
get SIZE long
savepos OFFSET
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE

It will create a new file called MainMenu

2) Use the following script in reimport mode selecting MainMenu (without .lzs) and the folder where you extracted the files with the original script:

Code: Select all

math FILENUM = 0
callfunction JPAK_DUMP 1

startfunction JPAK_DUMP
    idstring FILENUM "JPAK"
    get ZERO long FILENUM
    get FILES long FILENUM
    get DUMMY long FILENUM
    get ZERO long FILENUM
    get DUMMY long FILENUM
    get DUMMY longlong FILENUM
    for i = 0 < FILES
        get NAME_OFF long FILENUM
        get SIZE long FILENUM
        get OFFSET long FILENUM
        get SIZE2 long FILENUM  # both the SIZE values were the same in the sample
        get DUMMY longlong FILENUM
        get ZERO long FILENUM
        get ZERO long FILENUM

        if SIZE != SIZE2
            print "Error: SIZE (%SIZE%) != SIZE2 (%SIZE2%), contact me"
            cleanexit
        endif

        savepos TMP FILENUM
        goto NAME_OFF FILENUM
        get NAME string FILENUM
        goto TMP FILENUM

        log NAME OFFSET SIZE FILENUM
    next i
endfunction


3) Now use the following script on MainMenu (without .lzs), normal mode:

Code: Select all

comtype lzss0_compress
get SIZE asize
clog MEMORY_FILE 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE

log MEMORY_FILE2 0 0
putdstring "LZSS" 4 MEMORY_FILE2
math ZSIZE + 12
put ZSIZE long MEMORY_FILE2
math ZSIZE - 12
put SIZE long MEMORY_FILE2

get NAME basename
string NAME + ".lzs"
log NAME 0 12 MEMORY_FILE2
append
log NAME 0 ZSIZE MEMORY_FILE
append

It will generate a new MainMenu.lzs file.

Yeah it's a bit long but it should work.

Recap:
1) MainMenu.lzs -> MainMenu
* no, no need to extract the files from MainMenu because you already extracted them before
2) files -> reimport -> MainMenu
3) MainMenu -> MainMenu.lzs
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

aluigi wrote:Reimporting can't work in this case because the archive is compressed itself while reimporting works when the archived files are (or aren't) compressed.

I would opt for the following solution:

1) Use the following script on MainMenu.lzs, normal extraction:

Code: Select all

comtype lzss0
idstring "LZSS"
get ZSIZE long
get SIZE long
savepos OFFSET
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE

It will create a new file called MainMenu

2) Use the following script in reimport mode selecting MainMenu (without .lzs) and the folder where you extracted the files with the original script:

Code: Select all

math FILENUM = 0
callfunction JPAK_DUMP 1

startfunction JPAK_DUMP
    idstring FILENUM "JPAK"
    get ZERO long FILENUM
    get FILES long FILENUM
    get DUMMY long FILENUM
    get ZERO long FILENUM
    get DUMMY long FILENUM
    get DUMMY longlong FILENUM
    for i = 0 < FILES
        get NAME_OFF long FILENUM
        get SIZE long FILENUM
        get OFFSET long FILENUM
        get SIZE2 long FILENUM  # both the SIZE values were the same in the sample
        get DUMMY longlong FILENUM
        get ZERO long FILENUM
        get ZERO long FILENUM

        if SIZE != SIZE2
            print "Error: SIZE (%SIZE%) != SIZE2 (%SIZE2%), contact me"
            cleanexit
        endif

        savepos TMP FILENUM
        goto NAME_OFF FILENUM
        get NAME string FILENUM
        goto TMP FILENUM

        log NAME OFFSET SIZE FILENUM
    next i
endfunction


3) Now use the following script on MainMenu (without .lzs), normal mode:

Code: Select all

comtype lzss0_compress
get SIZE asize
clog MEMORY_FILE 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE

log MEMORY_FILE2 0 0
putdstring "LZSS" 4 MEMORY_FILE2
math ZSIZE + 12
put ZSIZE long MEMORY_FILE2
math ZSIZE - 12
put SIZE long MEMORY_FILE2

get NAME basename
string NAME + ".lzs"
log NAME 0 12 MEMORY_FILE2
append
log NAME 0 ZSIZE MEMORY_FILE
append

It will generate a new MainMenu.lzs file.

Yeah it's a bit long but it should work.

Recap:
1) MainMenu.lzs -> MainMenu
* no, no need to extract the files from MainMenu because you already extracted them before
2) files -> reimport -> MainMenu
3) MainMenu -> MainMenu.lzs



Did that then after it packed into LZS the archive went around 3KB smaller then after loading profile in game it crashed....
i dont know why...
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

.

I think something wrong in code... i did export the files then put them into LZS again with you scripts (didnt modify the files for test) and the game crashed.... size was same as original this time... no idea
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

i try this on other LZS files - i used scripts on it = the size after was the same as it should but crashes the game anyways
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

Can you find a solution to it don't crash?
Polecze
Posts: 12
Joined: Mon Jun 29, 2020 3:53 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by Polecze »

aluigi wrote:Ok I made a script for it:
http://aluigi.org/bms/race_driver_3.bms

It automatically decompresses the LZS file and extract the JPAK archive in it.

Please let me know if there is any error.



any solution?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: .LZS FILLE SUPPORT FOR RACE DRIVER 3 IN FEDATA FOLDER

Post by aluigi »

I can't help with rebuilders.
If that work-around I proposed doesn't work, I have no other solutions.