News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Trying to make a table for Suikoden I and II (PSP)  (Read 33129 times)

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Trying to make a table for Suikoden I and II (PSP)
« on: January 15, 2010, 03:48:24 pm »
I'm interested in attempting to at least hack some basic text into this game. I was easily able to make a table file for the PSX version of the first game, yet this one proves more difficult.

I've already tried loading the entire ISO (only ~330 MB, so no big deal) into WindHex and using an SJIS table, no results. I opened it in Monkey-Moore, no working results (both with normal searching, and with wildcards in case the kana are 2 bytes each). I asked KitsuneSniper for help, who searched for the byte combinations of some SJIS values, and he could find random kanji (which to me, seems like random data rather than actual kanji), but nothing else.

Can anyone offer some insight as to some other methods to try to get table values?

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

Rolen47

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #1 on: January 16, 2010, 03:12:54 am »
Only 330 MB? That doesn't sound right. Isn't that game supposed to be over 800 MB?

Edit:
I took a quick look at the game, and it looks like there are 2 bigfiles called "gsd1.bin" and "gsd2.bin" in the ISO and they are compressed   :'(. My guess is the text is in those files, and you can't do anything to them unless you figure out how to decompress and extract those archives.
« Last Edit: January 16, 2010, 08:32:28 am by Rolen47 »

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #2 on: January 16, 2010, 11:00:32 am »
Only 330 MB? That doesn't sound right. Isn't that game supposed to be over 800 MB?

Edit:
I took a quick look at the game, and it looks like there are 2 bigfiles called "gsd1.bin" and "gsd2.bin" in the ISO and they are compressed   :'(. My guess is the text is in those files, and you can't do anything to them unless you figure out how to decompress and extract those archives.
Well, truth be told I took a .cso that I had of the game and turned it into an .iso using a program I found, but I had the compression setting up as high as it goes, so it actually came out smaller than it was when it was a .cso. Interesting, huh?

Yeah, I noticed those files, too. I also noticed some .src files, which KitsuneSniper tells me are a dyslexic way of writing SCRipt, one for each game. Could be in there, too. I just need to find table values and then I can start tearing through files to find the text.

Edit: Well, I managed to make a table using the old-fashioned RPG method (naming the main character something, moving the save file somewhere, naming the opposite thing on the next file, and comparing the two, rinse and repeat). The table has the same values used over for various characters, or so I thought at first. Apparently, 81-83 and BC are used as control codes to determine which set of characters to use (81 is hiragana alone, 82 is the end of hiragana and katakana, 83 is katakana, and BC is English upper-case only). However, it seems as if the script is compressed. I checked both the ISO in it's entirety, as well as the various suspected script files. I wasn't even able to find any small words, let alone the script. >_<;

~DS
« Last Edit: January 16, 2010, 05:00:46 pm by DarknessSavior »
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

Maxim

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #3 on: January 20, 2010, 01:51:39 am »
Files are compressed with gzip algorithm. You can cut some compressed file from archive and open it in WinRar.
Hope that'll help you to find a script.

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #4 on: January 20, 2010, 03:24:53 pm »
Really? I can just try and open the .bin files with Winrar? Interesting. I'll give it a shot!

Edit: I tried doing so, and Winrar just said they were damaged files or files of an unknown type. Should I try renaming the files or something?

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

KaioShin

  • Hero Member
  • *****
  • Posts: 5728
    • View Profile
    • The Romhacking Aerie
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #5 on: January 20, 2010, 04:09:11 pm »
The files inside the archieve are compressed with that. You have to extract them from the package first. To know where one file starts and ends you need to figure out the file format first. Should be easy though, standard VFS fare.
All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

Maxim

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #6 on: January 21, 2010, 01:57:21 am »
KaioShin said the right thing. :) Format of this archive is plain and easy.
It's just an archive with many gzipped files in there.

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #7 on: January 21, 2010, 11:18:15 am »
The files inside the archieve are compressed with that. You have to extract them from the package first. To know where one file starts and ends you need to figure out the file format first. Should be easy though, standard VFS fare.
So, what would I use to decompress these files? >_>;

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

Rolen47

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #8 on: January 21, 2010, 12:48:28 pm »
Well here's what you can do (this probably isn't the best way, but it works):

Open gsd1.bin in WindHex.

Search for the hex value: 1F8B08  (gzip files always start with this header)
Write down the offset (it's 14000)
Search for hex value 1F8B08 again.
Write down the offset (it's 10E800)

Now, Edit -> Dump Binary Data
Enter file name: va1.gz
Start Offset: 14000
Ending Offset: 10E7FF (you should subtract 1 from the offset you wrote down.)

and that will extract the first compressed file. Then you can use 7-Zip or WinRAR to extract the gz file.





Then to extract the second file you do pretty much the same thing:

Write down the offset (it's 10E800)
Search for hex value 1F8B08 again.
Write down the offset (it's 1C8800)

Now, Edit -> Dump Binary Data
Enter file name: va2.gz
Start Offset: 10E800
Ending Offset: 1C87FF (you should subtract 1 from the offset you wrote down.)

Now just keep doing that for all the files. I think there's 226 files in that 1 archive... Errrr hope you don't go insane extracting them all. If you were a programmer you wouldn't have to do it this way.
« Last Edit: January 21, 2010, 01:09:05 pm by Rolen47 »

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #9 on: January 21, 2010, 01:13:12 pm »
While that would be extremely helpful if there were only like, 10 files, like you said, there's 200+ files. Very insightful, though. Learn somethin' new everyday.

Is there some program I could use to detect each file and extract it?

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

KaioShin

  • Hero Member
  • *****
  • Posts: 5728
    • View Profile
    • The Romhacking Aerie
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #10 on: January 21, 2010, 01:39:08 pm »
Is there some program I could use to detect each file and extract it?

Write one. Seriously, extracting achieves is a basic romhacking skill required for almost all disc-based systems. And it's really not that hard. It's the perfect exercise for one's first "serious" program. All you need to finish such a program is basic program flow control and basic file I/O functions (the later can be looked up in the documentation of your given language quickly).

Don't say you couldn't do it until you tried, it's seriously easy.
All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #11 on: January 21, 2010, 01:50:32 pm »
Is there some program I could use to detect each file and extract it?

Write one. Seriously, extracting achieves is a basic romhacking skill required for almost all disc-based systems. And it's really not that hard. It's the perfect exercise for one's first "serious" program. All you need to finish such a program is basic program flow control and basic file I/O functions (the later can be looked up in the documentation of your given language quickly).

Don't say you couldn't do it until you tried, it's seriously easy.
Oh, sure. The only program language I'm even vaguely familiar with is Java. And that's something I just started taking a class in like, two weeks ago. Aside from that, I doubt I could code something like that in 65c816 (or if I could, that I have the skill needed to do so).

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

creaothceann

  • Hero Member
  • *****
  • Posts: 2619
  • SPINESHARK
    • View Profile
    • creaothceann's website
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #12 on: January 21, 2010, 02:25:47 pm »
Grab a copy of Turbo Pascal and read through (most of) the help file - shouldn't take more than a couple of hours tops. Then look up the syntax for variable declarations, control structures and functions/procedures (which is really easy), and that's it. You're ready to start experimenting with files.

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5038
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #13 on: January 21, 2010, 04:09:54 pm »
Grab a copy of Turbo Pascal and read through (most of) the help file - shouldn't take more than a couple of hours tops. Then look up the syntax for variable declarations, control structures and functions/procedures (which is really easy), and that's it. You're ready to start experimenting with files.
That sounds fairly promising, even though I dunno what the hell that is (sounds kinda like a programming language, based on 'variable declaration'). I'll look into doing that this weekend.

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4599
  • everything sucks forever
    • View Profile
    • The BRPXQZME Network
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #14 on: January 21, 2010, 05:14:53 pm »
lol pascal
we are in a horrible and deadly danger

Gemini

  • Hero Member
  • *****
  • Posts: 1892
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #15 on: January 21, 2010, 05:28:29 pm »
Oh Jesus, not gzip again! °0° At least I'm glad I've got it all implemented for FF7. This format is truly diabolic.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

creaothceann

  • Hero Member
  • *****
  • Posts: 2619
  • SPINESHARK
    • View Profile
    • creaothceann's website
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #16 on: January 21, 2010, 05:37:42 pm »
@DarknessSavior:
I should add that when I said "read through the help file", I meant only the part that lists the constants, variables and functions of the already shipped units (SYSTEM, CRT, DOS, etc).


lol pascal
It's not standard pascal though.

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4599
  • everything sucks forever
    • View Profile
    • The BRPXQZME Network
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #17 on: January 21, 2010, 05:43:22 pm »
Yes, but all non-mainstream programming languages, API’s, and compilers—especially formerly-mainstream ones—are easy targets.
we are in a horrible and deadly danger

KaioShin

  • Hero Member
  • *****
  • Posts: 5728
    • View Profile
    • The Romhacking Aerie
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #18 on: January 22, 2010, 04:54:03 am »
Is Turbo Pascal even object-oriented? I know Delphi is, but IIRC TP was before that. If he is learning Java anyway right now I wouldn't confuse him with another non-OO language. He can write that extraction tool just as easily in Java and since he has to learn it anyway (I assume it's for college or something) that'll also give him a huge boost in motivation to make progress with Java.
All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

creaothceann

  • Hero Member
  • *****
  • Posts: 2619
  • SPINESHARK
    • View Profile
    • creaothceann's website
Re: Trying to make a table for Suikoden I and II (PSP)
« Reply #19 on: January 22, 2010, 06:23:34 am »
Is Turbo Pascal even object-oriented?
Yes, since version 5.5.

Anyway, you don't need OOP for simple file manipulation (imo).