[Game] Neon Genesis Evangelion 2: Another Cases

For talking about everything else Evangelion: from the various manga and video games to merchandising and video/audio releases.

Moderator: Board Staff

Sailor Star Dust
Kept you waiting, huh?
Kept you waiting, huh?
User avatar
Age: 32
Posts: 22671
Joined: Aug 13, 2006
Location: Living in Houston, TX
Gender: Female
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Sailor Star Dust » Mon Jan 08, 2018 4:19 pm

Whoa, looks like y'all got awesome stuff going on here! I hopped onto the forums by chance (Just noticed my PMs).

The technical lists in the GitHub goes over my head (I have limited free time currently, too), but I wish you luck on this project :heart: From what I can gather, those lists are various data from the game? Scenario titles/summaries, in-game locations, character actions like "____ (name)" combined with "_____ (action)", etc. Might even be some CI-related info, if I read that right in the second Github link.
~Take care of yourself, I need you~

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Tue Jan 09, 2018 7:21 pm

View Original PostSailor Star Dust wrote:From what I can gather, those lists are various data from the game? Scenario titles/summaries, in-game locations, character actions like "____ (name)" combined with "_____ (action)", etc.


Yes, the "interface-text" is mostly stored in the game code; The CI stuff I'm sure is in a separate file. If there's any of it on the repo, might be a duplicate?
The text in the game is scattered across 3 types of formats:
1 - Built into the game code (this is what's on the repo)
2 - Compressed using a yet unknown/possibly-proprietary compression algorithm (always a pain to reverse engineer), stored outside of the game-code
3 - Plain Shift-JIS (Which I think is what the CI stuff was stored in), stored outside of the game-code

Ultimately I'd also like to #2 as well and to also crack the storage format for the pictures.

In other news,I've added a script for generating cheat codes if one were to modify the *_translate.py files:

Code: Select all

$ ./generate_translate_cwcheat_codes.py
_S ULJS-00064
_G Shinseiki Evangelion 2: Tsukurareshi Sekai - Another Cases
_C1 Translate 1
_L 0x20254A00 0x00006F4E
_L 0x202549F8 0x00736559
_L 0x201B5540 0x20736559
_L 0x201B5544 0x00006F4E
In and of itself, self-evident.

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Thu Jan 18, 2018 3:34 am

So like a week ago or so I found the game's decompression routine, it's at: 0x08807068
Register a0 is the input buffer
a1 is output buffer
and a2 is the decompressed size

I've been trying to transcribe it since then to run it stand-alone.
The algorithm is weird as eff, and as such my transcription has bugs.

But for now here's a little taste of alfa.hpt decoded, which is stored in umd0:/PSP_GAME/USRDIR/game/title.har
Image

Nothing big, just the alpha systems logo, but baby steps for now.
And course there's more work needed post-decompression to re-assemble the actual image since it's in a tiled format, but slow and steady.
In and of itself, self-evident.

katouhayato
Embryo
User avatar
Age: 29
Posts: 3
Joined: Jan 20, 2018
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby katouhayato » Sat Jan 20, 2018 1:51 am

Registered just to post here-- this is such a great project, and I want to thank you whole-heartedly for attempting to take it on! I ended up with this game last year and managed to play through it, but it was a bit painstaking to use my limited Japanese. Kanji dictionary and gamefaqs became my good friend. I would jump right in and help if my skills were a little less rusty and I had more time, for sure. Looking forward to hearing more about the progress!

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Sun Jan 21, 2018 1:01 am

View Original Postkatouhayato wrote:Registered just to post here-- this is such a great project, and I want to thank you whole-heartedly for attempting to take it on! I ended up with this game last year and managed to play through it, but it was a bit painstaking to use my limited Japanese. Kanji dictionary and gamefaqs became my good friend. I would jump right in and help if my skills were a little less rusty and I had more time, for sure. Looking forward to hearing more about the progress!


No problem, and welcome!

So the decompressor is working, but it's slow due to the way I went about it. It takes like 30 seconds to decompress one file.
But regardless good-enough-for-now. I've been pretty much running a process in the background that's decompressing every file in the game.
Still going.

With the decompressor working stably at least, I've figured out more of the picture format.
Here are some of the images I've converted after decompressing them:
Image
Image
Image
Image
Image
Image
Image

There's like a 1000 or so event based images for example, such as this set:
Image

Not sure what this is, but I found it funny that it's a picture of a cut-out line:
Image

As for the failures, they don't convert at all or if they do, they come out garbled.
One of the easier failures to tackle is like this:
Image

I plan to spend some time tomorrow to clean my code up.
In and of itself, self-evident.

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Tue Jan 23, 2018 2:35 pm

The issue above is fixed and most pictures convert correctly:
Image

About a handful (<100) of pictures still have issues: bad transparency, bad colors, bad tiles, or totally different format,
compared to the 2000 or so that are fine.
I'll come back to them later.

This game has some funny event photos...
Image

What I want to work on next is trying to inject a modified image back into the game.
Can someone type up the translations to the Japanese text in these images (don't bother editing the images yourself, they're scaled up screenshots):
Image
Image
Image
In and of itself, self-evident.

Baz
Leliel
Leliel
User avatar
Posts: 713
Joined: Mar 21, 2009
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Baz » Wed Jan 24, 2018 9:47 am

Some of these are barely legible, but here goes:

喬 high (doubtful about this one)
低 low

好意 good will
関心 interest

空腹 hunger
水分 fluids
眠気 fatigue
WC toilet
風呂 bath

所持アイテム inventory
ステータス status

食 food
WC toilet
水 water
風呂 bath
眠 sleep
自販 vend
買 buy

For completeness:

ネルフ施設 NERV Facilities
第3新東京市 3rd New Tokyo City

Sailor Star Dust
Kept you waiting, huh?
Kept you waiting, huh?
User avatar
Age: 32
Posts: 22671
Joined: Aug 13, 2006
Location: Living in Houston, TX
Gender: Female
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Sailor Star Dust » Wed Jan 24, 2018 4:12 pm

View Original PostdeeRez wrote:Not sure what this is, but I found it funny that it's a picture of a cut-out line:
Image


Ah, I'm 90% sure that's the coupon/sticker campaign from Pen Pen's scenario :penpenatf:
~Take care of yourself, I need you~

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Sun Jan 28, 2018 5:26 am

View Original PostSailor Star Dust wrote:Ah, I'm 90% sure that's the coupon/sticker campaign from Pen Pen's scenario :penpenatf:


Ahhhh, interesting!

View Original PostBaz wrote:Some of these are barely legible, but here goes:

喬 high (doubtful about this one)
低 low

好意 good will
関心 interest

...


Thanks for the help!

Something that hit me on my adventures is that this game is very wasteful when it comes to resources.
Duplicate data everywhere. Ten scenes need a picture? Duplicate the picture ten times!

On top of which, simple effects like this can be done programmatically:

Image
Image

They instead saved every combination of characters and background to disc.

If a character let's say gets a sticker on their arm, you'd think they'd just blend the sticker in via code or provide a separate texture with the sticker on the arm.
But what did they do? They copied the entire character twice, including animations it looks like.

PenPen is sick of your shit Alfa System.

Image

And so is Asuka.
Image

Anyways,
I've uploaded the decompressor script to decompress the game's files (after unpacking with hgar.py):
https://github.com/rezual/nge_2_re/blob ... /zipped.py

I pulled it off by cheating and writing a small PSP emulator with just enough features to run the actual game code that does the decompression:
https://github.com/rezual/nge_2_re/blob ... app/psp.py

The downside is I can't keep it up, cause I'll eventually need to figure out how to run the decompression algorithm in reverse in order to inject files into the game.

Currently I'm looking at the .har file format again.
I already wrote an unpacker (hgar.py) and it works great.
But, to create / pack my own .har files, I need to figure out how to calculate 3 mysterious fields that the game depends on.

After I tackle this, I'll push it to GitHub and then move onto writing code for converting pictures into the game's native format.

After that, I'll then tackle the hard part of figuring out the decompression algorithm for reals to be able to compress.
In and of itself, self-evident.

Sailor Star Dust
Kept you waiting, huh?
Kept you waiting, huh?
User avatar
Age: 32
Posts: 22671
Joined: Aug 13, 2006
Location: Living in Houston, TX
Gender: Female
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Sailor Star Dust » Sun Jan 28, 2018 3:34 pm

Don't mind me, I'm just poking my head into this thread every so often because it's interesting to me. (Plus, I love this game :heart: )

View Original PostdeeRez wrote:Duplicate data everywhere. Ten scenes need a picture? Duplicate the picture ten times!


Huh. I know that's from the Leliel mental battle and everything, but that really is a waste to do things that way :cringe:
~Take care of yourself, I need you~

Kira BB Yamato
Embryo
Posts: 15
Joined: Feb 09, 2018

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Kira BB Yamato » Fri Feb 09, 2018 1:47 am

Hello. I played this game quite a bit last summer, and I wanted to see about translating it then. I poked around with a hex editor, found some files with dialogue, and ultimately got nowhere. I worked on the SD Gundam G Gen Overworld translation project, but I wasn't cut out for handling all of that on my own.

I'm really good at devoting myself to mindless tedium though. I'll see about translating these strings, if they haven't already been handled. Also, I'm definitely borrowing that pulse autowin cheat.

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Fri Feb 09, 2018 2:38 am

View Original PostKira BB Yamato wrote:Hello. I played this game quite a bit last summer, and I wanted to see about translating it then. I poked around with a hex editor, found some files with dialogue, and ultimately got nowhere. I worked on the SD Gundam G Gen Overworld translation project, but I wasn't cut out for handling all of that on my own.


Yeah this stuff will take a while and there's still that huge IMTEXT.bin file that I need to figure out the format of which contains the more complicated scenario text, but thankfully it's in plaintext somewhat. Just the boundary parts of the file format need to be figured out.
As long as I lay enough of a foundation so someone can do the translation stuff now or five years from now, then it's good enough motivation for me to proceed forward, versus expecting translations to happen in parallel. It actually makes my life easier cause I don't feel as rushed. :P
But yeah, I know some other projects that die since there was either only the translator or only the techie.

View Original PostKira BB Yamato wrote:I'm really good at devoting myself to mindless tedium though. I'll see about translating these strings, if they haven't already been handled.


I don't see any PRs in my queue on GitHub, so you're good to go!

View Original PostKira BB Yamato wrote:Also, I'm definitely borrowing that pulse autowin cheat.


I'm really glad! I can't believe people got passed certain points in the game without such a thing.
You get far in beating an angel, andddd, do-or-die mini-game comes up. Not fair - jerk developers.

As for me, I've almost gotten the HGAR stuff figured out. My previous weekends were busy with other responsibilities, and so is this upcoming one, but I plan to try to sneak in something Sunday.
In and of itself, self-evident.

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Thu Feb 15, 2018 2:33 am

Did some more reading of assembly code in how the game loads the .har files and what certain fields are.

After two days of full focused attention, I've barely scratched the surface.

I don't know what the heck the developers were doing. The below is my transcribed code from assembly to Python:
Image

They do some weird obfuscation. Initially I thought the field was some kind of CRC (where you add all the bytes in a file to check for data corruption). Nope, the field doesn't even depend on the file data. Instead the resulting number says where to put the file's id in an array in the game's memory.

Thankfully this is enough to replace files:

Below is Asuka's texture inside Misato's place:
Image

And below is Rei's texture inside Misato's place:
Image

Since they're very similar, I've overwritten Asuka's texture with Rei's, and confirmed it works:
Image

Image

I've updated my code on GitHub:
https://github.com/rezual/nge_2_re/comm ... 5dd8f6be32

The commands I've run:

Code: Select all

hgar.py --extract ./PSP_GAME/USRDIR/map/mapobj01.har
hgar.py --replace ./PSP_GAME/USRDIR/map/mapobj01.har Asuka.hpt ./Eva/PSP_GAME/USRDIR/map/mapobj01.har_EXTRACT/Ayanami.hpt
mv ./PSP_GAME/USRDIR/map/mapobj01.har ./PSP_GAME/USRDIR/map/mapobj01.har_BACKUP
mv ./PSP_GAME/USRDIR/map/mapobj01.har_REPLACE ./PSP_GAME/USRDIR/map/mapobj01.har


So remember how I said there's still the issue of figuring out how to run the decompression in reverse, to be able to compress the pictures?
Turns out, the 31st bit on the pain-in-the-ass field I mentioned above is what controls if the file is compressed or not.
If I turn this bit off, I can then have the game treat the file as if it's already decompressed.

So as a quick test I modified randomly in a hex editor Rei's decompressed texture (that I replaced Asuka's with),
and sure enough the random edits showed up in-game:
Image
Image


Where does this leave us? It means I just have to write a converter to convert PNGs to the game's format,
to be able to modify the Japanese text in pictures.

Anyways, that's what I'll be working on from now on.

After that's done, there's still that huge IMTEXT.bin file that contains most of the text that needs translating.
The game has its own event scripting engine, and I'm not sure how tied into IMTEXT.bin the engine is.
The more tied into it is, the bigger a pain-in-the-ass to decipher the format.
Which is why I'm leaving IMTEXT.bin last cause I want to have this other stuff behind me when I tackle that file.
In and of itself, self-evident.

Mr. Tines
Administrator
Administrator
User avatar
Age: 60
Posts: 20016
Joined: Nov 23, 2004
Location: This sceptered isle.
Gender: Male
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Mr. Tines » Thu Feb 15, 2018 4:00 am

View Original PostdeeRez wrote:I don't know what the heck the developers were doing. The below is my transcribed code from assembly to Python:
The form is that of a not entirely trivial decryption. A search for "0x3d09 encryption" brought up one game obfuscation related item in the first few hits, so probably something that has been a trick of the trade, at least in the past.
Reminder: Play nicely <<>> My vanity publishing:- NGE|blog|Photos|retro-blog|Fanfics|G+|MAL
Avatar: Etoh Mei (b. 9-May-2018)

Reichu
Space-Time Teratoma
Space-Time Teratoma
Posts: 22981
Joined: Aug 21, 2004
Location: Lost in Bat Country
Gender: Female
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Reichu » Thu Feb 15, 2018 8:54 am

Most of what's going on in here is complete gibberish to me so I can be of no use, but curious -- any chance of getting a rip of the in-game graphics? You posted some examples, so it looks like it's doable.

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Thu Feb 15, 2018 11:13 am

View Original PostMr. Tines wrote:The form is that of a not entirely trivial decryption. A search for "0x3d09 encryption" brought up one game obfuscation related item in the first few hits, so probably something that has been a trick of the trade, at least in the past.


Thanks for pointing that out!

This is from the Ys games:
Image

Yeah looks similar except they're using the high-16bits from the multiplication and without the xor.

I wouldn't be surprised if the same employee worked on both games, and transferred from Nihon Falcom to ArcSystems.

Anyways, I wrote a function to come up with my own encoded value that decodes properly, but the game crashes. So I'm clearly missing something else that the game checks for elsewhere.

My leading theory is that the game crashes because instead of using filenames to read a file within the archive, for certain files the game might use those encrypted IDs instead. And the theory regarding why encryption is used for such an unimportant field is because you can encrypt the same number multiple ways.

So file #5 in archive A is not the same file as file #5 in archive B.
Using encryption you can store the #5 index as 1321312312 and the second #5 index as 63452423 - yet they're both 5, and when doing comparisons within the game to see if the files you loaded from various sources are the same, you can quickly find out they're not.

View Original PostReichu wrote:Most of what's going on in here is complete gibberish to me so I can be of no use, but curious -- any chance of getting a rip of the in-game graphics? You posted some examples, so it looks like it's doable.


Sure, but I need to fix a certain bug that affects a few images and I'll also take a look at the PS2 version. If it's not much work, I'll go with the larger resolution. I think the PSP pictures are cropped vertically.
In and of itself, self-evident.

Reichu
Space-Time Teratoma
Space-Time Teratoma
Posts: 22981
Joined: Aug 21, 2004
Location: Lost in Bat Country
Gender: Female
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Reichu » Fri Feb 16, 2018 2:14 pm


Finally took a look. I'm not seeing any way to make edits. I don't know if you need to give me permissions, or if I have to request them somehow. It's been years since I used github in any way, so I can't remember much about how it works, heh.

With regard to graphic ripping: the PSP version has so much content unique to itself that it might be simpler just to do a complete dump first, instead of worrying about overlap with the PS2 version. If it's possible, a full set for the PS2 version can be created later. Having the graphical assets on hand would be simply lovely in any case, so I hope you can pull it off! :thumbsup:

Mr. Tines
Administrator
Administrator
User avatar
Age: 60
Posts: 20016
Joined: Nov 23, 2004
Location: This sceptered isle.
Gender: Male
Contact:

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby Mr. Tines » Fri Feb 16, 2018 3:41 pm

View Original PostReichu wrote:Finally took a look. I'm not seeing any way to make edits.
The little pencil icon at top right -- you probably have to be logged in, first, though.

Image

We can go through pull requests later.
Reminder: Play nicely <<>> My vanity publishing:- NGE|blog|Photos|retro-blog|Fanfics|G+|MAL
Avatar: Etoh Mei (b. 9-May-2018)

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Fri Feb 16, 2018 4:10 pm

View Original PostReichu wrote:Finally took a look. I'm not seeing any way to make edits. I don't know if you need to give me permissions, or if I have to request them somehow. It's been years since I used github in any way, so I can't remember much about how it works, heh.


Normally, the approach is to make a fork (which you've done), and use PRs.

But to make it easier on you I'm just going to let you commit to master itself.
I've sent you a collaborator request.
So delete the fork and git clone the master repo.

Feel free to try to modify the README and do a test push to see if you can get the change to go through.

(Mr. Tines is pointing out a way to edit via the website itself, but I highly recommend learning to git clone locally!)

View Original PostReichu wrote:With regard to graphic ripping: the PSP version has so much content unique to itself that it might be simpler just to do a complete dump first, instead of worrying about overlap with the PS2 version. If it's possible, a full set for the PS2 version can be created later. Having the graphical assets on hand would be simply lovely in any case, so I hope you can pull it off! :thumbsup:


Fine fine, I'll push the PSP version before the end of today, think 10:00 PM ET.
Though, I've not played the game so it'd be interesting to see if you can spot anything that's not used in the game.
In and of itself, self-evident.

deeRez
Shamshel
Shamshel
User avatar
Age: 29
Posts: 262
Joined: Jul 31, 2011
Location: East-coast USA
Gender: Male

Re: [GAME] Neon Genesis Evangelion 2: Another Cases

  •      
  •      
  • Quote

Postby deeRez » Fri Feb 16, 2018 6:44 pm

Okay here it is, 185 MB of PNGs.

Note, lots of the subtitle images are broken in that they're interlaced.
And a handful of images have the wrong transparency or palette errors.

Download:
ZippyShare: [link removed]

The real download button is in the top-right.
In and of itself, self-evident.


Return to “Everything Else Evangelion”

Who is online

Users browsing this forum: No registered users and 2 guests