Russian translate is done!

Talk about anything related to Legend of Grimrock 2 here.
badhabit
Posts: 467
Joined: Sat May 05, 2012 2:24 pm

Re: Russian translate is done!

Post by badhabit »

OlegDX wrote:
Hi, I tested it just for fun. :)
Data file exchanged, resulted in this intro screen ;). But as Oleg already said, without the exe hack you can't enter the game.
badhabit run new grimrock2_rus.exe or replace original grimrock2.exe
Your Steam version based variant grimrock2_rus.exe (including Steamworks support I guess?) seems pretty incompatible with my gog.com exe.
Oleg, could you give please the addresses/strings & more in-detail explanation where to change the exe?
OlegDX
Posts: 27
Joined: Thu May 24, 2012 9:24 am

Re: Russian translate is done!

Post by OlegDX »

Font.loadTrueType

Code: Select all

--1---------------------------------------------------
0124 7B97: - 000B6F97 
68 00 FF 59 00    

PUSH OFFSET 0132FF00                                         //new filter

--2---------------------------------
01247B9F: - 000B6F9F
E9 EC 82 0E 00 90

JMP 0132FE90                                                 //jamp new code for replace oem char to unicode


--3---------------------------------
0132FE90: - 0019F290
53 81 FB BF 00 00 00 7E 24 81 FB FF 00 00 00 7F
1C 81 C3 50 03 00 00 81 FB DF 00 00 00 7E 0E 81
FB EF 00 00 00 7F 06 81 C3 60 03 00 00 8B 85 D4
F7 FF FF 53 50 E8 26 09 F5 FF 83 C4 08 5B E9 DC
7C F1 FF 00


PUSH EBX                                                     //input oem char code

CMP EBX,0BF
JLE SHORT 0132FEBD

CMP EBX,0FF
JG SHORT 0132FEBD
ADD EBX,350                                                 //replace oem char to unicode russian char win1251

CMP EBX,0DF
JLE SHORT 0132FEBD

CMP EBX,0EF
JG SHORT 0132FEBD
ADD EBX,360                                                 //replace oem char to unicode russian char win1251

MOV EAX,DWORD PTR SS:[EBP-82C]
PUSH EBX                                                    //input  param char code (unicode)
PUSH EAX
CALL 012807F0
ADD ESP,8
POP EBX
JMP 01247BAF                                                //return



--4---------------------------------------------------         //new filter char oem
0132FF00: - 0019F300
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
for version stream 2.1.13
badhabit
Posts: 467
Joined: Sat May 05, 2012 2:24 pm

Re: Russian translate is done!

Post by badhabit »

OlegDX wrote:Font.loadTrueType

Code: Select all

--1---------------------------------------------------
0124 7B97: - 000B6F97 
68 00 FF 59 00    

PUSH OFFSET 0132FF00                                         //new filter

--2---------------------------------
01247B9F: - 000B6F9F
E9 EC 82 0E 00 90

JMP 0132FE90                                                 //jamp new code for replace oem char to unicode


--3---------------------------------
0132FE90: - 0019F290
53 81 FB BF 00 00 00 7E 24 81 FB FF 00 00 00 7F
1C 81 C3 50 03 00 00 81 FB DF 00 00 00 7E 0E 81
FB EF 00 00 00 7F 06 81 C3 60 03 00 00 8B 85 D4
F7 FF FF 53 50 E8 26 09 F5 FF 83 C4 08 5B E9 DC
7C F1 FF 00


PUSH EBX                                                     //input oem char code

CMP EBX,0BF
JLE SHORT 0132FEBD

CMP EBX,0FF
JG SHORT 0132FEBD
ADD EBX,350                                                 //replace oem char to unicode russian char win1251

CMP EBX,0DF
JLE SHORT 0132FEBD

CMP EBX,0EF
JG SHORT 0132FEBD
ADD EBX,360                                                 //replace oem char to unicode russian char win1251

MOV EAX,DWORD PTR SS:[EBP-82C]
PUSH EBX                                                    //input  param char code (unicode)
PUSH EAX
CALL 012807F0
ADD ESP,8
POP EBX
JMP 01247BAF                                                //return



--4---------------------------------------------------         //new filter char oem
0132FF00: - 0019F300
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
for version stream 2.1.13
Thanks but I was not able to find the analog addresses for the gog version :(
OlegDX
Posts: 27
Joined: Thu May 24, 2012 9:24 am

Re: Russian translate is done!

Post by OlegDX »

I do not have this version, so I can not say where the fix
badhabit
Posts: 467
Joined: Sat May 05, 2012 2:24 pm

Re: Russian translate is done!

Post by badhabit »

OlegDX wrote:I do not have this version, so I can not say where the fix
Please, take a look in your message box, I sent you soem infos.
OlegDX
Posts: 27
Joined: Thu May 24, 2012 9:24 am

Re: Russian translate is done!

Post by OlegDX »

ok, what language ?
OlegDX
Posts: 27
Joined: Thu May 24, 2012 9:24 am

Re: Russian translate is done! FOR (gog.com exe)

Post by OlegDX »

Code: Select all

000B4607 -- replace
68 C8 61 5A 00 --> 68 E0 D2 59 00

000B462F -- replace
8B 85 D4 F7 FF FF --> E9 5C 80 0E 00 90

0019C690 -- replace (code win1251)
53 81 FB BF 00 00 00 7E 24 81 FB FF 00 00 00 7F
1C 81 C3 50 03 00 00 81 FB DF 00 00 00 7E 0E 81
FB EF 00 00 00 7F 06 81 C3 60 03 00 00 8B 85 D4
F7 FF FF 53 50 E8 B6 09 F5 FF 83 C4 08 5B E9 6C
7F F1 FF     

0019C6E0 -- replace
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
Last edited by OlegDX on Thu Jan 01, 2015 4:28 pm, edited 1 time in total.
OlegDX
Posts: 27
Joined: Thu May 24, 2012 9:24 am

Re: Russian translate is done!

Post by OlegDX »

Code: Select all

0019C691 -- nead fix for unicode
------------------------------------
  CMP EBX,0BF
  JLE SHORT 00C2D2BD
  CMP EBX,0FF      
  JG SHORT 00C2D2BD
  ADD EBX,350                     //U+0410 (0xC0): Cyrillic Capital Letter A  (0x350 + 0xC0 = 0x410)
  CMP EBX,0DF
  JLE SHORT 00C2D2BD
  CMP EBX,0EF
  JG SHORT 00C2D2BD
  ADD EBX,360      
00C2D2BD:
------------------------------------
badhabit
Posts: 467
Joined: Sat May 05, 2012 2:24 pm

Re: Russian translate is done!

Post by badhabit »

OlegDX wrote:

Code: Select all

0019C691 -- nead fix for unicode
------------------------------------
  CMP EBX,0BF
  JLE SHORT 00C2D2BD
  CMP EBX,0FF      
  JG SHORT 00C2D2BD
  ADD EBX,350                     //U+0410 (0xC0): Cyrillic Capital Letter A  (0x350 + 0xC0 = 0x410)
  CMP EBX,0DF
  JLE SHORT 00C2D2BD
  CMP EBX,0EF
  JG SHORT 00C2D2BD
  ADD EBX,360      
00C2D2BD:
------------------------------------
Thanks!
Translation ingame works, see picture :) (OK, menu is currently not working... last fix described missing?)
Image

Also, I packed together a binary patch (via Xdelta) only containing Oleg's work for testing: copyright save and small,15MByte only. Install and de-install script for 64bit windows, compatible with GOG (& I guess the AH version) LOG2 2.1.13 only, tested only on my system (as always, backup your stuff, here grimrock2.dat and grimrock2.exe). Extract the rar to your grimrock2 folder and run the "grimrock2_eng_to_ru.bat" (you can recover to the english version via "grimrock2_ru_to_eng.bat").

http://www.xup.to/dl,52773011/LOG2_2.1. ... to_ru.rar/
OlegDX
Posts: 27
Joined: Thu May 24, 2012 9:24 am

Re: Russian translate is done!

Post by OlegDX »

(OK, menu is currently not working... last fix described missing?)
Need to further modify the "EXE"
correct procedure because of error Font.load(..)
error : max/min char -127...127 (work only 0..127)
need : max/min char 0...255
good idea (xdelta)
Post Reply