• Please review our updated Terms and Rules here

Chicken vs. Egg - getting files on a CP/M machine

MykeLawson

Experienced Member
Joined
Mar 21, 2014
Messages
382
I'm putting together an S-100 CP/M machine that consists of a CPU board, a memory board, a dual CF disk storage board, and a keyboard, mouse, and display board. There is no disk controller card,and the CPU Monitor program is setup to use a serial interface that I do not have. I got to thinking about how to get the various individual .com files, I have on my PC, onto that second CF card. Can I format the card on the CP/M machine and then plug that into my PC running Win10 and just copy them over? That seems way to easy. I suspect that there is some utility out there that has that capability. So, if anyone knows of such a utility, that would make my job much easier. Thanks
 
Just to throw an idea at you.

Can you use an offline simulator (e.g. SIMH) to create a bootable disk image and use an image copier to copy the virtual disk image onto the CF card on your PC?

Dave
 
I put the CF card in a usb adapter. I can mount the device directly to simh. (I use this for PDP11 images)
I use cpmtools to build or modify CP/M images. You can work directly with the device or work on an image and
copy to the card.
I'm running MacOS. I have also done this with a Raspberry PI. I don't do Windows
 
I'm putting together an S-100 CP/M machine that consists of a CPU board, a memory board, a dual CF disk storage board, and a keyboard, mouse, and display board. There is no disk controller card,and the CPU Monitor program is setup to use a serial interface that I do not have. I got to thinking about how to get the various individual .com files, I have on my PC, onto that second CF card. Can I format the card on the CP/M machine and then plug that into my PC running Win10 and just copy them over? That seems way to easy. I suspect that there is some utility out there that has that capability. So, if anyone knows of such a utility, that would make my job much easier. Thanks
"Formatting the card on the CP/M machine" is not an option. It does not sound as though you currently have a CP/M system running, or at least a system running with (a) the necessary BIOS code to communicate with the dual CF/IDE board and (b) any CP/M software that has been written to format the CF card.

Are you using an S100Computers.com board set (Z80 Master, dual IDE/CF board, and RAM) and the only reason you cannot directly make use of the supplied software is because you are using something other than the Propellor board for your console?

Have you taken a look at this web page titled "Bringing up CPM3 for the first time on an IDE/CF card based system" - it directly addresses your "chicken and egg" problem in the specific context for coding and installing a customized version of CP/M for the dual CF/IDE board:

If your S100 system is mostly made up of boards built from the S100Computers web site designs, I suggest you post your question in the S100 Computers Google Group. There is a lot more experience to be found on that site (vs the VCFed forum) for such a system.
 
Last edited:
If you know what port the serial interface card uses, could you not just build a serial interface for it? And if you don't know you could still probably work it out.

With all of your S100 work, you should make a 'test card' that has a remappable serial port with a fixed baud rate, and some mappable and writeable memory that you can access via an external device - it would be a useful card for any S100 system you tackle since it would give you information on what the computer was going on... Add a display and some diagnostics and you end up with a universal jack-of-all-trades tool - :) ( external display itself could also be a serial interface, or a microcontroller... doesn't need to be video ).

Normally I wouldn't suggest something like that, because it's a bit too complex for many even on this forum, but you're on the list of people who could achieve it without too much difficulty :)
 
Yep, it is the S100computers stuff; Z80 Master, dual IDE/CF board, and RAM, and the Prop Console card. But they don't have a serial interface to download code. So I was thinking I could take one the the CF cards, pop it into my PC and copy the loose CP/M files I have to it, pop the CF card back into the S100 machine and have code that uses the dual port serial card I already have. That one uses 8251A USART chips.

So, given the config of my new system, I will probably be bringing up the CPU and Memory boards up first and at least confirm all the lights blink correctly, and the requisite signal tracing. Then thrown in the Prop IO board and see if I get a display and can do something via the Monitor. Then throw in the Dual CF and see if I get CP/M 3 up. I'm surprised there isn't a boot ROM that will direct boot into CP/M for folks that don't care about a Monitor. Oh well.

I guess if I can't find a utility to copy files directly to a CP/M formatted CF card, I can type in enough code to at least load in the program and save it to the CF card, then use that program to load any of the other loose CP/M programs I have. I'm trying to be able to use as much as I can 'out of the box' for the S100computers stuff so I minimize the likelihood that I introduce an issue where there is no issue in bringing it up.
 
Yep, it is the S100computers stuff; Z80 Master, dual IDE/CF board, and RAM, and the Prop Console card. But they don't have a serial interface to download code. So I was thinking I could take one the the CF cards, pop it into my PC and copy the loose CP/M files I have to it, pop the CF card back into the S100 machine and have code that uses the dual port serial card I already have. That one uses 8251A USART chips.

So, given the config of my new system, I will probably be bringing up the CPU and Memory boards up first and at least confirm all the lights blink correctly, and the requisite signal tracing. Then thrown in the Prop IO board and see if I get a display and can do something via the Monitor. Then throw in the Dual CF and see if I get CP/M 3 up. I'm surprised there isn't a boot ROM that will direct boot into CP/M for folks that don't care about a Monitor. Oh well.

I guess if I can't find a utility to copy files directly to a CP/M formatted CF card, I can type in enough code to at least load in the program and save it to the CF card, then use that program to load any of the other loose CP/M programs I have. I'm trying to be able to use as much as I can 'out of the box' for the S100computers stuff so I minimize the likelihood that I introduce an issue where there is no issue in bringing it up.
With the board set you have, you are literally ready to "plug and play" using several of the CF card images found here. As explained on that web page, you can transfer these images to a CF card using the "HDD Raw Copy Tool" utility (link provided), plug the CF card into the S100 board, and you are ready to go. See:

That solves your "chicken and egg" problem completely. With CPM3 already up and running, along with editing tools and a Z80 assembler already provided on the CF card image, you can then proceed to modify the existing CPM3 XIOS to support whatever other boards you want to add into your system.
 
I can tell you how we did it--on a disk drive with its own peculiar controller. Layout the disk as much as possible as a single long file on a PC host system. Write a boot ROM program that can receive using serial (I assume that you'll have serial ports) data and write to the disk. It doesn't have to be anything fancy--just something to receive data and dump successive sectors to disk.
FWIW, I'd recommend that you start with CP/M 2.2 rather than CP/M 3, as the BIOS is much simpler.
 
With the board set you have, you are literally ready to "plug and play" using several of the CF card images found here. As explained on that web page, you can transfer these images to a CF card using the "HDD Raw Copy Tool" utility (link provided), plug the CF card into the S100 board, and you are ready to go. See:

That solves your "chicken and egg" problem completely. With CPM3 already up and running, along with editing tools and a Z80 assembler already provided on the CF card image, you can then proceed to modify the existing CPM3 XIOS to support whatever other boards you want to add into your system.
Well, it does, to a point. I have used that tool to create the first disk using Image #4. That said, the tool relies on an .imgc files for a source. And after a bit more noodling around, it appears that the tool is capable of creating a CP/M compatible CF card image....... Hmmm. That seems too easy since that tool isn't a CP/M specific tool. The .imgc files on the S100computers site are already built to match the config of the system. If I copy loose .com files off my PC to a CF card, how will the tool know what format to put them on so CP/M can read them? I am certainly missing an important piece of the puzzle.....
 
I can tell you how we did it--on a disk drive with its own peculiar controller. Layout the disk as much as possible as a single long file on a PC host system. Write a boot ROM program that can receive using serial (I assume that you'll have serial ports) data and write to the disk. It doesn't have to be anything fancy--just something to receive data and dump successive sectors to disk.
FWIW, I'd recommend that you start with CP/M 2.2 rather than CP/M 3, as the BIOS is much simpler.
I think for this go round, given that this system is kinda like a kit, I'm going to go for broke and put CP/M 3 on it.. But to the question of getting some of my code for the stuff I need, I think I have figured a plan out by doing something akin to the 'boot loader' approach to get the serial interface transfer program that works with my 8251 serial card.:

Using the Monitor program, enter some simple loader code at say 8000h
1. Init the 8251 USART
2. Set reg for 0100h
3. Set reg for number of bytes to transfer+1
4. Check status of receive buffer, if empty continue
5. Get a byte and put if in (add reg)
6. Dec counter reg
7. Rinse, repeat to step 4

Go back to CP/M then use the Save command to save it to disk. Now I would have something more robust with which to transfer over the rest of the files.....
 
I think you are confusing two things.

All the image tool does is to copy one set of bits (effectively) from one place (a file on your PC in a specific order) into the same bits on the destination location (your Compact Flash card).

The image tool doesn't matter what 'internal' format the file is for (CP/M, VMS, RSX-11M, MS-DOS, etc. etc.).

The S-100 computers 'team' has already done the hard work of creating the appropriate image for you (providing they meet the requirements of your hardware).

You do not need to copy .com files to your CF. In fact, doing so will not work.

If you want to build your own image, you need the .com files and a separate utility to create the virtual disk image on your PC; and then use the image tool to transfer this to the CF.

Dave
 
Well, it does, to a point. I have used that tool to create the first disk using Image #4. That said, the tool relies on an .imgc files for a source. And after a bit more noodling around, it appears that the tool is capable of creating a CP/M compatible CF card image....... Hmmm. That seems too easy since that tool isn't a CP/M specific tool. The .imgc files on the S100computers site are already built to match the config of the system. If I copy loose .com files off my PC to a CF card, how will the tool know what format to put them on so CP/M can read them? I am certainly missing an important piece of the puzzle.....

It sounds like you have used these pre-built CF disk images, and you have been able to use those to successfully boot your system into CPM3 ?

If so, you are now asking how to add additional files to that CF disk image using a PC. To do that, you can use the MSDOS CPMtools utility and a "diskdef" definition file that tells CPMtools how to read/write CPM files to the image file on the CF card. There was a recent discussion on how to do that in the S100 Google Groups forum:

As I mentioned before, you should post this question in the S100Computers Google Groups forum which is where you will find people who already done exactly the same thing you are now trying to do.
 
Last edited:
If you can write your data to the CP/M system's bootable medium, I don't see what the issue is. Write it on a more modern host and stick it into your S100 system.
 
Back
Top