ROM Hack Vampire Knight DS Game Translation

Zorbnog

Well-Known Member
OP
Newcomer
Joined
Dec 26, 2018
Messages
57
Trophies
0
Location
Zervus, Zorbnog
XP
297
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!~
 
  • Like
Reactions: PhantomGhost

z3tzilla

Member
Newcomer
Joined
Feb 18, 2010
Messages
16
Trophies
0
XP
171
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.
 

z3tzilla

Member
Newcomer
Joined
Feb 18, 2010
Messages
16
Trophies
0
XP
171
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:
YSVSqy9.png

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).
Y6jdnVN.png

VfZUsgU.png


Still can't find character mappings though...

4. Don't know what's in
Flash_data.R00
GL_SM.R00
 

z3tzilla

Member
Newcomer
Joined
Feb 18, 2010
Messages
16
Trophies
0
XP
171
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.

DvbBgdi.png
 

PhantomGhost

Well-Known Member
Member
Joined
Nov 12, 2016
Messages
163
Trophies
0
Website
agtteam.tumblr.com
XP
1,157
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,

z3tzilla

Member
Newcomer
Joined
Feb 18, 2010
Messages
16
Trophies
0
XP
171
Country
Russia
Seeing the first two tables, it seems like VFW is already supported in. Should make the job a bit easier on some parts.
What's VFW? Variable font width?

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 ^^')
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.
 

z3tzilla

Member
Newcomer
Joined
Feb 18, 2010
Messages
16
Trophies
0
XP
171
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,
  • Like
Reactions: Zorbnog

Zorbnog

Well-Known Member
OP
Newcomer
Joined
Dec 26, 2018
Messages
57
Trophies
0
Location
Zervus, Zorbnog
XP
297
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....
 
  • Like
Reactions: z3tzilla

z3tzilla

Member
Newcomer
Joined
Feb 18, 2010
Messages
16
Trophies
0
XP
171
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.
 
Joined
Oct 21, 2018
Messages
7
Trophies
0
XP
98
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
 

PhantomGhost

Well-Known Member
Member
Joined
Nov 12, 2016
Messages
163
Trophies
0
Website
agtteam.tumblr.com
XP
1,157
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.)
 

Zorbnog

Well-Known Member
OP
Newcomer
Joined
Dec 26, 2018
Messages
57
Trophies
0
Location
Zervus, Zorbnog
XP
297
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!!!
 
  • Like
Reactions: z3tzilla

Mirai0000

New Member
Newbie
Joined
Jul 17, 2018
Messages
3
Trophies
0
XP
143
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~!
 

Zorbnog

Well-Known Member
OP
Newcomer
Joined
Dec 26, 2018
Messages
57
Trophies
0
Location
Zervus, Zorbnog
XP
297
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~!

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

Well-Known Member
Member
Joined
Nov 12, 2016
Messages
163
Trophies
0
Website
agtteam.tumblr.com
XP
1,157
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
 

Zorbnog

Well-Known Member
OP
Newcomer
Joined
Dec 26, 2018
Messages
57
Trophies
0
Location
Zervus, Zorbnog
XP
297
Country
United States
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

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!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/eJV6GaIEgd4?si=ciLPnlhfd7XcrxQn