View previous topic :: View next topic |
Author |
Message |
Tomaitheous Elder
Joined: 27 Sep 2005 Posts: 306 Location: Tucson
|
Posted: Fri Aug 11, 2006 2:21 am Post subject: Some thought on Fonts |
|
|
I was looking through the US releases. Perticularly at the font and routine. All the games I've looked at don't use a variable-width-routine. Most are fixed 8x12 fonts.
Two things did suprise me - Exile 1 & 2 and Cosmic Fantasy 2. Exile 1 uses a 12x12 font - the system card font. I can't believe WD got away with that! While Exile 2 uses an 8x8 font, but there is no lower case. I thought they changed to a variable font routine in CF 2 because it uses the system cards 16x16 font, but they actually just scaled the font into an 8x16 font on the fly!
I had originally decided on using varible-width font for future projects (it looks really nice & clean), but DS:LOH and DE2 use a fixed width 8x12 font and it looks great. I think I might have to borrow one of them
BTW Dave, that 8x12 font used in Ys IV by NightWolve looks great. _________________ www.pcedev.net |
|
Back to top |
|
|
NightWolve Elder
Joined: 19 Apr 2002 Posts: 304 Location: Chicago, IL, USA
|
Posted: Fri Aug 11, 2006 8:58 am Post subject: |
|
|
You sure you can even do a VWF? I think there's a reason they're all fixed-width.
Oh, the font in Ys IV was ripped right out of the Windows VGA Courrier font file if you're wondering. It happened to already be in the needed 8x12 bitplane mode, so that had a lot to do with why it was picked! _________________ Translation Projects: Xak 3, Ys 4, Ys 1&2 Complete
Boycott XSEED Games! |
|
Back to top |
|
|
Kaminari Elder
Joined: 19 Apr 2002 Posts: 1432 Location: Paris, France
|
|
Back to top |
|
|
nodtveidt Elder
Joined: 27 Dec 2004 Posts: 414 Location: Isla del Encanto
|
Posted: Fri Aug 11, 2006 10:21 pm Post subject: |
|
|
Doing a VWF is possible but it is not a trivial process. The way it could work goes a little like this...you reserve a certain area of vram for the place you're going to put your text (you will need one unique 8x8 section for each tile that's going to be used), then write the pixel values directly to vram in the place where the text should go. Obviously you'd need a pixel plotting routine (damned planar memory! grrrr) but in theory, it could certainly be done.
There is indeed a very good reason why fixed-width fonts are used...it's worlds easier to simply use fixed tiles to display text, and you can reuse the same tile pattern for multiple locations in the BAT. _________________ Frozen Utopia
Retro gaming was never this cool. |
|
Back to top |
|
|
Tomaitheous Elder
Joined: 27 Sep 2005 Posts: 306 Location: Tucson
|
Posted: Fri Aug 11, 2006 11:42 pm Post subject: |
|
|
Quote: | You sure you can even do a VWF? I think there's a reason they're all fixed-width. |
Nah, it can done. Many SNES games use it and that's a tile based system. The problems lies in the fact, from a translation perspective, that you can't expand game code for a CD game in the way you can expand a ROM to include the new VWF routine. Plus if you use a VWF system, most of the time you have to calculate when to do a CR/LF because of alignment issues since characters per line are variable and this makes compression routines using dictionary method less effecient.
Quote: | Doing a VWF is possible but it is not a trivial process. The way it could work goes a little like this...you reserve a certain area of vram for the place you're going to put your text (you will need one unique 8x8 section for each tile that's going to be used), then write the pixel values directly to vram in the place where the text should go. |
Nod, that's the way all the games I've looked at(which call $E060) do it. They have linear set of tiles setup in the BAT for direct access for displaying text - with the exception of games like Downtown Nekketsu Monogatari which use hirogana/katakana 8x8 tiles stored in vram.
The downside to fixed width routine is that a 8x12 font set takes up 840+ bytes(1bit format). Finding a static place to put could be problematic. A VWF routine would take up about 100-200 bytes using the 12x12 system card font and another 70+bytes for a table for letter dimensions/deadspace (cookie cutter).
Kaminari: I'll have to take a look at Might & Magic 3. _________________ www.pcedev.net |
|
Back to top |
|
|
David Shadoff Regular
Joined: 10 May 2002 Posts: 83 Location: Toronto, Ontario, Canada
|
Posted: Sat Aug 12, 2006 3:32 pm Post subject: |
|
|
Although something like this is not going to be easy, it can certainly be done. Let me explain:
Most games use the system card 12x12 or 16x16 SJIS tiles from the system card. If the print routine allows a choice, or even if they use 12x12 by default, there is a required *shift/merge* operation on alternate characters, due to the fact that 3 12x12 tiles fit into 2 16x16 areas. Most of the time, they won't read/write VRAM, preferring to mix in a RAM buffer first.
The BAT/tile arrangement in these cases is: The BAT contains a fairly regular sequence of tile numbers, and the tiles themselves are re-adjusted by the print function (arbitrary graphics). Usually scrolling will just move BAT values up a line, in order to re-use them on the following line.
Sometimes (often?), the more configurable print routines will allow for extra pixels of space between the characters. In these cases, the approach is already available (but will obviously need to be adjusted for 8-bit characters), since you're dealing with arbitrary-pixel shifts and a running counter for "current pixels of offset".
As for on-the-fly calculation of automatic spacing/word-wrap, I would avoid it. It's just too much trouble. Instead, you should be calculating this before you insert your text (the text editor for example, or a series of warnings produced by the inserter). Then the CR/LF can be at forced intervals, and your re-compression can happen on the "pre-rendered" text. This can't be done in the case where any text can follow any text, but I can't think of any cases of that situation.
It's true about not being able to find a lot of extra space for stuff like this on Super CD ROM games. But just as ROM hacks will usually extend ROMs, a "CD-ROM" hack could have a pre-loader to load a bunch of new code (and text ?) into the "Super CDROM" RAM from $68-$7F. Or a particularly tight "Super CDROM" game could use the Arcade Card for something (including swap space for paging out code or text). Some people might think of this as cheating, but after all, you can still play it on real hardware, and emulators usually implement the extra features even if the game doesn't use it... |
|
Back to top |
|
|
Tomaitheous Elder
Joined: 27 Sep 2005 Posts: 306 Location: Tucson
|
Posted: Sun Aug 13, 2006 11:49 pm Post subject: |
|
|
Quote: | Some people might think of this as cheating |
I wouldn't considered it cheating. CD->SCD would be fine as most people have a SCD unit/card/duo. If it takes an SCD->ACD for a Manji Maru, then so be it, I'll not complain
Anther idea would be to have the font loaded into whatever space was available - non-static address. At the end of the text block would be a variable identifier pointing to the location of the font. Area 1 & 2 might have the font located in a different address than area 3, etc. Also the compression scheme could be based on local instances/dictionary lookup, so you wouldn't need a seperate static lookup table - exm. BloodGear.
Unfortunately, due to limitations with Auleria having the text is stored in ADPCM ram would make things a bit more complicated. A CD->SCD would be better/easier, with a small loader on the boot sequence to load up the tables in SCD memory before the game loads.
-Rich _________________ www.pcedev.net |
|
Back to top |
|
|
Paranoia Dragon Elder
Joined: 09 Apr 2005 Posts: 366 Location: New Iacon
|
Posted: Mon Aug 14, 2006 9:45 am Post subject: |
|
|
Hmm, does this mean the possible translation of Auleria? Not that it's up on my list, but, like with any decent Turbo game, I'd love to see it! _________________ Sentience is the right of all freedom beings? |
|
Back to top |
|
|
nodtveidt Elder
Joined: 27 Dec 2004 Posts: 414 Location: Isla del Encanto
|
Posted: Mon Aug 14, 2006 6:37 pm Post subject: |
|
|
And here I was thinking that I was the only one clever enough to use ADPCM memory for dialogue.
(Neutopia III uses it) _________________ Frozen Utopia
Retro gaming was never this cool. |
|
Back to top |
|
|
Tomaitheous Elder
Joined: 27 Sep 2005 Posts: 306 Location: Tucson
|
Posted: Tue Aug 15, 2006 12:35 am Post subject: |
|
|
Nod, that's cool. So you load up whatever language the user plays in to the ADPCM buffer?
Aeluria also stores the text pointer table in ADPCM buffer and copies it to ram when entering a town. It's the first game I've come across to use ADPCM in this way other than a poor mans DMA - though I heard some other games use it to store graphics.
PD: I wasn't originally planning on it. I just found out about this game last week. It's not the greatest game, but so far I like it. Kind of reminds me of Exile, but in a different setting.
I tend go through games documenting how the text is stored, text routines and such for future projects. This one just happen to catch my interest. I have enough info gathered to do a translation. I've already located some free space for additional code and the text conversion looks like I could get a way with little to no compression. It'll make for a nice side project
It'd be nice to have a site dedicated for info on translating PCE CD games - text location in iso/game, compression types used, how to trap text routines, etc. The site could have a list of groups/person and which games there working on, want ads/requests, etc. Romhacking site has a nice database, but mostly just SNES/NES projects and info.
-Rich _________________ www.pcedev.net |
|
Back to top |
|
|
NightWolve Elder
Joined: 19 Apr 2002 Posts: 304 Location: Chicago, IL, USA
|
Posted: Tue Aug 15, 2006 6:36 am Post subject: |
|
|
nodtveidt wrote: | And here I was thinking that I was the only one clever enough to use ADPCM memory for dialogue.
(Neutopia III uses it) |
Nope. Ys IV does it as well. Most of the time the 8x12 font tile set is stored there, until an ADPCM speech sample is about to be played. That's why in two instances of the game, the first being when Adol falls and you get that all uppercased, "THE GIRL TIED HER BANDANA AROUND YOUR LEG" message, the font is the 8x8 system one (there was a control code that allowed you to switch to it). See, right after that scene, ADPCM speech is played and whenever I'd try use the normal font, the tiles that would appear would be nothing but garbage. It seems the speech sample is loaded somewhat too early at that point, so the 8x12 font tiles are not available. This wasn't a problem of course when using S-JIS 16x16 font tiles from the system card as the game normally did. Hudson only wanted the 8x12 font for weapon/item/inventory/status menus, etc. but thanks to Dave's ingenuity, we were able to make some ever so slight code changes to support upper and lowercase 8x12 tiles thoughout the game. You really have Hudson to thank for leaving the door slightly open for the good English font potential, and thus localization. _________________ Translation Projects: Xak 3, Ys 4, Ys 1&2 Complete
Boycott XSEED Games! |
|
Back to top |
|
|
Matow Visitor
Joined: 19 Jun 2004 Posts: 8
|
Posted: Wed Aug 16, 2006 12:15 am Post subject: |
|
|
I don't know if there's much of a point to a site dedicated to translating PCE games since Tomaitheous and Dave Shadoff are really the only ones working on anything. 95% of cd games have there text stored like Star Breaker or Startling Odyssey 2. All will use the system card's front for the Kanji and than they'll either use the 2 byte system font for Kana or a 1 byte front for Kana. Generally most of the games only stored one of the Kana fonts and just used a transfer byte to switch between Katakana and Hiragana. A few stored both fonts for the 1 byte kana but I don't really remember how many anymore.
There's a few exception like Ruin that uses a really simple dictionary system but it's mostly just for names and a few Kanji compounds. Neo Metal Fantasy uses a completely different. I don't think it even uses the system font if I remember right. There's also Sol Monarge which I could never figure out it's text storage. I'm not even sure if it's compressed or not. I couldn't even take a save state and find the text decompressed in there like you can for Emerald Dragon, DS LOH2 and some other games with compression. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|