Monday, December 19, 2022

Z80-MBC2 Build Follow-Up: What Can It Do?


This is a follow-up to my 3 part “Z80-MBC2 Build”, you may want to check that out before reading this, links are below. All of the screenshots, GIFs, or video that I use in this post are captured from the uTerm output using a VGA to HDMI adapter feeding into a standard HDMI to USB capture device. More on that can be found on my “Cheap Capture Setup” page.

Building the Z80-MBC2: https://theclassicgeek.blogspot.com/2022/09/the-z80-mbc2-retro-homebrew-computer.html

Building the uTerm Terminal: https://theclassicgeek.blogspot.com/2022/10/z80-mbc2-build-part-2-uterm-vt100-style.html

The Final Assembly: https://theclassicgeek.blogspot.com/2022/12/z80-mbc2-build-part-3-final-assembly.html

Note: All of the games and software I talk about in this article can be found via the links below.

http://cpmarchives.classiccmp.org/

https://www.z80cpu.eu/mirrors/klaw/files.htm

http://cpmarchives.classiccmp.org/cpm/Software/rlee/index_dirHTML.html 

http://cpmarchives.classiccmp.org/cpm/mirrors/www.triton.vg/TesseractRCPM+Catalog.html




Now that we have that out of the way, and you have your newly built Z80-MBC2 computer up and running, what exactly do you do with it? That answer is probably going to be different for everyone, and if you’re one of those asking, “Why build something like this? It’s so OLD!”, then none of this is going to make much sense to you anyway. However, I will tell you what I’m using mine for and what it can be used for, at least at the time I wrote of this article.

The Z80-MBC2 isn’t a particularly powerful computer, however it’s considerably more capable than the original 70’s era machines it’s inspired by. One of my favorite things about this homebrew computer is its simplicity. As I said in my first post, I never had the chance to mess with machines of that era, this gave me a little bit of that opportunity, albeit with a modern design. I wanted to build this computer to give me an insight to the Z80 processor, a chance to play around with something other than a 6502 powered machine, and to play around in CP/M. All things I never had the chance to do before. Just for a bit of fun, and if you're curious how powerful this little homebrew computer is, here is the "ASCIART.BAS" BASIC program often used as a benchmark on these old machines. It manages to run it in approximately 2 minutes 30 seconds at 8MHz. Definitely not a speed demon, but for what this thing is, I can honestly say, it's not bad either. 

 NOTE: You may have to manually set the video quality to 720P.

I'm very happy with what this build, but you may be asking, what can it actually do? What can you use it for? The Z80-MBC2 is actually a pretty capable little computer considering its limitations. It can be a lot of fun to play around on and even be useful if you really wanted it to be.

Let’s start off with the first question most people ask about early computers, what types of games can it play? The Z80-MBC2 isn’t really capable of traditional graphics without external help, basically being limited to ASCII characters, and it has no sound, an Atari 2600 is lightyears ahead of it in those terms. That all being said, there are actually quite a few cool games you can play on this machine, and where it really shines is early text adventures!

Now before I jump into the games, I want to note that everything here is based on using the Z80-MBC2 with the uTerm. The Z80-MBC2 itself is actually capable of much more with different hardware and software. In fact, there is a pretty cool project I came across using a Raspberry Pi as a bare-metal ANSI terminal emulator, called PiGFX (linked below) that I will definitely be checking out in the near future. This gives the Z80-MBC2 the ability to display primitive color graphics, somewhat similar to that of the Atari 2600 or Colecovision. I highly recommend checking it out!

PiGFX Project: https://github.com/fbergama/pigfx

 



Zork, Zork 2, and Zork 3 are by far the most well-known text adventures you can play on the Z80-MBC2. All three games work perfectly and are a must for anyone looking to experience a true era appropriate gaming experience. There’s nothing like hand drawing maps on graph paper and having to actually use your imagination to visualize the environment. One thing these early text adventure games were very good at was descriptive storytelling, they had to be, and it’s rare to find games today that even come close to that level of storytelling. The best way I can describe them is classic “which way books”, it’s like reading an interactive novel, where your actions and decisions have a direct effect on the story and if you can reach the end of it. 

 


Of course, Zork isn’t the only text adventure series that can be played on the Z80-MBC2, Hitchhikers Guide to the Galaxy, Nemesis, Leather Goddesses of Phobos, and Planetfall are just a few more of the well-known text adventure games, all made by a company called Infocom. You can find all these games, and more, at the links at the top of this post.

If text adventure games aren’t your cup of tea, there are other options. As I stated above, the Z80-MBC2 doesn’t have real graphical capability, but it can display ASCII characters to create very basic graphics. Two well-known games, both actually written in BASIC, that take advantage of this are Gorilla and Star Trek. Both games are included with the Z80-MBC2 software.

Gorilla, a turn-based artillery game, is a simple game where two players try and hit each other with explosive bananas, while standing on top of several buildings, by taking turns entering speed and angle numbers to try and hit their opponent. Think “Worms”, but significantly simpler.

Star Trek on the other hand has you take command of the USS Enterprise, your mission is to try and eliminate Klingon warships that have invaded Federation Space, all by entering a series of commands to move the ship around and try to stop the Klingon's from reaching Federation Headquarters.

These are both fun little game that really show off what you can accomplish in BASIC on a machine like this. Of course, there are many simpler BASIC games out there, like the obligatory Poker, Blackjack, Hangman, word searches, and more. 

 




Lastly, there are games like Ladder and Catchum that take full advantage of the ASCII text characters to create two very fun and challenging titles. Ladder is sort of like a simple Donkey Kong, where you jump over holes, falling obstacles, and climb ladders, to try and reach the top of the screen. Whereas Catchum is a Pac-Man clone where you eat the dots while trying to avoid the monsters trying to eat you. Both games are a must and really show off what was possible on ASCII terminals of the era. Both are also included with the software for the Z80-MBC2, using CP/M 3.

If you’re having problems getting Ladder and Catchum to display correctly on the uTerm, then I have included links to my Archive.org repository that contain copies of both games that have been edited to include a VT180 config that works great with the uTerm. This was an issue that I had and it prompted me to reach out to Just4Fun, the projects creator, looking for assistance. 

After some back and forth he was kind enough to send me the copies he uses, and they both work perfectly. I got his permission to upload them for others who may be having the same problem. I also figured out you cannot use the original config editors to make changes to the games settings or controls without breaking the custom VT180 working profile. So I opened up the config file for each game in a Hex Editor and changed the controls to use WASD for movement to make it more friendly to modern players and uploaded them to my Archive.Org page.

Archive.Org Download (WASD Controls): https://archive.org/details/uTerm-CPM-Catchum-Ladder-WASD

 





What if you want to do more than just play games? Can a computer based on 40+ year old technology still be useful? The answer is, that depends on what you want it to do. One area a computer like this would excel is simple text editing. With software like WordStar running perfectly, you can easily create, edit, and save text documents in true retro fashion. There are also a good number of useful programs available for simple tasks like math calculations and conversions, recipe and phone number/address storage, custom database creation, and more. 

 


Another area of useful software I should touch on is programming. With the current setup, you can learn to program in languages like MBASIC (Microsoft BASIC) and UCSD Pascal (University of California, San Diego Pascal). Both are 70’s era programming languages that are relatively easy to use and learn and are included in the Z80-MBC2 software package. I will note that if you’re going to play around with MBASIC, then I highly suggest you do so in CP/M as booting into MBASIC does not support file saving, whereas if you run it under CP/M, you can save and load your work.

Like BASIC, UCSD Pascal was very common in the 70’s and early 80’s, and was on many different platforms as well, like the Apple II, original IBM PC, Motorola 68000, Texas Instruments TI-99/4A, and MOS 6502 powered systems like the Commodore machines of the era. UCSD Pascal was a full programming language system than ran on a p-code (portable code) virtual machine called the p-System, and like BASIC came in different versions.

Both MBASIC and UCSD Pascal are interesting trips down memory lane that I highly recommend to anyone who wants to experience this era of programming, and both can still be useful for messing around on old style machines.




The very last thing I’m going to cover is the operating system options currently available for the Z80-MBC2. First and foremost, and what a vast majority of people are going to run, is CP/M. Out of the box you can run CP/M 2.2 or CP/M 3, personally I run CP/M 3. This is a very well documented easy to use operating system that feels a lot like MS-DOS. The story behind CP/M losing out to DOS is a fascinating one that I highly suggest reading about if you don’t already know it.

 


The Z80-MBC2 also comes with the ability to run fig-Forth 1.3, but to be honest I know absolutely nothing about that OS so I’m not going to cover it on here, but a quick Google search will lead you down that rabbit-hole should you so desire. What I do want to touch on is the inclusion of Collapse OS, something that I only discovered recently. With my interest sparked, that’s the rabbit-hole I personally decided to go down.

Collapse OS exists for one reason, to survive the collapse of modern society, hence the name. Based on the aforementioned Forth OS, it’s an operating system and tool set designed to run on minimal and improvised machines to give people the long-term ability to maintain, program, and use simple computers, micro-controllers, and electronics, and to store data without the need for the internet or complex systems that will ultimately break down. It can run on just about anything from Z80, 8086, and 6502 powered machines and has an impressive list of features. It’s also available for free for anyone who wants to mess around with it and see what they can get it up and running on.

It’s a really neat concept, to build a simple OS around the idea that you may have to scavenge for parts or build machines for tasks with very low power requirements and limited tools. Making the OS 8-bit makes a lot of sense from that perspective, if you think about, processors like the Z80 and 6502 are still around in great abundance today, they are very easy to understand and work with, require very little power, and are very robust.

The author of Collapse OS states that the idea isn’t necessarily to preserve computers or computing, but electronics in general. Electricity, micro-controllers, and other simple electronics would indeed be highly beneficial and relevant to communities after such a societal collapse, and having a means to manage, program, and use it would indeed be very handy.

The dark side of my brain really liked the idea of Collapse OS, I’m one of those people who has actually spent time thinking about what I would do if something happened that threw myself and my family into the dark. What would we want to survive and be comfortable? On the technology side of things, low-power low-drain computers and electronics than can run on DC 5V, 9V, or 12V would be very handy since those voltages are very easy to produce, store, and use.

Collapse OS is just a neat idea that I thought was cool to see on the Z80-MBC2, an exercise in what we all hope is silliness. It means the Z80-MBC2 would still be useful in yet another way even after such an event. It’s a cool little “what if” operating system that tickled my inner prepper and was very glad to see included.

About Collapse OS: http://collapseos.org/




While all of this software is primitive by today’s standards, it can still be useful and fun to play with, primitive doesn’t have to mean useless. No one is going to replace their modern hardware with something like this, but there’s no reason you can’t have fun with it and get a little use out of it for the pure nostalgic experience of it all. Personally, there are days I find myself using old or retro machines like this Z80-MBC2 much more than my modern desktop. For me, it often feels much more rewarding and enjoyable to use. I know I’ve said it a couple times now, but if you get it, you get it. If not, then this probably just isn’t your thing.

Thanks for taking the time to read through all of this and I hope you found something useful along the way, or if nothing else you were mildly entertained.

Cheers!


Saturday, December 17, 2022

Z80-MBC2 Build Part 3 – Final Assembly


 
Author's Website (Just4Fun): https://j4f.info/z80-mbc2 <--- Check it out! 
 

 Now that the Z80-MBC2 and uTerm are both up and running, it’s time to give it all a nice home. I went through several different ideas on how I wanted the final computer to look, from doing a full custom 3D printed case, to a small “all-in-one” keyboard style case like the Commodore VIC 20/64 “bread bin”, to something “boxier” to better fit 70’s era machines like the Altair, IMSAI, and SWTPC. The custom 3D printed case idea died very early on, I quickly realized I simply don’t have the time or skills to design and print a custom case that size, at least not yet. Perhaps I will revisit this idea in the future once I’ve honed my 3D design and printing skills further. The VIC 20/C64 style bread bin sounded great until I realized I couldn’t realistically find a case to fit my needs, in the size I wanted, at a reasonable price, and I had no desire to incorporate the keyboard into the final build. In the end I settled on a much more realistic and era appropriate “boxy” case that better represented machines of that era and the vision I had in my head. Also, this style of enclosure is much more readily available, inexpensive, and easy to modify. 

 

Buy Case: https://amzn.to/3FD9XgF

I really wanted the final machine to look like a “next step” for these early CP/M machines, with proper front panel buttons and lights. As well the keyboard port on the front panel for ease of use. On the back panel I put the SD card, power, VGA output, and the transparent serial connection so you could still connect to the computer that way if necessary. The last thing I would like to do is extend the GPIO to the back so it could be easily accessed, but that’s something I will tackle later since I haven’t decided exactly how I want to accomplish that. I’ll likely use a simple pin header that can connect to an external break-out board via a ribbon cable.

Here are a few things to note that may influence your own design choices, as it did mine…

  1. Once you have the system setup how you like it, you’ll find yourself swapping the SD card out much less often, perhaps on the rare occasion you want to add something else you may have come across or if there’s an update released by the original Z80-MBC2 author. So having external front or back panel access to it isn’t necessarily a must, especially if your case is easy to open. I put mine on back for that reason, and because it’s a micro-SD and wasn’t sure if I could make the slot look nice enough to be front facing. Full size SD cards are easier to work with and I hate when I have to use my fingernail or a tool to insert and remove the micro cards.

  2. I put the keyboard port in the front instead of the back purely for convenience. My system won’t be setup in the same spot all the time, and will get moved around quite a bit, so it made more sense to put it on the front panel. Also, since that’s where the port is on the uTerm, it just made it easier for the internal layout. I also used a PS/2 to USB adapter for ease of use since a majority of USB keyboards will work fine with this computer.

  3. The transparent serial connection went on the back simply because it won’t get much use, but it’s still nice to have. I also went with USB type B because I prefer it over all the other port types. It’s more robust than its smaller counterparts and type B cables are still cheap and very abundant. I could have just used a pin header but incorporating the serial USB into the design just made things easier for later, especially since I have a few of these lying around and can spare one for this build.


Designing the layout and look of the front and back panels took quite a bit of time to get done and went through several different re-designs as the build progressed and I better realized how much space I actually had to work with. Getting it to look like it belonged in the late 70’s or early 80’s, with a bit of modern flare, wasn’t nearly as easy as I had thought. Once I was happy with the design however, it was just a matter of printing it onto sheets of adhesive vinyl to attach to the panels. The panels themselves had two options, drill and cut out the holes on the included panels or printing my own. In the end I decided to print my own to give me more 3D design practice, and it guaranteed a good fit. 

 



The inside layout was also a bit of a challenge, I wanted it as “clean” as possible, but I also had a very limited amount of space to work with. I had to extend everything to the front panel while trying to maintain the ability to easily disconnect everything if necessary. I thought about designing a custom front panel PCB, but I really didn’t want to wait for it to arrive and I wasn’t sure I could make it cleanly fit. So, I decided to just extend everything directly using pin headers. It makes it easy to replace anything that may go bad and it fits into the limited space. I also think it fits better with the overall aesthetic of the machine since many of these early home computers had a lot of DIY modifications.

Mounting the PCBs was accomplished using a custom 3D printed support structure that I designed to hold everything in place, but still allow for easy servicing should the need arise. The Z80-MBC2 and uTerm are both held in place using screws, and the SD card and RTC are held in place using 3M double sided mounting tape. The base of the support structure is screwed to the case, and the two upper sections are sitting on top of 6 removable 3D printed standoffs. It’s not perfect, but the overall design fits in the limited space, holds everything in place, is easy to disassemble, and it looks the part of a homebrew computer.

 



The final result pretty closely matches what I think a “next step” homebrew CP/M machine like this would look like. If nothing else it appeals to me, and that’s really all that matters. I love how it looks and it has given me the opportunity to explore an era of computing that I missed, even if only a little. The question now becomes, what to do with it? Will I actually use it? The short answer is yes, I’ll definitely use it. 


More photos coming soon!

One of the reasons I wanted the Z80-MBC2 was to learn more on how these old machines worked, and since their so simple, they’re easy to learn on. I enjoy messing around with the old software and games, and it can actually still be useful, but that’s not the real point. Sometimes the best part of a trip is the journey, not the destination. Most people will look at old retro machines like this and think “what’s the point?”, and if you have to ask that question, then I’m not going to be able to explain it to you. That simply means this isn’t your thing, and that’s fine, we’re all different, but if you’ve made it this far through all 3 long winded articles, then you probably already understand.

I had a great deal of fun building this machine, I learned a lot along the way, and ended up with a neat little retro computer that will provide me with countless hours of entertainment. From here I will be doing a follow-up article to cover more of software side of things, changes that may have been made, and share why I think an old-style homebrew computer like this can actually still be fun and useful. For now though, I’m just going to enjoy the fruits of my labor and say thank you for taking the time to read through all of this. I hope you found something helpful here, or if nothing else, it was entertaining. 

Read The Build Follow-Up - What Can It Do?: https://theclassicgeek.blogspot.com/2022/12/z80-mbc2-build-follow-up-what-can-it-do.html