Hi all,
is there any tools to convert the usecode file from 16 bits to 32 bits?
thx
Artaxerxes
about Exult tools
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Re: about Exult tools
Not directly, no; but if I am not mistaken, one could dump all with rip/wud, edit the header to be 32-bit and reassemble with wuc/rip. Or someone could write a program to do that directly.
I assume this is for SI French? (maybe even for the book function?) If you are interested only in larger amounts of text, it would be a lot easier.
I assume this is for SI French? (maybe even for the book function?) If you are interested only in larger amounts of text, it would be a lot easier.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: about Exult tools
do you mean it would be a lot easier..... to be in 32 bit? or something else?
Anyways, yes, it would be for translation. The english text just fits in 16 bits for the book function. Other languages tend to use more space than English, so it fails hard.
We did a 32 bit usecode conversation for SI-french using rip/wud and rip/wuc but it is not very clean (jump offset were an issue for some functions). So I was thinking, why not just start from 32 bit usecode. It would be the creating of patches easier and we could automate from translation too. All of that is resting on having 32 bit usecode.
Artaxerxes
Anyways, yes, it would be for translation. The english text just fits in 16 bits for the book function. Other languages tend to use more space than English, so it fails hard.
We did a 32 bit usecode conversation for SI-french using rip/wud and rip/wuc but it is not very clean (jump offset were an issue for some functions). So I was thinking, why not just start from 32 bit usecode. It would be the creating of patches easier and we could automate from translation too. All of that is resting on having 32 bit usecode.
Artaxerxes
Re: about Exult tools
Yes, that is what I meant. But on further reflection, there would actually be little difference between the two cases (32-bit due to text size vs 32-bit due to code size) because the size of offsets for addsv/addsi opcodes would change, and this would change the values of jump offsets; the difference would be that jump offsets are less likely to become 32-bit if the function size is mostly due to text.do you mean it would be a lot easier..... to be in 32 bit?
In either case, the program would have to recalculate jump size offsets. Given that UCC has been recently modified to do just that, it wouldn't be too hard to write a separate utility for translation which recalculates string/jump offsets and outputs corrected opcodes and offsets.
Or UCC could be used to translate, by having the text in a separate, easily modified file, which declares the string constants and the book/dialog function making reference to the strings in that earlier file. But this would be just as tricky as it would require an adaptation of the tools that no doubt exist for translation.
Which brings me to the point: is there any specific tool that is being used in translations? If the source is available, I could modify it to handle the 32-bit conversion.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: about Exult tools
The Italian team have made such a tool I believe. It may have been used for other translations as well.
thx
Artaxerxes
thx
Artaxerxes
Re: about Exult tools
Hallo,
I’m The Ancient One, one of the Italian translator of BG (now working on SI).
I’m quite sure that our tool, written by DK, already does what you’re asking for.
We added this feature at least two years ago in order to translate the books from SI.
Right now I’m not sure if this needs a “custom patch” for Exult, but I don’t think so.
Hope this helps.
-diego
PS
This is my first post on the Phorum.
So… thank you very much for your wonderful work on Exult. I love Exult so much that I come here almost daily in search of news!
I’m The Ancient One, one of the Italian translator of BG (now working on SI).
I’m quite sure that our tool, written by DK, already does what you’re asking for.
We added this feature at least two years ago in order to translate the books from SI.
Right now I’m not sure if this needs a “custom patch” for Exult, but I don’t think so.
Hope this helps.
-diego
PS
This is my first post on the Phorum.
So… thank you very much for your wonderful work on Exult. I love Exult so much that I come here almost daily in search of news!
Re: about Exult tools
If it converts to 32-bit usecode, complete with correctly updated 32-bit string and jump offsets, then no patch should be needed (in fact, the original games would choke with 32-bit usecode).Right now I’m not sure if this needs a “custom patch” for Exult, but I don’t think so.
Yes, I can tell :-p (from here, for those who are wondering).I love Exult so much that I come here almost daily in search of news!
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Site Admin
- Posts: 985
- Joined: Thu May 14, 2020 1:34 pm
Re: about Exult tools
You could do like Marzo recommended to me quite awhile ago and separate the usecode into two or more functions. (If I am understanding correctly). It's really easy and a quickly copy-pasted and edited example will follow this sentence.
extern BG_BOOK_QUALITY_101_OR_MORE object#()();
extern BG_BOOK_QUALITY_100_OR_LESS object#()();
BG_BOOK shape#(1301) ()
{
book_mode();
UI_play_sound_effect2(0x005E, item);
var quality = get_item_quality();
if (get_item_quality() > 100)
item->BG_BOOK_QUALITY_101_OR_MORE ();
else if (get_item_quality() BG_BOOK_QUALITY_100_OR_LESS ();
}
BG_BOOK_QUALITY_101_OR_MORE object#()()
{
var quality = get_item_quality();
if (quality == 101)
say("Book 101");
else
say("Qualities 149 and up are unwritten.");
return;
}
Second file has this:
BG_BOOK_QUALITY_100_OR_LESS object#()()
{
var quality = get_item_quality();
if (quality == 0)
say("Book 0");
return;
}
extern BG_BOOK_QUALITY_101_OR_MORE object#()();
extern BG_BOOK_QUALITY_100_OR_LESS object#()();
BG_BOOK shape#(1301) ()
{
book_mode();
UI_play_sound_effect2(0x005E, item);
var quality = get_item_quality();
if (get_item_quality() > 100)
item->BG_BOOK_QUALITY_101_OR_MORE ();
else if (get_item_quality() BG_BOOK_QUALITY_100_OR_LESS ();
}
BG_BOOK_QUALITY_101_OR_MORE object#()()
{
var quality = get_item_quality();
if (quality == 101)
say("Book 101");
else
say("Qualities 149 and up are unwritten.");
return;
}
Second file has this:
BG_BOOK_QUALITY_100_OR_LESS object#()()
{
var quality = get_item_quality();
if (quality == 0)
say("Book 0");
return;
}
Re: about Exult tools
Greetings,
yes, the U7Ed (the editor for Ultima7 fan translation) can automatically convert, if needed, the jump opcode from 16 to 32 bit.
Just ask me for the source, but I think can be more useful a little discussion, because the algo it's... mmm... how can I say that? A little "complicated"
Well, isn't written very well... but works
yes, the U7Ed (the editor for Ultima7 fan translation) can automatically convert, if needed, the jump opcode from 16 to 32 bit.
Just ask me for the source, but I think can be more useful a little discussion, because the algo it's... mmm... how can I say that? A little "complicated"
Well, isn't written very well... but works
Re: about Exult tools
Can you mail it to me? I'd like to take a look (and compare to the way I've done it in UCC).Just ask me for the source
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Re: about Exult tools
Of course, just the time to find some little docs I've written for it...