• Please review our updated Terms and Rules here

Sending BASIC from Windows to IIGS via serial

twillkickers

Experienced Member
Joined
Feb 22, 2017
Messages
152
Location
New Jersey, USA
I'm trying to send some basic to my IIGS over the serial port from command line (CMD) in Windows to my IIGS - but I'm having some problems.

Some background info:
  • I'm using COM8 on my Windows Machine (settings below)
  • COM8 Status.JPG
  • I'm using the modem port on the Apple IIGS (settings below)
  • Modem Port Settings.jpg
I begin by opening Apple Basic on my IIGS (control + reset)
I type IN#2 in the command line on the IIGS so that the IIGS begins listening to the modem port.
I have a program file called MUNCH.txt (sample program copied from the internet, attached to this post.) I'm trying to send the entire file over to the IIGS. I've done this by using the type command in DOS:
type MUNCH.txt COM8.JPG

However the output to the IIGS is missing some characters towards the beginning of each line:
type MUNCH.txt output APPLE IIGS.jpg

I am wondering why this is? Are my settings wrong?

However, when I use the below line to echo a single line to the IIGS, it comes out without any errors:
echo line 30.JPG

output of echo on APPLE IIGS.jpg

Also when I use type to print the text file to the CMD display, it comes out just fine.
type MUNCH.txt.JPG

Any input on why the type command is not getting the text correct on the IIGS would be helpful. I appreciate it!
 

Attachments

  • MUNCH.txt
    509 bytes · Views: 2
Are the missing characters always the same?

I would try at least 9600 baud on the connection and see what happens, perhaps the command piping the text to the com port is "too fast." Just a hunch.

Also you can use terminal programs to send text files with character and/or line delays. I have to do this more for Apple 1, otherwise characters get missed especially on new lines.
 
Missing characters are always the same... When I changed to 9600 baud it comes out missing even more characters. Are any of my other settings wrong?

9600 BAUD.jpg
 
That gives us some info anyway! Probably slow it back down, but thanks for that test.

I would still recommend you try TeraTerm, and set minimal line/character delays in the settings. I find this to be the most stable way to send text programs over serial to older computers.
 
Set it to 150 baud on both sides... slow as snot but apparently no missing characters. Wonder if I should try setting CPU speed to normal instead of fast and going higher baud? I'll give it a shot and re-post.
 
Tried setting CPU to Normal and it became even worse... Putting it back on Fast and switching to 150 baud for now. If someone has additional recommendations for faster & accurate transmission speed please let me know!
 
As each line is typed into basic, and the "CR" happens, basic will take a while to process it. As suggested earlier, use a terminal program to put a delay at the end of each line. Start at 50 milliseconds or so, and increase/decrease as required. You may also need to put delays between characters, but this *usually* works. Switching to a protocol-based file exchange method (like xmodem/ymodem/zmodem) is better.

Nowadays, I use "minicom" on linux for these things. Similar programs for windows might be Tera Term or CoolTerm, but I've used neither.
 
Thank you for the tip! This is most certainly my issue. Was hoping to eventually use this method to send over 6502 assembly, but I think I'll just try and fit programs onto disks.
 
Thank you for the tip! This is most certainly my issue. Was hoping to eventually use this method to send over 6502 assembly, but I think I'll just try and fit programs onto disks.
Right on. Lots of options for the Apple II nowadays, you're only as limited as your imagination.

To give you some ideas from a Replica 1 Plus, it can take several minutes for a terminal program to enter a long assembly program. The same program on Cassette loads in perhaps 30 seconds. The same program on a local disk, in my case, the p-LAB MicroSD for Apple-1 card, loads in a few seconds.

So yeah, sending over serial works with the right line (and sometimes character) delays, but it's also painfully slow compared with pretty much any other option.
 
Have you tried either XModem or a terminal program on the IIGS to receive the file? The error checking in a protocol would help the transfer.
 
Guess the big question is whether the Windows box and IIGS intrinsically support hardware handshaking. Or, if there's a way to configure them to use XON/XOFF instead. If baud rate "solves" the problem, it is most certainly a handshaking issue.
 
Back
Top