ROM Hack Vitamin X Evolution - Help wanted

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
Well I wasn't sure if you wanted to go alone or not. If you need help change your first post and the title. Translator looking for hacker(s)... some details here...
It's ok, thanks :) I'd rather go alone because I wanna translate slowly and study as I do it, but I didn't think I could learn romhacking. It's difficult (I've got little programming experience) but now I think I can do it studying a bit. I've got noobish questions still so if I can get these out of the way...

1) What's arm9 for?
2) If ASCII is 1-byte, each japanese character in Shift JIS could be replaced for two alphanumeric characters?

Thanks a lot! :) I'm trying to understand FAST6191's great guides so thanks for everything really!!
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,230
Trophies
2
Location
Tree
XP
3,525
Country
Poland
1) arm9 file is main executable file in every rom, it boot load into ram and stay until you turn ds off... so mainly there's a system text, misc stuff, or for example names of characters, commonly this data are global, and don't should be reloaded during play.
2) exactly, so if there's in arm9 for example 4 Shift-JIS characters, you can use any 8 ASCII characters below 128 value, lets say 32-127
 
Last edited by plasturion,
  • Like
Reactions: Chell

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
1) arm9 file is main executable file in every rom, it boot load into ram and stay until you turn ds off... so mainly there's a system text, misc stuff, or for example names of characters, commonly this data are global, and don't should be reloaded during play.
2) exactly, so if there's in arm9 for example 4 Shift-JIS characters, you can use any 8 ASCII characters below 128 value, lets say 32-127

Got it, super thanks for the answer!
 

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
upload_2017-1-25_22-41-32.png


So I tried to translate it directly to ASCII... it's not difficult but I still do not get why few letters aren't spaced. It's clearly because of the space character I'm using, but which one should I use or what to do now?
 
Last edited by Chell,

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,230
Trophies
2
Location
Tree
XP
3,525
Country
Poland
If you want to use ASCII characters you should prepare font file first.
This set of characters were never used, or might be prepared for special usage.
I tried to extract cpk archive with CriPakTools, there's 2 .nftr font files, but after unpack it seems to be coruppted, no-editable.
It's funny - Header of font file is somewhere inside, but not at beginnig as should be, so I can't edit.
But if you have correctly decompressed that cpk archive try to open .nftr file in Tinke or NFTRedit and check space(20h) character lenght/offset.

Space shouldn't be wider than 3-6 pixels.

also check characters "," , "-"
 
Last edited by plasturion,
  • Like
Reactions: Chell

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
use the quickbms script for the cpk. for repacking maybe use cripacktools. By the time they are ready to insert there may be better criware packers.

edit:
there is that emulator that lets you load from directory the files used in game. which will make it much easier to test while you go.

@Chell Have you mastered dumping the pointers yet?
there is an lba unpacker out there that might be re-purposed for this. I noticed great similarity between the one games lba files and the hunex stuff. As in slight difference and no hunex magic stamp but otherwise very similar.
to make it easier go through each file with ct2 noting the section offsets then use tinke and the pack file option and manually enter the offsets for the sections.
You could also set up a batch file for filecutter that outputs what you need with the help of hexplorer and a spreadsheet. (hexplorer has a reverse byte option and copy as hex which lets you paste it as hex into the spreadsheet). so look up filecutter bat (batch file) copy paste the necessary into a spreadsheet then use hexplorer to supply the offsets down through the spreasheet. copy that into a new bat file and run.
It sounds more compicated then it is but this is alot less time consuming then noting offsets and manually entering them in tinke.
those output files from file cutter or tinke would then be used once again to output pointers offsets for kruptar. then its just a matter of editing. then updating the pointers in those sections then updating the section pointers in the original file. Again sound complicated but really it is not. just tedious.
 
Last edited by rastsan,
  • Like
Reactions: Chell

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,230
Trophies
2
Location
Tree
XP
3,525
Country
Poland
Yes, quickbms unpack cpk correctly. It's really nice depacker. Thanks to know about that.
Chell try listen to rastsan, I always tried to find a workaround for dumping text to make it simpler,
but it might be worth to learn that first if you think about translation serious.
I found a way to ommit pointers completly and created one text file, I made an inserter which will seek strings and replace in binary, it just send textfile to binary, no numbers needed, maybe it sound simple but dump counsume much time, but once is done, Inserting is few seconds, redump too, it's not best way thought.
and there's limitation, translated text can't be longer than japanese string.
I have to learn about pointers too.
You can download some spreadsheet from romhacking.net. look for 7th dragon.

I checked that font file and ascii characters are tiny and has constant lenght 10.
It might be a reason.

Maybe game has own formating procedure and just try to fit two times more character into the same text lines. that's why tring to skip some spaces. Try to change fonts lenghts or check how it looks from different rom where's not constant. You can copy this part character set to current fontfile while extracting png, edit in some graphic editor and change values lenght, size values in fonteditor.
 
Last edited by plasturion,
  • Like
Reactions: Chell

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
@plasturion @rastsan Thanks!

@plasturion I get it but I wanted to understand logically why the game's normal halfwidth font would do that... I found it odd because the VN eventually has English text written in fullwidth characters, and when I type like this with half width characters the font gets jumbled specifically right after the space so I thought there'd be a reason... and if I wanna change the fonts I gotta understand this anyway. I still can't go around editing these things so I was curious. (In summary I thought I should understand it before editing the fonts but you're telling me I should try editing it and find it..)

@rastsan I did reading on pointers but I didn't try using an editor like kruptar yet. So I'll share how it's going later.
Btw, I searched for LBA unpacker but I found nothing so I wanted to ask what does LBA stand for? Sorry if this is a noobish question.

(lol I can't write today sorry... )
 
Last edited by Chell,

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
Okay for the font don't bother - find one you like (as in windows ttf) and just get CT2 to build it for you in the right size (under Tools - nftr editor). (be sure you have the right size before you build it). or edit the font in tinke as it has a width editing feature PER letter.

as to making tools... what programming language are you using?
the one lba tool is in python. You don't need to build a tool just use kruptar and manage the insertion in file with a plugin. As those dumped strings have headers before the text that I did not take the time to look into too much I just dumped text and thought to come back to this later. (there could be string length in there i don't know). Those two unknown values before the pointers could be anything they need to be corrupted then played in game to see what happens when the value is made bigger or smaller. if the text is longer on screen then they are length. If the text on screen (for that text pointer) are in a different position its coordinates... which will actually help translation ALOT. as that would mean that pointer order may not have anything to do with it and its about location of the text on screen that matters...
I may be making this more complicated then I need to.
even then romhacking.net has tools already for just this thing. there is a sjis dumper with a end byte spec out there other app that as long as you know where the pointers are and how they are formatted they dump them. (I already mentioned this earlier)
honestly it won't take you too long to dump the pointers. (I would do it... really I would... )
its just a matter of figuring those other things out.
(I could go on and on... sigh time to stop bothering you)
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,230
Trophies
2
Location
Tree
XP
3,525
Country
Poland
yes you are right... logically and actually it gives nothing...
I used to change things to break/fix and find a reason, but maybe here is useless.
lenght halfwidth characters in font file is the same like other fullwidth - 10.
I guess next offset value is ignored, and this might be calculated during loading,
so changing this value give nothing.

Every games has own displaying text procedure, I'm not familiar with VN i guess.
As i noticed main issue is - characters like space, "-" "," "." it just mess everything becouse of spacing.
I found "first prologe" in hexeditor and 2byte fullwidth space is used, so I think unfortunelly you have to use 2byte space for this game.
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
That is why I said it will be interesting what comes up in play as it means one font is being used and that will help determine what those values are. It could be a font control code before the text - #controlcode text or controlcode# in section of section name text... (again sound more complicated but not really)

as the non text section within the sections have #(unknown bytes)#section name data.
okay can you guys give me the very first text you see in game that isn't graphical I got an urge to test things.
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,230
Trophies
2
Location
Tree
XP
3,525
Country
Poland
yes.. first text that isn't graphical is on that screenshot above - "first prologue" and space is 2 byte there. I didn't test things too lazy sorry, but I think it seems that they spaced 1byte ascii characters (32-64) on purpouse to not use them becouse of use part of them as controle codes - like "@n" - newline.

Summary - fontfile has parameters - like width, space for every character.
And this values should be loaded.
When we compare space characters, 1byte(20h), and 2byte(81h (forgot)h) in fontfile - they are the same characters with the same parameters, but acting different one is shorter then second.
technically we have to check is it allow to change font to different one, becouse even fontface can be loaded from file, I wonder if parameters for that font are hardcoded somwhere else, wich is odd, and then will be need to find where's that font width every character values are, maybe arm9 or somwhere else. Maybe at least Shift-JIS characters are fully loaded with all parameters that would be lucky, but otherwise - I guess debugger using skils /asm will be needed If we want to change font. This need just check it out/testing for now.
 
Last edited by plasturion,

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
@rastsan I don't use any lol. But Python is the single programming language I can at least understand a bit so I'd wanna check it. But if it's not needed for the fonts I think it's better to try Kruptar. Although for one reason or the other, I'm having trouble using Kruptar w/ Vitamin X so I still couldn't check it... hopefully I'll figure out later.
Thanks for telling me about the pointers, so I'll try finding lengths too next step. :) I highly doubt it could be coordinates since it's a visual novel so the majority of texts are positioned in the same starting point? It doesn't sound too economic, but really idk.
I'll check the SJIS dumper too, thanks! Must've missed the tip since I didn't get it before.
And please don't worry you two are not bothering me anyway, it's all helpful since I'm a beginner there :)

@plasturion 2 byte space is being used in-game huh. Thanks a lot for telling me!
Also I can understand that but @n doesn't keep me from using halfwidth letters - I did it on the screenshot above. So changing the space should at least get it working.

@plasturion and @rastsan Actually before the VN texts there's an "insert your name" screen so I guess that'd be the first non-graphical text, right? And before you start the game there's always a random message from one of the characters. So Idk which would be the first one.
I did partially dump the prologue's text on the Wikia so you could search it using a SJIS table maybe? Sorry if I got it wrong!
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
Problems with kruptar?
set the source rom as the file (not the actual nds rom so each file in the vitamin_scr folder would get its own new kruptar project) mostly beacause you would need to do some math on the pointers to keep them relative to each files pointers in the nds rom itself. which is way way more work then is needed.
the destination rom as a copy of said file in said vitamin_scr folder
the table file when adding new groups of pointers is table1 and one below table 2(not the same as the table file with the characters in it ... please feel okay at being confused by that..) table one pointers is the source pointers table 2 is the destination pointers. To be clear pointer table 1 and 2 and character table file.
Kruptar does not update the pointers in file unless you specify it. it lets you insert into given memory ranges and uses that to update the pointers (into table2) when you click recalculate and re-insert all. you need to know where they start and where the pointers end. If you go over that memory range it gives you an error. I only used kruptar to dump the text according to the pointers and make it easier to watch your line limit. at the bottom of the insert box is a size box watch that if you go over the original size alot you will not be able to fit it into the old space.
again do not worry about this right now as what needs to be tested is an updated much larger file with multiple text sections that have gotten larger and HAD to be repointed - as in everything was repointed except for the first sections start.
again its a great tool but I simplified its use greatly by importing directly by dumping the pointers myself.


as to positioning its top screen and bottom screen and where on the top/bottom screen. So yes somewhere in this game has this whether its in the ika files or just a general in the arm9 thing ... either way need to fiddle with those unknowns and see what happens.
Why is this important well change where in the text box the text appears with a smaller width font and you now have 1 or more extra letters per line to display on screen. change the graphic text box itself in combination with this and you could make that more.
not only that but finding this could also help in finding the asm for the font routine itself. even then ct2 did have that feature I just never mastered the use of that changes nftr fonts screen space wise.
again the fonts can be replaced. Pick a TTf you like and make one (one that is free to use) or use tinke and edit the character width. I haven't tried a font replace yet but I will later. (I kinda wanna see some horror story like font just for the heck of it)

that prologue text will help.
Again the forum is here to ask questions... if you are not getting it ask away (I have a few I would laugh at now posted over a decade ago).
 

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
Problems with kruptar?
set the source rom as the file (not the actual nds rom so each file in the vitamin_scr folder would get its own new kruptar project) mostly beacause you would need to do some math on the pointers to keep them relative to each files pointers in the nds rom itself. which is way way more work then is needed.
the destination rom as a copy of said file in said vitamin_scr folder
the table file when adding new groups of pointers is table1 and one below table 2(not the same as the table file with the characters in it ... please feel okay at being confused by that..) table one pointers is the source pointers table 2 is the destination pointers. To be clear pointer table 1 and 2 and character table file.
Kruptar does not update the pointers in file unless you specify it. it lets you insert into given memory ranges and uses that to update the pointers (into table2) when you click recalculate and re-insert all. you need to know where they start and where the pointers end. If you go over that memory range it gives you an error. I only used kruptar to dump the text according to the pointers and make it easier to watch your line limit. at the bottom of the insert box is a size box watch that if you go over the original size alot you will not be able to fit it into the old space.
again do not worry about this right now as what needs to be tested is an updated much larger file with multiple text sections that have gotten larger and HAD to be repointed - as in everything was repointed except for the first sections start.
again its a great tool but I simplified its use greatly by importing directly by dumping the pointers myself.


as to positioning its top screen and bottom screen and where on the top/bottom screen. So yes somewhere in this game has this whether its in the ika files or just a general in the arm9 thing ... either way need to fiddle with those unknowns and see what happens.
Why is this important well change where in the text box the text appears with a smaller width font and you now have 1 or more extra letters per line to display on screen. change the graphic text box itself in combination with this and you could make that more.
not only that but finding this could also help in finding the asm for the font routine itself. even then ct2 did have that feature I just never mastered the use of that changes nftr fonts screen space wise.
again the fonts can be replaced. Pick a TTf you like and make one (one that is free to use) or use tinke and edit the character width. I haven't tried a font replace yet but I will later. (I kinda wanna see some horror story like font just for the heck of it)

that prologue text will help.
Again the forum is here to ask questions... if you are not getting it ask away (I have a few I would laugh at now posted over a decade ago).
Thanks a lot! :)

Actually my problem w Kruptar is actually using it, it's freezing somehow. But yea I'm really interested in trying to use it; I opened the files you sent in Kruptar and everything was ok. Thanks a lot!

Oh. so CT2 is really great for editing NDS games/fonts, huh. I'll try to do it! Thanks!
 

Chell

Member
OP
Newcomer
Joined
Dec 18, 2016
Messages
20
Trophies
0
Age
30
XP
55
Country
Brazil
No, I meant that I'm too lazy to learn 10000+ japanese exclusive symbols.
But with Hiragana and Katakana I'm goooooooood ^_^
Oh! lol! Do try to learn using flashcards whenever you're in the bus or something, it makes a big difference. I enjoy kanjiplus.com but there are others. Go on playstore/appstore and search for flashcards kanji learning method. Learning by radicals is pretty simple too. Try to memorize 5 radicals/day as you'd do hiragana or katakana. In few months you'll see all there's to memorize are combinations of radicals so it's easier to memorize by translating. Gl!

Lately I'm working on other things (namely trying to get employed and having classes again...) and am unable to progress w the Vitamin X translation. I'll do a translated LP in the meantime but romhacking is a bit consuming so *maybe* not in a month or so. But we'll see. Thanks everyone so far I'm enjoying everything I'm learning. :)
 
Last edited by Chell,

Gizametalman

Banned!
Banned
Joined
Dec 18, 2015
Messages
974
Trophies
0
Age
30
Location
D.F. - Zona Cero.
XP
730
Country
Mexico
Oh! lol! Do try to learn using flashcards whenever you're in the bus or something, it makes a big difference. I enjoy kanjiplus.com but there are others. Go on playstore/appstore and search for flashcards kanji learning method. Learning by radicals is pretty simple too. Try to memorize 5 radicals/day as you'd do hiragana or katakana. In few months you'll see all there's to memorize are combinations of radicals so it's easier to memorize by translating. Gl!

Lately I'm working on other things (namely trying to get employed and having classes again...) and am unable to progress w the Vitamin X translation. I'll do a translated LP in the meantime but romhacking is a bit consuming so *maybe* not in a month or so. But we'll see. Thanks everyone so far I'm enjoying everything I'm learning. :)

Yes that's what I've been told in a English/Japanese facebook group.
That Kanjis should and must be learned by radicals.
I have some tools though.
Like: Kanji Sonomama Rakubiki Jitten to translate kanjis using my 3DS.
And: Aedict dictionary in my smartphone to translate words from english to japanese.

The thing is that, I have a thing for languages, and I much rather to keep learning French, Italian, Portuguese, German, Russian, Latin and Esperanto than learning Japanese only, I've had enough of it for now.

Greetings, it's good to meet someone who's had the needed experience with this complicated and unique language.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: @K3Nv2, try SanDisk format tool?