Hacking Hayarigami(流行り神) Series Translation

M@sher

Member
OP
Newcomer
Joined
Jan 27, 2016
Messages
5
Trophies
0
Age
28
XP
78
Country
Netherlands
Hi everyone!
I'm new here so I'm sorry if this is not the right way to request help.
I can translate as I have a pretty good understanding of the Japanese language, as a Game Art student I can edit videos and images as well, but other than that I can't do any of the programming/coding related things.
Anyway, I'm looking for programmers, coders, translators (Jp>En) and testers to translate and release a patch for the Hayarigami series, as we probably will never get a release over here.

For those who don't know, the Hayarigami(流行り神) series is a horror visual novel series in which one plays a detective that solves supernatural crimes related to Urban Legends, as the name means "Sudden Popular God"
Here's the trailer of the first game:


One may know this series already due to GirlGamerGab's playthrough of the most recent game, Shin Hayarigami(New Sudden Popular God) for the PSVita:


Preferably I'd like to translate all 3 PSP games and the new Vita game if possible, as it is my first translation project I don't know a lot about how these things work, but somehow I'd like to bring this game to a Western audience and maybe even make a PC version if possible.
If someone could rip the text then I could already start translating as soon as today.

Thank you very much for your interest, if you have any free time and/or interest please help!
Hayarigami Series.png
 

AttackOtter

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
357
Trophies
0
Age
29
XP
1,376
Country
United States
I looked into the first game, and I believe the scripts are stored in the tp####.dat files. Since this is a Nippon Ichi title, I looked into decryption of some of their other PSP titles, but the few NIS .dat file extractors failed to work. It seems this either uses a completely different kind of encryption, or an even older version that the newer games left behind a long time ago.

Unfortunately this was also their first PSP title, or rather, port, so it's unlikely that we'll find a preexisting tool that will be able to extract the scripts. Your best bet would be to try asking around or PMing people who've done hacking work on some of the PSP NIS games before. If all else fails, you could use a text hooker to manually extract the text and start translating while you ask around for help.
 

M@sher

Member
OP
Newcomer
Joined
Jan 27, 2016
Messages
5
Trophies
0
Age
28
XP
78
Country
Netherlands
First of all thank you for replying, secondly that's quite unfortunate then, I suppose if there is no other choice I could potentially just put a translated silent playthrough online but patching the game itself would be the preferered option.

Since the first two Hayaragami games have DS games too it could also be a possibility to patch those, so I'll look into that too, to see whether it's less of a hassle to patch those.

Anyway, once again thank you for your reply and your time!
 

thexyz

Active Member
Newcomer
Joined
Jan 8, 2014
Messages
40
Trophies
0
Age
54
XP
180
Country
Serbia, Republic of
If somebody wants to take a look, the text's in .dat files (e.g. start.dat), encoded as shift-jis and "encrypted" with bit inversion.
so for example 76427d336eb06d8a7d547d1f7d377d527ebe7d5f7d166c057ebe6c346ead7d447d4e7d366e4972227d487d1671566a557ebd becomes 89bd82cc914f927582ab82e082c882ad814182a082e993fa814193cb915282bb82b182c991b68ddd82b782e98ea995aa8142 which is 何の前置きもなく、ある日、突然そこに存在する自分。 in shift-jis
 

AttackOtter

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
357
Trophies
0
Age
29
XP
1,376
Country
United States
@M@sher
The DS games would definitely be easier to do since DS hacking is in general supposed to be a lot simpler than PSP hacking, so starting the translation with that might be a step in the right direction (getting the scripts at the very least would be good)

@thexyz
Oh, that's actually pretty convenient compared to a wildly unknown encryption scheme, although how would someone go about "unencrypting" the files, or extracting the text?

Edit: Looked into TP001.dat using a hex editor and it apparently has an ascii text table right at the beginning. Not really sure what else to do though
 
Last edited by AttackOtter,

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
You have to learn programming.
Most languages have two built-in functions. If not, you can make your own quite easily.
chr(val) -> val must be 0..255 and it gives the corresponding string value. You can see the table for which numbers correspond to which letters at asciitable.com.
ord(chr) -> chr must be a string of length 1 and it gives the ordinal, the number that corresponds to that character.

So then, for each character:
read the character
convert it to ordinal (ord)
compute 255 minus ordinal (this calculation flips the bits - I'm not exactly sure why that is, though)
convert the new ordinal back to a character (chr)
write the character

I tried a few different files and only saw text in start.dat. start.dat is 5,200 kB, it seems to be about half text. So the whole script might be in that start.dat, it's definitely big enough to have a whole game worth of text in there.
And then if you look at the unflipped version, you see a TOC at the beginning that goes filename, offset, filesize. The 0x22 right at the beginning means there are 0x22 (34) entries. So you can use this data to unpack into sub-files.
The other .dat files use a different format that doesn't have the TOC.
 

AttackOtter

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
357
Trophies
0
Age
29
XP
1,376
Country
United States
You have to learn programming.
Most languages have two built-in functions. If not, you can make your own quite easily.
chr(val) -> val must be 0..255 and it gives the corresponding string value. You can see the table for which numbers correspond to which letters at asciitable.com.
ord(chr) -> chr must be a string of length 1 and it gives the ordinal, the number that corresponds to that character.

So then, for each character:
read the character
convert it to ordinal (ord)
compute 255 minus ordinal (this calculation flips the bits - I'm not exactly sure why that is, though)
convert the new ordinal back to a character (chr)
write the character

I tried a few different files and only saw text in start.dat. start.dat is 5,200 kB, it seems to be about half text. So the whole script might be in that start.dat, it's definitely big enough to have a whole game worth of text in there.
And then if you look at the unflipped version, you see a TOC at the beginning that goes filename, offset, filesize. The 0x22 right at the beginning means there are 0x22 (34) entries. So you can use this data to unpack into sub-files.
The other .dat files use a different format that doesn't have the TOC.

I hope this doesn't sound rude or anything, but I don't exactly have any experience with that, so I don't understand the process. I understand the flow of it, but I don't have any programming experience outside of game development tools like Unity, Gamemaker, Renpy, and others.
 

thexyz

Active Member
Newcomer
Joined
Jan 8, 2014
Messages
40
Trophies
0
Age
54
XP
180
Country
Serbia, Republic of
compute 255 minus ordinal (this calculation flips the bits - I'm not exactly sure why that is, though)

That's a good observation, and here's why: The numbers are (usually) represented using a system called two's complement (you can google it)
As a result, -x equals bit inversion of x plus one:

Code:
-x = ~x + 1
and as such
255 - x = ~x + 256
and since we're operating on bytes
255 - x = ~x
 
  • Like
Reactions: flame1234

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
957
Country
United States
I hope this doesn't sound rude or anything, but I don't exactly have any experience with that, so I don't understand the process. I understand the flow of it, but I don't have any programming experience outside of game development tools like Unity, Gamemaker, Renpy, and others.
Well, there's no time like the present!
Download Python 3.5: https://www.python.org/downloads/
You can run it at the command line or in IDLE which is kinda like a Python IDE.
Type at the prompt or paste it in:
Code:
print('Hello, world!')
The next one is:
Code:
[x for x in range(10)]
Last one. You might want to type this one in rather than pasting the first time, just so you see how it works. You have to push enter twice as well after the last line.
Code:
for x in range(10):
    print('Hello, world!')
You can also try experimenting with ord and chr. In Python, these are built-in functions, which means you can always make use of them no matter the situation.
You can also try using Python as a calculator program: https://docs.python.org/3/tutorial/introduction.html
I actually do use Python as a calculator program. It has a feature that most calculator programs don't, that it leaves up on the screen previous calculations and results, which I like.
Next is to figure out reading and writing from files; you can use a google search to figure it out quite easily.
After that you'll be about halfway there.
 

M@sher

Member
OP
Newcomer
Joined
Jan 27, 2016
Messages
5
Trophies
0
Age
28
XP
78
Country
Netherlands
I'm trying to wrap my head around all the programming related things but as I thought, no matter how I look at it it isn't really sinking in, I guess programming really isn't my thing (´~`;)

The game starts out with a video with text and then gets to the introduction, which presents the following text that thexyz got after decrypting the file, except that starts out with 「ここは........どこだ?」 before it gets to that part, at least for the DS version that is I don't remember if the PSP version had the same.
If somebody wants to take a look, the text's in .dat files (e.g. start.dat), encoded as shift-jis and "encrypted" with bit inversion.
so for example 76427d336eb06d8a7d547d1f7d377d527ebe7d5f7d166c057ebe6c346ead7d447d4e7d366e4972227d487d1671566a557ebd becomes 89bd82cc914f927582ab82e082c882ad814182a082e993fa814193cb915282bb82b182c991b68ddd82b782e98ea995aa8142 which is 何の前置きもなく、ある日、突然そこに存在する自分。 in shift-jis

Thank you! I can't find start.dat with chrystaltile in the .nds file though, additionally in that file there are a bunch of .tx2 files which seem to be text as well, it's strange.
As for a tl, seeing the context of the rest of the conversation it means "Without any kind of introduction, one day his 'self' suddenly existed there." or "Without any kind of introduction, he found himself suddenly existing one day." as that sounds better in English.
There's a UI in which you can change the character's name in that scene, I don't know how much space those generally take and how one would go about programming it in a way so only the Western signs remain remain.
Also there's a lot of images and videos which will need to be edited as they contain text but those seem to be encrypted as well.

Since I don't get it at all what's the better course of action? For the programmers to decrypt the text and then for me (and other translators if anyone is interested) to translate that and then for the programmer to re-encrypt that again or would it be better if I just sent translated text over to the translator so they wouldn't have to decrypt everything? Sorry if it's a stupid question, it's just the first time I'm translating a game.
 

AttackOtter

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
357
Trophies
0
Age
29
XP
1,376
Country
United States
I'm trying to wrap my head around all the programming related things but as I thought, no matter how I look at it it isn't really sinking in, I guess programming really isn't my thing (´~`;)

As for a tl, seeing the context of the rest of the conversation it means "Without any kind of introduction, one day his 'self' suddenly existed there." or "Without any kind of introduction, he found himself suddenly existing one day." as that sounds better in English.

Since I don't get it at all what's the better course of action? For the programmers to decrypt the text and then for me (and other translators if anyone is interested) to translate that and then for the programmer to re-encrypt that again or would it be better if I just sent translated text over to the translator so they wouldn't have to decrypt everything? Sorry if it's a stupid question, it's just the first time I'm translating a game.

I'm not a translator, but I can help with writing and localizing the script to make it read well in English beyond a 1:1 translation.
"Without any kind of introduction, he found himself suddenly existing one day." I don't know the context exactly because I don't know Japanese on a decent level but I was thinking it could be written as "Before he was conscious of himself, he found himself existing." although there are other ways to write it.

And yeah, the programming stuff is giving me a headache haha. Don't really get it I guess.

Edit: It would definitely be necessary to have the files decrypted before any kind of text insertion could happen. And for working with others, you'll want to make a spreadsheet with the Japanese text for you and the translators/writers to work on together.
 
Last edited by AttackOtter,

M@sher

Member
OP
Newcomer
Joined
Jan 27, 2016
Messages
5
Trophies
0
Age
28
XP
78
Country
Netherlands
Oh that would be nice! I think that translation would work as well! The introduction starts out kind of like a fairytale, or urban legend, in the 'once upon a time'/'one day' kind of way.
It starts with the main character waking up/gaining concsiousness in a dark cramped room and suddenly becoming aware that he's there and that he's conscious. The first text boxes were about how when he does everything comes flowing back to him and it seems as if his body was activated as if it were a machine that was hibernating before, I think it was something like that. Afterwards a 'demon's voice' speaks to him about urban legends. The cases seem to be stories told in that room.

Glad that someone who does have more programming experience is confused too and I'm not a complete idiot lol.

Anyway, in that case a google drive spreadsheet would work well, I guess my question was whether first to decrypt everything and then translate all the decrypted data or whether to start ripping the text with a text hooker now and translate while the programmers are busy decrypting it. Thinking about it, it was a bit silly as it would be not very efficient timewise to translate only after everything's been decrypted :P

I'm not sure if any DS emulators have working text hookers (The sound is pretty awful on DeSmuME with this game), I know that it should be possible for PSP emulators, the text should be the same so that shouldn't be too big of a problem. I'll figure out how to make that work, I just wanted to know if it was even possible to hack this game before I started with the translation.
 

AttackOtter

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
357
Trophies
0
Age
29
XP
1,376
Country
United States
I'm not sure if any DS emulators have working text hookers (The sound is pretty awful on DeSmuME with this game), I know that it should be possible for PSP emulators, the text should be the same so that shouldn't be too big of a problem. I'll figure out how to make that work, I just wanted to know if it was even possible to hack this game before I started with the translation.
Sounds good! Text hooking the PSP version should be easy. Oh, and to clarify, what I wrote isn't so much a translation as a localization of the line. It goes from being a strict translation of it to having the same sort of feeling without necessarily using the same exact words.

Edit: And if it comes down to it there's always the PS2 version of the game.
 
Last edited by AttackOtter,

Skelletonike

♂ ♥ Gallant Pervert ♥ ♀
Member
GBAtemp Patron
Joined
Dec 26, 2008
Messages
3,433
Trophies
3
Age
32
Location
Steam City
XP
2,684
Country
Portugal
Well, just noticed this thread but this seems pretty interesting.
Didn't know about this series before, but it seems pretty interesting from the plot you mentioned.

Wishing good luck with it is all I can do though. x.x
 

M@sher

Member
OP
Newcomer
Joined
Jan 27, 2016
Messages
5
Trophies
0
Age
28
XP
78
Country
Netherlands
It is pretty interesting!

A small update note; At the moment this project is rather, dead, as well I can't get the text hooker to hook the game's text, so I'm depending from outside help from people experienced with the Visual Novel Reader program at the moment. If I could get the H-code I'd be able to start working, but until then I'm afraid it's halted.

What I could do is translate the Audio drama as those are pretty interesting as well, they're short bonus stories that come with the game.
 

hypericum4

New Member
Newbie
Joined
Aug 1, 2017
Messages
1
Trophies
0
Age
36
XP
41
Country
United States
Well, I can't send a message without posting 10 times, so I'll have to do it here, so sorry for reviving such an old thread. Unfortunately, I know little to nothing about programming and dumping text, even with a program, but I'm trying to learn now. I am working on translating this game, specifically Hayarigami 2, in my free time. I have some of 黒闇天 and about half of 予知夢 translated. I guess it would make sense to start from the beginning, but besides the artwork being better in the first game, I think the writing and character interaction is the strongest the 2nd game of the series. If you, or anyone else, is still interested in this game, let me know as I'll continue working on this throughout the year and hopefully can get one or more of the scenarios finished. Unfortunately since I can't take the text out of the game myself, for now, I've been typing it out on to my computer as I play, which can be extremely tedious given that this game has short branching paths and then a major two way split when you choose between Scientific or Occult routes. 3 is actually the easiest to do this way, since after you finish a route you can got back and start from any area, as long as you don't die. Anyway, I hope that someone sees this and is interested in this because I'm going to keep translating this until it's finished. Maybe I'll just do what the youtube guy did and have it subbed over that game. But if you can't play it, what's the fun it that? I really would love to share this game series with a lot of people because it is one of the most interesting and well written stories that I have come across in Sound Novels/Visual Novel (or whatever you want to call them) next to Machi.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    HiradeGirl @ HiradeGirl: :discuss: