Jump to content

Fire Emblem Shadow Dragon font format


duckbill
 Share

Recommended Posts

Hi All,

First of all, sorry for my bad english.

Right now I am wanna start translation project for Fire Emblem: Shadow Dragon. English -> Russian.

This game will never get a russian localization so I decided to do it myself for my wife and all russian fans of FE.

The only problem right now is the font. Did someone managed to hack font file structure?

I have a lot of experience in software developing so it's no problem to me to create any pack/unpack tools.

I only need an information about file structure.

Can anyone help me?

Link to comment
Share on other sites

Have you started by unpacking the ROM (using NDSTool or etc) and looking around through the contents?

I had a look at the font structure a while back. I have a fairly good grasp of how the game defines what code equals what symbol and where the font graphics may be, but not how to edit the font graphics (or what they even look like).

I'll see if I can dig up some notes.

Link to comment
Share on other sites

Yes, I unpacked ROM. There are at least 2 files with the same structure in the data/fonts folder: alpha and talk.

First one responsible for system messages and menu and second one for dialogs between characters.

As far as I understand file structure:

[Header Section]

[Data Section]

Header section:

4 bytes: Total file length

4 bytes: Offset in Data section of some table (Table1)

4 bytes: length of Table1

20 bytes: Unknown (padding?)

Table1 contains two sets of pointers (4 bytes each).

First half of table:

offset in the data section of pointer to glyph attributes record

Second half of table - unknown pointers.

Glyph record is:

2 bytes: Code of symbol (I do not determine code page, but probably ShiftJIS)

2 bytes: width of symbol

4 bytes: unknown (seems to to be a pointer in data section for glyph image)

4 bytes: unknown (always 0, padding?)

That's all so far that I found.

Update: bytes from 4 to 7 in glyph record is definetly a pointer in data section to Glyph image. And image seems to be not raster, but some vector format.

Edited by duckbill
Link to comment
Share on other sites

If you got that far already, then you're probably making really good progress. Unfortunately, that's more or less the same as what I've got.

The only thing I can think to add is that there seems to be a shorter version of the symbol codes, which you can use to save space when writing the dialogue. For instance (this is based off the Japanese version of FE12 so it may differ slightly here) you can input 42 instead of 82 61 to get uppercase B, 43 instead of 82 62 for uppercase C and so forth.

I haven't looked into where the game decides this though. Also, you may need a specific code or command to start using this shorter code (I can't quite remember, may be getting confused with FE5).

If you find anything new, can you give us a shout. I believe the FE12 English translation project could use the help : )

EDIT

Actually, I looked at the EU version of this game and I forgot the symbol codes are different; they already use stuff like 65 for lowercase e. Just ignore what I said then >___<

Edited by VincentASM
Link to comment
Share on other sites

I was wrong: it is not a vector format but some type of RLE compressed raster font. What you call short or long codes actually two different symbols: 0x42 is ASCII code (but the same meaning in ShiftJIS codepage) for Capital English letter B and 0x8261 is ShiftJIS code for Full Width Capital English B. In most fonts those Full width letters uses the same glyph as usual letters buth its width is set to max value allowed for this font.

I did not find in the font any signs of height. Looks like its predefined constant. I think I managed to understand font format except actual glyph storing algorithm. When I get this I'll write full specification for this format if anyone interested in it.

I am working with US version of the game.

If my help will be useful for FE12 English translation project - I am ready to help, but right now I find out very little info. Only message file format. I just do not spend time at anything else until I get how to modify font to add cyrillic letters.

Link to comment
Share on other sites

Ah that makes sense. I was wondering why there were two codes for some symbols, didn't think to check the width either.

Sure, any details you find are welcome. The two games seem to share a similar or identical font format (when comparing the Japanese versions at least), so any information you can figure out should also apply for FE12. Of course, presumably, the FE12 project staff can figure this info out as well, but your input could help speed things up.

If I find anything new, I'll make sure to tell you as well. Although I rarely hack these days and you've already learned more than me in terms of the font format, so my help will probably be minimal ^^

Although, I'm thinking the EU version could be better to work with, since it *might* have more symbols compared to the US version. I don't have the US version to check though. For reference, the talk file in the EU version is 8 KB in size. The Japanese version of the file is 85 KB (lots of kanji), but you don't want to use this since the EU/US versions are probably closer to your intentions.

Edited by VincentASM
Link to comment
Share on other sites

US and EU versions has the same set of symbols in the font.

Max symbol width is 0x10 and I think that height is also 0x10. It uses 2bpp compressed image for each glyph.

For example glyph of symbol ` is compressed to "29 4C 5E CD FF F9 D9 5F FF FF FF FF FF FF F8"

I can't get what type of RLE is used, but I am sure that it is a RLE compression.

UPDATE: It is not a 2bpp! It uses at least 5 different colors, so it is 3 or 4 bpp.

Edited by duckbill
Link to comment
Share on other sites

  • 1 year later...

I know this is off subject and I terribly suck at hacking, but is there a way to convert these into .ttf files? I unpacked the FE11 ROM, mainly for the .sdat thing and then I saw a folder called 'fonts'. I opened it and found 5 files, alpha, bit, pal, system and talk. They all have no file extension. I opened one in FreeFileViewer and all these codes showed up. They look like some of the codes you were talking about earlier. 'Hope I'm of some use... Anyway, can you make these usable font files?huh.gif

Edited by SisterOfMarth98
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...