Tuesday, November 20, 2018

Something old for something newish

Every so often I build using 8085 or a member of the Z80 family and I tend to run CP/M usually V2.2 on it as a OS.  This is the reason why and it still hold true to this day.

Looking at Grant Searle's  and Lee Hart's pages made me think of this.

http://searle.hostei.com/grant/cpm/index.html

http://www.sunrise-ev.com/z80.htm


Why CP/M?

For most OS and hardware the classification is vendor specific or not. Examples of vendor specific is Apple 6502 based systems programs didn't run on Commodore systems without significant modification while the CPU was identical the surrounding OS support and hardware tended to differ sometimes greatly.  In the Z80 would a good example was TRS80, it ran an OS unique to that machine and only on that machine or possibly a handmade clone with copies on the Roms.  There is not a thing wrong with this is you want to clone a system.

CP/M however was totally different because it ran on many machines based on the heirs of 8080, or put differently if a program runs under CP/M-80 on an 8080 then some machine with a Z80 and CP/M installed will run it and likely faster.  CP/M didn't care if the CPU was 8080, 8085, Z80, Z180, Z280 or even NSC800 as they at the base binary level of 8080 were the same.   What CP/M did was make the hardware look the same by abstraction in a new for the time section of code called the BIOS. Different machines could and likely had different BIOS to deal with NEC or WD floppy controller or maybe even a built from TTL controller and also same for the different serial devices (SIO, 8251, USART, ACE, 6850). 

This standardization allow program portability for things like all manner of programming languages, Multiplan, Dbase, Wordstar, as well as programming editors, debuggers, and both cross and native assemblers to run on nearly any CP/M system that had reasonable ram usually 48K, enough storage and for some IO(terminal) that was compatible (mostly editors).  This allowed a great deal of software to be made and distributed much of it free as well as commercial.

So, CP/M as modules!

CP/M is basically three modules, CCP (command control processor) or what we call the user interface to the system.  The program interface is the BDOS Basic Disk Operating system, its the set of APIs to read and write files print to the printer and handle basic console IO.  The last already mentioned is the BIOS, it takes a standardized interface and turns it into real IO.

The only one written by the developer is the BIOS for a specific machine.  The whole of the machine specific IO and storage system is defined here.

The BDOS is a 3.5K chunk of code that was early on a black box with a matching relocator if needed now the source is easily available and can be assembled for any address.  This is largely the same for the CCP, early on it was a 2K lump with a relocator.  With time it was also rewritten from scratch as ZCPR or CCPR as an improved user interface.

How the blocks are used.

The system used to be loaded from non file system parts of the disk known as system tracks.  The boot ROM would load about 2-4k (the BIOS) to high memory and then jump to the ColdBoot where the BIOS code would set up devices and also initialize page 0 (the first 256 bytes of ram) with vectors as needed.  After doing that the system does a WarmBoot where the rest of the system is loaded including the BDOS and CCP. CP/M assume the CCP is overlaid by applications and can even accommodate overlaying the BDOS and will reload both after a warm boot.  That is done to allow most all of the ram to be available to applications.

I'll stop here and point out that in the early days System tracks stored this that image but with larger Eproms it was possible to copy from Eprom to memory that being far faster than floppy or disk in general and for small floppies made about 8k of space available for storage.  The other assumption is CP/M only cares that storage is block addressable and not if its disk, tape, Ram, or Flash.  Another feature is the loaded version can even load a improved version so an improved CP/M can be a file that can be edited and assembled for test on the system with the ability to recover.


Functions:

CCP allow doing basic operations like directory, loading, saving, erasing, or executing files.  DOS largely used the same command line interface and the history of that form of command reaches back to PDP-11 RT-11.

The BDOS allow for functions like open a file, read a file test for file presence and also allocating space to a file.  Other functions are get a char from terminal putting one to the terminal and testing for a char waiting among others (about 40 in all).

The BIOS can be used directly if one needs to write to a block of disk that is not part of the file system or even edit the file system directly.  For that there are set Track, Set sector, Read and write a block (usually logical sector).  Also the serial and printer ports are handled at the IN and OUT level.  Its features is it was written to a standard specification as needed by the BDOS and it also made for likely the most widely varied code that all performed a standardized set of tasks.

The history of CP/M is that it begat PC-DOS aka MSdos which for the early years even supported the same FCB structure for files.  Its legacy is in the idea of a BIOS to make disparate hardware look similar if not the same. to the applications.  But its greater impact was a software industry be it freeware, shareware or commercial paid code that could be used on a wider population of machines no matter who made it.  That level of functionality and advancing performance or disks and CPU in the z80 space kept it on the map till the late 80s and in some case mid 90s.  It remained so because the cost of computers is not only hardware though it was significant.   For once who made the machine did not determine if you were locked to a software vendor and code that was good on an old machine will still remain useful on newer hardware.



Tuesday, September 11, 2018

C&C

Between Computers and Communications radio has become mixing both.

Things like uBitx and QSX are one group and the wild Atlas210X mod another.

The Atlas210X  is a fun project taking a second and more messed up 210X and making a modern style radio of it.  The unit has no power amp so making one up at the 10W QRPlevel is part of that.  The other is the VFO is really bad drifty and has been given the golden screw driver treatment. Lastly it was a parts dog.  So cleaning up problems fixing the filters were the start.  Atlas used a lot of molded mud caps (X5R) which have terrible Q.  Now the item is Arduino display and si5351 NCO are being added.

This is the fun part.  Before it was a basic 5 band radio without much in the way of modern features.  Using the arduino and all to replace the VFO we can do things like A/B VFO, Rit, Split and even sideband flip along with stable VFO with 1hz resolution.    It will be a fun QRP radio suitable for battery operation.

Update when done maybe even a picture.

Monday, April 9, 2018

Radio, various

As a radio amateur I build a lot of my own gear.  I lean toward small or specific capability
usually SSB and QRP power levels.  So far  have many for every band from 80M though 2M.

QRP SSB is fun.

Of all the one I've designed my 6M Crunchproof was a rig built for 6M contesting
and harsh (RFI) environments.  Features A 36mhz image rejecting DC IF  for single
conversion and matching image reject transmitter.  It incorporates feature needed to
allow working in the same band with a high power stations close by physically
and in frequency.


Also I like to build kits and a few favorites are:

WM20, a 3W SSB for 20M my second 20M rig, small and compact.

KNQ7A a Chinese kitted design for a simple 40M radio that copies many before it.

1W,  a kitsandparts design, the rare in my collection as its 40M CW only but a really nice radio.
 I packaged it on a wood trinket box and has enough room for a battery , paddle, and antenna
making a compact portable rig.

Slop Bucket 20, fun name for SSB back in the 60s.  A very nice 7W SSB on a very small board.
It to goes in a box to be a complet station in a small box for portable use when I care to.


Any of mine published?

No, like many of the one off designs a schematic even if available would be at best only part of the story.  That radio was a one off as a solution to a problem and was a mechanical tour de force for shielding.  There are 8 boxes and some have further shielding.  Like many of the HB radios the though of publish was not in mind and as a result if many pages in the lab notebook and no pictures.  Documenting at this point would take longer than building and that does not take into account more than 12 years of parts going to unobtainium.  Like many
designs Layout and construction is everything. Do it badly and a good design is
crap.

Maybe next time.