|
|
CP/NET 1.1 server emulator for Unix systemsHere is a program you can use on your Linux machine to communicate with a single CP/M requester connected to a PC serial port. It uses the RS232 protocol described in Appendix E of the CP/NET documentation. The program emulates either version 1.1 or 1.2 of CP/NET, and therefore must be used with a requester running the same CP/NET version. It should be noted that CP/NET versions 1.0, 1.1 and 1.2 are not compatible with each other (1.2 is not even backwards compatible with 1.1). Although they use the same physical-layer protocol over a serial line, they differ at the network-layer level. I have included the package working SNIOS modules for the P112 CPU board, for both CP/NET 1.1 and 1.2 versions. The SNIOS uses the second serial port of the P112 at 38400 baud. CompilingThe package contains both a server (master) and a client (requester). The server runs under Unix, the requester under CP/M. Included is a Makefile that can be used to build the server using the GNU C compiler. The requester files are in the cpmfiles directory, together with the CP/NET utilities from the standard Digital Research distribution. To compile the requester NIOS (SNIOS.ASM), use the supplied NIOS.SUB submit file on the P112 machine; you will also need DR's RMAC and LINK. You can build it under Unix as well, using a package like zxcc. But you can actually skip this step, since a ready-to-run SNIOS.SPR file for the P112 is provided. Command line argumentsThe server program accepts a number of command line options:
The initialization fileThe CP/M-disk-to-Unix-directory mappings, communication device settings and a few other options are set through an initialization text file that is read by the server program at startup. By default, the program expects the file to be located in the user's home directory with the .cpnet.ini name. An alternate configuration file may be specified with the -ini command line option. You can use the example cpnet.ini file supplied with the package when creating your own one. The initialization file is structured similarly to MS-Windows .ini files, i.e. it is split in several sections, each one containing a number of settings, like this: [section1] variable1 = value1 variable2 = value2 [section2] ... Below is a description of the recognized sections followed by the list of accepted options, and their default values in case no option is specified or the initialization file is missing:
All settings, except the disk-to-directory and printer-to-file mappings, can be overriden by command-line options. RunningCopy the supplied CP/NET requester files (you can use cpmtools, for example) from the cpmfiles directory to a P112-formatted and SYSGENed floppy. Among the files there is a compiled, ready-to-use SNIOS module. Connect the second serial port of the P112 board to a free serial port on the PC. Start the server program on the PC side, making sure that the correct serial port device is specified in the initialization file. Alternatively you can use the -port and -speed command line options to override the .ini file settings. I would suggest using some debug output at this stage to make sure that the communication between the two machines works, -debug 6 should do the job. Then, boot the P112 from the floppy and issue the CPNETLDR command. You should get an output like this: A>cpnetldr CP/NET 1.2 Loader ================= BIOS EE00H 1200H BDOS E000H 0E00H SNIOS SPR DD00H 0300H NDOS SPR D100H 0C00H TPA 0000H D100H CP/NET 1.2 loading complete. A> If the server is not yet running on the PC side, or if there are communication problems between the PC and the P112, you will get an additional "Network access failed" message. Most common causes include incorrect port device and/or speed settings, or the wrong type of cable is used to connect the two machines. If everything went OK, then you can try to login into the server so you can start accessing files: A>login The login command does not produce any output on success. If you specified in the server configuration a password different than the default "PASSWORD", then you'll have to supply it in the login command line as well, otherwise the command will fail, e.g.: A>login mypasswd You can now map local drives to remote ones and start accessing the files: A>network c:=a: A>network d:=b: A>dir c: C: DDT COM : DUMP COM : ED COM : T BAS C: TEST BAS : PIP COM : ASSM COM : DDTZ COM C: ADV COM : RAND LST : LOAD LST : BITDEMO FOR C: TEST PAS : TURBO COM : TURBO MSG : TURBO OVR C: TINST COM : TINST DTA : TINST MSG : CMDLIN PAS C: TEST COM : CHAIN FOR : CONFIG COM : DUMP FOR C: ERRORS : FORT COM : FRUN COM : GRAPH FOR C: LD ASM : LOAD FOR : RAND FOR : READ ME C: RUNA COM : SAMPLE FOR : SORT FOR : TRACE FOR C: RAND OBJ : LD PRN : LOAD OBJ : LD OBJ C: CMDLIN COM : GRAPH LST : ADVENTUR DTB : GRAPH OBJ C: GAME CAV : GAME2 CAV : NEWGAME CAV : DUMP LST C: DUMP OBJ A>cpnetsts CP/NET 1.2 Status ================= Requester ID = 70H Network Status Byte = 00H Disk device status: Drive A: = LOCAL Drive B: = LOCAL Drive C: = Drive A: on Network Server ID = 00H Drive D: = Drive B: on Network Server ID = 00H Drive E: = LOCAL Drive F: = LOCAL Drive G: = LOCAL Drive H: = LOCAL Drive I: = LOCAL Drive J: = LOCAL Drive K: = LOCAL Drive L: = LOCAL Drive M: = LOCAL Drive N: = LOCAL Drive O: = LOCAL Drive P: = LOCAL Console Device = LOCAL List Device = LOCAL A> If you need to connect to a more than a couple of drives on the remote PC, then it would be advantageous to create a submit file to do the job. For example, I use the following one: A>type connect.sub login network c:=a: network d:=b: network e:=c: network f:=d: network g:=e: network h:=f: network i:=g: network j:=h: network lst:=0 cpnetsts A> Note that I did not include the CPNETLDR command at the top of the file, since it breaks the execution of the submit file. When you are done, use CTRL/C on the PC side to end the server program and to return to the shell prompt. Known issues
Last updated: 10-Sep-2007 |
||||||||||||||||||||||||||||||||||||||||||||||||