• Please review our updated Terms and Rules here

CP/NET, anyone?

durgadas311

Veteran Member
Joined
Mar 13, 2011
Messages
1,774
Location
Minnesota
I'm starting this thread because there has been some interest in getting CP/NET running on various platforms or environments. The intent of this thread is to have a place to discuss and work on implementations, or a jumping-off point to spawn new threads for specific implementations.

In recent years I've worked on a CP/M 3 version of CP/NET, and also have a JAVA CP/NET server that runs on MAC and Linux and should work on Windows.

For the purposes of emulations, the "network device" emulation need not (necessarily) match any real hardware. One can design a simple data path that uses INIR/OUTIR, for example, and requires very simple Z80 code to implement the SNIOS.

For real hardware, some sort of physical interface is required. The simplest is probably a serial port, although there is a lot more capability provided by Ethernet modules such as those based on the WizNET W5500 chip, which provides TCP/IP sockets with very little Z80/8080 overhead.

As background and a starting point, here is a modified copy of the original Digital Research CP/NET manuals, with my extensions for CP/M 3: http://sebhc.durgadas.com/mms89/wiz850io/dri-cpnet.pdf

In addition, here is a document about a WizNET W5500-based implementation on Heathkit H8 computers (with a Z80): http://sebhc.durgadas.com/mms89/wiz850io/CPNET-WIZ850io.pdf. This document explains how I chose to interface the CP/NET domain to modern TCP/IP networks.

I also have a github repo where I am keeping CP/NET client source code, although it has become a catch-all and contains a lot more than just CP/NET. The CP/NET code is pretty much contained in the 'net' subdirectory. https://github.com/durgadas311/MmsCpm3. Apologies to Zilog mnemonics enthusiasts, I use Intel+Z80.LIB. Lets keep flames about that on a separate thread...

I am currently working with someone on a RC2014 version of CP/NET using that platform's MT011 adapter to the "Featherwing" WizNET W5500 module. This adapter is nearly identical to the Heathkit WIZ850io adapter, and so shares most of the code.

The CP/NET server JAVA code is shared separately, but we can discuss that as need/interest be.
 
Hey Doug, noob question: is CP/NET CP/M Plus only or could it be used on CP/M 2.2; if so, how much BIOS space does it need? It'd be really interesting to retro fit a network adapter to a Superbrain or other 2.2 system.. :)
 
Hey Doug, noob question: is CP/NET CP/M Plus only or could it be used on CP/M 2.2; if so, how much BIOS space does it need? It'd be really interesting to retro fit a network adapter to a Superbrain or other 2.2 system.. :)

Originally, DRI only released a CP/M 2.2 version of CP/NET (CP/NET v1.2 was the last). A few years ago I ported NDOS 1.2 to CP/M 3 and made it into an RSX. So, both are available, once you have a working SNIOS.
 
The CP/NET server JAVA code is shared separately, but we can discuss that as need/interest be.
As I've written in the other thread, I am working on an emulator to run a standard CP/M 2.2 (in a non-standard environment). CP/NET seems to be the easiest way of accessing the host file system through the emulation and requires only writing a simple NIOS.

However, I need to implement the complete server side within the emulator (which is written in C), which is a much bigger undertaking. The original server ran on MP/M, which is not useful to me.

Do you know of decent CP/NET implementations with source code?

Hey Doug, noob question: is CP/NET CP/M Plus only or could it be used on CP/M 2.2; if so, how much BIOS space does it need? It'd be really interesting to retro fit a network adapter to a Superbrain or other 2.2 system.. :)
It was designed for CP/M 2.2 and was a dynamic overlay on top of BDOS. It does not take any memory unless started, but I don't know how big it is.
 
...
Do you know of decent CP/NET implementations with source code?
....

I've got a JAVA implementation, which could be converted to C/C++. An alternative would be to use the JAVA socket server as-is and create a socket client in your emulation.

I posted some source code here: http://sebhc.durgadas.com/mms89/wiz850io/cpnetsocketserver.tgz. This is not the full source code, I left off the Diablo630 code for supporting LST: devices, that's probably an additional project. The parts related to MagNetHFB are to support a legacy Heathkit H89 network adapter from the early 1980s,

There's also the JAVA socket server at http://sebhc.durgadas.com/mms89/wiz850io/CpnetSocketServer.jar. If you want to go that route, feel free to ask more questions on it. It uses TCP/IP sockets and expects raw CP/NET messages to be sent on the socket connection, and sends back CP/NET responses. It includes the Diablo630 emulation for LST: devices. It is not a complete Diablo630, but supports the basic carriage control sequences and produces postscript files. It supports the print sequences used by Magic Wand.
 
We've got a more-formal github repo setup for CP/NET. It is here: https://github.com/durgadas311/cpnet-z80. Still working on cleaning it up, but the build procedure should work on Linux (and probably MAC). Has support for a basic serial transport, virtual/emulated abstract device, and WizNET W5500 adapters for Heathkit H8/H89 and RC2014 computers.
 
cpnet-0.8 is a pretty good start. CP/net server written in C. both versions 1.1 and 1.2. I've been using it for years.
It uses serial for the physical transport, but the code is well organized. It wouldn't be all that hard to support ethernet.
At least at the server end.
If you use a USB connection to to something like the FTDI parallel adapter it's screaming fast.

joe
 
I've created a version of CP/NET 1.2 for the Kaypro, using the "serial data" port as the server connection. This is compatible with the CpnetSerialServer server in the github repository, when configured for the "DRI" protocol. I don't have real hardware to run it on, so there may be some issues with timeouts, but it does work on my simulator. Server documentation: https://github.com/durgadas311/cpnet-z80/blob/master/doc/CpnetSerialServer.pdf

If someone with a Kaypro is willing to try this out, contact me and I can help get it setup.

Client (Kaypro) software bundle: http://sebhc.durgadas.com/kaypro/cpnet12.tgz
 
Hello durgadas311,

thank you for your cpnet project.

I could read your information on retro-comp.

At the moment I am trying a cpnet installation with a Kaypro 4/84 and Acer notebook (Linux 18.4).

With the cpnet-0.8 I was able to achieve success. Unfortunately nut
cpnerldr, login password netstat, network. logoff.
You do not work in the network.
Example: pip g [0]: = a: d.com goes.
d (Enter) no display.

I think the getcwd function needs to be changed!

cc -O3 -c main.c
main.c: In function ‘main’:
main.c: 241: 5: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
getcwd (buf, 1024);
^ ~~~~~~~~~~~~~~~~~
cc -O3 -c cpnet11.c
cc -O3 -c cpnet12.c
cc -O3 -c cpmutl.c
cc -O3 -c netio.c
cc -O3 -c sio.c
cc -O3 -c inifile.c
cc -g -o cpnet main.o cpnet11.o cpnet12.o cpmutl.o netio.o sio.o inifile.o

Your version could be created.
After cpnerldr comes an error message
Initerr ??

Let's see.

Greetings Kurt
 
cpnet-0.8 is a pretty good start. CP/net server written in C. both versions 1.1 and 1.2. I've been using it for years.
It uses serial for the physical transport, but the code is well organized. It wouldn't be all that hard to support ethernet.
At least at the server end.
If you use a USB connection to to something like the FTDI parallel adapter it's screaming fast.

joe

Hi joe,

you can tell you the exact setting and version of the Kaypro and Linux cpnet-0.8.

The adaptation to the CC (2020) is missing.

main.c:241:5: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
getcwd(buf, 1024);

Kurt
 
Unfortunately, cpnet-0.8 server is not compatible with the cpnet-z80 project I work on. I have not had much luck trying to gather support to reconcile the differences. At this point, you need to use the SNIOS and Server(s) in cpnet-z80 together. I have not been able to try the cpnet-0.8 client (CP/M, SNIOS) code to see if it is compatible with the cpnet-z80 servers.
 
I've created a version of CP/NET 1.2 for the Kaypro, using the "serial data" port as the server connection. This is compatible with the CpnetSerialServer server in the github repository, when configured for the "DRI" protocol. I don't have real hardware to run it on, so there may be some issues with timeouts, but it does work on my simulator. Server documentation: https://github.com/durgadas311/cpnet-z80/blob/master/doc/CpnetSerialServer.pdf

If someone with a Kaypro is willing to try this out, contact me and I can help get it setup.

Client (Kaypro) software bundle: http://sebhc.durgadas.com/kaypro/cpnet12.tgz

Thank you for your information.

I tried to use this configuration.
Does it mean the Java doesn't work.

Did I get something wrong?

Kurt
 
Kurt, I will need more information about what is not working, and what you tried.

Hi,

I installed the version cpnet-z80-master according to its description on a Linux64 - Ubuntu 18.4.
Transfer the software cpnet12kp to the Kaypro.

Client setting:
9600, n, 8.1 rts / cts

Server setting:
cpnet_tty = / dev / ttyUSB0 9600
cpnet_flow_control = rts / cts

Action:
cpnetldr OK
login network fail
network I: = I: works.
netstat: Messages OK
srvstat: error message

The connection does not seem to exist.
I'm not a JAVA speci. Where and how can I set the baud rate
fixed to 9600, n, 8.1?

The serial connection between Kaypro and notebook works
with kermit or xmodem or pcget perfectly.

The other option, cpnet-0.8, works partially.

greeting
Kurt
 
Kurt,

I may need to see your entire CpnetSerialServer config file, but there should not be any blank spaces around the '/' characters. What output do you get from CpnetSerialServer, and what is the commandline you are using?

The config file can specify the baud rate, as you have done with "9600". It always uses 8 bit no parity.
 
Kurt,

I may need to see your entire CpnetSerialServer config file, but there should not be any blank spaces around the '/' characters. What output do you get from CpnetSerialServer, and what is the commandline you are using?

The config file can specify the baud rate, as you have done with "9600". It always uses 8 bit no parity.
Hi,
no, it doesn't work that way. The config is OK and set up according to your specifications.

Send me your configuration using the Kaypro emulation as an example.
You wrote that it works like this.
So I can understand and test it.

I then test my Kaypro 4/84, which I own in 1984 and have already created some programs. I programmed Bascom, ksam, M80 and z80asm.

I am also currently testing the boards:
sc126, sc114 the fast board from Karl 24a karlab 2020.

Thank you for your understanding.

greeting
Kurt
 
I'm not going to be able to help much unless you provide me with more detail on what is not working. Without seeing the java output from CpnetSerialServer.jar, I can't be certain that the server is running properly. I also need more information about what you are seeing on CP/M (CP/NET), seeing the actual console log would be ideal.

Here is a simple example of a config file for CpnetSerialServer:

Code:
cpnet_tty = /dev/ttyUSB0 9600
cpnet_flow_control = rts/cts
cpnet_cid = f2
cpnet_server00 = HostFileBdos /path/to/cpnet-files
cpnet_protocol = dri
 
Thank you for your efforts.

I chose the cpnet-0.8 option.
I can cope better with this.

Happy New Year.

Kurt
:D
 
Back
Top