Author Topic: Viper RSR Translation  (Read 43299 times)

Gamen

  • Casual VIPER Fan
  • *
  • Posts: 12
  • Karma: +2/-0
Viper RSR Translation
« on: July 28, 2011, 05:45:55 pm »
Hello, I'm new here.

I know there was a project for translating Viper RSR, and that it has died a few times. I'm not sure if it produced anything. I did read that most of the game was translated, but that the WIN file format needed to be reverse-engineered. I don't know what the status of that is. I've seen a bunch of tools in some threads, but I don't know if any of them can be used to update a WIN yet. So.

I've been writing code for handling SGS formats for a while. Every year or so I get the urge to take a look at what I've written, and see if I can add more to it. Usually with the goal of writing some sort of WIN+ANM to GIF converter. Don't know if one exists. At any rate, this time I was distracted and wrote a script to export all the dialog from each .WIN in a .DAT. And then another to update a .DAT with translations. So.

File name: rsr_translation_patch_20110728_h_scenes.zip File size: 134.38 KB

There you go, a patch. It really only translates the various H-scenes, and a few other lines. It's also missing Diablo's lines in that one scene. His language escapes me. Drop it in you RSR directory and run the batch file, which'll backup your existing SGS.DAT before patching. It's for the DVD edition, I don't have any other. I'm guessing most have it too, given the extra scenes I hear it has compared to older versions. Some translation is mine, some from other members of the forum, I don't remember whose is what. It's really more a proof of concept to show that the WIN files can be updated. Excuse what is translated by me, I switched majors to Computer Science from Japanese Language & Literature because I was failing.

I'm also attaching a .csv (renamed to .txt) with all the unique strings, and what I have for translations.

It'd be great if this is all that was holding the project back.

JG

  • Karin-chan Fan
  • Website Administrator
  • Hardcore VIPER Otaku
  • ********
  • Posts: 3,497
  • Karma: +85/-4
  • 3000 posts of rediculousness and counting
    • Favorite Sogna Game:
      ・Gokuraku VIPER Paradice
    • Now Playing:
      ・Mario & Luigi: Brothership
    • Sogna Digital Museum
Re: Viper RSR Translation
« Reply #1 on: July 28, 2011, 07:17:54 pm »
I know there was a project for translating Viper RSR, and that it has died a few times. I'm not sure if it produced anything.

Not dead, but suffering from a lack of qualified translators.  What you've done should be of tremendous help to the project.


I did read that most of the game was translated, but that the WIN file format needed to be reverse-engineered. I don't know what the status of that is. I've seen a bunch of tools in some threads, but I don't know if any of them can be used to update a WIN yet.

Yes, I've managed to work that out already.  At least enough to do text translations, including decompile and recompile.  There's still some graphics commands I have not worked out but those would go unchanged in a translation.  Becuase I have not figured out so many graphics commands I've withheld the release of my toolset. (And unfortunately have not found much time int he last couple of months to improve upon it)


I've been writing code for handling SGS formats for a while. Every year or so I get the urge to take a look at what I've written, and see if I can add more to it. Usually with the goal of writing some sort of WIN+ANM to GIF converter. Don't know if one exists.

If I could figure out all the graphics commands, I could make this happen.  I'm able to partially decode the WIN, already known how to decode the ANMs, and know how to construct a GIF.  Unfortunately missing key peices of knowing exactly what ANM frame to show when and where to make it work.

Perhaps we could combine forces and get my compiler/decompiler suite finished and released to the masses.  If you're interested, read through this thread, and then see if you can use OllyDbg and help me figure out exactly what some of these opcodes actually do (I know what some of them do, but not why they're different than another opcode that may do practiacally the same thing, or know what some arguments do but not others.)  This offer to help is open to anyone with sufficient coding background (being able to follow x86 assembly code is a must.)

See attached for my compiler/decompiler's operations table.


Gamen

  • Casual VIPER Fan
  • *
  • Posts: 12
  • Karma: +2/-0
Re: Viper RSR Translation
« Reply #2 on: July 28, 2011, 11:18:22 pm »
Well, you've definitely done much more work in actually deciphering the opcodes. I really only got a little beyond disassembling the interpreter loop so I could parse the instructions and identify jump targets.

Right off, however, I can identify opcode 76 for you. I'm pretty confident it pops up a dialog for the player to enter their name, as in Typing, when printing text the character $ is replaced with it. The name is of course stored in the registry as Name.

Edit 1: And I believe the first argument of opcode 3E is the register the index of the selected choice is stored in. Same with its i18n version, opcode 69.

Edit 2: And I believe the first argument of opcode 17 is the index of the layer to be scrolled, like you seem to already have deduced but still marked as unsure. Side note, I've been thinking of them as layers, probably because of Flash.
« Last Edit: July 29, 2011, 12:45:03 am by Gamen »

Gamen

  • Casual VIPER Fan
  • *
  • Posts: 12
  • Karma: +2/-0
Re: Viper RSR Translation
« Reply #3 on: August 02, 2011, 06:27:12 pm »
Well, since I can't post to the thread you reference, I'll add to this one. Might have to start a new one, since this one does specify the topic as being translation, not reverse engineering.

Opcode 64h: The interpreter loop is skipping over instead of parsing the arguments, but here's the format:
[64h] [uint8 shifts] shifts*{[uint16 frames] [uint8 colors] colors*{[uint8 index] [uint8 red] [uint8 green] [uint8 blue]}}
And I'm pretty sure it's a palette shift. It loops between the <shifts> changes to the palette, updating the palette with the <colors> colors and waiting <frames> frames between each shift.

Opcode 44h: This is not a no-arg opcode. It's format it the same as opcode 45h ([44h] [uint8 register]), and has almost the same functionality. Since it sets the animation state to Ah, the interpreter loop terminates and control passes back to the animation loop, where it pretty much idles, waiting for the user to give it some input (specifics to be eloborated on... ctrl, f11, and f12 are bad, d-pad and numpad good). When it gets that input it reads a uint8 from the bytecode and stores the input flags at the register.

Opcode 45h ([45h] [uint8 register]): Does almost the same, except a lot less. Ends autoskip and stores the current inputflags at register <register>.

...And I'd say that's good for now. If you have a particular opcode you want to know more about, as long as it's not for internationalization, I'll see what I can give you for details. Otherwise I'll just continue randomly looking at this thread and my notes for missing details when I have the time. Maybe I'll detail the switch/case ops next (32h, 33h, 48h, and 7Ah)
« Last Edit: August 02, 2011, 06:35:06 pm by Gamen »

JG

  • Karin-chan Fan
  • Website Administrator
  • Hardcore VIPER Otaku
  • ********
  • Posts: 3,497
  • Karma: +85/-4
  • 3000 posts of rediculousness and counting
    • Favorite Sogna Game:
      ・Gokuraku VIPER Paradice
    • Now Playing:
      ・Mario & Luigi: Brothership
    • Sogna Digital Museum
Re: Viper RSR Translation
« Reply #4 on: August 07, 2011, 04:11:32 pm »
I'm quite sure opcode 44 has no arguments.  The only thing it does is set system state.

Code: [Select]
00414EE6  |> C705 04084300 >|MOV DWORD PTR DS:[430804],0A     ;  Case 44 of switch 00413321
00414EF0  |. E9 76100000    |JMP SGS.00415F6B                 ;  jump to end of opcode switch


Thanks for figuring out system state 0x0A waits for input from the d-pad though.

Gamen

  • Casual VIPER Fan
  • *
  • Posts: 12
  • Karma: +2/-0
Re: Viper RSR Translation
« Reply #5 on: August 08, 2011, 04:02:24 pm »
I'm quite sure opcode 44 has no arguments.  The only thing it does is set system state.

Code: [Select]
00414EE6  |> C705 04084300 >|MOV DWORD PTR DS:[430804],0A     ;  Case 44 of switch 00413321
00414EF0  |. E9 76100000    |JMP SGS.00415F6B                 ;  jump to end of opcode switch

Yes, as I explained, since it sets system state, it stops reading bytecode and returns to the window procedure, and causes the animation thread to idle until one or more of the following keys are pressed (VK_NUMPAD8, VK_UP, VK_NUMPAD2, VK_DOWN, VK_NUMPAD4, VK_LEFT, VK_NUMPAD6, VK_RIGHT) without any of the following keys or buttons being pressed (VK_NUMPAD0, VK_ESCAPE, WM_RBUTTONDOWN, VK_F11, VK_F12, VK_SPACE, WM_LBUTTONDOWN, VK_RETURN, VK_CONTROL) at which point a byte is read from the bytecode and the current input flags are stored at that register and a message is posted to the window to read the bytecode for the next system state.

The only example of 44 that I know of is in BATTLE.WIN in Viper M5. Not a great example, since I can't find anything that jumps into the function that contains opcode 44, but at 3d00h you've got 46 46 44 00 1F 13 1E 26, and I don't see quitting the game in the middle of a function as likely.

Quote
Thanks for figuring out system state 0x0A waits for input from the d-pad though.

No problem, here are what flags are set for which buttons and keys:
01h - VK_NUMPAD8, VK_UP
02h - VK_NUMPAD2, VK_DOWN 
04h - VK_NUMPAD4, VK_LEFT
08h - VK_NUMPAD6, VK_RIGHT
10h - VK_NUMPAD0, VK_ESCAPE, WM_RBUTTONDOWN 
20h - VK_F11, VK_F12,  VK_SPACE, WM_LBUTTONDOWN, VK_RETURN, VK_CONTROL

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #6 on: August 29, 2013, 01:40:56 am »
Just going to add this link here.

https://www.dropbox.com/sh/hqrwkz7s3ihcvga/A2h8X_G8kj

Some translated texts from Viper RSR, but back then.
Still needs to be re-written in some places.
BlackShadow

Rai

  • Serious VIPER Fanatic
  • ***
  • Posts: 299
  • Karma: +20/-0
    • Favorite Sogna Game:
      ・VIPER-M1
Re: Viper RSR Translation
« Reply #7 on: September 11, 2013, 09:05:12 pm »
Here's something -- thanks mostly to 黒い灯影's archive above plus a fresh playthrough of the game, I've sorted all the text and translations I'd collected from this forum into a spreadsheet, and threw in some stage directions for extra context. Not all that useful for re-inserting back into the game, but handy to just read through to get the story. Also for getting a sense of how much is left to translate.

Where there were multiple translations for the same scene available, I picked the one that was more polished. I also contributed a bit of polish of my own, and even added a few easy translations ("Hello", "Thank you", "Let's go", etc. is about all I can handle). I also consolidated different people's translations of "Seiki" and "Majuu" into..."Seiki" and "Majuu" for now. I'm not sure if we settled on a consistent translation for those terms, so they're placeholders to not get mixed up with mentions of more generic "knights" or "monsters".

Also included are rows for lines that don't have subtitles. Thankfully, most of those were surprisingly easy to translate by ear. The one instance of this I hope someone else can listen to and translate is what Veloce says to Cala during their battle just before he defeats her.

Hope this helps the overall translation efforts somehow.
« Last Edit: September 11, 2013, 09:13:53 pm by Rai »

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #8 on: September 11, 2013, 10:22:19 pm »
Wow, awesome work on putting everything together, Rai!!
I'll try to look through my notes, see if I missed anything, because i tried my hand at translating some of the chapters on my own as well.
BlackShadow

Gamen

  • Casual VIPER Fan
  • *
  • Posts: 12
  • Karma: +2/-0
Re: Viper RSR Translation
« Reply #9 on: September 11, 2013, 11:17:52 pm »
The one instance of this I hope someone else can listen to and translate is what Veloce says to Cala during their battle just before he defeats her.

The best I can do you for is this:

doushita
isei no ino wa kuchi dake ka
konna level no hikui mahou shika tsukaenai komusume ni yarareru to wa na
buka na kyoikyoi yarinaosanakereba ikan na (or something like that, it's pretty slurred)

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #10 on: September 12, 2013, 12:11:48 am »
Also included are rows for lines that don't have subtitles. Thankfully, most of those were surprisingly easy to translate by ear. The one instance of this I hope someone else can listen to and translate is what Veloce says to Cala during their battle just before he defeats her.

Gamen's post reminded me that I did send that part out, a long time ago, to get transcribed.
And this was the result of it.  Which is practically the same as Gamen's result.

Code: [Select]
なにこいつ、魔法が効かない?!
どうした?威勢のいいのは口だけか?
こんなレベルの低い魔法しか使えない小娘にやられるとはな。
部下の教育をやりなおさなければいかんな。

Nanikoitsu, mahout ga kikanai?!
Doushita? Isei no ii no ha (wa) kuchi dake ka?
Konna reberu (level) no hikui mahoushika tsukaenai komusume ni yarareru to ha (wa) na.
Buka no kyouiku wo (o) yarinaosanakerebaikanna.

*I assume that you want to be able to say these phrases yourself,
so I put in parentheses the words that had different pronunciation that the spelling (characters).
So if used as a subject indicator, “ha” is actually pronounced as “wa”. And if used as an object indicator, “wo” is pronounced as “o”.
Ganbatte! Good luck!
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #11 on: July 11, 2014, 01:04:19 pm »
Here's the current statistics of the Viper RSR Translation, as of today.



even made a pretty graphic for you guys.


I hope you guys appreciate how much money i've put into this...  :rattydance
« Last Edit: July 12, 2014, 12:55:45 pm by 黒い灯影 »
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #12 on: July 13, 2014, 04:00:37 pm »
Download Link  - 94.8% done
BlackShadow

Hitchr

  • Casual VIPER Fan
  • *
  • Posts: 19
  • Karma: +0/-0
    • Favorite Sogna Game:
      ・Viper GTS
    • Now Playing:
      ・The Walking Dead
Re: Viper RSR Translation
« Reply #13 on: July 14, 2014, 07:53:21 pm »
Excellent job. That's a nice project going.
Are those texts usable in a playable version of Viper RSR ?

I don't know if a french version could interest anyone but I could give it a try.

JG

  • Karin-chan Fan
  • Website Administrator
  • Hardcore VIPER Otaku
  • ********
  • Posts: 3,497
  • Karma: +85/-4
  • 3000 posts of rediculousness and counting
    • Favorite Sogna Game:
      ・Gokuraku VIPER Paradice
    • Now Playing:
      ・Mario & Luigi: Brothership
    • Sogna Digital Museum
Re: Viper RSR Translation
« Reply #14 on: July 15, 2014, 08:38:56 pm »
I don't know if a french version could interest anyone but I could give it a try.

I would support any major language translation if it's renderable in the SGS font map. (This may eliminate languages like Chinese and Korean.)  French is certainly a major language.  I suspect that once we have games fully translated to English, other languages would quickly follow.  (Hyperguy, at one time in the past, said he'd help with Spanish.)


Keep in mind all speech would remain Japanese.  We could replace the sampled text with English or any other language if we had actors and actresses to voice the parts, but that would be difficult.

Hitchr

  • Casual VIPER Fan
  • *
  • Posts: 19
  • Karma: +0/-0
    • Favorite Sogna Game:
      ・Viper GTS
    • Now Playing:
      ・The Walking Dead
Re: Viper RSR Translation
« Reply #15 on: July 15, 2014, 09:33:52 pm »
I kinda volunteer for the french version.

I don't think english dubbing would be very interesting. Fun and impressive for a fan work of course, but not really needed for my opinion.

Rai

  • Serious VIPER Fanatic
  • ***
  • Posts: 299
  • Karma: +20/-0
    • Favorite Sogna Game:
      ・VIPER-M1
Re: Viper RSR Translation
« Reply #16 on: July 16, 2014, 08:53:24 pm »
Getting hyped at the progress on RSR. I've been reading through the new file. My favorite parts are the earlier Maranello conversations and the full context they provide for how much of a scumbag he is.

It could use some copyediting on top of wrapping up the translations though. Like Cala's name being "Carla" sometimes, along with common English typos. When you post the 100% file (which won't be much longer now, I assume), I'll go over it and correct things like that so it's nice and clean for putting back into the game.

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #17 on: July 16, 2014, 11:37:14 pm »
That would be great, Rai
Yeah, some parts I just copied and pasted, as I just wanted to get it closer to 100 percent, and then a proof read for the corrections.
BlackShadow

黒い灯影

  • Mr. Monkey in the moon
  • Forum Administrator
  • Ambassador of VIPER Knowledge
  • *******
  • Posts: 626
  • Karma: +42/-1
  • Unleashing the monkey inside!!
    • Favorite Sogna Game:
      ・VIPER-RSR
    • Now Playing:
      ・Viper RSR
Re: Viper RSR Translation
« Reply #18 on: July 19, 2014, 03:45:19 am »
Viper RSR - 100% English Translated Script
Alright, here it is.... its been long awaited
still needs some revisions though, and probably
some parts need to be re-written to be more... er.. English.
BlackShadow

rduppercut

  • VIPER Initiate
  • Posts: 2
  • Karma: +0/-0
Re: Viper RSR Translation
« Reply #19 on: July 19, 2014, 08:06:57 am »
This is tremendous news, I've never actually been able to play RSR because I can't make heads or tails of Japanese. Is this for reading along with while playing, or is there a way to patch it into the game?