Page 1 of 1

usecode deassemble

Posted: Mon Mar 10, 2003 2:25 am
by Quester
WinXP
P4

F:\Program Files\Exult>ucxt.exe -a

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Can anybody help?

Re: usecode deassemble

Posted: Mon Mar 10, 2003 3:14 am
by wjp
Is Exult setup correctly so that it can find the game data files? Is your exult.cfg in the same directory as ucxt?

Re: usecode deassemble

Posted: Tue Mar 11, 2003 1:25 am
by Quester
yes, all installed correctly, ucxt in Exult folder
is there another way to disassembly usecode? I try translate BG & SI to Russian

Re: usecode deassemble

Posted: Tue Mar 11, 2003 1:31 am
by wjp
Russian? Wow, very nice :-)

You could use 'wud' too. It's probably more stable than ucxt currently.

Re: usecode deassemble

Posted: Tue Mar 11, 2003 1:56 am
by Quester
thanks
I yet dont see a code form usecode, and have a question:
is there way to use more symbols in font than in original game? Latin is 26 symblos, russian - 32

Re: usecode deassemble

Posted: Tue Mar 11, 2003 2:12 am
by wjp
Yes, that's possible, since French uses more symbols, too. (Letters with accents).

I'm not really familiar with the details, though.

Re: usecode deassemble

Posted: Tue Mar 11, 2003 4:31 am
by artaxerxes
I think I can help on that one.

To decompile usecode, I've used "rip" and "wud". To recompile, I've used "wuc" and "rip" (again).


Get the cvs from si-french (sf.net/projects/si-french) and use the "le_camomille.pl" perl script to automatically take a usecode file, a rip, a wud and a wuc exec and magically split all data to be translated into a "todo" directory.

Wrt alphabet, it works this way:
fonts.vga holds several shapes. Each shape is made of 127 frame. Each frame is a letter of the alphabet. What the exult engine does when it needs to show a string of text is about the following:

for each letter of string_to_show
number = convert_letter_to_number(letter);
show_frame(number);
endfor

The association number letter is such that A = 0x41, B = 0x42,..., a = 0x61, ....
just like normal ASCII.

For the accentuated letters in French, I used the unused frame of each shape to put in é, à, ç etc. However, I cannot type normal é and expect it to be shown on the map since 'é' > 127. So I convert each é into the frame number of the shape. So for instance, I know that I put é at the 4th frame (starts at 0) so I have to type 0x03 whenever I need to put a é, which is easily done with emacs: c-q c-c (result is ^C which is 0x03).

There you go. I dunno is the russian alphabet uses something similar to ASCII. I really doubt it would work with unicode though. At worst, you'd have to make your own frames, assign arbitrarily a number to them and type your text normally but create a converting program that maps russian letter to frame number. I've done a similar program to convert accents to ultima shapes. It is in the tools directory of CVS and it is called "conv.pl".

If you need more help, don't hesitate to ask!

Artaxerxes

Re: usecode deassemble

Posted: Tue Mar 11, 2003 11:01 pm
by Quester
Thanks for help, I very need it.
Also question - in decoded script - where is font number? I think it is "pushi 1" before calling print function, its right?