Designing the MAG-85
A 1970's Style Micro Trainer
Small, simple computer systems are fun to play with. Before I started building the MAG-85, I brought a 1980's vintage Ampro Little Board system back to life. At first, I had only the most basic software for the Ampro, including a very simple editor and assembler. After having a couple of evenings' fun using that, I decided I'd like to be able to do pretty much the same thing, but with a portable, possibly even a handheld, system.
The first thing that occurred to me was an old micro trainer, like the SDK-85 or EMAC inc.'s fine Primer trainer. There were a couple of problems with these, however. Primary of which was that they'd cost me money. Likewise, neither is in the category of things that are comfortably hand-held. There are other microprocessor trainers out there based on the 8085 and Z-80, any of which would allow me to program 8080 code. I'd love to have one, but again, that money thing was hard to justify. Especially when I've got drawers full of 8085s and Z-80s and support chips on hand.
Rules to Build By
Looking at what I already have, including lots of great books, the ICs, and various electronic tools, I decided to go ahead and build a system of my own. But, since it's so easy for a simple idea to grow beyond its original intentions, I had to establish some rules to guide the design:
- low chip count
- low power
- limited memory
- simple I/O
- use parts I already have
- no asynchronous communications, to support single-step and changeable clock speeds
I also have to have some goals for the design, so that I don't end up with a wiring project rather than something with a long-term purpose. So I established some goals for myself:
- usable hand-held
- AC adapter or battery powered
- allows direct entry of machine language programs
- supports running and debugging those programs
- system code may include an assembler/disassembler
- no high level languages in base system
- standalone system, not a parasite of a PC
Having established these guidelines, I've managed to keep myself off of a couple of false tracks while putting this system together. There are points where something seems like a good idea. Like providing decoding for all 256 I/O ports on the 8085. For a handheld? How many I/Os do I really need? Depending on how you look at it, it's possible for the number of I/Os to grow really fast. "Hmm, I might go to 9, so I might as well decode 16. But if I add that subsystem, I might want to break it into separate I/Os for each element within it. Maybe I'll want 32..." Etc.
That's just one example of how thinking can go astray. My hobby projects are prone to this. The time I put into them is my own, I have all sorts of resources that make overdoing things so easy, and I hate to have to rework something later because I didn't plan well enough.
Here's where this design is going:
- One Memory IC: Dallas DS1225Y 8Kx8 Non-volatile RAM (or equiv.)
- Eight decoded I/O Ports, 0-7
- Simple scanned keypad, 4x5, hex 0-F keys plus some functions.
- Several hardware switches for 8085 interrupts and functions like single--step
- A jump table to allow easy development of system code on the host
- Single-step and clock speed adjustment in hardware
- Hardware memory protect switch to give some protection for the RAM
In many ways, this design has been informed by the COSMAC Elf. The Elf's 1802 is a very different type of CPU from the 8085, however. Making the MAG-85 behave like an Elf would require more hardware and change the use of the 8085 in ways I'm not looking for. So the MAG-85 lives somewhere between the Elf and the SDK-85.
Unlike the SDK-85, I don't have to show off Intel's catalog of VLSI support chips for the 8080-85 family. I use simpler SSI and MSI chips. The keypad driver, the 74C923, is as close as I get to a specialized VLSI chip. I considered using standard 4000-series CMOS to simplify the ICs even more, but the low IC count rule won the day for the 74C923.