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

Author Topic: Final Fantasy MSX Fonts  (Read 16112 times)

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Final Fantasy MSX Fonts
« on: January 02, 2014, 01:49:12 pm »
I want to make an English translation of Final Fantasy for the MSX but I can't find the fonts within the rom. I've used YY-CHR and a few other gfx viewers. I tried all of the YY-CHR gfx formats and tried adjusting alignment. Does Final Fantasy use some kind of MSX system font or is it a special format?

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7088
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #1 on: January 02, 2014, 03:59:10 pm »
The only time I really looked at MSX graphics, it used a bitplane format, but instead of tile-by-tile interleaving, it is interleaved by the entire bitplane. (that is VRAM 0-0x7FF was plane 1 for all 256 tiles, 0x800-FFF is plane 2 and 0x1000-17FF is plane 3.
It's been years since, but I recall then blueMSX was pretty much the best emulator so maybe it's possible to dump VRAM then look for matching data in the ROM. If it is interleaved by plane that might require a custom tool to dump/insert.
"My watch says 30 chickens" Google, 2018

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #2 on: February 19, 2014, 11:59:08 am »
I tried to open the "MSX-final-fantasy.DSK" disk image but the programs I tried gave errors. rddsk.exe said the disk was corrupt and cut off the last letter of the extensions example: ".PIC" would be ".PI" so it must not be the same disk format

"SAYDOS.2" and "Say DOS Version 1.A0 for MSX series" is in the first sector of the file

Here is what part of the directory looks like:

45 4C 4F 47 4F 20 20 20 2E 50 49 43 98 02 9D 02    format.ELOGO   .PIC˜...
46 4F 4E 54 32 20 20 20 2E 50 49 43 90 02 97 02    FONT2   .PIC..—.
4F 50 45 4E 47 52 50 20 2E 50 49 43 83 02 8F 02    OPENGRP .PICƒ...
45 4E 44 47 52 50 20 20 2E 50 49 43 A6 01 BA 01    ENDGRP  .PIC¦.º.
4D 41 50 44 53 50 20 20 2E 50 49 43 BB 01 C1 01    MAPDSP  .PIC».Á.
46 4F 4E 54 20 20 20 20 2E 50 49 43 C2 01 C9 01    FONT    .PICÂ.É.

It seems like it's FONT.PIC then C2 01 C9 01 with  01C2 being the start address in 512 byte sectors or something.
01C2 as a dec is 450 so 450*512=230400 back to hex is 38400 that address gives me the start of a seemingly common header that is preceded by 0s. 01C9 gives me the start address of the last 512 byte section just before the next maybe header. There is about a line and a half of 0s in the end of the last section but I'm not sure if they go in the file.

Here is what the extracted file header looks like:

05 00 00 00 C8 00 80 00 28 00 00 00 00 00 00 00
00 03 00 00 24 03 77 07 74 05 71 01 70 04 65 02
33 03 33 03 33 03 33 03 33 03 33 03 44 04 55 05
22 22 6B 23 22 22 02 32 22 22 11 22 22 6B 32 23
33 33 02 22 22 11 22 22 6A 23 22 22 02 23 22 22

I'm not sure where the header ends

.PIC makes me think that it is a Designer Plus file but ViewMsx says it's not valid. This could be because I extracted the file incorrectly though.

http://mark0.net/onlinetrid.aspx says:
MATCH:100,0%   EXT:PGC    PGN (Portable Gaming Notation) Compressed format   http://pgn.freeservers.com/
but I'm not sure what to try for that.


If I open the file with YYCHR I get this in MSX 4bpp mode:



Anyone have any clues?

Edit: the first few lines kind of looks like patterns in a .pl7 palette file.

05 00 00 00 C8 00 80 00 28 00 00 00 00 00 00 00
00 03 00 00 24 03 77 07 74 05 71 01 70 04 65 02
33 03 33 03 33 03 33 03 33 03 33 03 44 04 55 05
« Last Edit: February 19, 2014, 08:29:33 pm by Tellah »

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #3 on: February 19, 2014, 06:42:16 pm »
I cannot help with this but I wanted to come in to say I hope you finish this.  I would love to play this version in English.  :)

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 451
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #4 on: February 19, 2014, 08:38:37 pm »
I love your name Tellah! I respect you from that alone. I will throw in my support (of words... not action because I know nothing about MSX Hardware...) along with JCE3000GT. The MSX version of FFI always looked quite interesting and to have it translated would be wonderful.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7088
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #5 on: February 20, 2014, 02:15:02 am »
I cannot help with this but I wanted to come in to say I hope you finish this.  I would love to play this version in English.  :)
OMG THE LOADING TIMES! :P
"My watch says 30 chickens" Google, 2018

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #6 on: February 20, 2014, 05:23:42 pm »
OMG THE LOADING TIMES! :P

I've played tons of PSX and 3DO games, load times don't bother me.  LOL 

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #7 on: February 20, 2014, 05:57:10 pm »
I bet you're not old enough to have played games on tapes  ;D

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #8 on: February 20, 2014, 06:17:55 pm »
I bet you're not old enough to have played games on tapes  ;D

Oh I have.  I am almost 35 you know.   :thumbsup: 

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #9 on: February 20, 2014, 06:47:11 pm »
You have a point :)

I'm 37 myself!

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #10 on: February 20, 2014, 06:57:44 pm »
I tried to open the "MSX-final-fantasy.DSK" disk image but the programs I tried gave errors. rddsk.exe said the disk was corrupt and cut off the last letter of the extensions example: ".PIC" would be ".PI" so it must not be the same disk format

"SAYDOS.2" and "Say DOS Version 1.A0 for MSX series" is in the first sector of the file

Here is what part of the directory looks like:

45 4C 4F 47 4F 20 20 20 2E 50 49 43 98 02 9D 02    format.ELOGO   .PIC˜...
46 4F 4E 54 32 20 20 20 2E 50 49 43 90 02 97 02    FONT2   .PIC..—.
4F 50 45 4E 47 52 50 20 2E 50 49 43 83 02 8F 02    OPENGRP .PICƒ...
45 4E 44 47 52 50 20 20 2E 50 49 43 A6 01 BA 01    ENDGRP  .PIC¦.º.
4D 41 50 44 53 50 20 20 2E 50 49 43 BB 01 C1 01    MAPDSP  .PIC».Á.
46 4F 4E 54 20 20 20 20 2E 50 49 43 C2 01 C9 01    FONT    .PICÂ.É.

It seems like it's FONT.PIC then C2 01 C9 01 with  01C2 being the start address in 512 byte sectors or something.
01C2 as a dec is 450 so 450*512=230400 back to hex is 38400 that address gives me the start of a seemingly common header that is preceded by 0s. 01C9 gives me the start address of the last 512 byte section just before the next maybe header. There is about a line and a half of 0s in the end of the last section but I'm not sure if they go in the file.

Other than $38400 I've found what seems to be another couple of Fonts--one of which may be the other "font.pic." file.  Offset $52000 (4bpp linear) for what seems to be a close duplicate to the font at $38400.  The other location is puzzling...go tp $4F000.  Ideas?

I'm definitely NOT a graphics person so my knowledge is extremely limited.  :(

*edit*
Though I did locate some data already and have played around with it.  :)

« Last Edit: February 20, 2014, 07:33:10 pm by JCE3000GT »

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #11 on: February 21, 2014, 09:21:59 am »
The vram can be opened with tilemolester in 4bpp linear codec in 2 "dimensional" mode with the canvas column width at 32 wide. (Screen5)

The font file seems like a custom or legacy bitmap with rle compression. I might be able to open it with ms paint if I modify the header.

Edit: file format is same as vram with rle compression
« Last Edit: February 22, 2014, 03:41:49 pm by Tellah »

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #12 on: February 22, 2014, 04:05:38 pm »
The vram can be opened with tilemolester in 4bpp linear codec in 2 "dimensional" mode with the canvas column width at 32 wide. (Screen5)

The font file seems like a custom or legacy bitmap with rle compression. I might be able to open it with ms paint if I modify the header.

Edit: file format is same as vram with rle compression

Hmmm ok cool, I will mess with it again. 

I've already got a ton of the game data mapped out myself.  I plan on porting one of my Final Fantasy I hacks I'm working on to both this and the NES version.   

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #13 on: February 24, 2014, 02:33:36 pm »
The code for the text is the same as the nes japan version. They just cut the code into a few parts and worked around it. This means to translate the msx version, all I need to do is paste in the text and gfx from the nes version. The hardest part will be the rle gfx compression. The A-Z takes a lot less space than the Japanese alphabet so I may be able to leave that part uncompressed and manually type in the code for the blank space. That and hopefully the pic header data agrees with it.

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #14 on: February 24, 2014, 03:15:26 pm »
The code for the text is the same as the nes japan version. They just cut the code into a few parts and worked around it. This means to translate the msx version, all I need to do is paste in the text and gfx from the nes version. The hardest part will be the rle gfx compression. The A-Z takes a lot less space than the Japanese alphabet so I may be able to leave that part uncompressed and manually type in the code for the blank space. That and hopefully the pic header data agrees with it.

This is good news and as I expected.  I've already been able to locate huge chunks of data that are almost a carbon copy of FF1 NES.  Now if only I can make the walking faster...  LOL  Having trouble locating that bit.

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #15 on: February 24, 2014, 03:34:48 pm »
I saw somewhere that someone converted the game to work on turbo r but the sound doesn't work. also I might have to convert the text to all caps to make it fit :P

JCE3000GT

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #16 on: February 24, 2014, 05:24:25 pm »
I saw somewhere that someone converted the game to work on turbo r but the sound doesn't work. also I might have to convert the text to all caps to make it fit :P

Well that's better than nothing I suppose.  Is there that little space available for the English dialogue?

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #17 on: February 24, 2014, 07:25:03 pm »
There's plenty of room when compressed and it seems like compressed is my only option.  :huh: does anyone know of a tool that does rle compression?

Quote
    WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW

Run-length encoding can be expressed in multiple ways to accommodate data properties as well as additional compression algorithms. For instance, one popular method encodes run lengths for runs of two or more characters only, using an "escape" symbol to identify runs, or using the character itself as the escape, so that any time a character appears twice it denotes a run. On the previous example, this would give the following:

    WW12BWW12BB3WW24BWW14

it has the two char one

first line
05 00 00 00 C8 00 80 00 28 00 00 00 00 00 00 00
05 screen mode?
C8 200?
80 image width?
28 image height?

next 2 lines
00 03 00 00 24 03 77 07 74 05 71 01 70 04 65 02
33 03 33 03 33 03 33 03 33 03 33 03 44 04 55 05
I duno  :huh: I tried it with all 0s and the game seemed to run fine
compressed code starts
22 22 6B 23 22 22 02 32 22 22 11 22 22 6B 32 23
33 33 02 22 22 11 22 22 6A 23 22 22 02 23 22 22
2 22s triggers a run of 22s that is 6b long. after the 11 a new line starts.
« Last Edit: February 25, 2014, 12:31:55 am by Tellah »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7088
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #18 on: February 25, 2014, 02:01:34 am »
RLE is usually different for each variant.
Fortunately RLE is the simplest compression there is.
So if you can find a compressed sample AND its corresponding decompressed equivalent (like, from a RAM dump), it's usually pretty easy to work out.
"My watch says 30 chickens" Google, 2018

Tellah

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Final Fantasy MSX Fonts
« Reply #19 on: February 25, 2014, 01:07:43 pm »
I have the vram version and can see the algorithm but I'm looking for a tool before I resort to typing it out. It's likely I'd have to type it out more than once if letter are in the wrong place or something.

Edit: I've started to compress the graphics by hand like some kind of primate  :laugh:
« Last Edit: February 26, 2014, 03:00:26 pm by Tellah »