[net.micro.amiga] Mac to Amiga text transfer

crunch@well.UUCP (John Draper) (10/18/85)

 ON TRANSFERRING FILES FROM MACINTOSH TO AMIGA - John Draper
 
        I'm back again with more useful information on the Amiga.   This time,
 I want to share with you on the problems I had in transferring files from
 the Mac to the Amiga.   I needed to do this because there was no good terminal
 program for the Amiga,  so I had to transfer files from the Amiga on-line
 support system which is made available through their technical support
 program.
 
        There are lots of source file examples on the system they are using,
 and its available through their software support program.   I have requested
 permission from Amiga to post some code because all code is currently copy-
 righted.
 
        I scooped it up using MacTerminal,  then broke the large capture file
 down into smaller files.  After that,  my problem was in getting the files over
 to the Amiga.
 
        My first attempt was to use the AmigaDOS "copy" command to "copy"
 serial data into a file.   The command is as follows:
 1> copy ser: grog.c
 
        Grog.c is the filename that I want on the Amiga.  The file got
 transferred OK,  but I was unable to send an EOF to the Amiga to get it to
 acknowledge that I was done.   The Copy also uses internal buffering,  and
 I was unable to get the Amiga to flush out the last block to disk and properly
 close the file.   I had to reset the machine,  but lo and behold,  "grog.c"
 wasn't on the disk.   I didn't expect it to be,  because the file wasn't
 properly closed.   I read in the DOS users guide that typing a control-\
 would terminate the COPY routine,  but that didn't appear to put me back into
 CLI.
 
        My next attempt was to write my own program on the amiga to accept
 serial data by:   fopen("ser:","r+");   But lo and behold,  the Lattice
 standard I/O had a stupid bug that wouldn't allow more than 128 characters
 to be transmitted.   I assumed that I was filling the buffer,  but it turned
 out that the stupid MacTerminal can't go faster than 1800 baud (I was using
 9600),  and that wasn't the case.   I also implemented Xon/Xoff protocol and
 that didn't work.   So I tried a different approach.
 
        Amiga furnishes a program used by the IBM Cross Development system that
 transfers files from IBM to Amiga.   It is a simple HEX converter program that
 makes any binary file into characters from A-F and 0 to 9,  followed by a
 "Q".   For instance ABC123, get converted into 414243303132Q.   So I wrote
 a program on the MAcintosh that converted the file into that format, then using
 MacTerm,  was going to send it over that way.   But,  for some reason,  after
 only 128 characters,   that program gagged and I got "timeout error".   Amiga
 people were stumped on that one.
 
        Last night,  when I finally attempted to demonstrate each attempt to
 a friend,  I discovered that the control-\ DID work,  but nothing was
 indicating that it was working.   However,  the last block of the file failed
 to get transferred.   I got around that by sending spaces until I heard the
 disk access,   then I typed a control-\.   After that,  I had to re-boot
 the machine,  and lo and behold,   grog.c was in the directory.   I "typed"
 it out and it all appeared to be there.   I used ED to edit out the spaces
 at the end of the file,  and diddled with Macterm because it was putting a
 "cr" character at end of each line.   The result was that If I typed the file
 out,  there appeared to be no line breaks,  but after I read in the file using
 ED,  then read it back,  the ED program,  messaged the file in such a way as
 to put in the line breaks.   After that,  I fed the compiler (It was getting
 rather hungry by then),  and learned that I had to spend another 2 hours
 diddling around with the include files until the compiler stopped gagging.
 
        The program is pretty neat.   It displays "tires" bouncing off the
 walls in various velocitys going faster and faster until most of them dissapear
 off the screen leaving one of them bouncing up and down, and the other one
 right and left.   Again,  I hope to get permission soon from Dave Lucas and
 the Amiga folks to post the source.   The program leaves residue on the
 right margin, and Dave said that he wanted to clean it up a bit before
 releasing it.   Now, I can do my editing on the Macintosh,  then transfer
 the file to the Amiga.   Now,  I should try to get the Amiga to be an
 "Appletalk" node.
 
 HERE ARE THE MAC-TERMINAL SETTINGS:
 
 TERMINAL MENU:
 
        Local Echo on
        "on line" on
        "auto repeat" on
        (Everything else off)
 
 COMPATABILITY MENU:
 
        9600 baud
        8 bits no parity
        Handshake none
        Connection:  "other computer"
        port: "printer"
 
 FILE TRANSFER MENU:
 
        method: Text
        remote system: Other
        Delay between characters: none
        Delay between lines: none
        No line breaks or word wrap.
 
        I used the Macintosh printer cable,  I removed it from the ImageWriter,
 then plugged it into the Amiga serial connector,  and it worked fine.
 
        REMEMBER!!  Very important,  when done transferring the text,  you
 need to send spaces until you notice a disk access.   That is a pretty good
 indication that you have everything.   After that, type a control-\ to tell
 the Amiga to close up everything.