Language Support

Search these posts first and if your question hasn't already been asked, ask it here!

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia
Language Support

Postby Grig de Griz » Thu Mar 16, 2006 11:54 pm

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"?

User avatar
siron
Posts:504
Joined:Fri Jul 22, 2005 12:35 pm
Location:Hamburg
Contact:

Postby siron » Mon Mar 20, 2006 5:15 am

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 )

User avatar
Lord Brazen
Site Admin
Posts:162
Joined:Mon Jul 18, 2005 10:16 pm
Location:Toronto, Canada
Contact:

Re: Language Support

Postby Lord Brazen » Tue Mar 21, 2006 12:14 am

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"?
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.

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 :lol:
"Stars are holes in the sky from which the light of the Infinite shine through." - Confucius.

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Wed Mar 22, 2006 4:07 am

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:

Code: Select all

------------------- ------------------- HEX ASM HEX ASM ------------------- ------------------- B980 MOV CX, 128 B9FF MOV CX, 255 ... ... ... ... ... LOOP LABEL1 ... LOOP LABEL1 ------------------- ------------------- (B980 replace B9FF)
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.

User avatar
Lord Brazen
Site Admin
Posts:162
Joined:Mon Jul 18, 2005 10:16 pm
Location:Toronto, Canada
Contact:

Postby Lord Brazen » Wed Mar 22, 2006 3:59 pm

Grig de Griz,

What about character codes 161-230. Do they output correctly?
"Stars are holes in the sky from which the light of the Infinite shine through." - Confucius.

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Thu Mar 23, 2006 4:00 am

The characters with these codes are output correctly everywhere, except for places, which I have presented on pictures (previous post). The same text, same font, but is not output. Probably others functions for drawing or loading of the font, but what for?

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Mon Mar 27, 2006 12:14 am

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).

Code: Select all

0x001A88F6 | B0 7F | mov al, 7Fh
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:

Code: Select all

0x001A88F0 | movsx ax, word ptr [di+18h] 0x001A88F4 | cmp ax, [di-50h] 0x001A88F7 | jg short near ptr [...] 0x001A88F9 | jmp near ptr [...]
Is more interquartile:

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 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.

Code: Select all

0x001A8939 | 3D 80 | cmp ax, 80h
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.

User avatar
Lord Brazen
Site Admin
Posts:162
Joined:Mon Jul 18, 2005 10:16 pm
Location:Toronto, Canada
Contact:

Postby Lord Brazen » Tue Mar 28, 2006 12:19 am

The "incorrect text" - text, where the characters with codes from 129 up to 255 are not output (10% of all texts).
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.

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.

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Tue Mar 28, 2006 4:04 am

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.

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Fri Apr 07, 2006 4:02 am

I have found solution of my problem.

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 ...
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.
Last edited by Grig de Griz on Fri Apr 07, 2006 8:27 am, edited 1 time in total.

User avatar
siron
Posts:504
Joined:Fri Jul 22, 2005 12:35 pm
Location:Hamburg
Contact:

Postby siron » Fri Apr 07, 2006 4:19 am

Sounds promising :)

I hope we have a russian version soon. Keep us informed!

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Fri Apr 07, 2006 8:30 am

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? :shock:
I prefer to play in original English versions (If understand). The translation takes part of spirit of the game (even very good)... :(

User avatar
siron
Posts:504
Joined:Fri Jul 22, 2005 12:35 pm
Location:Hamburg
Contact:

Postby siron » Fri Apr 07, 2006 2:22 pm

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.

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Mon Apr 10, 2006 2:22 am

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.

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 ...

minos84
Posts:1
Joined:Mon May 15, 2006 1:53 pm

Postby minos84 » Mon May 15, 2006 2:06 pm

i search for a friend
i search to make the install of moo2 in french
there are texts and fonts but i can't found .
I have many versions (one multilanguage in italien spanish )


Return to “Support”

Who is online

Users browsing this forum: No registered users and 6 guests