• Please review our updated Terms and Rules here

Transferring text files from Kaypro II to Windows machine.

Thorbjorn: 8n1 is set at both ends. I know nothing about 7e1.

What is not clear to me is how properly to do a simple textfile transfer with Teraterm with a 51 byte notepad file to demonstrate that there is a data connection and path for transfer between the pc and Kaypro! When this is successful, I should be able to move on to a .hex file transfer.
 
Last edited:
Thorbjorn: 8n1 is set at both ends. I know nothing about 7e1.

What is not clear to me is how properly to do a simple textfile transfer with Teraterm with a 51 byte notepad file to demonstrate that there is a data connection and path for transfer between the pc and Kaypro! When this is successful, I should be able to move on to a .hex file transfer.
You are talking directly to the SIO chip in your code, so that is also something to debug :-/

My bios has the SIO port mapped to RDR: and PUN: making it easy to test with PIP RDR:=CON: and PIP PUN:=CON: respectively to see what happens. I don't know your machine, but does it do something similar?

Anyway, I would suggest you split this in two, and get the "type content of file to console" bit working first.
 
Last edited:
I don't have any experience with Tera Term, and it appears they don't have a Linux version so I won't be running that any time soon. But I assume it has to be similar to minicom, Putty, and the like. There should be a "terminal window" (or pane) that provides a portal to whatever is connect to the other end of the serial port. Typing into that window should send those characters out the serial port (to the Kaypro). If the Kaypro serial port has the CCP (Console Command Processor) running, you are essentially typing to "CP/M" and what you type will be echoed back and you'll see it. If you have "PIP SOMEFILE=RDR:" running then you won't see what you are typing because PIP is not "echoing" it back. Tera Term probably has an option setting like "local echo" which you could turn on, so you can see what you type. Or else just "type blind".

But perhaps you need to confirm that you have a working connection, in which case it might be best to start with "console redirection". If you run "STAT CON:=TTY:" what should happen is the "A>" prompt should "move" to the Tera Term window and be gone from the Kaypro screen. Then, you should be able to type commands, etc, on the Tera Term window and "run CP/M" the way you used to from the Kaypro keyboard/CRT. This will confirm the connection is working. If it doesn't work, you'll need to RESET to get back. If it is working, you can run "STAT CON:=CRT:" in Tera Term to get back to normal.

If all this is working, it should be trivial to transfer data. On Kaypro run "PIP SOMEFILE=RDR:" and in Tera Term type some text (which you may not see as mentioned before regarding "echo") and finish with ^Z. At this point, PIP should save what you typed to the file and warm boot (there will be disk activity on the Kaypro).

The next step would be to use Tera Term to "raw send" a small file. So, run "PIP SOMEFILE=RDR:" as before, but use the Tera Term menu to do a raw send of a file. From what documentation I can find, the menu option should be File->Send_file... from which you should get prompted for choosing a file and selecting options. I suggest "Binary" since you don't want Tera Term munging the data. The delay settings may not matter, especially at slower bauds. The split-up HEX files I posted all have ^Z at the end, but if the file you send does not then you'll need to notice when Tera Term finishes sending and then go to the terminal window and type ^Z.
 
Unless I am doing something stupid, I cant make console redirection work. Since the keyboard side of the SIO works, I assume the RS232 side of it does. But as I did have to replace the amplifiers that interface between the Kbd and the SIO, I shall check those that sit between the RS232 connector and the SIO -- U68 (MC1488)/U69 (MC1489).
David
 
Last edited:
You may need to check whether you have the right cable wiring, too. Maybe try with and without the null-modem adapter.
 
I tried removing the null modem -- no change.

I measured DC voltages on the amps attached to the SIO: some of the output amps have inconsistent voltages. I will look with the scope tomorrow. I can get replacements for these chips at a reasonable price, and shall order so as to have spares. Interestingly, these are also socketed (which suggests to me that they are prone to need replacement!)
 
Yeah, socketing "interface" chips as well as big-ticket ones makes sense, although I don't know what logic they used to decide which were socketed and not. The RS232 interface chips are certainly, potentially, exposed to harsh electrical environments. Even beyond surges and glitches. They typically have a long "antenna" attached to them, for picking up all sorts of damaging signals.
 
If you use HxC, then maybe use that to transfer the initial files needed?
 
I have traced Kaypro serial port data input on the scope. With a null modem between the FTDI cable and the DB25, data from the PC's USB port arrives at pin 2 of the Kaypro's J4. Without the DB9 null modem adaptor, data arrives at J3, pin 3, as expected. I can trace this signal through U69 (MC1489) to U70 (SIO/0) pin 12, which is RxDa. The test signal is a text file. To receive this, both ends are set to 300 Bd.

I set pip test.txt=rdr: on the Kaypro (I have also tried tty:). Tera term 5 on the PC recognises the FTDI. (Tera term seems to have a user manual only in Japanese!) I set the serial port speed, and then go to File/Send file. I drag the file to send, onto the panel: bulk read and no delay are already selected (send size is greyed out). Press OK. The blue LED at the Kaypro end of the FTDI cable flashes while transferring data, and I see data moving on the scope as described in the previous paragraph. pip never relinquishes control to the A: prompt, even if I type ^Z in the Teraterm window. I hit the reset button on the Kaypro, and save RAM to disk, with no results.

I must be doing something wrong.
 
So, the reason I think SAVE doesn't work is that PIP does not buffer data at 0100H, instead using memory space somewhere after the end of the PIP.COM image. The SAVE command saves pages starting at 0100H. If you do save a huge amount of RAM, you'll need to look for your text further down in the image. According to my test, you would see the text at about 1FCAH, so you probably need to save at least 32 pages. If the saved image is not too big, you could load it under DDT and examine it more easily.

As far as why ^Z didn't work, all I can think of is that Tera Term chose not to send it. some of these terminal programs fall prey to being line-oriented, although it seems counter-productive to do that when connected to a serial port. You might need to check settings, and/or try pressing Enter after the ^Z. PIP (CP/M) does not require/expect a CR-LF after the ^Z. PIP does not require the ^Z to be at the beginning of a line, either.
 
I suppose it is possible that the received text gets lost in the SIO (I`m clutching at straws here). Or, as you suggest, the problem lies with Teraterm, though it is clearly sending the data through the FTDI cable.

Reminder: what I am trying to do is a bootstrap operation to get a terminal program like Kermit (or ) XModem on to the Kaypro, so that I can subsequently perform normal serial transfers of software or .txt files between it and a PC. On your recommendation, I got the necessary cable. Now I need software that does the trick!

The alternative would be to be able to change .com files to .imd. These can then be loaded on to an SD card as .hfe files and will run on my HXC2001 emulator.
 
Long-term, you still need the serial port to work. But I had forgotten/missed that you now had a gotek working. Here's is an IMD of the disk image I used recently on my simulator to test downloading and assembling the kermit-80 HEX files. Probably, the only thing of value is KERMIT.COM. Give it a try: http://sebhc.durgadas.com/kaypro/kaykerm.imd

But, if the serial path is not working then more debugging will be required. At least you can run CP/M, so perhaps you can do some debugging from DDT or else I can try to come up with a program to allow you to test the SIO.
 
So, I guess one thing you could do once you've got kermit on your Kaypro is to use kermit as a "terminal program" and see if you can "talk" to your Tera Term on the PC. At the kermit prompt, after setting the speed, you can enter the command "CONNECT" and then anything you type should appear on the Tera Term window, and vice versa.

Use Ctrl-\ C on the Kaypro to exit the CONNECT mode and get back to the kermit command prompt.
 
Most of the RS-232 signals are for detecting or communicating hardware status, flow control, etc. The minimum set of connections should be RX, TX, and GND.

Whether you need to connect the other lines at all could depend a lot on how the respective equipment behaves.

If you don't get anything at all on the PC side them you may not have the RX and TX lines wired up correctly. What you get out is obviously subject to how the hardware interprets the incoming signal.
 
I have made some progress: it is now clear that my Kaypro can communicate with my PC. I am using a usb to DB9 cable that has FDTI electronics in the DB9 end, plus its own null modem. There are two LEDs in the DB9 connector: the blue one flashes as data travels from pc to Kaypro, and the orange one as data travels from the Kaypro to the PC. I am running term.com on the Kaypro and TeraTerm 5 on the pc, at 300 Bd, and by means of these I can either get the Kaypro keyboard to write characters on the teraterm window on the pc, or the pc to write characters on the Kaypro display when term.com is running. On the basis of the flashing blue LED, I am pretty sure that I can get teraterm to send files to the Kaypro; but I have not been able to save these to disc. CTRL-Z on the pc keyboard after the transfer stops does not cause term.com to save any files, or terminate, and relinquish control to the A> prompt. On the assumption that these two bits of software will work for me, I still need help to get a .hex file on to the Kaypro. As I reported earlier, pip.com doesnt seem to do this.

David
 
The saving of files and the Ctrl-Z are for PIP, not TERM.COM. If TERM.COM/TeraTerm confirms you have a working RS-232 connection, then the next step would be to use PIP on the Kaypro to receive the file. If you are using "PIP FILE=RDR:" then you may first need to confirm that nothing has altered your default CP/M config and that RDR: is still set to TTY:. The command "STAT DEV:" will show you.
 
Thanks!

I have repeatedly tried ^Z with PIP, without success. I will check the configurations and try again tomorrow.

In the meantime, I am very glad that at last I have proved that the Kaypro hardware is working properly!

David
 
Back
Top