Welcome to the Shining Force Central Forums!
SFC Forums Index Shining Forums Shining Force III SFIII Translation Project
Register for your free forum account now or Login to remove this advert.

New SF3 Compressor by CUE

A place for those working on the Shining Force III Translation Patch.

New SF3 Compressor by CUE

Postby knight0fdragon » Sun Jan 10 2016 3:57am

Hey Legalize Freedom, could you send me the compressor that has the complete compression, I wonder if I could write a quick tool that will take the uncompressed translated files and translate it to his format
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

New SF3 Compressor by CUE

Postby legalize freedom » Sun Jan 10 2016 7:11am

knight0fdragon wrote:Hey Legalize Freedom, could you send me the compressor that has the complete compression, I wonder if I could write a quick tool that will take the uncompressed translated files and translate it to his format


I thought you'd never ask. :)

New Compressor.zip
http://sf3transftp.shiningforcecentral. ... k%20Files/
Last edited by legalize freedom on Mon Jan 11 2016 1:57am, edited 1 time in total.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: Isomaker error

Postby knight0fdragon » Sun Jan 10 2016 5:05pm

wow, I didn't know the source was included.


From the looks of it, CUE already supports my file format, could somebody test this? All you need to do is change the .sf3 on the text files to .raw, and follow his instructions (actually you do not even need to do that, his code does not check extension, but the .sf3 files are the raw files he is looking for)

Usage: X5-CODER fnt_name txt_name bin_name switch

- fnt_name ... font to use -- you should be able to use the one that was extracted
- txt_name ... script to use (raw or ANSI format) -- the .sf3 file in the translation project
- bin_name ... encoded file to create (the X5 file) -- the output name to be placed onto disc


switch:
- e .......... scenario 1, original english version
- j .......... scenario 1, original japanese version
- x .......... scenario 2, scenario 3, premium disk
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: Isomaker error

Postby legalize freedom » Sun Jan 10 2016 8:19pm

Do the underscores represent spaces? If so what is required before the switch? Isn't this usually a dash and the switch with no spaces? Or does it have spaces? Maybe just a space before the dash...

It appears the font is extracted by running sssss.exe on an X5*.bin file. Should this be done on the originals or on a patched output?
I'm guessing this only needs to be done once for each scenario type (Sc1E, Sc1J and one for the other J versions. Then it can be used forever as the font file.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: Isomaker error

Postby knight0fdragon » Sun Jan 10 2016 9:11pm

Don't we have a custom font for scenarios 2,3,PD?

Should be called Sf3-2.fon

The _ means nothing,

here is an example ->X5-CODER Sf3-2.fon X5JINMEI.raw X5JINMEI.bin x

I do see one issue, I broke my files by page,

so this command needs to be ran in command prompt

copy /b *.sf3 newfile.raw

this will merge the pages into one


Anyone here with PHP skills? We may be able to just use CUE's compressor in PHP and make a web version of this tool so that it is cross platform compatible.
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: Isomaker error

Postby legalize freedom » Mon Jan 11 2016 12:15am

knight0fdragon wrote:Don't we have a custom font for scenarios 2,3,PD?

Should be called Sf3-2.fon

The _ means nothing,

here is an example ->X5-CODER Sf3-2.fon X5JINMEI.raw X5JINMEI.bin x

I do see one issue, I broke my files by page,

so this command needs to be ran in command prompt

copy /b *.sf3 newfile.raw

this will merge the pages into one


Anyone here with PHP skills? We may be able to just use CUE's compressor in PHP and make a web version of this tool so that it is cross platform compatible.


This appears to work perfectly.

I picked a file where I had a convenient save (Sc2). Merged the pages. Ran the X5-coder. Put the file in the patch directory. Ran a new iso. Tested in game.

Everything appears to be working and the file size is waaay smaller.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby knight0fdragon » Mon Jan 11 2016 12:22am

Awesome, I converted his encoder to C#, will clean it up and make sure I didn't mess anything up, If it works, we could make it an ASP app or PHP app like I said, Perhaps make a better version of the translator lol
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: New SF3 Compressor by CUE

Postby legalize freedom » Mon Jan 11 2016 12:36am

knight0fdragon wrote:Awesome, I converted his encoder to C#, will clean it up and make sure I didn't mess anything up, If it works, we could make it an ASP app or PHP app like I said, Perhaps make a better version of the translator lol


An updated Translator would be sweet. I just switched to 1440p and there is no scaling or ability to change the window size.

Image
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby knight0fdragon » Mon Jan 11 2016 12:53am

nope, that was C++ 6.0 lol I did not care for scaling at the time,


Could you share the font, raw and the new bin file, I wanna try and compare my output
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: New SF3 Compressor by CUE

Postby legalize freedom » Mon Jan 11 2016 1:52am

I put an example folder and the font files in the package and re-uploaded. Grab from the same spot.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby Special T » Sun Oct 02 2016 7:28pm

.
Last edited by Special T on Mon Oct 03 2016 3:00pm, edited 1 time in total.
Special T

User avatar
Shining Member
Shining Member
 
Posts: 422
Joined: Thu Sep 16 2004 8:15pm
Location: Riverview

Re: New SF3 Compressor by CUE

Postby legalize freedom » Sun Oct 02 2016 10:27pm

K0D or someone with better code knowledge than I.

I'm getting crashes with the new compressor and I would like to know why. All the files it crashes on are pretty big, but filesize doesn't dictate. It specifically crashes while encoding using x5-coder.exe.

I'm wondering if the set maximums are keeping it from doing its thing. 1. don't believe any file we have will go over 64. The biggest one that will run has been 45. and 2. If there is an issue with maxes, the program crashing doesn't help anyone.

I've put three .raw files on the FTP http://sf3transftp.shiningforcecentral.com/Translation%20Task%20Files/
Of the three, ASCASL works fine, BEERIN and BTL91 both crash.
You can also find the New Compressor.zip in this folder which contains the source code.

Any help would be appreciated.

The new compressor works great. No filesize problems anywhere by a good margin. I would really like to use it on all the files.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby knight0fdragon » Mon Oct 03 2016 4:07pm

Without looking at code, my guess is there are illegal characters going on, I will try and take a look if I can. I am not going to lie, I just do not have the energy to be working on this new compressor, Between coding for 9 hours a day on top of coding another 4 or 5 for iOS games, working on more code just makes me exhausted LOL, but I will look into the compressor for you at least to get that going.
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: New SF3 Compressor by CUE

Postby knight0fdragon » Mon Oct 03 2016 4:37pm

did the ftp credentials change? I can't upload the fixed files, anyway legalizefreedom, I sent you the fixed files, you just need to add a zero byte to the end of the file (open up in a hex editor, and add 00 to the end)
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: New SF3 Compressor by CUE

Postby legalize freedom » Mon Oct 03 2016 6:35pm

Understood. I appreciate it. I figured it would be something easy for someone that knows what they are doing.

I'm not aware of the FTP credentials changing. Maybe just yours for some reason. I'll ask Swalchy to look at it. He's more familiar with that end than I.

I didn't get any files. I'm guessing the exe was included which may be blocked. Maybe try to change the extension or zip it. We'll get the FTP figured out at any rate.

Thanks!
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby knight0fdragon » Mon Oct 03 2016 7:08pm

Should have been 2 raw files, did not fix the exe, was not needed
knight0fdragon

User avatar
Shining Hero
Shining Hero
 
Posts: 1032
Joined: Fri Nov 05 2004 5:36am
Location: Good ol(Not Really) Pennsylvania USA

Re: New SF3 Compressor by CUE

Postby legalize freedom » Tue Oct 04 2016 12:13am

Got it to work thanks to your advice!

This is a long story, but I'll post it here for posterity.

Because the Sc3 page 10s are basically inaccessible, you may or may not remember that I maintain the page 10s with insertable .dat files. I have a couple of "page 10 farm" files where I can edit and then grab the page to create a .dat which is then inserted into page 10 with the translator.

With the new compressor workflow, I needed to use these page 10 dats to include at the end of the .raw file. I'm basically just renaming it to X5<filename>90.sf3 so it falls after the page 9 .sf3 when creating the .raw file.

For some reason the files that have blank lines after the last useful line are including a "1A" (little right arrow in notepad) character at the end of the file once it is copied as the new name. All that is required is to delete that character and the file works fine.

I'm using one big .bat file to do all of this, but I guess these will require me to open with a hex editor each time unless you know why this character is being added and can advise me how to avoid it.

All I'm using is this with only the one dat in the directory. I don't know why it would be adding that character. I'm copying so that the dat file will remain for the next compression.
copy *.dat X5%name%90.sf3

Edit:
It appears a rename doesn't add that character, so I will just incorporate that strategy.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby Bulzome » Wed Oct 12 2016 12:18am

The new compressor is pretty easy to use, but there's something I don't quite understand. I'm not sure I understand how you are pulling .dat files from the files with 10 pages. It looks like the translator saves the page 10 text in the X5<name>09.sf3 files. My questions would be what do you mean by "page 10 farm files"? How did you get these .dat files and how do you edit them? Adding the .dat file to the raw file seems simple enough, but if anyone could point me in the right direction with how to get the .dat file, it would be greatly appreciated.
I succumbed only to the power of Elbesem

I'm HUNGRY! Can I have a burrito?

It's MY turn to shoot the penguins. DADDY!

YouTube Stuff

PSN: Vandolf
I succumbed only to the power of Elbesem

I'm HUNGRY! Can I have a burrito?

It's MY turn to shoot the penguins. DADDY!

YouTube Stuff

PSN: Vandolf
Bulzome

User avatar
~The Master of Evil~
Shining Member
 
Posts: 243
Joined: Mon Sep 22 2008 3:50pm
Location: Altoona, PA, US

Re: New SF3 Compressor by CUE

Postby legalize freedom » Wed Oct 12 2016 12:19pm

I sent you an email with my farm files. You speak like you didn't get that email, so I re-sent it.

The dats aren't so much pulled from the files as re-created in other files. I have 3 or 4 working files I created that have only page 10s on every page. So the page 10 from one file is on page 0, the page 10 from the next is on page 1, etc. Then the lines are re-created.

Once these files exist, you just grab the page .sf3 file and edit it with a hex editor to remove the blank lines at the end and rename it to .dat. These can then be used with the Fill > Fill from Scriptfile command in the translator program to insert at page 10 line 0 to fill in page 10s as well as being used with the new compressor.

The page 10 info is contained in the 0k inaccessible file with no extension. It's technically a .sf3 file, but I haven't found a way to get at the info. Windows apparently doesn't like it. If you grab the directory and copy it to another location, you lose the page 10 info, so having the info somewhere else is not really optional. I reformat every couple of years, so I discovered this pretty early on.
legalize freedom

User avatar
Shining Legend
Shining Legend
 
Posts: 1608
Joined: Sat Apr 29 2006 4:09am
Location: Texas, USA

Re: New SF3 Compressor by CUE

Postby Bulzome » Thu Oct 13 2016 9:17pm

Sorry, I must not have gotten your email. Although, I believe I know what to do now. I'll email you if I have any trouble. Thank you!

It will be nice to have the locations in all the files.
I succumbed only to the power of Elbesem

I'm HUNGRY! Can I have a burrito?

It's MY turn to shoot the penguins. DADDY!

YouTube Stuff

PSN: Vandolf
I succumbed only to the power of Elbesem

I'm HUNGRY! Can I have a burrito?

It's MY turn to shoot the penguins. DADDY!

YouTube Stuff

PSN: Vandolf
Bulzome

User avatar
~The Master of Evil~
Shining Member
 
Posts: 243
Joined: Mon Sep 22 2008 3:50pm
Location: Altoona, PA, US


Return to SFIII Translation Project

Who is online

Users viewing this topic: No registered users and 1 guest

cron