PDA

View Full Version : IMSAI 8080 or Z80?



w2hx
August 20th, 2014, 06:54 AM
Hello all,

I am starting to think about getting involve in vintage computing to relive some of my misspent youth. I have come across an available IMSAI 8080 with a Z80 card in it. I was wondering what people's thoughts are about whether I should stick to 8080 or go with Z80. Some thoughts that come to mind are a) support from fellow owners b) availability of software c) ease of adding onto the system with such things like teletypes and disc drives. For example, if Z80 has only a fraction of the available software that the 8080 had, that might be a determining factor.

can anyone share their thoughts about if one direction might be "better" than the other? I don't have any particular use or objective in mind that might steer me one way or the other. Just looking for general comments.

thanks very much
73 W2HX

KC9UDX
August 20th, 2014, 07:01 AM
I guess I'm the wrong guy to answer this, but until someone better versed in these things comes along, I'll say that I think the Z80 is fully software-compatible with the 8080.

glitch
August 20th, 2014, 07:59 AM
I usually use an 8080-based CPU board in my IMSAI, but only because I've had some timing issues with my EPROM burner board with Z80s. I think I determined it had to do with how the EPROM board inserted ultra-long wait states while programming EPROM locations (like, several milliseconds). Some Z80 boards implement the S-100 bus lines a little more "faithfully" than others; in my experience, the Cromemco ZPU has been the best about this, with various 1980's boards being the worst.

All 8080 software will run on the Z80, but you may have some issues with more esoteric hardware designs. The good thing about a S-100 system, if you get a machine whose CPU board only implements CPU functionality (i.e. no RAM, I/O, interrupts, et c.), you can swap the CPU board out if you ever find yourself in need of a true 8080 system.

Chuck(G)
August 20th, 2014, 08:05 AM
Yes, the Z80 is more compatible with the original Intel product than was at least one of the clones (the NEC 8080). Also, don't forget the 8085 and the NSC800 as candidates.

There are a few products that were written for the Z80 exclusively, but they mostly tend to be meant for a specific platform (e.g. Tandy), so that shouldn't affect you. The big ones (e.g. WordStar, Multiplan, etc.) run just fine on the Intel products. ZCPR (an alternative CLI for CP/M and (ISTR) TurboDOS are two Z80-only programs.

Bottom line is that if you want "original" hardware, go 8080A. If you the most flexibility and higher speeds, use Z80.

JDallas
August 20th, 2014, 08:31 AM
I used the ZPU by Cromemco too... nice board with a switchable 2 or 4Mhz speed.

One thing I learned on having a mixed-breed S-100 is that the first thing you do before plugging in a new board from another vendor is pull out their schematic and write down in tabulation along side all the other boards, each of their signals on S-100 bus, name and active polarity. It wasn't really standardized until IEEE-696.

For my S-100 system, as late as 1978-79 I still had to modify some S-100 boards before getting them to run. Sounds unbelievable but true. I recall that I had to change the polarity of a signal on one board and in another case I had to switch around their different use of signals like PHANTOM... I think that affected about three signal lines in disagreement that had to be resolved.

Back in the day when someone said, "...the S-100 *Standard* Bus..." usually someone would knowingly counter, "...Yeah right..."

I probably still have that tabulation in my S-100 notebook. I remember a lot of the lines that diverged were the loosely defined ones, that led to incompatibilities when boards needed extra capability like some of the graphics boards. My Mini-Term MERLIN as one example. I also had a (SSM) Solid State Music PB-1 EProm burner that I got working with my ZPU just fine, though I don't recall what boards were trouble and thus modified.

@Glitch: Let me know if your EProm burner is a SSM PB-1 as it can run with a ZPU at 4Mhz.

I just posted this on a DFW vintage blog... the Z80 is a superset of the 8080 with different mnemonics but of their common set of instructions, they assemble into the identical machine code and are thus both capable of running 8080 code like CP/M etc. Z-System was a later rewrite of CP/M2.2 into Z80 instruction set like ZCPR was a Z80 re-write and enhancement of the CCP as Chuck mentioned.

The 8085 had like 3 divergent changes from the 8080 instruction set. I don't recall them specifically but if you search-engine that you'll find the specifics. I think there with in the low order machine codes around the RST instructions. Note that you have to be guarded when trying to run 8080 code on an 8085 because of the slight differences. If those differences are not used in the code, it will run fine.

I read somewhere that those that ran CP/M (Version ?) on an 8085 had to make a slight change due to that. In general the 8085 would not be the best choice for a CP/M application even though it was a perfectly good processor.

For example if you see those mobile data terminals from the 80s and 90s on reruns of the TV show "COPS", those MDT-850s ran entirely off of a single 8085. As a lot of the COPs series was filmed around Los Angeles, its very common to see those on the show; LA was the biggest contract for police and fire MDTs at the time and we at ElectroCom Automation Inc (E-Systems spin-off) beat out Motorola for that contract.

Alas those MDTs are all gone now and oddly enough I saw a Want-To-Buy for a MDT860 awhile back.

Chuck(G)
August 20th, 2014, 09:16 AM
The 8085 had like 3 divergent changes from the 8080 instruction set. I don't recall them specifically but if you search-engine that you'll find the specifics. I think there with in the low order machine codes around the RST instructions. Note that you have to be guarded when trying to run 8080 code on an 8085 because of the slight differences. If those differences are not used in the code, it will run fine.

The 8085 had more than 2 or 3 instructions difference from the 808A, but they really don't matter. Two published new instructions, RIM and SIM, have dual uses. The first is control of a bit-bang type of serial I/O (SOD and SID pins); the second is for control of the added "half interrupt" pins (RST 5.5, 6.5 and 7.5), which provide a rudimentary PIC that vectors to 2CH, 34H, 3CH, respectively--and all three have higher priority than the legacy INTR pin. There is also a TRAP interrupt, which is exactly analogous to the Z80s NMI pin, but which vectors to 24H, rather than the Z80s awkward 66H (conflict with CP/M use of those locations). Both were unassigned instructions in the original 8080A instruction set--just like a couple of the relative jump instructions in the Z80--so there shouldn't be any problems.

However, there are also nine added instructions that were never explicity made public by Intel. You can find them documented in the Tundra 80C85 CPU documentation with a full explanation. Too bad--we really could have used those back in the day.

Back in the day (1976), we selected the 8085 for a couple of good reasons. First, it's pretty much a system on a chip--add one of the special support chips with RAM, ROM and I/O and you have a (limited) completely functional system. The buses, unlike the 808A, but like the Z80 are not multiplexed--which means that things happen faster. Development systems were readily available (e.g. MDS) and plans were already in place to take the chip to 5MHz. Sadly, it never went beyond that.

The Z80A was ultimately more popular. The NSC800 is a bit of an interesting hybrid from National Semiconductor. It's essentially a Z80 with an 8085 bus structure. In fact, there was a relatively simple adapter board to allow the NSC800 to replace the 8085 in the Godbout 85/88 CPU board to give the 8-bit side access to the Z80 instructions.

But you haven't indicated why you'd like to select one or the other. If it's just experience with the software, there are plenty of alternatives. If it's cuddling up to an old chunk of iron, why not go for the real original thing?

Frank S
August 20th, 2014, 10:07 AM
For those, they are interested in the NSC800, here i have a schematic for the 8085 Adapter.
The NSC800 used the same multiplexed bus as the 8085, but there are slightly differences in some signals.
IC1 is a GAL16V8. I have no Jedec file for it.
Frank
19989 19990

Chuck(G)
August 20th, 2014, 11:38 AM
Thanks, Frank. This is pretty much what I remember. Do you use one of these? I'm curious how well it works with the 8257/8237 DMA controller chips.

JDallas
August 20th, 2014, 11:39 AM
The 8085 had more than 2 or 3 instructions difference from the 808A...
The only relevance to the issue of 8080 code running on a 8085 is WHAT is different in the 8080 opcode instructions. Nothing in the Z80, and few in the 8085. That the Z80 has over a 100 additional instructions that never appear in 8080 code was irrelevant and hence unmentioned... for the same reason that the additional instructions in the 8085 that are additional instructions that never appear in 8080 code is irrelevant. Only those few instructions that changed what the 8080 opcode did, are important.

And yes, there are always unpublished opcodes that are discovered or posted later. Use them professionally at your own risk because you'll never know when they change, get removed, or don't appear on a second source vendor's version. Hobbyist and people using an existing system can have fun with them... you don't design professional systems taking unnecessary risks like that.

Intel Says,
"Except for two additional instructions, the 8085 instruction set is identical to and fully compatible with the 8080 instruction set.
Most programs written for the 8080 should operate on the 8085 without modification."

Personally I think they're overstating the simplicity as it mostly applies to simple applications and not professional applications. In other words, professional applications are more likely to experience conflicts because they more fully utilize the potential of micros. For most people these differences are unlikely to appear.

Source:
From http://bitsavers.trailing-edge.com/pdf/intel/8085/ ::
--- 8080_8085_Assembly_Language_Programming_Manual_Nov 78.pdf
--- 06-Sep-2011 12:49
--- 4.8M

Section quoted in full, copyrights to INTEL:
- - - BEGIN - - - - - - - - - - - - - - - - - - -
Chapter 1. Assembly Language and Processors, Page 1-24

8085 PROCESSOR DIFFERENCES

The differences between the 8080 processor and the 8085 processor will be more obvious to the system designer than to the programmer. Except for two additional instructions, the 8085 instruction set is identical to and fully compatible with the 8080 instruction set. Most programs written for the 8080 should operate on the 8085 without modification. The only programs that may require changes arc those with critical timing routines; the higher system speed of the 8085 may alter the time values of such routines.

A partial listing of 8085 design features includes the following:

• A single 5 volt power supply.
• Execution speed, approximately 50% faster than the 8080.
• Incorporation in the processor of the features of the 8224 Clock Generator and Driver and the 8228 System Controller and Bus Driver.
• A non-maskable TRAP interrupt for handling serious problems such as power failures.
• Three separately maskable interrupts, that generate internal RST instructions.
• Input/output line, for serial data transfer.

Programming for the 8085

For the programmer, the new features of the 8085 are summarized in the two new instructions SIM and RIM.
These instructions differ from the 8080 instructions, in that each has multiple functions. The SIM instruction sets the interrupt mask and/or writes out a bit of serial data. The programmer must place the desired interrupt mask and/or serial output in the accumulator prior to execution of the SIM instruction. The RIM instruction reads a bit of serial data if one is present and the interrupt mask into the accumulator. Details of these instructions arc covered in Chapter 3.

Despite the new interrupt features of the 8085, programming for interrupts is little changed. Notice, however, that 8085 hardware interrupt RESTART addresses, fall between the existing 8080 RESTART addresses. Therefore, only four bytes are available for certain RST instructions. Also, the TRAP interrupt input is non-maskable and cannot be disabled. If your application uses this input, be certain to provide an interrupt routine for it.

The interrupts have the following priority:

TRAP --- Highest
RST7.5 (1)
RST6.5 (2)
RST5.5 (3)
INTR --- Lowest

When more than one interrupt is pending, the processor always recognizes the higher priority interrupt first.
These priorities apply only to the sequence in which interrupts are recognized. Program routines that service interrupts have no special priority. Thus, an RST5.5 interrupt can interrupt the service routine for an RST7.5 interrupt. If you want to protect a service routine from interruption, either disable the interrupt system (DI instruction), or mask out other potential interrupts (SIM instruction).

Conditional Instructions

Execution of conditional instructions on the 8085 differs from the 8080. The 8080 fetches all three instruction bytes whether or not the condition is satisfied. The 8085 evaluates the condition while it fetches the second instruction byte. If the specified condition is not satisfied, the 8085 skips over the third instruction byte and immediately fetches the next instruction. Skipping the unnecessary byte allows for faster execution.
- - - END - - - - - - - - - - - - - - - - - - -

Hand corrected OCR errors... excuse any I missed.

Marty
August 20th, 2014, 12:17 PM
Hi All;
I used to have an Imsai 8080 with Z-80 CPU, and it worked fine.. I also have an Altair 8800 that has an 8080 CPU in it, and I use that most of the time.. Such as Eprom Programming on my SSM PB-1 Eprom Programmer, I have not tried it with a Z-80 card in it.. My main problem has been trying to use faster CPU's and such on it..
I have a Disk Drive controller from John Monahan which takes a faster Z-80 CPU Card that I don't have, and it didn't seem to work with my other Z-80 CPU cards either..
And I am NOT good enough at rewriting Z-80 only instructions in 8080 code.. So, I never had it completely working, that is the Disk Drive controller Board..
I can use my Tarbell 1010 Disk Controller Card in the 8080 system, though..
I have a SpaceByte 8085 CPU card that works fine in my Altair 8800..
So, it just depends on what Your ultimate goal is..

THANK YOU Marty

Chuck(G)
August 20th, 2014, 12:37 PM
Personally I think they're overstating the simplicity as it mostly applies to simple applications and not professional applications. In other words, professional applications are more likely to experience conflicts because they more fully utilize the potential of micros. For most people these differences are unlikely to appear.

Got any specific examples? I never ran into any programs written for the 8080 that wouldn't run on an 8085. I've got systems with both chips, so I'd be happy to verify that.

Instructions 20h and 30h execute as NOP on an 8080, but they were simply notated as "---" on the reference card. So I think that my statement of "they don't really matter" holds pretty well. OTOH, trying to execute code for the 8085 on a Z80 might not have resulted in such a happy outcome.

When I learned of the added (and potentially useful--think about stack addressing) instructions via Intel internal memo, I asked Fast Eddie, our sales rep to poke around at Intel to get the bottom line on these. He said that the reason not to publish them was that the product planning people weren't sure that they could be easily integrated into future (i.e. 8086) designs. The idea being was that you could simply convert your 8-bit 8085/8080 code via auto translation into the yet-unnamed 8086 code and run it as-is. That turned out to be a good decision--many early 16-bit applications for the IBM PC were little more than translated 8080 programs with a few tweaks.

JDallas
August 20th, 2014, 12:58 PM
...Eprom Programming on my SSM PB-1 Eprom Programmer, I have not tried it with a Z-80 card in it...
I pulled out the manual on my SSM PB1 card to see if I have any special notes on it... it was configured mostly to map around my other boards. I didn't see anything that I thought was specifically for making a 4MHz ZPU compatible. However all my hand-written notes and circuits get swept into an entirely different area of storage, so notes like that might never be found.

It may be that toggle-switching the ZPU to 2Mhz during programming is all that was required. Too many decades ago to remember that. :)


My main problem has been trying to use faster CPU's and such on it. I have a Disk Drive controller from John Monahan which takes a faster Z-80 CPU Card that I don't have, and it didn't seem to work with my other Z-80 CPU cards either.
If you have some URLs to PDF files and such, I'll take a look. If so describe your speed options and anything else on the bus that could be relevant.

It might be wise to post that in a new forum topic...

Marty
August 20th, 2014, 03:15 PM
Hi All;
I think part of the problem, as I remember it, was that the Origional Altair 8800 Couldn't handle the higher Buss speeds, as the Monahan Z-80 cards was set to run at 6 MHZ, or higher.. And I could get my 2 MHZ Z-80 cards to run, but not well and my 4MHZ not at all..
And part of the other problem, was I couldn't get the Monahan Z-80 Card, I came along after He had sold all He had..
And my other Z-80 cards do not have the same ports and options as His Board and Software does..
And the rest of the problem, was the Z-80 code.. I had rewritten alot of His code to run on my 8080/8085, but the Z-80 specific instructions I could never translate over to 8080 code.. And alot of his Disk controller routines were written using specific Z-80 instructions, for saving track and sector information..
And since at present I am in DEC mode, I do not have my Altair out on the kitchen table, but rather my PDP 11/40..

THANK YOU Marty

bonedaddy
August 21st, 2014, 04:47 AM
Hi All;
I think part of the problem, as I remember it, was that the Origional Altair 8800 Couldn't handle the higher Buss speeds, as the Monahan Z-80 cards was set to run at 6 MHZ, or higher.. And I could get my 2 MHZ Z-80 cards to run, but not well and my 4MHZ not at all..
And part of the other problem, was I couldn't get the Monahan Z-80 Card, I came along after He had sold all He had..
And my other Z-80 cards do not have the same ports and options as His Board and Software does..
And the rest of the problem, was the Z-80 code.. I had rewritten alot of His code to run on my 8080/8085, but the Z-80 specific instructions I could never translate over to 8080 code.. And alot of his Disk controller routines were written using specific Z-80 instructions, for saving track and sector information..
And since at present I am in DEC mode, I do not have my Altair out on the kitchen table, but rather my PDP 11/40..

THANK YOU Marty

Marty (and others,)

There has been a lot of activity with the N8VEM-S100 cards (John Monahan and Andrew Lynch's) with many people stepping up to organize group purchases of different cards.

http://n8vem-sbc.pbworks.com/w/page/35044530/PCB%20Inventory

is currently showing that Gary Kaufman (details on how to contact him on that page) still has nine of the Z80 V2 boards if you're interested.

Todd

Disclaimer: I also organize group orders of different boards and keep an inventory of boards available but don't make any money at it since it's for hobbyists.

w2hx
August 21st, 2014, 05:25 AM
Well, I think I have my question answered (original thread question anyhow!) Thanks to everyone.
Eugene W2HX

Marty
August 22nd, 2014, 02:10 PM
Hi All;

I have just placed an order with Gary Kaufman for the Z-80 Board !!! THANK YOU, BoneDaddy..

THANK YOU Marty

daver2
August 23rd, 2014, 01:53 AM
Technically speaking - the Z80 is 99.99...% compatible with the 8080 machine code - but not exactly 100%. I have been caught out myself - as have others - in trying to run code designed for an 8080 on a Z80. One example is the very early Altair BASIC. This is primarily due to a slight incompatibility in the use of the FLAG register under certain conditions e.g. if you try SUB A (A=A-A) you will get the Z and N flags set on one microprocessor; but the Z, N and P flags on the other (and no I can't quite remember which way around without checking).

In most programs this would probably not be noticed - but it is a trap.

There were patches released for Altair BASIC and an even later release had the code modified so that it would run on either processor (if memory serves me correct).

You can try this for yourself by downloading the SIMH emulator and trying to run the 4K Altair BASIC in both 8080 and Z80 mode. It works fine when the 8080 mode is selected - but refuses to work properly when the Z80 mode is selected.

There were, however, multiple sources for the 8080 microprocessor - some of which contained subtle differences in the use of the flag register also. Some of these also used to fail to run Altair BASIC.

I have predominantly used the Z80 - so I don't think you will be disappointed with your choice of card - but if you are running CP/M and not programming in assembler you will probably not notice much difference (apart from the slight increase in speed that you should get).

Dave

Marty
August 23rd, 2014, 04:37 AM
Hi All;
Back in the Day, Dr. Suding wrote code that would Identify which manufacture of 8080 and some Z-80 chips which were used in His Digital Group machines, I do not have this code but I have always wanted it..
I got this information from some people who used to work for Digital Group, I knew a number of them..
THANK YOU Marty

JDallas
August 23rd, 2014, 06:15 AM
...Dr. Suding wrote code that would Identify which manufacture of 8080 and some Z-80 chips...
I was just thinking of that yesterday wondering if it was online somewhere.

I'll be searching for it or similar articles on... particularly more recent methods to identify if the code is running on an software emulator instead of a real processor in an hardware system. :)

Marty
August 23rd, 2014, 07:07 AM
Hi All;
Basically, what Dr. Suding did was test all of the instructions in an Intel 8080, and noted what flags were set and what the CPU did for different routines, the what and how of say addition.. He then did the same using such as an AMD 8080 and compared the Results, and noted what differences there were, and thus by the results, could Identify if it was an Intel or an AMD CPU..

THANK YOU Marty

NF6X
August 23rd, 2014, 07:15 AM
W2HX, I think I know which computer you're looking at. I hope that I will somehow find the self control to not drive the price up, because I really can't afford to buy it at the moment. But it is SO tempting! And I have SO little self control. ;)