• Please review our updated Terms and Rules here

Interested in a home brew Z80 computer project?

On tight spaced PCBs, a pin-point solder tip is essential to prevent stray solder bridges and one doesn't need to use a lot of solder for the connection. Pretty points on the pins look nice, but, it's mostly a waste of solder.
 
On tight spaced PCBs, a pin-point solder tip is essential to prevent stray solder bridges and one doesn't need to use a lot of solder for the connection. Pretty points on the pins look nice, but, it's mostly a waste of solder.

Hi Richard,
Yes, agree. I try to use as little solder as possible for that reason. I filed down the point of my soldering iron for better precision and have been "mopping up" afterwards with the solder wick to pick up any excess. Checking the pin and the nearby traces for bridges is helping catch them early but prevention through an adequately spaced design would be better still.

The 10 mil clearance PCB is in respin right now. It seems to have leveled off at the 10-12 remaining connections level. I will let it run for a few days and see if it can solve. It is just an experiment now though as further buiding has revealed some interferences near the power plug which will have to be addressed to.

C4 and the power LED are too close when the protruberances from the molex connector are present. They don't show up in the 3D model or in the hand placement I tried earlier. Oh well, that's why we prototype, right?

Well for some good news. I am mostly done with the build and am now in some checking out. I installed all the sockets and passives except for the 1K ohm resistors I have on order from Jameco. Those have been shipped so it will be a couple of days. I have at least that much in testing yet to do though so I am not too worried about stalling out waiting for parts.

I hooked up the reset circuit and it seems to be working fine. Also the power LED indicator is working. All the sockets seem to have the appropriate Vcc and Gnd connections. I built a serial cable. Also tested the CPU and UART clocks and they seem OK.

My wife took the camera so I will post some photos later. The board is really starting to take shape now that most all the components are in place and even some of the chips are installed.

Have a nice weekend! Thanks!

Andrew Lynch
 
Hi Richard,
More good news for a change.

I almost finished the build and did some checking out. Things were looking pretty good so I started slowly adding ICs. I started with the blank 27C1001 ($FF) and it did what you'd expect. Then I tried again with completely full ($00) 27C1001 just for funsies and it did what you'd expect there too.

I was fairly sure the Z80 was booting and trying to running programs so I started writing some itty bitty Z80 assembler programs like those below. These little programs always help me out with plumbing out the data, address, and control lines. Since the Z80 was cooperating, it made things go smoothly. It also confirmed the basic infrastructure is largely intact.

.org $0
loop: JR loop
.end

and

.org $0
loop: JP loop
.end

The ROM chip select is working as is the IO select. As best I can tell the ROM and RAM configuration latches are working although I haven't fully tested them yet. At least they aren't getting in the way yet.

So, the next step was to run the scream program and that worked fine. I posted some photos to the webpage. The photos are of the new configuration of the PCB with additional components. Scream is running on the laptop and you can see the ASCII zeros being blasted across the serial line. I always love this part of computer building/fixing. Getting scream to work usually means things are on the uptick.

Next I will see if the typewriter program will work. Once that is working, all the pieces are in place for the RAMless monitor and that's were the real testing starts. I am not going to install the SRAM until the RAMless monitor is working and can wring out the board. Those chips are $20 a piece and I am not going to release the magic smoke out of one of them if I can avoid it.

:)

I sort of had to hack the circuit to make it work. I am missing the 1k ohm pull up resistor on /INT so I just substituted a 2.2K ohm resistor literally just stuck in the PCB. I know that is not kosher but it works well enough until my Jameco order comes in. I don't know how well this PCB is going to withstand desoldering so I am hesitant to solder anything in temporarily. My guess is that the prototype boards are not all that great of quality and are not going to stand up to much abuse. Unlike those VG boards which you could desolder with a blow torch and use a pipe wrench and never harm it, these seem a lot more delicate.

I just checked on the respin of the 10 mil PCB. I am pretty sure it has bottomed out at about 12 connections. That means even 10 mils is too much clearance for the autorouter to successfully solve. In addition, at 10 mils the autorouter has gone bananas adding vias in order to try to solve. There must be hundreds on the board now. Probably 500-600 or so -- this is not good.

I will back off to 9 or 8 mils clearance and see if it can solve but that is hardly any different than the default 6.5 mils. It may be that this is just a known limitation of the design we'll have to accept in order to keep the PCB unit cost down. It can still be done with normal tools, that much I know since I just did it but it is a real PITA to work with. There is very little margin for error in building the board -- way less than I am comfortable with. I am going to speak with the autorouter author and see if there is anything he can do.

More later as it develops. Thanks!

Andrew Lynch

PS, I just ran typewriter and posted a couple more photos. With the serial IO routines working, next is the ROMless monitor and a more thorough check out. I'll save that for tomorrow. Things are looking up. At least the design is holding together.
 
Last edited:
Yes, Andrew, always stop and go to bed on a high note. Saves laying awake thinking about what the hell it might be LOL

The prototype boards I've used have been able to handle a fair amount of soldering/desoldering, but, I wouldn't hit the same component more that 5 times in its lifespan if at all possible.

Your board probably isn't any worse than some kits I've ended up putting together for people on which you can't see the board between the traces, so, I wouldn't worry too much, just caution them to sharpen up their soldering skill on some junk boards.

I'm lucky in that the software I use allows me to see the board with the component outlines so that things don't overlap and the 3D view is really helpful with that too.

Respins are inevitable even when working with simple boards (since they are usually smaller and the trace distance ends up being the same) and I don't recall ever having designed anything that didn't have a version 1.1 :)
 
Hi Richard,

Yes, you are right as usual! :) Proper soldering is a vital skill no matter what you are making. I'd just like to keep the approach "doable" for your average dude with a cheap soldering iron. I just detest solder bridges and when a PCB is routed too tightly it makes an potentially enjoyable experience into a miserable one. Solder, wick, test, repeat, until I'm ready to scream.

On a good note, so far this morning I have gotten the RAMless monitor to work. After the usual buffoonery of writing serial IO routines which actually work... :-/ it is up and running nicely. However, I must have misremembered something because I could have swore it allowed direct IO port reads and writes but apparently it doesn't. Oh well, at least it can inspect memory.

The RAMless monitor is the HDM80 tool written by my good friend Dave Dunfield. He gets all the credit for this excellent hardware debugging tool. I use it all the time for fixing old machines and making new ones. It really is great stuff and Dave deserves all the kudos for it.

Also, I spoke with Alfons over at FreeRouting.net and he has an excellent idea on how to improve the minimum clearance on the PCB respin. I made a new version with his improvements and it is in the autorouter as we speak. I set the minimum clearance to 13 mils and we'll see how it works out. Alfons idea is to set the special clearance requirements *around the pins only* which makes total sense because that is where any builders would actually solder. Whether the traces themselves are only 6.5 mils apart makes no difference to the builder since you normally don't solder traces other than at where they connect to the pins. I know that patches using "cuts and jumpers" will invalidate the approach but we'll cross that bridge when we get there.

Best of luck and have a nice Sunday afternoon! Thanks!

Andrew Lynch

PS, since the RAMless monitor is installed and working, I put in the SRAM to check it out. It is working as best I can tell. Will post more photos later.
 
Last edited:
Hi All,
The build continues. Tonight I got the "third-e" program running which is my ROM based monitor. It is a nearly full up monitor and requires RAM to run. The good news is practically nothing needed to be changed to make it run. Also, I used it to verify the Memory Page Configuration Latches (MPCLs) are working properly. That is a key finding since those were major changes compared to the original Test Prototype computer. This should be the last program I need to get running and verified before starting on the CP/M version. It looks like the only changes needed are to increase the serial port speed to 9600 bps and also change the ROM_ENABLE IO port to its new home on the ROM MPCL.

Installed the 82C55 PPI and it seems to be working fine. Also the ECB buffer chips are in place and at least aren't interfering with anything. It won't be possible to fully test those until the backplane is done but things are looking up. I am considering plugging the new computer into the old handmade backplane and using the bus debugger I made earlier for some testing.

More later as it develops. Things are looking good. The big remaining projects are to get the CP/M rehosted, re-implement the RTC, and then work on the ECB bus connector.

Thanks!

Andrew Lynch
 
Hi All,

I didn't get a chance to work on the build last night due to family obligations. However, did get a chance to speak with Alfons over at FreeRouting.net and have come to some solutions for the respin of the new PCB with improved clearances. There is good news and bad news though.

The good news is I think we have an answer on getting the PCB to solve with improved trace clearance.

In order for the autorouter to successfully solve this PCB layout, it *must* be able to route traces between pins. The autorouter will never successfully solve the PCB without this constraint on trace clearance.

It turns out that the maximum clearance for *most* things on the PCB you can have based on their geometry is 13 mils. In addition, there are a small subset of connectors (P1, P3, and U20) which have slightly larger pins and will allow only a maximum clearance of 11 mils.

So I set up the clearance matrix with these new constraints and the PCB solves fairly quickly. The revised PCB is in the autorouter optimizer right now as it solved over night and is now in the process of shrinking the overall trace length and eliminating vias. I suspect it'll pay a penalty in of more overall vias to increase the clearance.

The bad news is that the trace clearance is as good as it can get with this configuration and software. For the most part, 13 mils is certainly "doable" if you are careful. Minimum clearance of 20 mils would be ideal but that isn't going to be happening with this PCB in its present configuration. Even the 6.5 mil clearance is possible but it is a PITA and tough to work with. Progress is slowed by constant inspection and test but it can be done. I think the 13 mil clearance for most components except for the 11 mil clearance on the three connectors is an acceptable compromise but in any case, it is the best I can do based on the physics.

My advice is that if anyone decides to pursue building this SBC is to do what Richard has already suggested; brush up on your soldering skills with old PCBs before starting. It is a good idea regardless.

The autorouter optimizer is running on an old computer in the basement now. It is about the same speed as the other computer it was running on but has the added benefit of being dedicated to the task and much fewer interruptions. On a side note, I was working on this last night and the video card decided to die just as I was working on it. Talk about frustrating! The basement machine is also a rarely used MythTV frontend only system so the video card is a special Nvidia PCI with S-video out. I have tons of old video cards so I swapped one in to replace the card and complete the autorouting but now the machine it is effectively unusable for MythTV -- its primary function. I ordered a couple of replacements on Ebay so it is no big deal but still what poor timing for the card to die! MURPHY!

More later as it develops. My goal for tonight is to get the CP/M ROM working. Thanks and have a nice day!

Andrew Lynch
 
Hi All,

Well, yesterday was a pretty good day. The good news is that I got the CP/M EPROM converted and now the SBC boots into the RAM monitor and from there you can start CP/M. CP/M has two drives at the moment; a 32K ROM drive and a 448K RAM drive. You can transfer programs into the RAM drive by XMODEM (included in the ROM drive) or directly into memory by using the Intel Hex transfer function in the monitor. I haven't had much time to really shake out the system but with some limited testing, it seemed to be working. At least as well as I remembered it did.

The revised PCB is in the autorouter still as of 0545 this morning. It was stuck on a single remaining trace and I did not have time to fix it then. If it is still trying to figure it out when I get home from work tonight I will just manually route the last connection. It'll be ugly but the optimizer will eventually remove it once all the connections are made so it doesn't matter too much.

I did notice one really odd thing last night while rehosting the CP/M EPROM; some EPROMs work fine while other do not -- even those which erase, program, and verify just fine in the programmer. The CP/M EPROM actually contains many programs such as a loader, the RAM monitor, the CP/M image, XMODEM, and RTC utilities.

The original SBC design calls for 27C080 EPROMs but during the testing phase I have been using some plentiful and cheap ST 27C1001/27C010 EPROMs because they are nearly the same pinout and I'd rather not use the more expensive 27C080/27C800's while banging away rehosting the code. At first the EPROMs worked great but as I have been going along I have found some EPROMs read normally and work in the circuit but others -- programmed identically -- act as though they are not even there. It is a mystery to me. Most of these EPROMs are 150 ns access time which should be just fine for a 4MHz circuit. All it needs is a 250ns response time, right? The EPROMs are a mixed bag of vendors, some ST and some TI and probably some others. None of the TI chips work and only some of the ST chips work. There doesn't seem to be any rhyme or reason to which work either.

Is there someone who could shed some light on what is happening with the EPROMs? In the initial boot configuration, pins 1,2,3,30, and 31 are all in the LOW state in the default configuration the MPCL comes up in.

Thanks in advance! Have a nice day!

Andrew Lynch

PS, tonight is fix the PCB respin in the autorouter, investigate the EPROMs some more and then try to get the RTC working.
 
Hi All,

.....The good news is that I got the CP/M EPROM converted and now the SBC boots into the RAM monitor and from there you can start CP/M. CP/M has two drives at the moment; a 32K ROM drive and a 448K RAM drive. You can transfer programs into the RAM drive by XMODEM (included in the ROM drive) or directly into memory by using the Intel Hex transfer function in the monitor. ......

Hello Andrew,

Thank you so much for all the detailed descriptions. The above paragraph is the core of
your present design, and it would be very helpful if you would kindly explain what goes on
when you turn the circuit on. If you could provide a flowchart or something, it would be
even more educational.

Thank you very much

ziloo
 
Hi All,
... I got the CP/M EPROM converted and now the SBC boots into the RAM monitor and from there you can start CP/M. CP/M has two drives at the moment; a 32K ROM drive and a 448K RAM drive. You can transfer programs into the RAM drive by XMODEM (included in the ROM drive) or directly into memory by using the Intel Hex transfer function in the monitor ....
---
When you say RAM monitor I assume you mean a monitor in ROM that uses RAM, or?

Are images (or, even better, sources) for these ROMs available anywhere? Instructions for the monitor?

It looks like the IC sockets are very close to the board edge on one side; kinda close in case you're going to slide this board into card guides when you implement the bus?

m
 
Hello Andrew,

Thank you so much for all the detailed descriptions. The above paragraph is the core of
your present design, and it would be very helpful if you would kindly explain what goes on
when you turn the circuit on. If you could provide a flowchart or something, it would be
even more educational.

Thank you very much

ziloo

Hi,
Well, I can try to explain. Basically when the CPU is reset there are two MPCLs. One is attached to an EPROM and the other to a SRAM. The default memory configuration (ie, MPCL 74LS273 latches are both set to $00) there is a 32K ROM page at $0000 to $7FFF and a fixed 32K RAM page at $8000 to $FFFF. The upper RAM page is fixed and can never be changed. However the lower ROM page can be switch into any of 32 different ROM pages (1MB) or switched out entirely and replaced with one of 16 different RAM pages (512K).

When the CPU boots, it starts executing at $0000 as per every Z80. The first thing it does is "toss" the program it is running (aptly named "loader") into upper memory and transfers control to the newly installed "RAM monitor" running at $F800-$FFFF. The RAM monitor continues with the rest of the hardware initialization which includes switching out the lower ROM page and creating a full 64K of RAM. The RAM monitor gives several monitor like functions you'd expect like "display" "load intel hex format" "go" "fill" "substitute" and the like. The last command it has is the "c" command which is basically a CP/M boot loader. Press c and almost immediately a CP/M prompt appears with A: being a RO ROM drive (32K soon to be 996K) and B: RW RAM drive (448K).

The first 32K of the ROM is sneakily formatted as a 32K CP/M disk complete with boot tracks (where loader and dbgmon are stored). I forget the exact format right now but the ROM is divided up into 128 byte sectors, tracks of some size, and the whole thing is 32K long. When CP/M is running it mounts A: as the block device in the CBIOS and you can do all the normal disk functions except write. You can get a directory of the three programs I placed into the ROM image. If I recall correctly, they are gm (go monitor), RTC (real time clock) and XM (XMODEM). There are supposed to be a bunch more but since I have to hand code the directory entries into the ROM image I have only done those few programs.

Hopefully this helps explain how the TP boots. Maybe you could ask a more specific question if there is something else you'd like to know? This is intended to be a open and public project so the details are all out in the open. I will be posting the software on the website once I have some confidence it more or less works.

BTW all the software is assembled from source, including CP/M 2.2 using TASM301. It is a free (as in beer not as in speech) DOS based assembler. In keeping with the open and public and free themes I'd like to convert to development environment similar licensed to KiCad for the hardware assembly but just haven't gotten that far yet. Similarily I would like to transition to a free OS like ZCPR or whatever it is called. Somebody still retains the rights to CP/M but have made it available for usage.

Thanks and have a nice day!

Andrew Lynch
 
---
When you say RAM monitor I assume you mean a monitor in ROM that uses RAM, or?

Are images (or, even better, sources) for these ROMs available anywhere? Instructions for the monitor?

It looks like the IC sockets are very close to the board edge on one side; kinda close in case you're going to slide this board into card guides when you implement the bus?

m

Hi Mike,
The RAM monitor is one that runs entirely in RAM, starting at $F800. It is stored in ROM and loaded into the high page as part of the boot process. Once the RAM monitor starts, it initializes the hardware and switches out the ROM page. Its actually called "dbgmon-e" but I call it the RAM monitor to distinguish it from the ROM monitor which used to run entirely in ROM. It is a similiar monitor of an earlier generation.

The ROM images are available on my workbench. :) I will be publishing the sources of the assembler on the website along with links to the tools I am using. Basically you dont need the ROM images if you have access to a DOS PC since TASM301 generates the necessary binary image (ROMIMAGE.BIN) from the assembler sources.

Yeah, I realize those ICs are rather close to the edge and were moved as part of the current respin of the board. I also added two mounting holes near the connector end of the PCB to complement the two holes as part of the DIN 41612 ECB connector. In theory you don't need a ECB backplane and could mount the PCB by itself in a case using the mounting holes. Or so the theory goes. I have to get the PCB to respin first and that means solving this minimum clearance issue. When I checked this morning, I was one connection away from a routed PCB but am not quite there yet.

I have a schematic for the backplane but no plans for a case yet. I am a big fan of air cooled computing, lets say...

:)

Thanks!

Andrew Lynch
 
Hello Andrew,

... The RAM monitor continues with the rest of the hardware initialization which includes switching out the lower ROM page and creating a full 64K of RAM.

What is the address range for this newly established 64k RAM?

...The last command it has is the "c" command which is basically a CP/M boot loader.

What address range the CP/M is residing on?


Press c and almost immediately a CP/M prompt appears with A: being a RO ROM drive (32K soon to be 996K) and B: RW RAM drive (448K).

How are these ROM and RAM units addressed? Z80 can only address 64K of memory and
how is the bank switching implemented? (Do I understand it correctly?)

Thank you

ziloo
 
Hello Andrew,



What is the address range for this newly established 64k RAM?

Hi! Excellent questions!

After the boot process is completed (ie, the RAM monitor is running) there is RAM at $0000 to $7FFF and at $8000 to $FFFF. CP/M theoretically has access to a full 64K of RAM, however, the TPA is somewhat less than that since it shares the RAM with CP/M itself and 2K for the RAM monitor.

What address range the CP/M is residing on?

CP/M loads at $D400 and uses up to $F2FF. CP/M is composed of three parts, the CCP, BDOS, and CBIOS. The CBIOS I wrote starts at the somewhere near the end but I don't remember the exact location. It is in the source. I seem to recall the TPA is 56K(?) or so. I don't remember the exact number but it is in the CP/M 2.2 source included.

How are these ROM and RAM units addressed? Z80 can only address 64K of memory and
how is the bank switching implemented? (Do I understand it correctly?)

Thank you

ziloo


The regular $0000-$FFFF memory map is accessed normally. The extended RAM and ROM are accessed by switching in the lower 32K memory page by writing to the various MPCLs. They appear as write only IO ports. I think they are $78 for the RAM MPCL and $7C for the ROM MPCL. Since they initialize to $00 upon reset, writing 1s to any of the latch bits cause address lines to be set high. The RAM MPCL has extended address lines (A15, A16, A17, A18) and the ROM MPCL has extended address lines (A15, A16, A17, A18, A19). The ROM MPCL also has a ROM_ENABLE line at bit 7. Note the address lines are local to the specific MPCL and its memory device. The CPU can only indirectly access the extended memory address lines via its MPCL.

All the hardware information is contained in the schematic and PCB layout on the N8VEM website. Soon I will be publishing a ZIP file of all the software and make files. It is all pretty crude stuff and DOS based for easy usage. It all probably needs a serious rewrite but the intent is/was to just show viable operation of the concept.

One curious artifact of the original design is that the RAM chip has its highest 32K page "pinned" to A15 by a 74LS32. Whenever the CPU sets the A15 high, all the SRAMs extended address lines (A15, A16, A17, A18) are forced high. That way there is a "permanent" 32K RAM memory reference for running programs which manipulate the memory map. The original design did not have this and I discovered the hard way that if you are going to change the memory map, the CPU needs a source of permanent context for reference. Otherwise context gets lost and the CPU goes into LA-LA-LAND.

:)

Thank you and have a nice day!

Andrew Lynch

PS, I did finally get the PCB to autoroute. It never was able to finish the last connection so I did it manual with some really bizarre convoluted manual trace. My hope is that now the optimizer can start and will free up some space and in doing so re-route my screwy manual trace into something that looks halfway normal. I can see why it could not solve properly though, the last connection was a real bear to finish. What a mess that section of the PCB became with the newly improved clearance. The PCB is noticably "looser" and appears it will be MUCH easier to work with. At any rate, there is not much more I can do to it.
 
Hello Andrew,

...The first 32K of the ROM is sneakily formatted as a 32K CP/M disk complete with boot tracks (where loader and dbgmon are stored). I forget the exact format right now but the ROM is divided up into 128 byte sectors, tracks of some size, and the whole thing is 32K long...

Would you please explain more details about addressing the sectors and tracks? How are the information stored on these tracks/sectors: as linked lists, some kind of an allocation
table...etc?

Thank you

ziloo
 
Hello Andrew,



Would you please explain more details about addressing the sectors and tracks? How are the information stored on these tracks/sectors: as linked lists, some kind of an allocation
table...etc?

Thank you

ziloo

Hi!
OK, well really the real tracks and sector information is contained in the CBIOS design. It views the data contained in the ROM as a 32K block device "disk". The CBIOS has an algorithm which when you tell it load track 00, sector 00, it knows to go get the first 128 bytes of the ROM. Depending on what track/sector combination you request, it returns different 128 ROM memory regions as a sector. It really is a kind of neat trick.

The ROM itself does not contain any disk metadata like sector/track information like you'd find if you used a Catweasel to do a raw read of a soft sector floppy disk. It is more like a data-only disk image where the disk imaging program knows which data goes with which track/sector based on the data's relative position within the image file.

The ROM is formatted in such a way that the CBIOS can parse it out using its track/sector block device read (and write in the case of the RAM drive). You can literally see the 32K disk structure in the layout of the ROM. It follows the CP/M DPB values in the CBIOS. I think goes something like this...

each track is 4K long and is composed of 32 sectors each 128 bytes in length. Within the 32K ROM there are 8 tracks. Track 0 and 1 are reserved as "system" tracks to contain the loader, dbgmon, & CPM boot image. Starting on track 2 is the directory structure which is like four sectors long or something. Actual disk data starts someplace after the end of the directory and goes to the end of the 32K ROM.

There is a similar concept for the RAM disk but with a different set of DPB values. Eventually I will convert the 1M ROM into a format similar to the RAM drive and include an entire CP/M set of utilities and some development tools, applications and the like. Of course this is user customizable so anything can go in there but right now you have to format the ROM image by hand which is a real PITA.

One of the things I put on the "help needed" section of the N8VEM website is for some programming whiz to make a DOS program which given a set of files and a DPB, will create a formatted ROM image. The program would not be that hard to write (I think) but would require some fairly detailed knowledge of how CP/M disk layout and formatting. I am doing that by hand now but it would be highly useful for others to have a utility which could do this automatically. All the necessary technical information is available online in the CP/M documentation and I can help point out where if anyone is interested.

Thanks and have a nice day!

Andrew Lynch

PS, OK, here is a long note and it is going to ramble about as I have lots of random thoughts I'd like to write down. These aren't aimed at you specifically Ziloo, but just some general thoughts I have been mulling over.

First, last night I worked more on the RTC. It apparently works as is and without any software modifications. I seem to remember something changing during the design or maybe my original notes were unclear. In any event, when I compared the RTC software to the schematic it seemed to be accessing it correctly and when I tried it the software "just worked". The battery back up worked fine too. I misremembered misremembering? :)

I think tonight I am going to clean up the software directory, make a ZIP file and post the whole mess on the N8VEM website. Yeah, the software is an awful stinky pile of something smelly but it seems to work at least somewhat and rather than wait until it is "perfect" (which will never happen) I'll just post it so people can review it and get a better idea of what this SBC is doing and why. Of course, a few bug reports and improvements would be nice...

The PCB respin is going along OK too. It is rather slow on the computer in the basement (2.6MHz Northwood celeron 400MHz FSB) and it hasn't finished its first pass of optimizing yet. The new layout took a major complexity hit in my attempts to improve the minimum clearance. It is just going to be a while before the optimizer can sort out the mess. I anticipate the via count will be somewhat higher than before, probably 150 or so is acceptable, due to the increased clearance margins. Really, the number of vias is hardly noticeable anyway but the improved clearance is *VERY* important to any future builders.

Regarding making the PCB available to other hobbyists; my plan is that when this PCB comes out of the optimizer is to order a batch of boards and sell them for $20 a piece + shipping to recover the costs. I may offer a 27C1001 EPROM option if its needed. Since there is no practical way for people to order these themselves directly (my preferred method... no middle man and you are on your own) direct ordering appears impractical based on the PCB manufacturers I have spoken with.

All the PCB information is all publically available so there is nothing stopping someone from just taking the Gerber files and ordering a PCB for themselves. Due to the low volume the unit cost will be rather expensive. However, you can do it and I did it for the initial two prototypes. It costs me $80 with shipping for the two initial proofing units.

There is nothing special about the $20 per unit figure, it is just what seems like a reasonable price to me and gives me some flexibility to find a good source of manufacturing. Besides, $20 is a nice round number everyone can identify with. Keeping the price fixed dramatically reduces the overhead of managing a group buy which ties the unit cost to the number of boards sold. My goal is only to cover my costs for the order and if by some miracle there are any funds left over at the end, I will put those towards either another SBC PCB order or for a PCB order of the ECB backplane, bus debug board, or disk IO board.

Using a fixed price method, I can just order a batch of PCBs and dole them out as people's orders come in and avoid the charging people in advance for an undetermined unit cost. I just don't see a practical method of organizing a "unit cost tied to group volume buy" scheme that doesn't rely on some complicated goat rope procedure I don't have time or patience to manage. In addition, complex ordering schemes are notorious for collapsing under the weight of their own excessive details. I have found adding money to any situation makes people wierd in my experience so I'd like to keep it all as simple as possible.

Please remember this is all in the open discussion/planning/thinking out loud phase right now. I am *NOT* ready to take any orders yet. The PCB has to survive the optimizer and final check out still before I place any my order. Even then, it will be at least a couple of weeks turn around so I would expect it will be another 3 weeks (optimistically) before I am ready to accept any orders.

One final note and it is a doozy. Although I have done everything I can think of to reduce the risk of this project for other hobbyists, the initial group who purchase PCBs will be taking on some inherent risk. It is inevitable. Since my initial PCB order, I have had to change the design to account for errors and anomalies. These new boards will be much improved but essentially untried new boards. While I am confident the design is essentially intact, until the first hobbyist other than me builds their first board, no one knows for certain what will happen. Caveat Emptor and all that jazz. There is inherent risk in any project like this and there are *NO* guarrantees or assurances this will work. Please keep that in mind *before* ordering a PCB.

Thoughts? Thanks and have a nice day!

Andrew Lynch
 
Hail great Andrew!

CP/M loads at $D400 and uses up to $F2FF.

This is about 8k of program code; where is the rest of CP/M?

The CP/M EPROM actually contains many programs such as a loader,
the RAM monitor, the CP/M image, XMODEM, and RTC utilities....

...You can transfer programs into the RAM drive by XMODEM (included in the ROM drive)

1- Is "loader" part of ROM monitor or a separate program.
2- Are both ROM monitor and CP/M on the same EPROM?
3- Is ROM drive the same as CP/M EPROM?

...the CP/M rehosted...

What does "rehosted" mean?

Hope you don't mind me for being so inquisitive Andrew, but the core of your SBC design is
the address range for all different pieces of programs that are working together.
Assembly language programs, specially when not commented, are pain to read and
comprehend. It would be highly valuable for your great work to take time and explain in
more details as to what goes on in your circuit, and place it on your site.

Keep up your great work!

ziloo
 
Hail great Andrew!



This is about 8k of program code; where is the rest of CP/M?

Hi!

great? Well, I wouldn't go that far... Wait until you see the source code ;-) I am sure you'll come up with some other adjectives.

Yes, I seem to recall the TPA is 53K in length for some reason. 2K is used for the RAM BIOS. CCP and BDOS uses 5.5K, if I recall correctly. I think the CBIOS and disk buffers use up the remainder. The CBIOS supports an IDE interface as well which chews up quite a bit of RAM and also requires a 512 byte deblocking buffer someplace up in high RAM.

The IDE interface is on the Test Prototype machine I built last year. The IDE portion works great. It could easily be converted to a CF drive with an adapter, I think. I used a small 1.2GB IDE hard disk but it really only used like three 8MB partitions.

Later I built a floppy disk interface onto the card but it had issues with grounding and I ran out of time to work on it. It was completed but I never got a chance to test the software for it even though it was largely already written. I still have all the schematics and intend to incorporate them into the disk IO board later on. I will probably have to design out an obsolete part (SMC FDC9229 data separator) that has become unobtainium and replace it with a SMC FDC9216 or UM8326. That is an other story for a different day though.

I think I bought a broken NorthStar Horizon about then and became obsessed with fixing it and ended up putting the home brew computer "on hold" until that passed. I fixed the Horizon and it is a great machine but now I am finally ready to return to finish this home brew computer.

One of the reasons I transferred the design to manufactured PCBs is to fix the root problem of the grounding on the Test Prototype. Since it used prototype boards with point to point wiring, after a few generations, it began to resemble a ball of wire that you could occasionally glimpse a component in. It was rather difficult to work on. The new PCBs are MUCH nicer to assemble!


1- Is "loader" part of ROM monitor or a separate program.

From a source perspective, the loader is its own program. As a binary, it is combined into the same ROMIMAGE.BIN as the RAM monitor and the CPM boot image. The latter two programs are just data fields loader transfers to their appropriate places in memory. Loaders last job task is to jump to the coldstart vector on the RAM monitor, who in turn swaps out the ROM and loader disappears from the CPU address space entirely. You can boot CP/M from the RAM monitor if desired. Or not. Frankly, I find the RAM monitor just as useful as CP/M is for the most part. I split my time between the two.

2- Are both ROM monitor and CP/M on the same EPROM?

Yes, the RAM monitor and CP/M boot image are in the ROMIMAGE.BIN stored in the first 8K of the 32K ROM page. The CP/M boot image is only the CCP+BDOS+CBIOS. The rest of the CP/M transient utilities are stored on one of the IDE hard disk partitions. My plan is to move them and some other stuff onto the ROM drive once it expands from 32K to 992K.

3- Is ROM drive the same as CP/M EPROM?

Yes. The ROM drive (A:) is just like a floppy disk. It currently is the first 32K of the EPROM -- which used to be a 32Kx8 28C256 EEPROM but is now a 1Mx8 27C080 or 128Kx8 27C1001 EPROM. The first two tracks are reserved for system tracks which contains the loader, RAM monitor, and CP/M boot image. The remaining 6 tracks (24K) are reserved for programs like GM.COM, RTC.COM, and XM.COM.

I'll post the files tonight in the ZIP file and when you inspect the make files and the resulting ROMIMAGE.BIN, it will be more apparent how the system is structured. It really is pretty simple structure but neat how it all works out.

What does "rehosted" mean?

"rehosted" means I modified the source code so that the "new" versions run on the new hardware and reflects the updated designs. Basically two main software components had to be changed to reflect the new design has RAM and ROM MPCLs compared to the previous generation which had only a single MPCL. The RAM monitor hardware initialization routine and the CP/M CBIOS had to be modified. I haven't located any other necessary changes although it would not surprise me if there were some others lurking someplace.

Hope you don't mind me for being so inquisitive Andrew, but the core of your SBC design is
the address range for all different pieces of programs that are working together.
Assembly language programs, specially when not commented, are pain to read and
comprehend. It would be highly valuable for your great work to take time and explain in
more details as to what goes on in your circuit, and place it on your site.

Keep up your great work!

ziloo

Hey, I don't mind at all. I rather enjoy discussing it although when I try to explain it I realize how convoluted this all must seem now. The machine has gone through several design iterations and there are vestigal artifacts left over from different phases along the way. It is a bit of a hodge podge of ideas and experiments.

Wait until you see the commented source code! Warning, have some aspirin and a glass of water nearby when trying to read it as it is basically my stream of consciousness writing style with a bunch of random quotes and chunks and pieces from all over thrown in. :) It is an awful mess but it is clear enough to modify over a year later when I changed it to run the dual MPCL configuration. Fortunately it comes with a neat little make file thing to automate building it on DOS machines.

Crappy documentation beats no documentation everytime! It surely could use a good clean up editing though. Maybe one of these days I'll get around to it...

I find it helps to have a copy of the schematic nearby when reading the source code. For some reason, they seem to go together well and things will make a lot more sense when looking at both back and forth.

Thanks and have a nice day!

Andrew Lynch
 
Hello Andrew,

...requires a 512 byte deblocking buffer someplace up in high RAM.

The first time I read about "blocking and deblocking", I thought blocking means
to stop/prevent!!! I don't know whether this terminology was coined by Gary Kildall or it
was someone else's idea. As I understand, blocking means "arranging blocks of data" and
deblocking means "removing blocks of data" (or was I right the first time?!?!). Would you
please give a more detailed explanation as to was goes on in that buffer...

Thank you

ziloo
 
Hi!

Yes, "deblocking" in the context of a CP/M CBIOS is an algorithm that converts whatever disk format sector size to the one that CP/M expects to use, namely 8" floppy disk with 128 byte sectors. When the CBIOS "deblocks" what it does is take the minimum sector size block from the native device, say an IDE hard disk minimum which its sector size is 512 bytes, and converts it into one to four 128 byte sectors usable by CP/M natively.

The CBIOS I wrote implements a crude deblocker for the IDE interface. Basically it is just one for one mapper and it horrifically inefficient. However, it does work reliably as far I could tell and the IDE harddisk is way faster than the Z80 can handle anyway. The more sophisticated CP/M deblocking algorithms were able to deblock and retain the sector information in a sort of tiny disk RAM cache for subsequent reads.

Thanks and have a nice day!

Andrew Lynch
 
Back
Top