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

Author Topic: how to add special characters?  (Read 1282 times)

Kyoichi

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
how to add special characters?
« on: February 21, 2020, 07:33:09 am »
Hi, I need help, I'm translating the goof troop into Spanish and I would like to be able to add characters that are only in Spanish, I tried with the Tile Layer Pro, but I can't find the text anywhere. Any advice?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 613
  • I am the baldest romhacker
    • View Profile
Re: how to add special characters?
« Reply #1 on: February 21, 2020, 09:00:08 am »
My advice is stop searching for text strings in a tile editor. Make a table file and search in a hex editor.

FAST6191

  • Hero Member
  • *****
  • Posts: 3092
    • View Profile
Re: how to add special characters?
« Reply #2 on: February 21, 2020, 09:39:35 am »
Cyneprepou4uk, I dare say they were looking for the font (tipo in Spanish?) rather than text.

Also Kyoichi while you did say the name it does help to mention what system it is for. In this case there is only a SNES entry so that is no so bad but if it was one of those things with a port everywhere, or indeed different versions (think Aladdin) that would be a different matter. Game does not appear to have been tackled for https://datacrystal.romhacking.net/wiki/Category:SNES_games either.

Two main approaches, though some later systems and formats some of their games use make some things a bit easier in some ways. This is assuming you care and can't work around it.

1) You overwrite existing characters. If it is just one or two characters that is not so bad and there is usually some useless punctuation, and in the case of many European languages vs standard English you might have a few characters that are only used for loan words. Converting a Japanese game tends to be nice by virtue of how many characters many games ship with, to the point where some will opt for the Japanese version of a game as a base. In this case the English version I saw on the let's play I link in a bit was also all capitals which reduces options there a bit more.
2) You extend the encoding and all handling from graphics on down accordingly. For the newer systems this is often far easier as their formats allow for it but for older stuff you risk running into any number of issues.

You say you could not find the font in a basic sweep with a tile editor. I will assume you had it set to normal ish modes and weren't trying to decode wonderswan graphics or something.
Three main issues
1) Custom size tiles
2) Compression
3) The text is not text at all but straight graphics. Watching a let's play ( https://www.youtube.com/watch?v=2hbce9kjONg ) the title screen selections at least use a different font but more likely are straight graphics. As is likely to be the stage clear banner.

Especially on older systems then 95% of graphics will be the standard 8x8 pixels or maybe 12x8 or 16x16. Fonts tend to be in the exceptions for this one as they benefit from having different sizes.
Hopefully you don't have an every character is a custom size type of ROM, though for a throwaway kids TV show game for the SNES (even if it was from Capcom) I would be surprised there. That said most things here look all flared out to be of a uniform size so you should not have too much trouble with that one.

Compression is just that. SNES compression is more limited than some later stuff but also more available than earlier devices but not absent, and often quite custom. We are however outside by area of expertise here as I have never had to properly tangle with SNES compressions.

Things to try.
It may be that some tracing is in your future.
Prior to that though you do have some options
1) You find the font or elements thereof in RAM and search the ROM for it -- barring compression games of this era (and still quite often to this day) don't tend to change much between the ROM and when they get loaded into memory at runtime as it is viewed as a waste of processing power. Compression would likely get in the way there if it is present.
2) Corruption. Unpopular for some but it works if you give it long enough. Here you corrupt part of the ROM, run it, see what is broken and repeat until you find what you want. Once you know where something is then figuring out its format tends to become a whole lot easier.
3) Regional and version comparisons. I don't know if it ever made it to Japan or got v1.1 versions but comparing different things can tell you what goes here.

There are some others
Tracing wise I think there are some good SNES tracing/debugger guides in the documents section. My link is for the GBA it covers what goes for just about every system
https://www.romhacking.net/documents/361/