• Please review our updated Terms and Rules here

Serial interface boot of CP/M

MykeLawson

Experienced Member
Joined
Mar 21, 2014
Messages
396
The other day I got to thinking; modern computers have a network boot capability but I imagine that you could get a 1Gig ethernet interface working on a retro CP/M machine. But, what if you replaced the ethernet interface with a serial interface..... You have a boot ROM, that relocated code to an area of memory CP/M would not use for booting. Then the ROM gets mask out of the 64K memory and the ROM starts to download the CP/M files from a serial port as if it were a disk. Once completed, it jumps to CP/M and you are up and running. Heck, you could have as many CP/M machines working that was as you have serial ports on the server to support it. All the server would need to do is can it's serial ports waiting for any requests. Or am I out past left field in this idea. Heck, it wouldn't be the first one I've had.
 
I thought there were several systems that did something similar to pull the OS over the serial port. Rather slow and the PROM one could get now could fit the bootstrap serial port code with enough room left over to place a complete CP/M system in ROM.
 
I actually think I have seen a few YouTube videos of a classroom system from Radio Shack that did something quite similar. And yes, you could do the same thing with a ROM. The nice thing with the serial port approach, is that if you wanted to make a common change, you could do it in one place, and not each machine. Who knows, just an idea that seemed interesting to burn a few synapses over...
 
I have setup "CP/NET servers" that can netboot, over ethernet (WizNET module) or serial port. The netboot protocol is just an extension of the CP/NET protocol. I've booted diskless machines, but also netbooted CP/NET on top of disk-resident CP/M systems. It does require some sort of foundation, like a ROM. I've made a netboot add-on to RomWBW, but also added it as a boot option to other ROMs. There's also a NETBOOT.COM that runs under CP/M but downloads the CP/NET SPRs from the server. I even experimented with using a single serial port as both the system console and the CP/NET connection (the system has only a CPU, RAM+ROM, and 1 serial port).

Obviously, the speed of the serial port affects performance. But running diskless systems is not too bad.
 
Booting obviously requires some resident local code (most likely a ROM), but everything else can be networked through any available technology. It's not very hard and has been done.

I've implemented a CP/M BIOS which used special ANSI escape sequences to read/write disk sector data through the console serial port. Even at 19.200 bps, it was surprisingly usable; CP/M systems, applications and data files tend to be small.

The main challenge with networked systems is handling concurrent accesses. Multiple machines writing to the same file will cause corruption if not handled correctly, and this is where network file system (such as CP/NET or NFS) become important. But having a few disk images (either read-only or one-per-machine) is easy to implement and works well.
 
Interestingly, I actually have hand-built a disk-less Z80 computer with 512K RAM, Z80, and CPLD. The CPLD contained a 32-byte ROM that load and run 256-byte program via serial port. The idea was to load an Intel Hex loader that, in turn, load Wayne Warthen's RomWBW which has CP/M and RAMdisk in the 512K RAM. The serial port was 115200, so it would need about 2 minutes to serially load the CP/M and RAM disk. This is a picture of the hand-built Z80.

Now I wonder whether I can increase the serial port to 230K, do a bit of compression and get the program load down to 30 seconds...
Bill
 

Attachments

  • ZoRC_prototype.jpg
    ZoRC_prototype.jpg
    239.2 KB · Views: 32
Interesting build... impressive that it works. I don't do free-floating wires, my stuff is soldered on perfboard. :)

Loading a full-sized RAM disk is indeed a slow mode of booting. CP/M itself weighs in at 3.5 KB, so it could be much faster. But you'd need to find a way to either read/write sectors through the serial port without disrupting the console (easy mode) or use CP/NET without disrupting the console (hard mode), although durgadas311 might have working code.

Real compression is likely too slow to be useful and may interfere with the loading process, but a simple RLL scheme might work well enough. Depends on your RAM disk. Moving from Intel HEX to binary will definitely speed things up substantially.
 
That is an amazing "lowest common denominator" build. No more excuses about not being able to use a ECAD system and get boards made!

What's the clock rate on this?
 
You may dimly make out the oscillator markings in the picture. It was 22Mhz. CMOS Z80 normally can be overclocked to 30Mhz, but RAM speed was the limiting factor. It turned out that Z80 shared many signals with RAM so their pins can be soldered directly; and CPLD pins can be reassigned to simplify wiring so it was actually not too difficult to build.
Bill
 
You may dimly make out the oscillator markings in the picture. It was 22Mhz.
I mean, isn't that a marvel? 22MHz that functions on a birds nest antenna structure like that? I've heard folks struggling with breadboards about 4 or 8MHz (even with tight wiring).

Just seems amazing that they might be able to get that much of a clock rate our of that.

(Mind, I'm am no EE. I have problems turning on light switches and putting batteries in the right way, so what do I know.)
 
I mean, isn't that a marvel? 22MHz that functions on a birds nest antenna structure like that? I've heard folks struggling with breadboards about 4 or 8MHz (even with tight wiring).
At 20MHz, the quarter wavelength is about 12 feet so these short wires won't radiate much. It was a prototype to check out a concept, so that was a easy way of building the prototype. Later on I designed a pc board based on that concept--ZRC. ZRC is only 14.7MHz because of the slow DRAM.
 
I have created a version of CP/M 2.2 for the Altair that does not require a disk controller. Instead, disk transfers are done through the second port on an 88-2SIO serial interface board and disk images are served from a PC. The server on the PC is the same server program that works with the Altair FDC+ controller.

This CP/M is particularly well suited for use with Martin Eberhard’s 88-2SIOJP board since it supports baud rates as high as 76.8K. At this rate, performance is as good or better than original Altair versions of CP/M from Lifeboat and Burcon. An original 88-2SIO can run at 19.2K baud – and this works – but it does feel slower than a disk system.


Mike D
 
Mike, I will absolutely check that out. Granted the 88-2SIO uses 6850 UARTS and my machine uses 8251A, so some software tweaking would be required. Guess my idea has been done before. Oh well. Thanks
 
Back
Top