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

Author Topic: [Technical] [GBC] Need help with editing/ inseting fonts  (Read 743 times)

Nebba

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
[Technical] [GBC] Need help with editing/ inseting fonts
« on: June 15, 2021, 10:41:15 am »
I am getting into translating a GBC game called Sakura Wars GB but the game only allows for 14 glyphs per line which is not enough glyph/character spaces for the translation. Since the game has 8x16 glyphs I made a 4x8 font for the game. I need help inserting the font into the game and making it functional.

the font is at:
18000    table 1
1a000    02 switch byte
1b000    03 switch byte
1c000    04 switch byte

The first text line is at 0x106091
This is the font order

is visible at 1bpm, 16x32 blocks with interleaved rows using tilemolester

NOTE: the game has 8x16 glyphs, shows 3 text lines per window and 14 glyphs per line

Example of the problem:
https://youtu.be/BfCA-mJHjYI

343

  • Jr. Member
  • **
  • Posts: 91
  • Gameboy Color Rules!
    • View Profile
Re: [Technical] [GBC] Need help with editing/ inseting fonts
« Reply #1 on: June 19, 2021, 08:51:03 am »
You can cut your text in bigrams and use 2 letters per tile.
five tables seems enough to fill an entire book.
EXAMPLE
Instead write
C,A,R. <==three tiles.
You can write
CA,R_. <==two tiles.

Nebba

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: [Technical] [GBC] Need help with editing/ inseting fonts
« Reply #2 on: June 21, 2021, 02:36:32 pm »
You can cut your text in bigrams and use 2 letters per tile.
five tables seems enough to fill an entire book.
EXAMPLE
Instead write
C,A,R. <==three tiles.
You can write
CA,R_. <==two tiles.
Hey you said I can cut my text into bigrams and be able to use 2 letters per tile. But what are are bigrams and how am I able to use 2 letters per tile?
« Last Edit: June 21, 2021, 03:56:37 pm by Nebba »

FAST6191

  • Hero Member
  • *****
  • Posts: 3168
    • View Profile
Re: [Technical] [GBC] Need help with editing/ inseting fonts
« Reply #3 on: June 24, 2021, 10:25:49 am »
You edit the font.
The game has no concept of the contents of the graphics you are placing down; just says go fetch these 14 items and stick them in a line. Does not matter to the game if it is 1 character per tile, 2 characters per tile, 1.5 characters per tile, a completely filled tile, blank or random squiggles. On some later systems and some newer there is an artificial space between characters when placed down (which can make things look odd, especially if you are trying 1.5 characters per tile, and Japanese games are especially font of this for menus) but for the GB/GBC then looking at the hardware docs for the reply in another thread of yours then that is probably not going to be the case (I can see how I might do it but does not look like what is done here).
Most hackers normally only do it either as a type of compression, as a shorthand for a variable (though more if the original game has it -- things like character names, yes/no selection boxes without having to type out yes/no, placeholders for "this item costs ???? gold" constructions) or as a type of pseudo variable width font*.

*variable width font is much as it sounds and is when letters like i j l 1 | and such are given a shorter box to sit in compared to chunky letters like w and m which looks more pleasing to the average Roman language character set using language reader. Japanese tends to be fixed width with every character being much the same so games rarely added this option and it makes words using double of those characters above (call, ill, will, jig and so forth) odd unless the font is hacked to use wider characters (which can also look odd and out of place with certain popular font styles). This is hard though as you have to go into the code and change the placement routine, add some more to make the placement know how much to use (again games have no concept of the character size or content by themselves) and also sort end of line (easy enough for a game to know it has hit the limit if everything is fixed, harder if you can overshoot it or have to consider it in the first place). As a halfway measure then some hackers might scan the script to see what characters are common or if there is a lot of double ll or similar words to those in the list above. The hackers then edit the font to have multiple (or 1.5) characters in a font and instead change the encoding used by the insertion table to call all these tiles with multiple characters in, which the game dutifully places on the line and you end up with squashed up characters without having to code it into the game. Obviously it requires you have space in the font to add things, though that is rarely too much of a problem in Japanese games where there are probably dozens of spare slots if you have just kana (hiragana + katakana + kuten for both of those + possibly yoon is way more than upper case, lower case, numbers and maybe 6 punctuation marks for English -- do you really need more than . , ? ! " and ' in most games?)  and probably hundreds or thousands if you have kanji.

cj iwakura

  • Full Member
  • ***
  • Posts: 242
  • The Rhythm Rogue
    • View Profile
    • iwakura.productions
Re: [Technical] [GBC] Need help with editing/ inseting fonts
« Reply #4 on: June 30, 2021, 08:36:01 am »
EsperKnight knows GBC pretty well(he worked on the Sailor Moon game), so I'll drop him a line.

蒼く咲く華 日は灯り 天に流れる | Kill The Past