Ideas to create other languages versions of updated TOS

News,announcements,programming,fixes,game patches & discussions.

Moderator: Petari

User avatar
exxos
Site Admin
Posts: 2575
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Ideas to create other languages versions of updated TOS

Post by exxos » Sun Jun 17, 2018 12:11 pm

In light of Petari's TOS mods, there is huge work in patching files for other languages as already mentioned in another thread.

So what if a simple program ( I could write in VB6 for PC) which would dump all the text into a text.label, then allow a second box to enter updated text. this way, anyone could easily patch the text to whatever they want, and the VB6 program would do the hexcode updates and dump to new file.

Of course if all address locations where fixed, a save feature could be added so each time Petari updates TOS105 for example, the whole thing could be patched from english to whatever was entered before. Making text updates very fast for future building.

If text locations change, then may need more work, maybe string match all english text and work out address locations that way.

I am also assuming text strings are fixed lengths.. I don't know if menus for example, has text padded with spaces, or simple end of line markers ? In which case text lengths may need to be increased to accommodate longer text...
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

User avatar
IngoQ
Posts: 546
Joined: Tue Aug 22, 2017 8:38 am
Location: Germany

Re: Ideas to create other languages versions of updated TOS

Post by IngoQ » Sun Jun 17, 2018 12:34 pm

I believe Peter mentioned earlier that the easiest way is to take the german language version as a basis, because it usually has the longest texts. Assuming all text fields are plain ASCII and have a fixed location, you could build a table with position and length of the text fields regarding to this version.

To have translations to other languages you would then take this language file and replace the texts with the new ones, provided they are equally or shorter than the german texts. The patcher tool would then read a language file and overwrite the text fields in the binary.

To handle future versions easier, you could replace the german text fields in the binary with a unique placeholder, for example sequence that never occures "naturally" followed by an integer that provides an index for the language file. This would make the patching independent of the position and therfore the binary version. Of course this would only work, if the text is long enough to be replaced by the sequence. "No" could be a challenge...

Or something in between: Every patched TOS version comes with its own language file, where the positions and lengths are defined for this special binary, which could be checked by building a hash.
Ingo :geek:

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupéry

User avatar
IngoQ
Posts: 546
Joined: Tue Aug 22, 2017 8:38 am
Location: Germany

Re: Ideas to create other languages versions of updated TOS

Post by IngoQ » Sun Jun 17, 2018 12:36 pm

But there my be another difference in the language versions besides only the strings: The keyboard layout. I have no idea how this is handled?
Ingo :geek:

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupéry

User avatar
exxos
Site Admin
Posts: 2575
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Ideas to create other languages versions of updated TOS

Post by exxos » Sun Jun 17, 2018 12:59 pm

IngoQ wrote:
Sun Jun 17, 2018 12:34 pm
I believe Peter mentioned earlier that the easiest way is to take the german language version as a basis, because it usually has the longest texts. Assuming all text fields are plain ASCII and have a fixed location, you could build a table with position and length of the text fields regarding to this version.
So likely texts are not padded with spaces then.. That may be true, but then only german speaking people could translate it assuming they knew other languages...

I was more thinking English would be best as most people who speak English, tend to be french or german etc.. Not so sure about germans speaking french for example.. :shrug:


IngoQ wrote:
Sun Jun 17, 2018 12:34 pm
To have translations to other languages you would then take this language file and replace the texts with the new ones, provided they are equally or shorter than the german texts. The patcher tool would then read a language file and overwrite the text fields in the binary.
Exactly.. Though if different languages are indeed different text lengths.. then I assume that just increasing the text length to a more generic standard size would also work.
IngoQ wrote:
Sun Jun 17, 2018 12:34 pm
To handle future versions easier, you could replace the german text fields in the binary with a unique placeholder, for example sequence that never occures "naturally" followed by an integer that provides an index for the language file. This would make the patching independent of the position and therfore the binary version. Of course this would only work, if the text is long enough to be replaced by the sequence. "No" could be a challenge...
Yeah, if we used english as the base file, all address locations would likely be stored, then the text to look for as a second check.. Then get the length of the text string, and allow the user to edit that length.. or the patcher increases the string length and re-calculates the address locations..
IngoQ wrote:
Sun Jun 17, 2018 12:34 pm
Or something in between: Every patched TOS version comes with its own language file, where the positions and lengths are defined for this special binary, which could be checked by building a hash.
I don't know if its possible, maybe Petari can answer.. but in terms of future boosters, we could have a flash block with all the files in, the TOS could jump/read the selected language files and return it.. though I think that may only work with TOS in RAM.. could be patched then.. would just need some software like auto program to load relevant language file..
IngoQ wrote:
Sun Jun 17, 2018 12:36 pm
But there my be another difference in the language versions besides only the strings: The keyboard layout. I have no idea how this is handled?
No idea. :shrug:
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Petari
Posts: 363
Joined: Tue Nov 28, 2017 1:32 pm

Re: Ideas to create other languages versions of updated TOS

Post by Petari » Sun Jun 17, 2018 3:28 pm

Yes, somewhere in 1993 I translated TOS 2.06 based on German v. - as said because text is usually longest in German. There were no sources then, and now situation is little better. I have well disassembled TOS 1.04 and 1.62. I learned some things in all those years.
Most important is that some 98% of txt is in standard RSC structures, and it can be well editable, so can replace text without need to keep same length - but right here must say that best to do it with some RSC editor, to keep good formatting - otherwise will not look so good. I needed to move TOS v. info 1.4 char. right to be centered in Desktop info.
RSCs are at the end of TOS ROM, and need not much work to replace them with translated versions. Actually, no need to translate to languages for which we have already versions 1.04 or 1.62 - RSCs in both are same. There are some messages from GemDOS part, which appear not often, that can be collected in 1 file and translated in short time - after that just replacing in src. Well, all depends from interest. It is extra work for me, so will go in only if people contribute.
Considering different kb. input: there are tables specific for every language, what translate physical kb. codes (position of key actually) to ASCII codes.
That's on me to put proper table to proper place. If I remember well, no need to change character sets, unless it is some language not using Latin letters as base. Then Latin remains in codes 0-127 and specific (kyrill for instance) go to codes in area 128-255 . That way will print correct filenames and possible txt. what remained English.
104D.ZIP
(4.39 KiB) Downloaded 5 times
Above is not German, but UK Desktop RSC. There is other, shorter one for AES too in ROM. You can translate it with some good RSC editor like ORCS. But, it has sense only to translate to language for which no TOS 1.04 or 1.62 . Big chance for people from Lichtenstein :lol: If someone translates it, I will post other RSC and GemDOS messages too .
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
exxos
Site Admin
Posts: 2575
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Ideas to create other languages versions of updated TOS

Post by exxos » Sun Jun 17, 2018 6:04 pm

I'm not at home to check right now.. but if its a RSC file, couldn't it simply be swapped for other TOS104 RSC files ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Petari
Posts: 363
Joined: Tue Nov 28, 2017 1:32 pm

Re: Ideas to create other languages versions of updated TOS

Post by Petari » Sun Jun 17, 2018 6:54 pm

exxos wrote:
Sun Jun 17, 2018 6:04 pm
I'm not at home to check right now.. but if its a RSC file, couldn't it simply be swapped for other TOS104 RSC files ?
Yes, just need to extract those other RSC files from other language TOS versions. Assuming that order of objects is same, it will work.
And, since Desktop Info is in RSC file too, that part needs same corrections as in English RSC .
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
crashman
Posts: 26
Joined: Thu Jan 25, 2018 2:55 pm

Re: Ideas to create other languages versions of updated TOS

Post by crashman » Sun Jun 17, 2018 10:30 pm

Count on me to help in whatever I can to translate/test in Spanish.

Petari
Posts: 363
Joined: Tue Nov 28, 2017 1:32 pm

Re: Ideas to create other languages versions of updated TOS

Post by Petari » Mon Jun 18, 2018 8:45 am

I looked Spanish TOS 1.04 . Longer than English - no wonder, they use 'CONFIRMAR' instead 'OK', and that's on many places. As remembered, not everything is translated - OUT OF INTERNAL MEMORY .... SYSTEM HALTED *** is same, and for sure in all other language versions. I need to run over complete 192 KB to see text messages outside mentioned 2 RSCs, which may need to translate (not talking about Spanish v., of course) . Finding keyboard table locations.
Will post here later, hopefully today modded v. with Spanish txt. and input.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
crashman
Posts: 26
Joined: Thu Jan 25, 2018 2:55 pm

Re: Ideas to create other languages versions of updated TOS

Post by crashman » Mon Jun 18, 2018 10:45 am

Thanks!
I have right here an open MegaST with your IDE adapter and currently a modded 1.04 Spanish, that I patched with your IDE patch, just with the addresses modified to fit on the Spanish TOS.
And an eprom burner by it's side...
Pity I am on afternoon shift at work, so after 14pm, offline...

Post Reply