[comp.sys.cbm] Paperclip/XMODEM

slindahl@udenva.UUCP (Steve "Mr. MBA" Lindahl) (01/20/87)

Has anyone experienced problems in downloading text files via xmodem for
the Paperclip 64 word processor?  The problem seems to be specific to the
files that I store on BSD4.2. 

Since I move around between terminals and word processors, I find that it
is easy to create and store text files on the UNIX system here at school.
When I need to print them out, I download them onto my Commodore 64 and
then load the file from the word processor.  Last week, xmodem was
installed onto our UNIX system.  Seeing that xmodem protocol is given in
my terminal program, I proceeded to use it.  Everything seemed to 
transfer as it should have until I loaded the file in from disk with my
word processor.  When I first transfered the file, I sent it as a text
file and stored it as a PRG file since Paperclip uses these to read in the
text.  When Paperclip tried to read the file, it produced graphics
characters where the letters should be.  Thinking that Paperclip wanted
to read the file in as a SEQ file, I then downloaded the file again and
this time I save it as a SEQ file.  When Paperclip tried to read this one
from my disk more garbled characters appeared that did not represent any
pattern whatsoever.  Finally, I just did a virtual transfer without any
error checking and saved it as a SEQ file.  With this, Paperclip was able
to read the data file...

Any help in this matter would be greatly appreciated.  If the answer is
something simple then please just send me Email.  One final note, I used
the VIP terminal program for the downloading process...



-- 
Steve J. Lindahl               {hplabs, seismo}...!hao!udenva!duorion!slindahl

             The Beast is loose, and it's hungry tonight...(Platoon)

rayz@csustan.UUCP (01/25/87)

In article <2767@udenva.UUCP> slindahl@udenva.UUCP (Steve "Mr. MBA" Lindahl) writes:
>Has anyone experienced problems in downloading text files via xmodem for
>the Paperclip 64 word processor?  The problem seems to be specific to the
>files that I store on BSD4.2. 

Xmodem does not convert the character sets-- Unix uses real ascii, while most
files on Commodore equipment are stored in Commodore ascii.  In particular,
Paperclip expects sequential files to be in Commodore Ascii.  (Paperclip's
PRG files are even worse:  they are stored in screen code.)

I do the same kinds of things you do between the two systems.  I find the
following two shell scripts work well to convert the character sets.  I run
the scripts under Unix, before sending a file to the CBM machine, or after
receiving one.

unixtoc64 will convert the ascii to cbm format, for downloading using, for
instance, xmodem.  c64tounix does the opposite.  Both scripts handle
C-Power special characters, as well as ordinary cbm characters.

-----Cut Here-----------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	/usr/local/c64tounix
#	/usr/local/unixtoc64
# This archive created: Thu Oct 30 19:40:14 1986
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'c64tounix'" '(570 characters)'
if test -f 'c64tounix'
then
	echo shar: "will not over-write existing file 'c64tounix'"
else
sed 's/^	X//' << \SHAR_EOF > 'c64tounix'
	X:
	X# Script to translate c64 C-Power files which have been uploaded
	X# by xmodem to unix format.  This script also works for other sequential
	X# ascii files, since the only difference between a C-Power file and
	X# simple ascii is that C-Power uses some Commodore graphic characters
	X# for the {}\|` and ~ characters.
	X#
	X# R. L. Zarling 3/86
	X#
	Xif /bin/test $# -lt 1
	Xthen
	X	echo "Usage: $0 filename [ filename ... ]"
	X	exit 1
	Xfi
	Xfor i in $*
	Xdo
	X	echo "$i ..."
	X	tr "\015\244\333\337\335\257" "\012\137\173\174\175\176" < $i | \
	X	tr "[\301-\332A-Z]" "[A-Za-z]" > t$$
	X	mv t$$ $i
	Xdone
SHAR_EOF
if test 570 -ne "`wc -c < 'c64tounix'`"
then
	echo shar: "error transmitting 'c64tounix'" '(should have been 570 characters)'
fi
chmod +x 'c64tounix'
fi
echo shar: "extracting 'unixtoc64'" '(572 characters)'
if test -f 'unixtoc64'
then
	echo shar: "will not over-write existing file 'unixtoc64'"
else
sed 's/^	X//' << \SHAR_EOF > 'unixtoc64'
	X:
	X# Script to translate unix files into Commodore C-Power format for
	X# downloading.  This script also works for standard ascii files,
	X# since C-Power format is a proper superset of the standard sequential
	X# format (adding a representation for {}\|` and ~, which are not
	X# normal Commodore characters).
	X#
	X# R. L. Zarling 3/86
	X#
	Xif /bin/test $# -lt 1
	Xthen
	X	echo "Usage:  $0 filename [ filename ... ]"
	X	exit 1
	Xfi
	Xfor i in $*
	Xdo
	X	echo "$i ..."
	X	expand -3 <$i | tr "[A-Za-z]" "[\301-\332A-Z]" | \
	X	tr "\012\137\173\174\175\176" "\015\244\333\337\335\257" > t$$
	X	mv t$$ $i
	Xdone
SHAR_EOF
if test 572 -ne "`wc -c < 'unixtoc64'`"
then
	echo shar: "error transmitting 'unixtoc64'" '(should have been 572 characters)'
fi
chmod +x 'unixtoc64'
fi
exit 0
#	End of shell archive