ROM Hack Single byte fonts

azerty1

Well-Known Member
OP
Member
Joined
Mar 22, 2009
Messages
160
Trophies
0
Age
29
Website
Visit site
XP
99
Country
Canada
I'm sure shining force feather is not the first game ever not to use NTFR and not to have a single-byte ascii font...
could anyone tell me how to insert a font into a game that does not support NTFR?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
What you have just described can be trivial tile editing through to full blown ASM hack.

I suppose an example question of a similar nature works here: * is not the first game to avoid using the SDAT sound format, how do I work it from here? There are thousands of ways it could go from here, granted there are few traditional options and the same applies here but hopefully you get where I was heading.

Next we would have to ask what you want out of it; do you want a single byte font for size (kind of pointless on the DS unless you are working in the binaries/overlays), a proper variable width font or something else entirely?

General order of play is
Find the game's font and at least divine the format of the font itself. Shining force is a game with a lot of text but note that many puzzle games and games with a low text count will often opt for a bitmap style text setup which places you squarely into graphics hacking territory, menus have also been known to do this.

Some stop here and satisfy themselves with an edited font (hence the half translations of yesteryear not having complete Japanese in the sections that were otherwise untranslated). Things here can range from basic tiles, filtered tiles (fonts are usually two colours and the GBA/DS BIOS have decompression functions for this, see TONC, cowbite and no$gba docs for more on these), split tiles and their cousins of assembled fonts (phoenix wright had some stuff like this for sprites if memory serves, NTFR is somewhat similar to this if memory serves)

Next up is basic ASM and memory hacking; modern games will often have a somewhat modern font display routine and much like the OAM and regular images (which can also be part of it) you can poke things around and make substantial changes. Note while I say modern values can be hard coded
This is also the stage where my much favoured kludge font width hacks often find themselves (skinny font).
You could get lucky and find a simple 8-16 bit "switch" hack is possible somewhere in here (swap a 16 bit read for an 8 bit read or a similar thing for the in game parser) but it is never wise to count on this.

Finally we have full blown ASM, I am going to link an example project as it covers more than I am willing to type out right now:
http://www.romhacking.net/docs/337/
 

azerty1

Well-Known Member
OP
Member
Joined
Mar 22, 2009
Messages
160
Trophies
0
Age
29
Website
Visit site
XP
99
Country
Canada
FAST6191 said:
What you have just described can be trivial tile editing through to full blown ASM hack.

I suppose an example question of a similar nature works here: * is not the first game to avoid using the SDAT sound format, how do I work it from here? There are thousands of ways it could go from here, granted there are few traditional options and the same applies here but hopefully you get where I was heading.

Next we would have to ask what you want out of it; do you want a single byte font for size (kind of pointless on the DS unless you are working in the binaries/overlays), a proper variable width font or something else entirely?

What i'm aiming for is to be able to put more letters into a textbox than the number of japanese hcaracters that can go in. Japanese has kanji which means a whole word in two bytes, which is probably rather hard to translate while preserving the length. Of course I could just try to get more textboxes, but even so, with fat letters that look like there's a space in between each of them is definitely not something you want to have to stare at in a 5 hour+ game.

QUOTE said:
General order of play is
Find the game's font and at least divine the format of the font itself. Shining force is a game with a lot of text but note that many puzzle games and games with a low text count will often opt for a bitmap style text setup which places you squarely into graphics hacking territory, menus have also been known to do this.

Some stop here and satisfy themselves with an edited font (hence the half translations of yesteryear not having complete Japanese in the sections that were otherwise untranslated). Things here can range from basic tiles, filtered tiles (fonts are usually two colours and the GBA/DS BIOS have decompression functions for this, see TONC, cowbite and no$gba docs for more on these), split tiles and their cousins of assembled fonts (phoenix wright had some stuff like this for sprites if memory serves, NTFR is somewhat similar to this if memory serves)
so this would be putting the rom through a tile editor and then editing the font to make it skinnier?

QUOTE
Next up is basic ASM and memory hacking; modern games will often have a somewhat modern font display routine and much like the OAM and regular images (which can also be part of it) you can poke things around and make substantial changes. Note while I say modern values can be hard coded
This is also the stage where my much favoured kludge font width hacks often find themselves (skinny font).
You could get lucky and find a simple 8-16 bit "switch" hack is possible somewhere in here (swap a 16 bit read for an 8 bit read or a similar thing for the in game parser) but it is never wise to count on this.

Finally we have full blown ASM, I am going to link an example project as it covers more than I am willing to type out right now:
http://www.romhacking.net/docs/337/

unfortunately, my knowledge of assembly is rather limited. i doubt i'd be able to do the same kind of thing to shining force...
i'll try the graphics editing route and see if i can get anywhere with my eyes...if that doesn't work, then i probably won't be able to get much further with this game...
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
You have two different concepts going on at the same time:

more characters: does this mean the Japanese characters are too fat (indeed I know they are all approximately the same size and do not take to being shrunk very well) and screen real estate is your problem.
The solutions to this include several things, implementing a variable width font is generally considered one of the hardest hacks to do but it also looks very nice when done properly, NTFR is very much the exception to this line of thought (people coming to the DS from the older consoles are often shocked by how "easy" a lot of the nitroSDK based hacking makes things). Most games will not autoshrink text to fit; waste of valuable processing power, similarly if your coders are Japanese they will probably think in such terms and making life easier for the would be hacker and/or translation team is probably not on their mind as much as making the deadlines.
This means simply shrinking the font "in tile" will probably not do anything other than probably make the gaps problem worse. The only time shrinking it like that will do any good is when you have an emulator that trims tiles to fit on a low res screen (see pocketnes for the GBA and possibly jenesisDS (software versions) on the DS) and you do not want the font to suffer.
Most games will not have a simple tweak available that sets the characters closer together (you might get a OAM writing or a background generating routine with a basic +8 pixels sort of thing going on but until you pull the rom apart you will not know).

more space in terms of bytes: does this mean the space you have available to you to put the text in terms of bytes is far too small for the amount of text you want (again English and most latin derived languages are considerably more verbose than Japanese who as you say have Kanji able to represent entire words). A sidenote at this point, I see Furigana quite often and more than a few games eschew Kanji where they can in favour of kana for the younger/less well versed/less inclined to focus audience so while Japanese in the strictest sense (which most non natives learn it in) does lend itself towards short sentences in practice this may not be so space may not be as tight as your studies would lead you to expect. This being said having played several hastily translated GBA RPGS (same problem, words shortened in the most horrible ways imaginable) I am aware of your plight.

If it is just in game files I say suck it up and repoint if assembly is not your thing, most games will stop and start sentences with a given character and you already seem versed in building apps for hacking making this trivial.
If it is in the binary proper or the overlays it changes things a bit as you are now going to have to find somewhere in the memory to do things with (hopefully not that difficult, grab a copy of cracker's DSATM and use the DEADBEEF option to scan for an opening. To spare my having to reply DEADBEEF is a valid "human readable" hexadecimal string that almost never appears in normal operations, by setting the ram to this any space that is not used by the game will be given away by the presence of DEADBEEF- you do not even need the devs version of no$gba to see this.

If it is fixed length text (rare but not unheard of on the DS and when it does exist it is usually limited to menus, the solutions can work quite well for text in the binary too) you will probably be suited to a multiple letters per tile approach instead (works best with thin characters like i j l 1 and so on but is certainly feasible for other characters). To sort it in your head "vv" or "w" (two v as in various or one w as in walrus), now expand it to every character and word you can think of.
 

azerty1

Well-Known Member
OP
Member
Joined
Mar 22, 2009
Messages
160
Trophies
0
Age
29
Website
Visit site
XP
99
Country
Canada
OK, thanks a lot FAST6191. I'll go try to figure out how the font works and if not, i'll see if i can generate more textboxes.
 

corblimey111

Member
Newcomer
Joined
Sep 25, 2009
Messages
11
Trophies
0
Website
Visit site
XP
23
Country
i wish you luck azerty1,

this could be a great project if you can figure this one out
biggrin.gif
 

azerty1

Well-Known Member
OP
Member
Joined
Mar 22, 2009
Messages
160
Trophies
0
Age
29
Website
Visit site
XP
99
Country
Canada
corblimey111 said:
i wish you luck azerty1,

this could be a great project if you can figure this one out
biggrin.gif

unfortunately, I haven't had much time to work on this and the time i have had has only resulted in the conclusion that i have no talent in graphics hacking. either the font isn't in there or it's in some colour that I can't see (colour blindness does not help in this kinda work...), i don't think i'm capable of doing this kind of hack. if someone who's more capable in finding and fixing fonts can finish the job, though, i'd be glad to write the text-inserter.
 

corblimey111

Member
Newcomer
Joined
Sep 25, 2009
Messages
11
Trophies
0
Website
Visit site
XP
23
Country
oh well i am about to start full time work anyway, perhaps when i have settled into routine, i can try to build some hype amongst other GBATempers and try to resurrect the project (not that i guess we could at this stage call it a project)

good luck in any other endeavors and thanks for looking into it anyway
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-