home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / emulator / unix / z80pack / cpmsim / 00readme.txt < prev    next >
Encoding:
Text File  |  1993-03-11  |  4.0 KB  |  87 lines

  1.     How to bring up CP/M 2.2 on the Z80-CPU simulation
  2.  
  3. The disk image (drivea.cpm in directory disks) contains only the programs
  4. of the CP/M 2.2 distribution. There is no bootable CP/M kernel on the
  5. system tracks, because this would violate the DRI license for CP/M 2.2.
  6. So to bring up CP/M you need a System running generic CP/M 2.2, not a
  7. special one like TRS80 from TANDY, with 1000H as memory base address!
  8.  
  9. Now first go to your CP/M machine and create a CP/M kernel with MOVCPM.
  10. If you want to run the simulation on a UNIX with small memory model like
  11. Coherent 3.x or Minix, generate a 32KB kernel, else generate a 64KB one.
  12. Then you have to copy the generated kernel to your UNIX filesystem into
  13. the directory srccpm and the filename cpmxx.com, where xx is the size of
  14. the kernel. There are several ways to transfer the file to your UNIX system:
  15.  
  16. 1. Connect both systems with a serial line and use kermit or umodem
  17.    to transfer it.
  18. 2. Use one of the public domain or shareware programs, which can read
  19.    CP/M disks on a DOS machine (example: disk22 can read ~120 CP/M
  20.    formats)
  21.  
  22. Before you can write your CP/M kernel to the system tracks of the
  23. disk image, you have to compile the Z80-crossassembler, which is needed
  24. to assemble the BIOS and boot-loader. Change to directory z80asm
  25. and type make. This should result to a executable file z80asm without
  26. warnings or errors. Move the crossassembler to a directory contained
  27. in your PATH variable, e.g. /usr/local/bin.
  28. Now change back to srccpm and link the appropriate biosxx.asm to bios.asm
  29. and the appropriate bootxx.asm to boot.asm. Please don't mix up
  30. kernel, BIOS and boot of different sizes, always use all the 64KB
  31. modules or the 32KB ones.
  32. Type make to assemble the BIOS and boot loader, and to compile
  33. several C programs.
  34. Type cpmbin cpmxx.com, where cpmxx.com is the name of your generated
  35. CP/M kernel. This should result in a file cpm.bin, which is needed
  36. by sysgen. Now type sysgen, to write cpm.bin, bios.bin and boot.bin
  37. onto the system tracks of the disk image.
  38. If all this steps went without error messages, you can run cpmsim,
  39. which should boot now CP/M from the disk image.
  40.  
  41. Move the image of the boot disk (disks/drivea.cpm) to a cool and
  42. dry place, and hold magnetic fields, heat, fluids, kids and dogs
  43. far away from it :-). To be seriously, make a backup, if you lose
  44. drivea.cpm, you can't boot CP/M.
  45.  
  46. Usage of the C programs:
  47.  
  48. cpmbin:    to convert the CP/M kernel from the format that MOVCPM
  49.     genrates, to MOSTEK binary format.
  50.     input: cpmbin <filename>
  51.     output: cpm.bin
  52.  
  53. sysgen:    to write the binaries onto the system tracks of the
  54.     disk drive a image.
  55.     input: cpm.bin, bios.bin, boot.bin
  56.     output: bootable CP/M on system tracks of disks/drivea.cpm
  57.  
  58. format:    to create an empty disk image for the CP/M simulation.
  59.     input: format <a | b | c | d>
  60.     output: in directory disks files drivea.cpm, driveb.cpm,
  61.         drivec.cpm and drived.cpm
  62.  
  63. receive:This is a process spawned by cpmsim. It reads from the named
  64.     pipe auxout and writes all input from the pipe to the file,
  65.     which is given as first argument. cpmsim spawns this process
  66.     with the output filename auxiliary.cpm. Inside the simulator
  67.     this pipe is connected to I/O-port 5, which is assigned
  68.     to the CP/M device PUN:. So everything you write from CP/M
  69.     to device PUN: goes into the file auxiliary.cpm on the
  70.     UNIX host.
  71.  
  72. send:    This process is to send a file from the UNIX host to the
  73.     simulator. Type send <filename> &, and then run cpmsim.
  74.     The process writes all data from file into the named pipe
  75.     auxin, which is also connected to I/O-port 5, which is
  76.     assigned to the CP/M device RDR:. You may use this to
  77.     transfer a file from the UNIX host to the simulator.
  78.     Under CP/M type pip file=RDR: to read the data send from
  79.     the process on the UNIX host.
  80.  
  81. If you use PIP to transfer files between the UNIX host and the
  82. simulator, you can only use ASCII files, because pip uses cntl-z
  83. for EOF! The easyest way to transfer a binary file from the UNIX
  84. host to the simulator is to convert it to Intel hex format. This
  85. may be converted back to a binary file under CP/M with the LOAD
  86. command.
  87.