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

Author Topic: (PS1) What should I do if the font isnt a TIM file?  (Read 5147 times)

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
(PS1) What should I do if the font isnt a TIM file?
« on: August 10, 2014, 10:57:10 am »
Wew. i posted this topic in Newcomer's Board but no one answered. :P Maybe people in there is all newcomers like me so they dont know about it. ^^
So I post in here, where I think there are so many expert people, who can answer. :D (Mod please erase my old topic at Newcomer's Board)
Im finding a way translating Chrono Cross. My alphabet has special characters. So I must edit the fonts of the game.
I use timview to see images of the game. But I just find battle font, menu font. I didnt find dialogue font. That means dialogue font isnt a tim file? What should I do if the font isnt a TIM file? I google and see this topic:
http://www.romhacking.net/forum/index.php?topic=13300.0
But Tile Molester give me error: out of memory...  I see the solution too
Run Tile Molester from the command line with the option -mxXm, where X is the number of megabytes you require; i.e. java -mx500M -jar tm.jar to allocate 500MB.
But I dont know that much about command line.  Perhasp my syntax was wrong the command line give error too. I mean what is before "java -mx500M -jar tm.jar". How can run tm.jar by command line.
Or perhasp Tile Molester doesnt work with large rom like Chrono Cross? Wew I see my Chrono Cross.img is not support type format (I must change to all file to open it).
And the nana is "not compability with my window....."
Please guide me how to edit non-TIM font of a PS1 game. I think this is my last problem.

esperknight

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #1 on: August 11, 2014, 05:46:08 pm »
Most likely the dialogue font is prob just a simple 16x16 as most are.  I would see about extracting all the files from the disc first and checking those.  Most likely culprit is usually the exe of the game (the SLUS*, SLJP*, etc etc file) or even something that could say font.  Open that in Tile Molester and see what you can find.  I prefer YY-CHR .Net myself but that doesn't really matter overall.

If you try to open the CD itself then that'll be waaaay too much of a pain to search due to the size.

Now if the font isn't that easy to find, what I do is use Agemo's PCSX Debugger (http://www.romhacking.net/utilities/475/).  Once you get in game and see text on the screen, pause the game and click the dump button.  This'll dump VRAM and RAM.  Now go into the dump folder and double click vram.exe and see what it looks like there. The important part is whether or not the entire font is in VRAM. Some games do this, some do not.

So if you see the entire font, you just need to see when it uploads it. So for this I'd restart it and do random VRAM dumps. Usually at the start screen or when you start the game.  Make note too of the X,Y coordinates.  Once you get an idea of where it's at then click upload break underneath GPU. Then continuously click Run CPU (or just Run) until it gets to the part where it uploads it.  Now keep in mine where it'll do that.  So from there restart once again, get up to before you upload it and then check of Enable under ASM log.   Click run and then look for the address it uploads from in that log. From there you should see how it got put there (maybe it was compressed or something).  You should also be able to see it in RAM at this point too.

Once you see it in RAM I like to copy off some bytes and use MadEdit to search for that in all the files and pinpoint it from there (just mount it and search all that and ignore MadEdit when it says it can't search something).  And hopefully you'll find it :)

Now the other side is when it uploads one letter at a time.  For that you can just check the upload break under GPU and display some text. See if it breaks for each letter.  If it does then it's in RAM.  So for that I just dump RAM, find it, and search all the files like I do above.

And that ends my long winded explanation of how to find a font in PSX :)

Could be easier/better ways to do it but that's the way I do it :)

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #2 on: August 11, 2014, 09:45:36 pm »
Thanks man. Do you understand his reply? He made an reply at my topic in Newcomer's Board and left. Im so pity he is the one who know exactly about font location.
It's just a set of glyphs stored right into the exe. It's a 1 BPP linear set, can't remember the size (probably 16x11 or 12x11 per character).
Too bad I dont understand what he said. "right into the exe" what exe he meant?

Vehek

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #3 on: August 11, 2014, 10:12:24 pm »
First of all, do you understand how to view or extract the files on a CD image? The EXE is the file that has the game's serial code as its name. For Chrono Cross disc 1, that's SLUS_010.41.

And "1 BPP linear set"? Wew I clicked but just see these options: real / 4 bpp / 4bpp / 8 bpp / 8bpp / 16 bpp / 24 bpp.
You mentioned trying to use Tile Molester.
1. Open the EXE using Tile Molester.
2. From the "View" menu, select "1bpp linear" in the "Codec" submenu and select "2-Dimensional" in the "Mode" submenu.
3. Find the font's graphics. It's around the address 0x46FC3.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #4 on: August 11, 2014, 11:52:45 pm »
Big help, dude, big help. It seem like you know the location too.
But can you tell me where are characters? Screenshot: http://i.imgur.com/OkW9ip5.png
I cant see which is a which is b.....
Already choosen 1bpp linear and 2-Dimensional.

Vehek

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #5 on: August 11, 2014, 11:53:25 pm »
I forgot to mention that you should reduce the view to 2 columns wide.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #6 on: August 11, 2014, 11:55:26 pm »
Thanks but how :D

August 12, 2014, 12:02:14 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Huray! Reach the goal.  :laugh:  http://i.imgur.com/7Tsx2Mn.png
Hahaha thanks all of you but its not final goal yet (lol) I ll pm you guys for the next problem.  :laugh:
Have a nice day.  :)

August 12, 2014, 12:45:07 am - (Auto Merged - Double Posts are not allowed before 7 days.)
How can I add new char to font (add, not edit exist char) and how can I make the tool accept my new char as an input?
I thought about edit exist char. Example: edit â (not need char) to ă (need char).
After that I ll type in the tool, like "I am â". The game will display "I am ă". The char I want.
But those not-need chars are just a few and not enough for those chars I want to add to the font.
So, how can I draw new char? And how can I make the tool accept it as an input?
Perhasp you already know the translate tool made by Terminus Traduction: http://www.romhacking.net/utilities/840/
« Last Edit: August 12, 2014, 12:45:07 am by vanngoctien »

Vehek

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #7 on: August 12, 2014, 11:47:08 pm »
I don't know much about that toolset. I only used it maybe once or twice years ago, and not for its intended purpose of translation. Want to know something? I was unaware that the font was in the EXE and not a virtual file until Gemini said so. So I didn't know the font's location in the EXE before then.
To make it recognize new text characters, I'm guessing you need to edit the files in 43_Tables_Apres with a text editor. Probably "Standard.tcc". I'm assuming you know about table files. Though, there might be the issue of character widths, I don't know how to edit that.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #8 on: August 13, 2014, 07:25:36 am »
Uhm ok. Im trying to edit more exist chars as I can.

August 14, 2014, 12:58:35 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Wew. I tried to edit exist char and draw new char. But the game freezed when the sentence contained edited char appeared.
Any guide, please?

August 15, 2014, 06:05:57 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Wew. Its fine I already solved it.
Now how can I edit width-height of characters?
« Last Edit: August 15, 2014, 06:05:57 am by vanngoctien »

Vehek

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #9 on: August 15, 2014, 06:08:51 pm »
I don't think height can be adjusted. For width, there's this file, no.1977, that contains the font widths. I have to check whether the Terminus Toolset is capable of replacing this file or if another toolset is necessary.

Edit:

Try this.
1. Run the Chrono_Cross.exe program and enter the folowing commands.
Code: [Select]
Iso_Ouvre
Dump_Init
Dump_Ptr
Dump 1977
2. Copy the resulting 1977.out from the 20_Dump_Avant folder into the 21_Dump_Apres folder.
3. Edit the new copy of 1977.out in a hex editor.
4. Enter the following commands into Chrono_Cross.exe
Code: [Select]
Iso_Mode E
Iso_Ouvre
Rein_Init
Rein_Ptr
Rein 1977
« Last Edit: August 15, 2014, 08:00:28 pm by Vehek »

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #10 on: August 15, 2014, 11:49:40 pm »
Exactly the thing I want is height.  :(
You see image: http://i.imgur.com/okGLS3F.png
Example: I want to edit a to ẫ. Well I cant because it will reach over the Z char.
Google a while I found these topic
http://gbatemp.net/threads/grand-knights-history-english-patch-alpha-looking-for-help.365958/page-7
http://www.romhacking.net/forum/index.php?topic=16225.40
They found the font data, include w-h of each chars by open rom with hex editor. What do you think about it?
I tried to open chrono cross.img by hex editor. But cant find w-h of each chars among that mess.
In the image you can see those chars at location 000472E0. But I go to that location. Image here: http://i.imgur.com/M8kUV2j.png
Wew... but I dont think those numbers are relative to w-h. The location of chars display by tile mosleter and tile mosleter open the EXE(SLUS_010.41) not the ROM. Even we changed to 1bpp linear, 2 dimesional and width view to 2 column.
Cant open the EXE by hex, hex editor say "incorrect parameter".
If you want to see EXE I put download link here: http://www.mediafire.com/download/2w22raz3b3fgt43/SLUS_010.41
Thank you Vehek for replying me so many. I always track this topic. Hope more veterans helping me, because I think this is the last problem.
« Last Edit: August 16, 2014, 12:04:13 am by vanngoctien »

KC

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #11 on: August 16, 2014, 04:29:39 am »
Most games don't support variable heights. It will probably need a few basic assembly hacks.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #12 on: August 16, 2014, 05:14:22 am »
Uh shit. I hate asm.  :'(
Seriously cant adjust height of char through hex editor?

KC

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #13 on: August 16, 2014, 08:01:33 am »
You can apply assembly hacks through a hex editor. Though I wouldn't recommend it. If you want to avoid assembly then your characters need to stay within the original limits.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (PS1) What should I do if the font isnt a TIM file?
« Reply #14 on: August 16, 2014, 09:56:43 am »
...
I wondering about stop right here and let some characters (about 14 chars) out of balance with the rest, or go further and have a perfect alphabet.

August 16, 2014, 03:45:48 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
OK I ll decrease all char height by 1.
« Last Edit: August 16, 2014, 03:45:48 pm by vanngoctien »