Sogna Digital Museum Forum

Sogna/VIPER Series => Translation Efforts => Topic started by: Gamen on July 28, 2011, 05:45:55 pm

Title: Viper RSR Translation
Post by: Gamen 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 (http://www.fileserve.com/file/aYKU2Fc)

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.
Title: Re: Viper RSR Translation
Post by: JG 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 (http://www.sognadigitalmuseum.com/forum/index.php/topic,2285.0.html), 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.

Title: Re: Viper RSR Translation
Post by: Gamen 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.
Title: Re: Viper RSR Translation
Post by: Gamen 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)
Title: Re: Viper RSR Translation
Post by: JG 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.
Title: Re: Viper RSR Translation
Post by: Gamen 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
Title: Re: Viper RSR Translation
Post by: 黒い灯影 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.
Title: Re: Viper RSR Translation
Post by: Rai 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.
Title: Re: Viper RSR Translation
Post by: 黒い灯影 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.
Title: Re: Viper RSR Translation
Post by: Gamen 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)
Title: Re: Viper RSR Translation
Post by: 黒い灯影 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!
Title: Re: Viper RSR Translation
Post by: 黒い灯影 on July 11, 2014, 01:04:19 pm
Here's the current statistics of the Viper RSR Translation, as of today.

(http://i.imgur.com/er82COk.png)

even made a pretty graphic for you guys.
(http://i.imgur.com/DrnZTbw.png)

I hope you guys appreciate how much money i've put into this...  :rattydance
Title: Re: Viper RSR Translation
Post by: 黒い灯影 on July 13, 2014, 04:00:37 pm
Download Link (https://www.dropbox.com/s/l77uwqn9irv7a0l/RSR-script%20-%20July11-2014-94.8.ods)  - 94.8% done
Title: Re: Viper RSR Translation
Post by: Hitchr 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.
Title: Re: Viper RSR Translation
Post by: JG 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.
Title: Re: Viper RSR Translation
Post by: Hitchr 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.
Title: Re: Viper RSR Translation
Post by: Rai 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.
Title: Re: Viper RSR Translation
Post by: 黒い灯影 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.
Title: Re: Viper RSR Translation
Post by: 黒い灯影 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.
Title: Re: Viper RSR Translation
Post by: rduppercut 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?
Title: Re: Viper RSR Translation
Post by: 黒い灯影 on July 19, 2014, 11:28:41 am
A few more steps are needed to fully patch the Viper RSR game, but it shouldn't really be too far off.
The script needs a few more revisions, and needs to be proof-read.
JG already has the tools needed to replace all the text in the game, just need to format the text into JG's request in here (http://www.sognadigitalmuseum.com/forum/index.php?topic=3518.msg32682#msg32682)
Title: Re: Viper RSR Translation
Post by: rduppercut on July 19, 2014, 11:34:13 am
Very cool, I'll keep an eye out. You've obviously done a hell of a lot of work for this labor of love, thank you greatly. You, and everyone else who's pitch in.
Title: Re: Viper RSR Translation
Post by: Hitchr on July 19, 2014, 11:01:27 pm
That's awesome. Gonna have a look and make a first reading soon.
Title: Re: Viper RSR Translation
Post by: Rai on July 20, 2014, 02:44:13 am
Alright, spent the day going through and cleaning up the text. There were a few parts that were a bit tough to interpret though.

-The tone of Alfa's first dialogue didn't match the more stuffy, proper voice he has with every scene since, so I made it a little more consistent with that.

-When Cala is challenging Elan to a practice match, they both talk about someone going easy on the other, and it switches back and forth. I'm not sure if her line to which Elan responds "you're making fun of me" is a straightforward "if I'm serious I could end up hurting you" or a sarcastic "if you're serious you could end up hurting me." I went with the latter since that's what the translator had, and tweaked the dialogue around it to agree with it, but it may still be off. Either way I think the scene gets the right dynamic between them across.

-Oops. There were a few lines in Chapter 4 that were only partly translated. Luckily, context made it easy enough to fill in the blanks.

-When Elan realizes the Princess was kidnapped, the original translation said "rescuing the princess can wait a bit." but I'm pretty sure the opposite notion was expressed.

-There was an untranslated line in Chapter 7 as they look at the map. I worked it out to "Since Monsters have the tendency to hole up in caves, we should go there looking to exterminate them anyway."

-For consistency, the repeating terms I went with were "Seiki Force" for Seikigun, and "Monsters" for Majuu
Title: Re: Viper RSR Translation
Post by: Hitchr on July 25, 2014, 08:38:16 pm
I started to make a french translation of the file. How could I insert this text in a rsr iso to make a test ?

Title: Re: Viper RSR Translation
Post by: uphillbattle on July 26, 2014, 08:51:34 pm
wow, these translations are great!
Title: Re: Viper RSR Translation
Post by: Hitchr on July 29, 2014, 11:40:07 am
My personal translation is going well.

Any news about how we can use the english released texts ?
Title: Re: Viper RSR Translation
Post by: JG on July 30, 2014, 07:13:58 am
I'll try to get my program finished this weekend.
Title: Re: Viper RSR Translation
Post by: Hitchr on July 30, 2014, 07:13:53 pm
That's good news.. :-)
Title: Re: Viper RSR Translation
Post by: Hitchr on July 30, 2014, 07:15:54 pm
Are there other french talking members around here ? When I finish the translation, it could be interesting to have a second reading from another person than myself. :-p
Title: Re: Viper RSR Translation
Post by: JG on August 03, 2014, 03:41:22 pm
I'll try to get my program finished this weekend.

I'm not going to be able to finish it this weekend.  I know what the steps are to replace text, but
a) the recompiler program needs more testing
b) the SGS.DAT recomposer file needs more testing (especailly with the compression algorithm to ensure it is truly backwards compatible)
c) I need some way to apply a patch to SGS files, but decomposing, replacing changed files, and then recomposing.  I haven't yet written such a program.
d) I'm trying to find out if the games will support multiple languages.

Regarding C, it'll be highly inefficient to send out massive SGS.DAT files with all the graphics and such.  A patching program will be a much smaller distribution.

Regarding D, I know the answer is yes for a single game, but I'm examining source code to determine if there is a free register across all the SGS.DAT files that can be used for a consistent language selection.  If so I can change the text writing lines into if-else switches so that a single SGS.DAT file could contain as many languages as we desire. We can present a choice on startup for which language to display (i.e., 0=Japanese, 1=English, 2=French, etc.)

Combining C and D essentially gives plug and play languages, which is the ideal solution.
Title: Re: Viper RSR Translation
Post by: Hitchr on August 05, 2014, 12:37:50 pm
Too bad.
I guess it's not an easy task what's remaining to do...

I'll continue translating in French meanwhile. It's an interesting project. A viper rsr game with a "choose your language" at the start could be awesome.
Title: Re: Viper RSR Translation
Post by: chaos1123 on August 20, 2019, 02:31:16 am
Is this work of art truly dead?