Page 3 of 3

Re: How to transfer Telewriter files?

Posted: Wed Oct 14, 2020 2:56 pm
by sixxie
Slightly baffling - 53 is the SDL scancode that backtick generates on my (US-UNIX) keyboard. I'd have assumed that acted as CLEAR... Will have to do more experiments.

Re: How to transfer Telewriter files?

Posted: Wed Oct 14, 2020 3:03 pm
by snarkhunter
My keyboard is an AZERTY one and I use a MS-DOS system (WIN 10 at work, XP Home... at home!).

Re: How to transfer Telewriter files?

Posted: Wed Oct 14, 2020 3:31 pm
by sixxie
Yeah but it generates a specific scancode that my SDL code checks and really should be mapping to CLEAR :) Harumph! Once working day is over I'll experiment with munging my keymap and see what happens.

Re: How to transfer Telewriter files?

Posted: Wed Oct 14, 2020 7:54 pm
by sixxie
So I set my own keyboard map to French, and ran with -debug-ui -1 -keymap fr -kbd-translate. I get this:

Code: Select all

sdl.key press   scan= 53   sym=000000b2   mod=0000   unicode=00b2   name=²
sdl.key release scan= 53   sym=000000b2   mod=0000   unicode=0000   name=²
And pressing the '²' key clears the screen. I'm completely at a loss for why it should not do so for you!

Re: How to transfer Telewriter files?

Posted: Thu Oct 15, 2020 6:42 am
by snarkhunter
... But it does! (at least under Dragon DOS) I've just tried once more to make sure)

Does this mean there are no changes needed and I may try the same under TW?
I will have a go right now.

Re: How to transfer Telewriter files?

Posted: Thu Oct 15, 2020 6:52 am
by snarkhunter
... Ok, using the following shortcut command:

C:\Users\ldepeux\Downloads\Dragon\XROAR64\xroar.exe -machine dragon32 -keymap fr -kbd-translate -lp-file XRoar-prtout.txt


I could get a loaded TW document printed as "prtout.txt" in the same folder as the XRoar executable.
The only thing that is annoying now is the fact there are several CR sent out between each line of TW text (I counted 9 of those), which makes rather lonnnnnng documents!

Maybe there is a trick to manage this, but thank you so much already, Ciaran, for your amazing help! (as always)

Lionel

Re: How to transfer Telewriter files?

Posted: Thu Nov 05, 2020 3:54 pm
by snarkhunter
Hello Ciaran,

Sorry about bothering you again about this, but would you by any chance have an idea and/or a solution to the issue I explained last time (when transfering Telewriter - disk version - files to PC text files)? Every line of text is followed by at least 9 CR codes, which would take a huge time if I was to manually remove them?

… Asking just in case, and thank you very much in advance for any help you might be able to provide here.

Re: How to transfer Telewriter files?

Posted: Thu Nov 05, 2020 6:09 pm
by sixxie
snarkhunter wrote: Thu Nov 05, 2020 3:54 pm
Sorry about bothering you again about this, but would you by any chance have an idea and/or a solution to the issue I explained last time (when transfering Telewriter - disk version - files to PC text files)? Every line of text is followed by at least 9 CR codes, which would take a huge time if I was to manually remove them?
You could try the following little awk command:

Code: Select all

awk '{ print; print ""; }' RS="" filename
"" is a special record separator value that means any run of newlines, so that will print each "record" (up to a newline) followed by a single extra newline. Just redirect the output into a new file.

Re: How to transfer Telewriter files?

Posted: Fri Nov 06, 2020 7:09 am
by snarkhunter
Thank you very much for this tip, Ciaraan. I had never heard about that AWK command, so I will have to try it and see what result I'll be getting. I will let you know when I'm done.

Re: How to transfer Telewriter files?

Posted: Fri Nov 06, 2020 1:10 pm
by sixxie
Awk's great - Perl kinda swallowed most of its use cases, but the way it matches stuff still often makes it the simpler tool for a job. Generally Unix tool, but I gather that these days Windows gets all the basic Unix stuff.