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

Author Topic: Any Good Tutorials For Finding Compressed Fonts?  (Read 2926 times)

fabio

  • Guest
Any Good Tutorials For Finding Compressed Fonts?
« on: March 14, 2011, 06:45:09 pm »
All,

I thought I would take a look at a couple of PC Engine games that I own to see how difficult it would be to replace some of the Japanese menu text with English. On the first game that I looked at, I was able to locate a string and successfully change one Japanese character to another. However, when I load up the ROM into a tile editor, I do not see the font. As a result, I am assuming that the font is in some form of compressed format, based upon some of the articles I have read on this site.

Does anyone have any tips for me in how to get started with locating the compressed font? My first inclination is to use a debugger (I have Mednafen) to try to track down where the font graphics are getting pulled from when they are loaded into memory.

I did a little bit of Intel assembly back in college, but it has been a good while ago, and I don't have any familiarity with the PC Engine assembly instructions. Any recommendations on good docs covering the assembly instructions for this platform would also be appreciated.

Also, what tile editor would you recommend for PC Engine ROMs? I have been using Tile Molester up to this point.

Thanks,

Fabio

SPennLUE

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • SPennLUE Projects
Re: Any Good Tutorials For Finding Compressed Fonts?
« Reply #1 on: March 18, 2011, 02:07:13 am »
A debugger seems like the best way to me.  I would offer more help if it could >_>
English translation - Rockman 2 Neta (PC); Document - Creating PC patchers with NSIS
Available here on RHDN or at my site: http://sites.google.com/site/spennlue/

RedComet

  • Hero Member
  • *****
  • Posts: 3168
    • View Profile
    • Twilight Translations
Re: Any Good Tutorials For Finding Compressed Fonts?
« Reply #2 on: March 19, 2011, 11:05:27 am »
Check out the Turbografx and Turbografx CD sections of the documents section. The best course of action is to find the font in VRAM and work your way back from there to figure out where it's coming from. The PC Engine uses a 6502 processor like the NES. (I think it might be modified slightly.) tomaitheous knows more about this than me, so maybe he'll pop in with a suggestion.
Twilight Translations - More than just Dragonball Z. :P

Klarth

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: Any Good Tutorials For Finding Compressed Fonts?
« Reply #3 on: March 19, 2011, 12:43:56 pm »
In most games, you can take a savestate (with text being displayed so you know the font is loaded) and then open up the savestate in a tile editor to get an uncompressed dump (exception: compression schemes that compress each character separately).

As RC said, figure out the VRAM address (debugger or savestate), work backwards with the debugger, and you'll find the decompression routine as well as the original data address of the compressed font.  The easy way is to edit a compressed font is to store an uncompressed font and just load that directly to bypass dealing with compression algorithms, if you have the luxury of extra space.

fabio

  • Guest
Re: Any Good Tutorials For Finding Compressed Fonts?
« Reply #4 on: March 19, 2011, 12:57:48 pm »
This past week I've been spending some time studying up on 6502 assembly, and I'll likely continue with that a little bit at a time. I also found Hu-Go tracer in the utilities section, and I have been working with that. It comes with a couple of practice exampes for finding a font. The example has led me to a couple more questions that perhaps someone can shed some light on.

First, the example mentions some details about the font tile that I would like to understand a little bit better. Could anyone shed some light on what this means? Perhaps you could point me to a doc that would go cover the fundamentals of these concepts:

Quote
Nametable says:
6D3 6D3 6D4 6D4 6D5 6D5
6D3 6D3 6D4 6D4 6D5 6D5

How? Examine the palette colors: C,D,E,F.
So we've got 4 interleaved 1-bpp tiles inside one PC Engine tile.

Second, there is an example of converting from a RAM address to a ROM address, and I don't understand the logic behind it. Any help on that one would also be appreciated (there's also another mention of how the tiles are stored):

Quote
$4960 --> $07 * $2000 + $960 = $E960 ROM.

Stored as 2-bpp. With blank interleaved pixels.

Other than that, I can pretty much follow the flow and logic behind the example. I'm sure that reading up on some additional technical docs will prove helpful to me as well, so I will continue to study up and gain a better understanding of the PC Engine platform in general.