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

Author Topic: Densetsu no Stafi - Font Question  (Read 9225 times)

Blackmage907

  • Newbie
  • *
  • Posts: 4
    • View Profile
Densetsu no Stafi - Font Question
« on: March 02, 2012, 03:41:29 pm »
I'm doing a translation for this rom(or attempting it at least) I think I may have found the font, but it looks.....wrong.
So i was wondering if anyone could tell me if I'm correct and if I am, maybe give a few suggestions as to what I should do to make it look better.
Quote
http://i1271.photobucket.com/albums/jj632/Blackmage907/FontMaybe.png


on a side note, when i go to replace the Japanese characters with roman characters, do I just replace the japanese with romanji?


FinS

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • nothing much
Re: Densetsu no Stafi - Font Question
« Reply #1 on: March 02, 2012, 05:53:01 pm »
Try using GBA 4bpp tile format and changing the palette to one with a gradient because the letters appear to be shaded to look 3 dimensional so a random colored palette will not show that 3 dimensionality.

March 02, 2012, 05:58:07 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
With regards to the translation what you will want to do probably is trace where it is writing the japanese tiles and rearrange the pointers to write the tiles of your translated text.
« Last Edit: March 02, 2012, 05:58:07 pm by FinS »

Blackmage907

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #2 on: March 02, 2012, 06:33:02 pm »
Thank you for a quick reply, I'll will give those things a try :)

EDIT: It worked, I ended up with this, which is in fact a roman character set, so now I just need to trace and rearrange the pointers? is there a preferred way of doing that in a GBA rom?

Quote
http://i1271.photobucket.com/albums/jj632/Blackmage907/FontMaybe2.png
« Last Edit: March 02, 2012, 06:56:00 pm by Blackmage907 »

FinS

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • nothing much
Re: Densetsu no Stafi - Font Question
« Reply #3 on: March 02, 2012, 08:50:54 pm »
The general approach is to run the game through a debugger until your targeted text is going to be printed to screen, then figure out how it got there by setting write break points on ram addresses or registers or even targeting known opcode addresses.  I don't work on gba so hopefully someone can suggest to you a debugger and some documents to study on going about your research.

Blackmage907

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #4 on: March 02, 2012, 09:35:13 pm »
Ah, Thank you so much, you've been a great help, I was kinda curious as to why there was an absence of japanese characters, is it a display issue? or is that part of the font compressed maybe?

Zoinkity

  • Hero Member
  • *****
  • Posts: 560
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #5 on: March 03, 2012, 06:13:02 pm »
The later the game system is the more likely they divide the ASCII table from other text tables.  The reason is more and more modern games are using computer font systems instead of their own rig-ups.  What you're probably going to find during breakpointing is a test to see if the char is < 7F, and if not it will do a couple conversions on your char to turn it into an offset from a particular address in ROM.

One rather common thing to save space is ni-he, where two font characters are saved in the same space and selected out using the upper two or lower two bits of each nibble.  An easy way to spot those is to set your palette so only 2 of the four possible colors in a 4bit image are nonblack.  8bit versions of it are also common, obviously where high/low nibble refers to each image. 

Could be compressed, but experience says unless they have the font loaded at all times games opt against this to avoid the overhead of constant cart access.  As one large file the compression ratio may be worth the effort, but as many, many individual 40 or 64 byte files the compression wouldn't amount to much of anything and they'd be wasting a lot of cycles loading and decompressing small, redundant data.
If you see the japanese font in-game and they never seem to switch it out or do so very rarely, just set a break on write right at the start of it and reset the game.  You should hit right in the middle of the decompressor (or probably a few dozen times before if they initialize memory first).

Spikeman

  • Hero Member
  • *****
  • Posts: 1063
  • *unce unce unce*
    • View Profile
    • None at the moment, check out my Last.fm page instead?
Re: Densetsu no Stafi - Font Question
« Reply #6 on: March 07, 2012, 07:17:44 pm »
The font data is compressed with a custom compression format. I wrote a dumper/inserter a few years ago. Hopefully it will be of some use. :)

http://dl.dropbox.com/u/5772976/stafy.rar

A full japanese table is included as well.
Open Source Hacking Projects: Guru Logic Champ, Telefang 2, (Want more? Check out my GitHub!)

CUE

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Nasío pa'jakear
Re: Densetsu no Stafi - Font Question
« Reply #7 on: March 07, 2012, 10:29:39 pm »
The font isn't compressed:
- rom offset = 0x0032A2FC
- total tiles = 0x100
- tile width = 0x0C (*)
- tile height = 0x10
- resolution = 2bpp reverse

(*) This is the 'problem': most of the graphic tools only work with tile width multiple of 8bits

The font extracted (with 16 tiles/row, but really is 1 tile/row):


The font extracted with borders:


Code: [Select]
1 row -> 12 bits @ 2bpp reversed -> 24 bits reversed =-> 3 bytes reversed
2bpp -> 1 row = 3 bytes, b1-b2-b3

for (tile = 0; tile < 0x100; tile++) {
  for (height = 0; height < 0x10; height++) {
    get 3 bytes
      a1, a2, a3
    reverse each byte (bits 76543210 -> bits 54761032)
      n = ((n & 0xC0) >> 6) | ((n & 0x30) >> 2) | ((n & 0x0C) << 2) | ((n & 0x03) << 6)
    each 2 bits is a pixel (3 bytes = 24 bits -> 24/2 = 12 pixels width)
  }
}
« Last Edit: March 07, 2012, 10:46:09 pm by CUE »

Spikeman

  • Hero Member
  • *****
  • Posts: 1063
  • *unce unce unce*
    • View Profile
    • None at the moment, check out my Last.fm page instead?
Re: Densetsu no Stafi - Font Question
« Reply #8 on: March 08, 2012, 01:46:02 am »
Well now I feel silly for calling it a custom compression format. My only excuse is I wrote that tool 4 years ago. :)

Either way, my dumper works the same way as outlined by CUE, and the inserter basically does the reverse.

CUE: is there a particular graphics tool you used that was able to view the font, or did you code something to extract those graphics?

Edit:

Here's a dump of the font with the palette used in the game:

Open Source Hacking Projects: Guru Logic Champ, Telefang 2, (Want more? Check out my GitHub!)

CUE

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Nasío pa'jakear
Re: Densetsu no Stafi - Font Question
« Reply #9 on: March 08, 2012, 07:45:02 am »
I used an old (and unfinished) tool to convert a binary file into a graphic file (only 1-2-4-8 bpp) with a monochrome palette.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6848
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #10 on: March 08, 2012, 10:49:23 am »
Maybe you could write a FEIDIAN tile definition?
"My watch says 30 chickens" Google, 2018

Pennywise

  • Hero Member
  • *****
  • Posts: 2235
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Densetsu no Stafi - Font Question
« Reply #11 on: March 08, 2012, 02:28:47 pm »
I think byuu's mosaic can handle the tile width definition.

Torchickens

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #12 on: August 15, 2013, 02:58:32 pm »
Bumping this.

I made a shoddy English font using Spikeman's tool that can the be imported using the tool. It's not very good though. There are actually two English fonts in the game; one used for the Staff Roll 1 and Staff Roll 2 and another used for an unused debug menu I found a while back. That is the one Blackmage907 found.

Here is my font. Note that it is incomplete as no lowercase characters are included and it isn't as big as it could be (Spikeman's font dump utility extracts characters that appear to be cut-off when viewed as 4bpp reverse in Tile Molester) but it works as a placeholder for anyone who wants to translate this game, I feel.

In fact, two months ago I tried translating the game's Opening Demo and came up with this.

Surrounded by the vast sea there exists a kingdom high in the sky above the clouds called Pufftop. It was peaceful in Pufftop.
Living there was Starfy, the honorable prince of Pufftop.
But he frequently finds himself in a careless place. (?)
One day, Starfy was carrying precious treasure, when......
He had carelessly dropped the treasure
Just then...!
....Old Man's voice: "Can you hear me?"
"Oh! It looks like you are safe."
"Something from Tenkai? What caused you to fall?"

"What!! You're Prince Starfy of Tenkai!?"
"This place is my home, located on a small island"
"My name is Rob. It'll be best for you to rest for a while from this terrible storm."

I made a proof-of-concept video (see here) to show this game can be translated but I figure that my ROM hacking knowledge isn't very good, and for this reason I caused a glitch where the text repeats itself.

For reference, the Opening Demo text begins at offset 0x274630 but you should be able to easily find a lot of text anyway by referring to  Spikeman's table file and searching for the relevant bytes in the ROM.

I work on a Starfy Wiki that can be found here. I thought it would be good to share some transcribed/translated text for anyone interested in translating the game.

Soundtrack names
Characters, enemies, bosses, items, abilities/vehicles, stages

Normmatt

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #13 on: August 15, 2013, 08:10:07 pm »
I did some work on this game in the past. I got a vwf inserted and working, I inserted a few lines of your translation just to see how it looked. I haven't looked at this game for awhile and probably won't unless someone wants to translate it.

Torchickens

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #14 on: August 16, 2013, 09:56:23 am »
I did some work on this game in the past. I got a vwf inserted and working, I inserted a few lines of your translation just to see how it looked. I haven't looked at this game for awhile and probably won't unless someone wants to translate it.


Wow, your font looks great! Could you share an IPS patch for the font, please? Unfortunately my knowledge of Japanese is rudimentary so I can only translate very basic sentences.

I'd like to note that I was inconsistent with the name of the kingdom. Pufftop is not an actual translation but is what Tenkai was localized to in the English versions of The Legendary Starfy for the Nintendo DS. Tenkai is the name of Starfy's kingdom that is mentioned in Densetsu no Starfy 1-4.

Tenkai is a combination of 天 (ten: meaning sky, heaven or celestial) and 界 (-kai: meaning world or kingdom). This means there are various possible translations like 'sky world', 'sky kingdom', 'heaven', 'celestial world', 'celestial kingdom' so I feel I should have just left it to 'Tenkai' or 'Pufftop' in my video instead of Sky World.

Some other terms from Densetsu no Starfy that were translated in The Legendary Starfy include these:

Characters:

*Stafy: Became Starfy. Media calling him 'Stafy' include like the movie poster in the Yoshi Theater in Mario & Luigi: Superstar Saga, official site links, Super Smash Bros. Brawl, the 'Baseball Cap',  'Wrestler Clothes' and 'Uniform' Stuff in Densetsu no Starfy 2. I believe Stafy and Starfy are interchangeable though, see this.
*Kyorosuke: Became Moe.
*Rob-jiisan: Became Old Man Lobber. Note ラブ was romanized as 'Rob', not 'Lob' on the Rob-jiisan Shirt in Densetsu no Starfy 4.
*Manazuko: Became Kit Fish. (female)
*Namazudon: Became Fat Cat (male)
*Fōku: Basically unchanged. Became Fork (male)
*Māmeido: Basically unchanged. Became Mermaid (female)
*Tenkai Solider: Became Pufftop Guard (male)
*Hadehirari: Became Ruby (female)
*Bonbōn (DnS4 internal name: Bonbone): Became Konk (male)

Abilities:

*Flying Squirrel Jump: Became Glide.
*Dash Jump: Became Dash & Jump.
*Piyopiyo (guidebook name at least): Known as being Dizzy.
*Effort Swim: Turbo Swim.
*Spin Attack: Became Star Spin. Instead of the Star Spin being level 1-3, upgrades were renamed to the Mighty (level 2) and Ultra (level 3) Star Spins.

Enemies:
*Manmarucho: Became Bellybird.
*Mekamikku: Became Blinkfin.
*Mabo: Became Bobfin.
*Hotarika: Became Calaminer.
*Anchii: Became Choby.
*Paraso: Became Chumbrella.
*Mīmon: Became Flunder.
*Sumaimu: Became Glunk.
*Gyoppu: Became: Guppo.
*Rabirabu: Became Hopalop.
*Zerī: Became Jellysquish.
*Jiappu: Became Liftwisp.
*Aisouni: Became Lurchin.
*Toosenbon: Became Nogo.
*Myumyu: Became Nubble.
*Takometto: Became Octopult.
*Patokari: Became Patrol Crab.
*Pearl Keeper: Became Pearl Sprite.
*Wattobin: Became Pingoon.
*Bibibi: Became Pizzap.
*Rokkun: Became Rock Punk.
*Fukya: Became Sand Snark.
*Sukerugyo: Became Skelefin.
*Dokurotto: Became Skullpin.
*Giro: Became Snark.
*Angā: Became Spinebelly.
*Hotaden: Became Stangler.
*Atchī: Became Wahi Wahi.

Stages:

*Tenkai: Became Pufftop.
*The Sunken Ship (Japanese: ちんぼつせん) shares the same Japanese name of S.S. Logwater in The Legendary Starfy, so some fans think it's the same.

I'd like to note that some of the Densetsu no Starfy playing cards suggest what the genders are. The gender of the character Wotsaruto is debatable, however. Wotsaruto wears a bow-tie stereotypically worn by males, and in Densetsu no Starfy 3 Wotsaruto uses the word 'boku' to refer to his/herself, used by males. Wotsaruto's playing card is Queen though and some other female characters use Queen.
« Last Edit: August 16, 2013, 10:01:39 am by Torchickens »

Blackmage907

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #15 on: February 01, 2014, 01:26:07 am »
I'm going to re-bump this, i had no idea it had so many replies, i disappeared for a bit(you know how life is) but Im still interested in getting this done, I'm looking to gain a better understanding of how cue came across the font, i get that you reverse the 2bpp, but I can't seem to find a tile editor that i can actually do that with, and i suppose with that, once i have it located(and dumped) what would be the most optimal way to change it to an english font?. I know it seems like i'm looking for some one to hold my hand and i can assure its not the case, im just new to rom hacking and i figured this wasn't too crazy as a first project to learn from and i just want to thank the community for not shutting me down and actually trying to help me get into this.

Torchickens

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #16 on: February 01, 2014, 07:24:58 am »
I did some work on this game in the past. I got a vwf inserted and working, I inserted a few lines of your translation just to see how it looked. I haven't looked at this game for awhile and probably won't unless someone wants to translate it.


May you send a copy of your new table file and an IPS patch with some example English text, please? I just thought it would be useful so that people could work on hacking the game and so they don't have to "re-invent the wheel" in terms of making a suitable English font. I can understand if you don't want to at this point.

Normmatt

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #17 on: August 11, 2014, 01:31:46 am »
I completely forgot I hadn't uploaded my font patch... Sorry about the wait... I've just put it up on github.

John Enigma

  • Sr. Member
  • ****
  • Posts: 390
    • View Profile
Re: Densetsu no Stafi - Font Question
« Reply #18 on: January 08, 2016, 07:43:08 pm »
Are there any updates on this?