Language Support
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
The game supports four languages: English, German, French and Italian (exist texts and fonts). How to make to the non English language, if the installation of the game don't choice of the language?
What should be written in "language.ini"?
What should be written in "language.ini"?
There is a multilingual version of this game, i.e. the orion2.exe is different there. I had a short look here:
ftp://ftp.infogrames.net/patches/moo2/
but the multilingual 1.31 patch seems not listed there.
I just tested:
ftp://ftp.infogrames.net/patches/moo2/moo2131d.zip
thats the german version and mebbe u can check out the differences.
(BTW. LordBrazens 1.4 patch only works with the english 1.31 patch:
ftp://ftp.infogrames.net/patches/moo2/moo2v131.zip )
ftp://ftp.infogrames.net/patches/moo2/
but the multilingual 1.31 patch seems not listed there.
I just tested:
ftp://ftp.infogrames.net/patches/moo2/moo2131d.zip
thats the german version and mebbe u can check out the differences.
(BTW. LordBrazens 1.4 patch only works with the english 1.31 patch:
ftp://ftp.infogrames.net/patches/moo2/moo2v131.zip )
- Lord Brazen
- Site Admin
- Posts:162
- Joined:Mon Jul 18, 2005 10:16 pm
- Location:Toronto, Canada
- Contact:
Re: Language Support
I do see there is multiple languages in the exe data segments and that a file name "language.ini" is referenced there as well however there is a lot of data that the game code never accesses. There are command line switches, cheat codes, and many other items that really dont need to be there and have no associated code. They even left the symbol table in the exe when they compiled it which is of no use to anyone other than its programmers.The game supports four languages: English, German, French and Italian (exist texts and fonts). How to make to the non English language, if the installation of the game don't choice of the language?
What should be written in "language.ini"?
They have release several different exe's. Some are non-english. They do not use the language.ini either.
In short...I don't know
"Stars are holes in the sky from which the light of the Infinite shine through." - Confucius.
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
Thank! Has understood. Overview my problem:
I end the fonts editor for my package of the editors on MoO2. [see picture] For the tests, I have created full Russian fonts and looking, how they will be showing in the game. A problem that Russian characters are output not in all texts (see description below), and I can not create manual - how to use the not English fonts in the game.
In MoO2 used the raster fonts - it is matrixes of pixels for each character from ANSI table. ANSI character set - American National Standards Institute (ANSI) 8-bit character set used for to represent up to 256 characters (0-255 chars code) by using your keyboard. The first 128 characters (0-127) correspond to the letters and symbols on a standard U.S. keyboard. The second 128 characters (128-255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions.
MoO2 not always load (or draw) pictures for 255 characters. Probably, it is an bug, because it is infrequent case. When such characters will be output, width of the character will be correctly, but there is no picture of the character (probably, it does not load in the array of characters pictures or are locked on draw).
In the credits (authors list) to output characters with codes 0-128! (but the code 128 should not be used for U.S. character set). [see picture] For the test I have changed in a title of the "Biospheres" technology the first two characters on Russian (In files "Techname.lbx" and "Help.lbx"). All output correctly, except for a video with the scientist and header of the technologys description in the encyclopedia. [see picture] [see picture]
I hope, that this bug can be corrected without recompilation EXE of the game. I.e. it is necessary to correct a constant, which used with cycle of loading (or drawing) characters picture. For example:
or something similar. But now I can not find it. You can help me? You already disassembled the game and are oriented in its code. I can submit demanded files for the tests.
I end the fonts editor for my package of the editors on MoO2. [see picture] For the tests, I have created full Russian fonts and looking, how they will be showing in the game. A problem that Russian characters are output not in all texts (see description below), and I can not create manual - how to use the not English fonts in the game.
In MoO2 used the raster fonts - it is matrixes of pixels for each character from ANSI table. ANSI character set - American National Standards Institute (ANSI) 8-bit character set used for to represent up to 256 characters (0-255 chars code) by using your keyboard. The first 128 characters (0-127) correspond to the letters and symbols on a standard U.S. keyboard. The second 128 characters (128-255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions.
MoO2 not always load (or draw) pictures for 255 characters. Probably, it is an bug, because it is infrequent case. When such characters will be output, width of the character will be correctly, but there is no picture of the character (probably, it does not load in the array of characters pictures or are locked on draw).
In the credits (authors list) to output characters with codes 0-128! (but the code 128 should not be used for U.S. character set). [see picture] For the test I have changed in a title of the "Biospheres" technology the first two characters on Russian (In files "Techname.lbx" and "Help.lbx"). All output correctly, except for a video with the scientist and header of the technologys description in the encyclopedia. [see picture] [see picture]
I hope, that this bug can be corrected without recompilation EXE of the game. I.e. it is necessary to correct a constant, which used with cycle of loading (or drawing) characters picture. For example:
Code: Select all
------------------- -------------------
HEX ASM HEX ASM
------------------- -------------------
B980 MOV CX, 128 B9FF MOV CX, 255
... ... ... ...
... LOOP LABEL1 ... LOOP LABEL1
------------------- -------------------
(B980 replace B9FF)
- Lord Brazen
- Site Admin
- Posts:162
- Joined:Mon Jul 18, 2005 10:16 pm
- Location:Toronto, Canada
- Contact:
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
The "incorrect text" - text, where the characters with codes from 129 up to 255 are not output (10% of all texts).
I found a place, where there is a call function for output of the "incorrect text" (the offsets are indicated for official version 1.31).
I don't decompile the program, I look in the hex-editor, therefore I can make an error in the analysis of the code.
Likely it looks so:
Is more interquartile:
If to change "B0 7F" on "B0 7D", the "incorrect text" outputs with bug - in down there is visible a first line next ANSI characters (on all game).
If to change "B0 7F" on "B0 7E", the "incorrect text" is not output (on all game).
During changes "correct" text is output normally. I.e. there are two ways of output text (minimum ).
At the offset "0x001A88F7(F9)" there is a function call of a output text. I can not look it, because I don't know offset of current segment.
If to change "3D 80" on "3D 7F", the "incorrect text" outputs with bug - in down there is visible a first line next ANSI characters (on all game). During changes need fast to press "Load Game" or "New Game", because at show credits (authors list) the game will have critical error.
Please, try to analyze it in your code.
I found a place, where there is a call function for output of the "incorrect text" (the offsets are indicated for official version 1.31).
Code: Select all
0x001A88F6 | B0 7F | mov al, 7Fh
Likely it looks so:
Code: Select all
0x001A88F0 | movsx ax, word ptr [di+18h]
0x001A88F4 | cmp ax, [di-50h]
0x001A88F7 | jg short near ptr [...]
0x001A88F9 | jmp near ptr [...]
Code: Select all
0x001A88EF | add [bx], cl
0x001A88F1 | mov di, 1845h
0x001A88F4 | cmp ax, [di-50h]
0x001A88F7 | jg short near ptr [...]
0x001A88F9 | jmp near ptr [...]
If to change "B0 7F" on "B0 7E", the "incorrect text" is not output (on all game).
During changes "correct" text is output normally. I.e. there are two ways of output text (minimum ).
At the offset "0x001A88F7(F9)" there is a function call of a output text. I can not look it, because I don't know offset of current segment.
Code: Select all
0x001A8939 | 3D 80 | cmp ax, 80h
Please, try to analyze it in your code.
- Lord Brazen
- Site Admin
- Posts:162
- Joined:Mon Jul 18, 2005 10:16 pm
- Location:Toronto, Canada
- Contact:
I had a brief look at the code in that part of the game exe. Yes, it is code that handles text output on some screens in the game.The "incorrect text" - text, where the characters with codes from 129 up to 255 are not output (10% of all texts).
I see no bugs here. In fact I see that it is deliberately coded in such a way that character codes in the 128 to 255 range are not output as raw characters.
I see that character code 128 has a special handler. I have not dug into the code very deep but, it is definately a special character.
Also, I see that character codes 129-255 have a special handler. The code that handles this range of character codes deliberately zeros bit 7 of the character code. It is clear that these character codes are not intended to display raw font characters.
I'll look at it a little more this weekend. I'm a little curious myself how this code works now...
"Stars are holes in the sky from which the light of the Infinite shine through." - Confucius.
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
I think, that at first there was no support of characters more than 128. Then it have made, but have not corrected all code (bug in it). I do not see sense to output the comments on the technology by two miscellaneous ways (colony screen and help screen).
I have downloaded "Open Watcom" and used "pmwbind" for elimination DOS/4GW. Now I can to decompile the program normally. Though it also will occupy many time. You can give me your MoO2's asm project? Or this your know-how?
I want to understand structure "debug info" (dwarf mode?), can be it will be possible restore names of functions and variables.
About the language, I saw interesting functions in "debug info":
"Update_Ship_Names_To_New_Language_", "Reload_Language_Strings_", "Load_Language_Fonts_", "Set_Language_Race_Names_" Etc.
I have downloaded "Open Watcom" and used "pmwbind" for elimination DOS/4GW. Now I can to decompile the program normally. Though it also will occupy many time. You can give me your MoO2's asm project? Or this your know-how?
I want to understand structure "debug info" (dwarf mode?), can be it will be possible restore names of functions and variables.
About the language, I saw interesting functions in "debug info":
"Update_Ship_Names_To_New_Language_", "Reload_Language_Strings_", "Load_Language_Fonts_", "Set_Language_Race_Names_" Etc.
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
I have found solution of my problem.
The description:
if (eax > 128)
loc_1231AB(...);
It clears characters, under given conditions. If to replace 80 on FF, "incorrect text" is output correctly. It is necessary to test, but this solution.
Code: Select all
Offset for ORION2.LE - 0x0017F407:
cseg01:00123070 sub_123070 proc near ; Attributes: bp-based frame
...
cseg01:00123091 xor eax, eax
cseg01:00123093 mov al, [ebp+var_4]
cseg01:00123096 cmp eax, 80h ; Required line
cseg01:0012309B jg loc_1231AB
cseg01:001230A1 xor edx, edx
...
if (eax > 128)
loc_1231AB(...);
It clears characters, under given conditions. If to replace 80 on FF, "incorrect text" is output correctly. It is necessary to test, but this solution.
Last edited by Grig de Griz on Fri Apr 07, 2006 8:27 am, edited 1 time in total.
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
Russian versions MoO2 exist, but very poor. I made Russian version MoO3, it was recognized by best. But I don't think to make Russian version MoO2 now (can be later). The process of researches is interesting to me only (for my MoO2 Workshop).
Siron, what for to you the Russian version? Want to learn Russian?
I prefer to play in original English versions (If understand). The translation takes part of spirit of the game (even very good)...
Siron, what for to you the Russian version? Want to learn Russian?
I prefer to play in original English versions (If understand). The translation takes part of spirit of the game (even very good)...
I was in Moscow some years ago. But no...I dont wanna learn russian. But I have some russian chess buddies and I would like to present them a good russian version of this game. And more russians in general would be interested in this classic...I assume.
I didnt even know that there already is a russian version.
I didnt even know that there already is a russian version.
- Grig de Griz
- Posts:48
- Joined:Mon Sep 26, 2005 12:23 am
- Location:Russia
I have made some experiments. I have following outcomes:
1. Now I can read watcom degub_info - I know names of variables and functions.
2. The output "incorrect text" is made by one more function.
3. For input text is necessary to edit the function Interpret_Mouse_Input.
4. If necessary, is possible to edit the function of text insertion.
1. Now I can read watcom degub_info - I know names of variables and functions.
2. The output "incorrect text" is made by one more function.
3. For input text is necessary to edit the function Interpret_Mouse_Input.
4. If necessary, is possible to edit the function of text insertion.
Code: Select all
cseg01:00123070 Print_Character_To_Bitmap proc near
...
cseg01:00123091 xor eax, eax
cseg01:00123093 mov al, [ebp+var_4]
cseg01:00123096 cmp eax, 80h ; Required line
cseg01:0012309B jg loc_1231AB ; eax > 80
cseg01:001230A1 xor edx, edx
...
------------------------------------------------------------
cseg01:0012260F Print_Clipped_Character proc near
...
cseg01:0012262E xor eax, eax
cseg01:00122630 mov al, [ebp+var_4]
cseg01:00122633 cmp eax, 80h ; Required line
cseg01:00122638 jle short loc_122645 ; eax <= 80
...
Who is online
Users browsing this forum: No registered users and 5 guests