1. Zorbnog

    OP Zorbnog Member
    Newcomer

    Joined:
    Dec 26, 2018
    Messages:
    47
    Country:
    United States
    Hi hi, just making a small update.

    1) My eyes are not liking the colors of this website so aie, that is a bit of a problem. Whatever.
    2) Thank you all for helping out!!!! <3
    3) Love you all.
    4) I can't wait for VK translation!

    Message me for anything. I'll do my best to get updates and reply to messages.

    Zorbnog out!~
     
    PhantomGhost likes this.
  2. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    So I went into the assembly code for the game trying to figure out the .r00 format and I've found the decompression subroutine. It's at 0x2024530 address in the memory.

    Each .r00 file is a sequence of compressed files (sometimes padded with trailing zeroes).

    Compression algorithm is basically one of the LZ variations.
    For every compressed file:
    1. get 3 bytes from input -- that's the total decompressed size
    2. while output size < decompressed size:
    3. get 1 byte from input (let's call it N)
    4. bit 7 not set for N (i.e. N <=0x7F):
    4.1. Copy next [N+1] bytes from input to output
    5. bit 7 set for N (i.e. N > 0x7F):
    5.1 read 1 byte from output (let's call it M)
    5.2 Count = bits 1-5 from N
    5.3 Offset = bits 6-7 from N + all bits from M (10 bits total, see example).
    5.4 Go back for [offset + 1] bytes in the output and copy the next [count + 3] bytes.
    6. go back to step 2

    For example:
    35 = Copy next 0x35 + 1 (54) bytes from input to output
    AB BA =
    1 01010 1110111010
    Go back 0x3BA + 1 (955) bytes and repeat 0xA + 3 (13) bytes from output.

    I'll upload all extracted files and tools I used later this week.
     
    Zorbnog and PhantomGhost like this.
  3. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    Right, so inside those .r00 files I've noticed:
    1. ANCG/ANCL files -- tile sets, palettes for game objects:
    4 byte header, 4 byte data size, [data size] bytes for actual data.

    2. Backgrounds / Large sprites / Image Packs / Image parts -- all use the same structure:
    Header:
    - 4 byte pointer to palette data
    - 4 byte pointer to tile data
    - 4 byte pointer to tileset data
    Multiply by 4 to get actual file offset. Can be zero, meaning there is no such section (explanation below).

    Section (starting from each pointer):
    - 4 byte number of files inside
    - [number of files] x 4 bytes -- offset to section end (again, multiply by 4 to get actual offset).
    - from [current position] until [section end offset] -- file data.

    One file can have several palettes or tile maps inside. Some files don't have anything but one tile set. This is done for swapping parts of a picture with another one:
    [​IMG]
    Kaname's not censored, that's where his face (from other files) will go to during the game.

    3. Font tiles -- there are 2 tile sets for font in 1 binary, one size 8x10, the other one 16x10:
    - 2 bytes unknown value (0x5 for 1st section, 0xA for 2nd)
    - 2 bytes unknown value (0xA for both sections)
    - 2 bytes number of characters.
    - [number of characters] * [character size] character tile data (1 bit color).
    [​IMG]
    [​IMG]

    Still can't find character mappings though...

    4. Don't know what's in
    Flash_data.R00
    GL_SM.R00
     
    Zorbnog and PhantomGhost like this.
  4. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    Turns out jjjewel and CantStrafeRight were right after all.

    This game doesn't store text as plain text in a certain encoding. It stores a sequence of commands to the interpreter. Most important are "change character group" and "get character X from the currently selected character group". It's kind of like inputting your name on the new game screen. You switch between character sets and pick the symbols you need.
    So, for example, 93 6E 74 68 decodes to "z3t" (group 93, symbols 6e, 74, 68), 93 24 92 83 93 33 decodes to "メタル" (group 93, char 24, group 92, char 83, group 93, char 33).

    So I guess there's really no way of making a character table and editing the text with something like crystaltile.

    It is however possible to render all text into images using the font data, mimicking the algorithm from the game. Or if you do manage to make a character mapping table, then you can extract the text in text format.

    [​IMG]
     
    Zorbnog and PhantomGhost like this.
  5. RedL

    RedL GBAtemp Regular
    Member

    Joined:
    Aug 5, 2018
    Messages:
    100
    Country:
    France
    Seeing the first two tables, it seems like VFW is already supported in. Should make the job a bit easier on some parts.
     
    z3tzilla and Zorbnog like this.
  6. PhantomGhost

    PhantomGhost Advanced Member
    Newcomer

    Joined:
    Nov 12, 2016
    Messages:
    63
    Country:
    United Kingdom
    @z3tzilla Wow, thanks for all your hard work!!

    So, if I'm understanding this correctly, a good next step would be to transcribe the font files, like so?

    Is there an ideal way to format this? Right now it's just in a spreadsheet.

    (Also, I suppose given the format there isn't any way to dump the kanji in a standard encoding so that there's a list of them to choose from instead of eyeballing some of it? It would have been a big help, for example in the one above, 79 looks like it should be a small ン , but as far as I know that doesn't exist ^^')
     
    Last edited by PhantomGhost, Mar 23, 2019
    z3tzilla and Zorbnog like this.
  7. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    What's VFW? Variable font width?

    First two groups is a half-width font so it's just regular katakana.

    Yeah, the next step is to transcribe the font files. Spreadsheet format works quite well, actually. I'd put all groups on one sheet for convenience. Maybe add a zoomed in screenshot of that group to the right so you don't have to switch to the image constantly.

    I really hope there's some sort of pattern to the font. Wouldn't it be difficult for developers themselves to maintain that font table? Then again, it was different for every game they made... Maybe they had an analyser that scanned the script and generated the font file...

    Anyway, on character naming screen they have all kanji grouped by its reading ('A' group, 'I' group, 'U' group etc). They've got to store that information somewhere. I'll see if I can find it. At the very least that would help searching the correct kanji for the font.
     
    Zorbnog and PhantomGhost like this.
  8. RedL

    RedL GBAtemp Regular
    Member

    Joined:
    Aug 5, 2018
    Messages:
    100
    Country:
    France
    Yup. Even if it just alternates between full-width and half-width, it's a start since it means the script display function must know the width for each table (or it's hardcoded? dubious) and insert line breaks as needed.
     
    z3tzilla, Zorbnog and PhantomGhost like this.
  9. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    I've uploaded extracted binaries and kanji groups from character naming screen to mediafire. I'll add extracted images later.
     
    PhantomGhost and Zorbnog like this.
  10. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    I was thinking of a way to help us create the font map. OCR software helps, but that still leaves a lot of manual work. While researching for ways to better OCR bitmap fonts with kanji i stumbled across this post. What caught my eye was that the 9x9 font from Etrian Odyssey looked a lot like the one they use here. That gave me an idea.

    They probably used a typical 9x9 font to generate their own character table, right? What if we take another font that uses the exact character graphics which we do know the mappings for? We can then compare the two and find which characters from VK have the same graphics as unicode/sjis characters. Which is exactly what we need.

    So does anybody know any japanese games that use 9x9 1bpp font in an understandable format like ntfr? Etrian Odyssey also has custom encoding, unfortunately. Doesn't have to be exactly 9x9 but the kanji must fit into that box.
     
    Last edited by z3tzilla, Mar 25, 2019
    Zorbnog likes this.
  11. Zorbnog

    OP Zorbnog Member
    Newcomer

    Joined:
    Dec 26, 2018
    Messages:
    47
    Country:
    United States
    I'm so sorry for not seeing all of this... Been so busy. Aaaa.

    I am not an expert so I am not sure what you are saying exactly but it seems like great progress! Phantom and I are going to start to translate the game so that might help a tad. Thanks so much for telling me this!!!

    ....Now back to studying....welp....
     
    z3tzilla likes this.
  12. z3tzilla

    z3tzilla Member
    Newcomer

    Joined:
    Feb 18, 2010
    Messages:
    16
    Country:
    Russia
    Well, that actually worked. I found one game that also has 9x9 font -- "Chocobo to Mahou no Ehon - Majo to Shoujo to 5-Nin no Yuusha" and the kanji are actually the same, so I compared it to VK's font. You can see the results here.
    Now it's only a couple dozen kanji left.

    Still, if you know any other games with 9x9 fonts please tell me.
     
    Zorbnog and PhantomGhost like this.
  13. PhantomGhost

    PhantomGhost Advanced Member
    Newcomer

    Joined:
    Nov 12, 2016
    Messages:
    63
    Country:
    United Kingdom
    That's incredible!!! It sure saves a lot of work :D

    I'm coming to the end of a translation project which is my current priority, but I'm going to make some time to fill in those gaps and hopefully get round to giving everything a quick double check too.
     
    z3tzilla and Zorbnog like this.
  14. LoliChan195

    LoliChan195 Newbie
    Newcomer

    Joined:
    Oct 21, 2018
    Messages:
    7
    Country:
    Australia
    Thank you soo muc z3trilla ☺ itll be hard, but ill take a look again later if i can, since a little while ago beforw i lost all the data i had since my laptop broke and hdd did as well, i was able to find the fonts and some image data in game, so it may be possible to edit the files directly in game
     
    z3tzilla and Zorbnog like this.
  15. PhantomGhost

    PhantomGhost Advanced Member
    Newcomer

    Joined:
    Nov 12, 2016
    Messages:
    63
    Country:
    United Kingdom
    Still finishing that other project, but I’ve filled in the blanks now and started double checking everything!

    I’m using the kanji groups pulled from the character naming screen as a basis for that. I keep getting confused since the game seems to randomly swap between using the on’yomi and kun’yomi so I just decided to skim through the obvious ones, and come back to others I had difficulty finding later. (Hence why you might see a lot of red squares on there for now.)
     
    z3tzilla and Zorbnog like this.
  16. Zorbnog

    OP Zorbnog Member
    Newcomer

    Joined:
    Dec 26, 2018
    Messages:
    47
    Country:
    United States
    Thank you guys for doing all of this!!!

    Just want to say that I will be freer after the 14th (basically) and I can help any way I can! <3 I can also try translating it along with PhantomGhost.

    Thank you guys so much and AAAA I am so happy that we made progress with this project!!!
     
    z3tzilla likes this.
  17. Mirai0000

    Mirai0000 Newbie
    Newcomer

    Joined:
    Jul 17, 2018
    Messages:
    3
    Country:
    United States
    I'm so sorry if I'm bothering but I just can't help but to say something. I simply want to say that I am extremely excited for this project and that I'm rooting for of you all 100%! With as much hard work as all of you are putting in so far you guys just might become the next jjjewel! Haha~!
     
    PhantomGhost, z3tzilla and Zorbnog like this.
  18. Zorbnog

    OP Zorbnog Member
    Newcomer

    Joined:
    Dec 26, 2018
    Messages:
    47
    Country:
    United States
    You aren't bothering us at all!!! Thank you so much for your support!! I truly appreciate it and I believe everyone else appreciates it as well!!! <333
     
    PhantomGhost and z3tzilla like this.
  19. PhantomGhost

    PhantomGhost Advanced Member
    Newcomer

    Joined:
    Nov 12, 2016
    Messages:
    63
    Country:
    United Kingdom
    The good news is that I've finished looking through the font.

    The bad news is that it's... not quite finished >_>'

    About half of the characters in the font don't appear on the character naming screen, so I wasn't able to double-check them as I wanted. Although, I have looked over them to make sure they look accurate at least.

    There are a few kanji left that need to be reviewed, which are marked with an *.

    I should probably say that I am still learning Japanese. Sorry that I couldn't be of more help. m(_ _)m
     
    z3tzilla and Zorbnog like this.
  20. Zorbnog

    OP Zorbnog Member
    Newcomer

    Joined:
    Dec 26, 2018
    Messages:
    47
    Country:
    United States
    We can learn together! :D

    It's alright! A created table is better than no table at all! <3

    Thank you for doing what you are doing!
     
    z3tzilla and PhantomGhost like this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Translation, Vampire, Knight