Jump to content

Z80-MBC2


Recommended Posts

I have been seriously looking at building a Z80-MBC2 to play around with for a few different reasons.

  1. I never had the opportunity to really play with CP/M, and I always wanted to.
  2. It's an inexpensive "retro" computer you can build yourself.
  3. It just looks like a lot of fun to play around on.

Watching Adrian's SWTPC 6800 videos rekindled my interest in computers of that style and era, and the Z80-MBC2 is cheap modern "DIY homebrew" way for me to have some fun and scratch an itch I have had for some time.

Yes, you can do it in an emulator, but this is one case where having actual hardware, getting to put it all together yourself, just makes more sense to me. I mean, I like to build things, so why not?

My question is, has anyone here built one yet? If so, what do you think?

If not, do you plan on it?

I know @BruceMcF mentioned the Z80-MBC2 a while back.

I have everything downloaded, the PCB's are on eBay for $9. Or I could order a set of 5 of PCBWay for under $20 if I really wanted to, but, I don't really need 5 boards.

I already have most of the supporting electronics and connectors, and tracking down the necessary ICs is pretty simple. The only things I need to figure out yet are the RTC, USB serial, and SD modules.

Any suggestions? 🙂

UPDATE: I'm documenting the full build on my blog! https://theclassicgeek.blogspot.com/

Edited by Strider
  • Like 4
Link to comment
Share on other sites

On 6/27/2022 at 2:37 PM, kelli217 said:

Just a few months ago I was looking at the RC2014 project. It's very similar.

I was looking at the "Classic II" version. I really liked the "out-of-box" support for MS Basic, and the $85 price for the full kit isn't all that bad in my opinion. In fact, I am still considering it, but the Z80-MBC2 crept to the top of the list becasue I already have most of the parts, and the ICs are still pretty cheap and easy to find. I can build the thing easily and cheaply, then maybe look into something like the Classic II if I like the Z80-MBC2.

Like I said, this is all to scratch an itch I never got to scratch, I don't want to spend too much time and money on it until I know what I'm getting into.

Also, truth be told, this is something to keep me busy until the X16 becomes available in a form I can get my hands on, something to play with. 🙂

  • Like 3
Link to comment
Share on other sites

On 6/27/2022 at 4:12 PM, Strider said:

I was looking at the "Classic II" version. I really liked the "out-of-box" support for MS Basic, and the $85 price for the full kit isn't all that bad in my opinion. In fact, I am still considering it, but the Z80-MBC2 crept to the top of the list becasue I already have most of the parts, and the ICs are still pretty cheap and easy to find. I can build the thing easily and cheaply, then maybe look into something like the Classic II if I like the Z80-MBC2.

Like I said, this is all to scratch an itch I never got to scratch, I don't want to spend too much time and money on it until I know what I'm getting into.

Also, truth be told, this is something to keep me busy until the X16 becomes available in a form I can get my hands on, something to play with. 🙂

I still harbor hopes of trying to do a "CP/M User Box". It would not be BASED on the Z80 MBC2, but the Z80 MBC2 might be an excellent starter project to get my feet wet before trying to hammer out anything of my own. I might even pursue it in two stages -- a 4MHz breadboard version and then a faster PCB version.

  • Like 2
Link to comment
Share on other sites

Posted (edited)
On 7/2/2022 at 4:49 PM, BruceMcF said:

I still harbor hopes of trying to do a "CP/M User Box". It would not be BASED on the Z80 MBC2, but the Z80 MBC2 might be an excellent starter project to get my feet wet before trying to hammer out anything of my own. I might even pursue it in two stages -- a 4MHz breadboard version and then a faster PCB version.

I am actually doing a bit of shopping around right now for two different projects, one of them being the Z80-MBC2, I pretty much have my heart set on building myself one. You'll have to let me know how yours goes.

The other project is building a DOS/Win95 "retro" computer for some old school fun, with some modern amenities like using an IDE SD adapter instead of a HDD and a floppy emulator (maybe). 😄

Edited by Strider
  • Like 1
Link to comment
Share on other sites

On 7/2/2022 at 6:14 PM, Strider said:

I am actually doing a bit of shopping around right now for two different projects, one of them being the Z80-MBC2, I pretty much have my heart set on building myself one. You'll have to let me know how yours goes. ...

If I am still in my current situation of working hard for long hours to help save up money to build a house, any hardware project is "not now". However, if I land a teaching position out of state where I am coming back to home base on the weekends and vacations, then I could be looking for something for weekday evenings this coming September, and will surely share whatever I find out (whether successes or 'successes at finding out what doesn't work') in these forums.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

TTY only graphics, no sound... So close man, so close!

The X16 is over-engineered, "too much" really. There's something to be said about a ZX Spectrum with a faster CPU, more RAM, and SD card storage - Would it be amazing? No. Does it need to be? No!

If someone made rudimentary graphics and sound for the Z80-MBC2, along the lines of the ZX Spectrum, then it would be an ideal little retro computer to do retro things with. Something between "too much", "not enough", and "the Colour Maximite is weird".

  • Like 1
Link to comment
Share on other sites

For me, the attraction is the fact I never really got to mess with anything like this, I started on a TI-99/4A and moved right into Commodore from there. I never went back far enough to mess with this sort of computer.

I watched Adrian Black's video series on the SWTPC and it hooked me. I just loved how it all worked, the raw nature of it, and this is a way for me to play around with a modern incarnation of something right out of that era. Plus, the Z80 isn't something I got to really use either. It all just sound like fun to me, as does building it.

I also think building something is just as fun as using the final product, that's why I want the X16 in a kit "DIY" form.

🙂

  • Like 3
Link to comment
Share on other sites

On 8/24/2022 at 4:58 PM, Strider said:

I also think building something is just as fun as using the final product, that's why I want the X16 in a kit "DIY" form.

Can't argue with that!

On 8/24/2022 at 4:58 PM, Strider said:

For me, the attraction is the fact I never really got to mess with anything like this, I started on a TI-99/4A and moved right into Commodore from there. I never went back far enough to mess with this sort of computer.

Software wise, no one needs real retro computer to have an authentic TTY experience, because almost any keyboard/screen combo can be attached to perfect software emulation on the other end. Using CP/M while sitting a real DEC VT-100 would feel very retro even if the OS is provided by a dusty old PC that's aging gracefully under a desk 500 miles away. It's for this reason that I feel the "human interface devices" are more important for the overall retro experience than the computing circuitry, with the only exceptions being if one wishes build, modify, or study the hardware. For instance, I don't generally use VICE on my desktop, because it just feels like I am using my desktop, because... I am using my desktop. Now if I invested in a Commodore monitor and a Keyrah for my VIC20, I'd be happy to use VICE in that setup, because it would feel like I am using a VIC20/C64 (especially if I tortured myself by using a tape deck too lol).

Anyway, I encourage you to consider the ways you can fully immerse yourself in the era to get the most out of the experience. An old looking screen, an old feeling keyboard, a few vintage magazines and books, the oldest coffee mug you can find, and your phone shoved to the back of a drawer where it can cease to be a yammering naggy-pants for an hour... Maybe a stale ashtray for maximum authenticity... Live the dream, man! 🙂

  • Like 1
  • Haha 1
Link to comment
Share on other sites

Posted (edited)

Well, the mainboard arrived, so I know what I'm doing today! 🙂

Guess it's time to start populating it with the common components, sockets, etc., after I test them of course. I don't have the ICs yet, but no reason I can't get a head start.

z80-mbc2-start.thumb.jpg.e4568ba7e15583ba363e0fe95ef9d9ed.jpg

Edited by Strider
  • Like 1
Link to comment
Share on other sites

Posted (edited)

Well, I'm as far along as I can get with what I have on hand, everything else has been, or needs to be, found or ordered.

It's a good thing I test everything before using it, my wife got me an assortment box of ceramic capacitors from one of the many re-sellers on Amazon, and I think just about every capacitor in it is faulty. So now I need to order some of those since I don't have the 2 values I need on hand, they were in that kit. I also haven't decided if I want to mount the VGA Terminal Board vertical or horizontal yet, so I held off adding that header until I have the board in hand. 

Overall, a few hours well spent in my opinion. Can't wait to get it completed!

z80-mbc2-started.thumb.jpg.dd3e3467fe0886292f9c63edaac5d0cd.jpg

Edited by Strider
  • Like 1
Link to comment
Share on other sites

eBay, the only current way I can get all the chips needed. It's a real love/hate relationship, love that all the chips I need are available for sale by US sellers, hate the inflated prices and shipping on such tiny items.

Oh well, $55 and some change after taxes, at least I got them. The crazy shipping kills, considering you fit all these chips safely in a First-Class package. $35 for the chips, $20 total or the shipping. 🙂

Edited by Strider
Removed oversized image.
Link to comment
Share on other sites

  • 2 weeks later...

Finally, the last parts arrived this weekend, then I get violently ill thanks to Norovirus (Stomach Flu), feel better today so I put it all together...and...

It completely slipped my mind that I have no way to burn the bootloader on the AtMega32A... 🥴

So now I have to wait even longer for the USBASP to arrive... It was a very crappy weekend. lol

z80-mbc2-almost.thumb.jpg.db6bff1baa1609c6af79901b8ddd05c5.jpg

  • Like 1
Link to comment
Share on other sites

I've been watching retro SBC Z80 computer videos on Youtube, and it occurs to me that what I want is a bit of a mix and match of the Z80-MBC2, the Z80 Playground, and John's Basement's Z80 Retro and Dr. Volt's DIY Home Computer: https://www.youtube.com/watch?v=tocXaInkarE

One idea I had that I'm taken with at the moment is rather than running CP/M in a part of a larger than 64K doing banking to get to the rest you can use a 64K SRAM and a 512K coin-battery-backed SRAM, with the larger SRAM used as a RAM-disk, by accessing the big RAM with I/O reads/writes in one half of the 256 byte I/O address space. Larger SRAMs have two chip selects, one low and one high, so you can tie the /IOREQ line to the pull low /HighRAM_CS1 and A7 to the pull high HighRAM_CS2, and there is no glue logic required for that part.

Even better, there is a Z80 indexed I/O address mode which puts the contents of register C on A0-A7 and the contents of D on A8-A15, giving another 8 bits of a HighRAM address basically "for free", so only four bits in a latch somewhere would support a 512KB SRAM as a RAMdisk.

Then looking at what else I would want:

  • A UART
  • A real time clock
  • A serial flash ROM as a "pseudo-hard-drive"
  • A gamepad port

... and I figured I could get SPI or SSR versions of all of that (the SNES controller is the "or SSR" part, since with it's "pull down /SELECT to latch the button state, then release" system, it doesn't bus neatly with other SPI devices) ... most in Sparkfun breakout boards, though the UART is on backorder.

And now it's coming together. The Z80 bus PIO doesn't attach the /Write line, but infers /Write from the state of /M=0, /IOREQ=0 and /Read=1, so if the /Read line on the PIO is tied high through a pull up resister, it turns into a blind Write port. One PIO port to hold six SPI selects, MOSI and the serial clock. The other port holds the high four bits of the HighRAM address, with four bits free for future expansion (but only as outputs, not as GPIO).

If its running slow enough for wired/or to work, then an octal driver can be used to generate two distinct I/O selects, /IO1 and /IO2, and /IO2 can be put onto a block pin header with D0-D7, A0-A4 and the Z80 control lines, while /IO1 selects the PIO for writes and the SPI serial shift register for reads

  • IN.0 := /IOREQ
  • IN.1 := A7
  • IN.2 := A5
  • /IO2 := OUT.0 + OUT.1 + OUT.2
  • IN.3 := /IOREQ
  • IN.4 := A7
  • IN.5 := A6
  • /IO1 := OUT.3 + OUT.4 + OUT.5

That allows reading $20 to be thought of a reading the SSR, writing $20 through $23 to be writing the PIO data or control registers, while $40-$5F is available for whatever may be on an extension board.

And the problem with the SNES gamepad interfering with the SPI bus can be fixed by dedicating to SPI select lines to the gamepad, one connected to the SNES port as an SNES pull-down or "pulse" select, /SNES_SEL, the other as a normal SPI hold down select, /SNES_MASK:

  • IN.6 := /SNES_MASK
  • IN.7 := SPI_SCLK
  • SNES_CLK := OUT.6 + OUT.7

However, I don't want to monkey around with FlashROM and swapping it in and out. So I was thinking, a DIP 5v, 12 GPIO ATTiny could "inject" a boot up routine into the 64K SRAM. Even the 2KB Flash versions would have plenty of space to store the BIOS internally. Add another tri-state Serial-In, Parallel Out SSR, tie it to A0-A7, make sure A8-A15 has weak pull-down resisters (which feels upside down from back in the day, but unlike TTL, CMOS pulls up just about as hard as it pulls down), connect the Z80 /Reset and /Halt lines and some other lines to the ATTiny, connect the ATTiny serial shift out line to the Serial input of the SSR set up for SPI, pull down /RESET, load the address within the zero page into the address SSR, load the desired byte into the data SSR, output enable the SSR's, pull down the 64KB RAM /CS and /WRITE, release them, release the SSR output enables, rinse and repeat until you have loaded the copy routine starting at $0000 and ending with a HALT opcode, and the chunk of the BIOS into $80-$FF, release the /RESET, wait until /HALT, load the next chunk of the BIOS, release the /RESET, wait until /HALT, repeat until the copy routine sees it has stored stuff up through $FFFF and it's done, so instead of halting it jumps to the cold boot routine in the BIOS and away you go.

The ATTiny just sits there until the reset button is pushed again, then it loads the BIOS again.

Sketching it out, I think it uses about 9 of the 12 available GPIO, so you could also have a "warm boot" button, which simply pulls /RESET down and releases without any first stage bootloading, to execute the jump to the BIOS warm boot that sits at $0000 under CP/M.

Edited by BruceMcF
Link to comment
Share on other sites

On the edge of this topic, what software is the 'killer app' for CP/M?  I am fully aware of the history and legacy platforms that ran it and in fact, bought the CP/M card for my Apple II but never bothered to procure software after getting it to boot successfully.  

Is the thrill to just build the board, get it working and get a command prompt and some light development or are there classic titles (even if classic title = a particular word processor or text based Infocom game or terminal?).  Thank you!

Link to comment
Share on other sites

On 9/15/2022 at 8:50 AM, EMwhite said:

On the edge of this topic, what software is the 'killer app' for CP/M?  I am fully aware of the history and legacy platforms that ran it and in fact, bought the CP/M card for my Apple II but never bothered to procure software after getting it to boot successfully.  

Is the thrill to just build the board, get it working and get a command prompt and some light development or are there classic titles (even if classic title = a particular word processor or text based Infocom game or terminal?).  Thank you!

Well, most of the Infocom games were released for CP/M, until they started including graphics, so take your pick. But the killer business apps were probably WordStar, Multiplan, and dBase II.

There's also Turbo Pascal, several versions of BASIC, and a couple of C compilers.

Link to comment
Share on other sites

On 9/15/2022 at 9:50 AM, EMwhite said:

On the edge of this topic, what software is the 'killer app' for CP/M?  I am fully aware of the history and legacy platforms that ran it and in fact, bought the CP/M card for my Apple II but never bothered to procure software after getting it to boot successfully.  

Is the thrill to just build the board, get it working and get a command prompt and some light development or are there classic titles (even if classic title = a particular word processor or text based Infocom game or terminal?).  Thank you!

For tinkering and dabbling with languages hosted on an 8bit system, CP/M is great.

Look at the programming languages page at Retro Archive ... skipping assemblers and linkers:

  • Turbo Modula 2
  • Microsoft Fortrain
  • Microsoft Cobol
  • BDS C
  • BASCOM
  • Microsoft Basic
  • Turbo Pascal
  • APL/Z
  • Software Toolworks C80
  • "MI C" C compiler
  • Nevada Fortran
  • Software Warehouse Lisp/80
  • Mix C
  • Turbo Database Toolbox for Turbo Pascal
  • Aztec C
  • Algol compiler
  • DRI CBASIC80 Basic Compiler
  • Microsoft "OBasic"
  • Nevada Cobol
  • Nevada Fortran
  • Tiny C
  • JRT Pascal
  • Nevada Basic
  • Pascal/Z
  • Janus ADA
  • Z-80 MUMPS

And of course CamelForth has a CP/M implementation.

 

Edited by BruceMcF
Link to comment
Share on other sites

On 9/16/2022 at 12:23 PM, kelli217 said:

There's QBasic for CP/M?!?

Oh no, when I look using my desktop monitor in the office, I misread the file name OBASIC.COM as QBASIC.COM. Oops. I am going to blame my cataracts, because I don't want to say anything bad about my loyal and trusty laptop.

The legend says that that is MBasic v4.51.

Edited by BruceMcF
  • Like 2
Link to comment
Share on other sites

  • Administrators
On 8/27/2022 at 2:37 AM, Strider said:

Well, I'm as far along as I can get with what I have on hand, everything else has been, or needs to be, found or ordered.

It's a good thing I test everything before using it, my wife got me an assortment box of ceramic capacitors from one of the many re-sellers on Amazon, and I think just about every capacitor in it is faulty. So now I need to order some of those since I don't have the 2 values I need on hand, they were in that kit. I also haven't decided if I want to mount the VGA Terminal Board vertical or horizontal yet, so I held off adding that header until I have the board in hand. 

Overall, a few hours well spent in my opinion. Can't wait to get it completed!

z80-mbc2-started.thumb.jpg.dd3e3467fe0886292f9c63edaac5d0cd.jpg

This is looking great! I also know how pleasant is the time spending assembling the board. Also I see you are enjoying using this PCB holder as much as I am. )

  • Like 2
Link to comment
Share on other sites

On 9/15/2022 at 9:13 PM, BruceMcF said:

For tinkering and dabbling with languages hosted on an 8bit system, CP/M is great.

Look at the programming languages page at Retro Archive ... skipping assemblers and linkers:

{stuff deleted for brevity, which is my thing}

 

Thanks for that, great resource (the parent, and related directories) and who can deny the Amtek amber font?

When I was in College (mid-80's in California), the school had PerfectWriter and the rest; very interested to see if it's the same version, however I believe we were running it on PCs.  Shame that "Turbo C" was not part of that lineup.  Suppose Borland had to snap the line somewhere and at a certain point only produced IBM PC titles.

 

Edited by EMwhite
One final thought...
Link to comment
Share on other sites

One of the main reasons I wanted to build the Z80-MBC2 was to give me the opportunity to learn on real hardware, and this “modern homebrew” machine is as close as I am going to get. Like I said, I can give you a basic overview of how these machines work, but this is simple enough I can really dig into how to make it work for me. So not only is this for fun, but it’s also a learning tool I can use to teach myself how to utilize it instead of just using what others create.

This one uses the AtMega32 basically as the system ROM, and I still need to get that programmed so I can get it up and running. I ordered a 2 pack of USBASP programmers, and they don’t seem to play well with Windows 10, I failed to notice that when I ordered them, so I am going to try them on Ubuntu and see how that goes. I’ll get this thing up and running sooner or later.

You had me for a second, I thought to myself, didn’t that come out in the early 90’s? 😛

I do plan on playing around in Microsoft Basic, and maybe Cobol, for the pure nostalgia of it, I haven’t messed with either since the 80’s. Not sure where I’m going to go from there, we’ll see.

 

On 9/17/2022 at 1:39 AM, Cyber said:

This is looking great! I also know how pleasant is the time spending assembling the board. Also I see you are enjoying using this PCB holder as much as I am. )

Yeah, that simple little cheap PCB holder is great to have, I have used it quite a bit! 🙂

  • Like 1
Link to comment
Share on other sites

I just used AVRDUDE in Linux to burn the bootloader, worked like a charm. Loaded the "sketch" that acts as the systems ROM. Hooked it all up, loaded up Putty, and .... IT"S ALIVE!

I know what I'm playing with all day today. 😛

I absolutely LOVE that first power on and boot feeling!

z80-mbc2-ALIVE.thumb.jpg.7d452b809529ea9fd6e75efa4ec093fd.jpg

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use