Zolatron 64 roundup

      1 Comment on Zolatron 64 roundup

This is the 300th blog post on this site, and I thought it would be appropriate to mark the occasion with a summary of what’s happening with my Zolatron 64 6502-based homebrew computer project.

You see, the thing is, I’m feel like I’m about to announce ‘mission accomplished’ for this project. And that’s not something I get to say very often.

Not that I won’t be doing lots more things with it. It’s just that I feel I’ve achieved what I set out to do – to learn how computers work. I now know how you do I/O and control RAM and ROM through memory addressing. I’ve also taught myself a lot about interrupts and timers and many other strange and obscure things.

In that sense, then, this project is complete. I have a functioning computer for which I can now write software.

Let’s take a tour through the machine and see where we’re at with the various components.

The backplane

This is currently on revision 2. The first spin of the board actually worked fine, but had only six slots that were a bit too widely spaced. Rev 2 gives me eight slots and all of the signals on the bus are broken out at the edges.

The main thing to note here is that I’m very happy I went with a backplane design. Yes, running signals over multiple boards can have issues – with reflections and noise. But these are minimal with a slow computer. I’m running at a 1MHz clock speed and have no plans to increase this on the Zolatron 64.

By breaking out functionality on to multiple boards, I’ve been able to iterate each part of the computer separately, making improvements and fixing bugs without affecting those parts of the machine that are already working.

I can also try things out. For instance, I have a 65C22 VIA board design that provides general-purpose I/O pins. I’ve been using three of these boards – one to drive an LCD display and LEDs; another to drive 16 LEDs (two 8-LED bar displays); and a third to talk to a Raspberry Pi. At some stage, I’ll probably drop the 16-LED board – it’s mostly for debugging. And I’ve recently replaced the Raspberry Pi one with a custom board (more on that later). But the 65C22 VIA board will continue to be useful for experimenting with other forms of I/O.

Main CPU board

Even though this board is on revision 4, there’s still a bodge wire on it, dammit. That said, it’s working absolutely fine, so I don’t feel the need to re-spin the board.

This board is the heart of the computer. It has the 65C02 CPU, 32KB RAM, 16KB ROM (actually a 32KB EEPROM of which I’m using half) and the 1MHz oscillator for the main clock. There’s also  bit of decoding logic and a reset button.

The oscillator is in a socket, so I could try sticking in a 2MHz or 4MHz unit, just to see what kind of mayhem will break out. There are also connections for an external clock. I might try hooking this up to my function generator just for the fun of seeing what, say, a 1Hz clock does to my carefully crafted code.

The EEPROM is in a ZIF socket. That was another good decision as most of my software development to date has been for the ROM code, so I’m frequently taking the chip out to re-flash it.

6551 ACIA serial board

The 6551 ACIA chip is notoriously flawed. But I’m glad I went with it to drive my first serial port. For one thing, it’s period appropriate and something of a classic. It’s also extremely easy to understand, which makes writing code a snap.

Although the 65C51 is still in production, I wanted to go with a vintage chip with less egregious flaws. And the biggest problem there turned out to be finding chips that were both genuine and working. The majority of the samples I bought on eBay were either fake or dead.

I’m still using this board as the main console connection – that is, in the absence of a keyboard and display on this machine, I’m interfacing to it via the serial connection. Very old school. I’ve dedicated a Raspberry Pi Zero 2W to the task, as we’ll see later. I don’t see any reason to stop using this board – hey, it’s working! Nonetheless, I’ve also created the…

NXP SC28L92 Dual UART board

The SC28L92 is a far superior option for creating a serial port. In fact, you get two!

It’s a little more complex to code for than the 6551. But having learned the basic concepts on the older chip I found I was able to understand the SC28L92’s datasheet fairly easily. I simply adapted the code I already had.

The SC28L92 has some other advantages, too. Among these are the fact that it offers a bunch of input and output lines – mostly intended to act as control signals for whatever comms gear you’re attaching, but which are actually usable for pretty much anything you want.

I’m not using this board much at the moment. But I have plans. Vague plans, but plans nonetheless.

65C22 VIA board

I’ve mentioned this above. The 65C22 Versatile Interface Adapter is so damn versatile that you wind up using it for all kinds of stuff.

Not only does it offer 16 bidirectional general-purpose I/O (GPIO) lines, but it also has two handy timers, a shift register and four other control lines.

Currently I’m using the 65C22 chip to drives an LCD display, LEDs, a parallel interface with a Raspberry Pi and (soon) a printer port.

Even if some of those devices (like the LCD and LEDs) ultimately go away, I’ll always keep at least one of these boards in the machine to provide the timers and ‘user port’ GPIOs.

Pi board

This is a recent development and combines a 65C22 VIA with a Raspberry Pi Zero2W, which has the hostname imp.

As I mentioned, I’ve been using the RPi, connected to the ACIA board via a serial connection, as my main console. The Pi is run headless – I simply SSH into it from whatever computer (or iPad) I’m using at the time and run a Go-based terminal (Zolaterm) I wrote specially for the job.

Then I started work on ZolaDOS, where I’m using the Pi as a form of mass storage. That’s coming along nicely. But it required running 16 wires between the Pi and one of the 65C22 VIA boards (plus a couple of other locations).

It quickly became apparent that I could save a whole rat’s nest-worth of wires by building a board to house both the VIA and the Raspberry Pi. This, also, is working nicely – now. I did have some debugging worries caused by stupid mistakes, but I’m saving that story for another post.

Parallel printer board

This is the new kid on the block. Again it uses a 65C22 VIA (is there anything this damn chip won’t do?). But this time it’s to create a parallel printer port, as found on computers of yore.

This is completely untested. I was in the process of ordering some PCBs from China when I thought, why not? I was already paying a hefty-ish amount for postage and one more board wouldn’t make that big a difference. And even using four layers, the board itself would cost only $8.

So I quickly cobbled this together, based on my experience with my SmartParallel project.

There’s actually not much to it. One of the VIA’s ports is used as the 8-bit parallel data port. The other provides the various incoming and outgoing control signals. Both ports are buffered using 74HC541 chips. And there’s a 74LV14 chip to invert four of the control signals to drive some indicator LEDs.

Will it work? Who knows?

Software

All that’s left to do is write software so that the computer actually does something. The main firmware is starting to settle down, so now the focus is shifting to ‘user’ programs that I can load into memory. The first ‘application’ is Hunt the Zumpus, which is a way of helping me learn how to do things like generate random numbers.

As for what comes after that … well, I’m open to suggestions.

The backplane design of this machine – and the way you order PCBs from China (with a minimum of five copies per design) means that I have enough boards to build at least five of these machines (or more, with slight variations). So, did anyone say clustering? At the very least, it might be fund to get a couple of machines talking to each other.

It’s more likely that I’ll take the lessons learned here and apply them to a single-board computer, maybe based on the 65816 CPU. For the moment, though, I have some debugging to do.

1 thought on “Zolatron 64 roundup

  1. Paul M

    Back: the day when I did embedded software for radio systems, we had a Dataman EPROM programmer and emulator. It saved a lot of time, you plugged it into the cpu board’s EPROM socket, and uploaded your image into the dataman. Once you’ve tested it works you can then program an EPROM.

    Obviously not as functional as an in circuit emulator but a fraction of the price.

    You can sometimes get lucky and find them for sale on eBay, but check it’s complete.

    Reply

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.