|
From: Roger B. <an...@xp...> - 2021-02-10 22:25:34
|
On 10 Feb 2021 at 15:29, Thorsten Otto wrote: > On Mittwoch, 10. Februar 2021 03:23:29 CET Roger Burrows wrote: > > I think most has already been said. The only situation were a multi-language > TOS might be useful is, when you not only supply EmuTOS, but a complete > "distribution", like eg. the minipack. In that case, using a multi-language > capable EmuTOS that works for everyone is very handy. > > OTOH, some time ago i already started to rework the multi-language feature > (not yet completed). I came to the conclusion that is should be possible to > get rid of all the hash & lookup tables. All that remains is a lookup table > per language (about 200 bytes for each language), plus the translated texts > (about 8-9K per language currently). That should free some considerable room > in the 512k ROMs, and also get rid of the runtime-overhead of looking up the > strings. > Yes, the current method is pretty ugly, but presumably the hash tables were chosen for speed. Without testing, I'm not sure how important that is versus doing a binary search. But in any case, considering there are 300+ text strings for each language, getting the lookup info into 200 bytes sounds pretty impressive. I hope you can get it done soon! Roger P.S. Even if you manage to get rid of the run-time lookup for most strings, there are still explicit runtime references to gettext(), so I'm curious how you're going to fix that. |