I've managed to make at least a little progress on the Z80 every day. All my notes (including TODOs, a log of what I've been learning, parts inventories, design notes, links, etc) is in a single org file in a repo with datasheets, schematics, firmware, etc. which doesn't translate well to a blog format, though, and publishing that org file as an HTML file (which I do, for my own use) is pretty ugly; I guess I could make it look nice, but that's time I could be spending working on building a computer so it's not going to happen.
The major updates since last week:
- I've tried quitting, but I'm still using Eagle. Every time I use KiCad, I last about 10 minutes before rage quitting and just going to Eagle. A large part of this is due to the fact that I'm pretty proficient at using Eagle, including adding parts where they don't exist.
- I've decided on a Eurocard format for I/O and mainboard; the power board is relatively simple and thus small. The two boards will use an IDC40 interconnect, though; this would also give me the option of stacking boards if I felt so inclined. Doing it this way lets me work around the some of the limitations in Eagle that were holding me back.
- I found the MCP23008 and MCP23017 - they're 8- and 16-bit I2C I/O expanders, which will make life a lot easier, I think.
- I found a display module with a 5.7" 320x240 LCD. It has an LCD controller (an RA8835) that I'll probably drive with an I/O expander.
- I came up with a first pass at an ATmega328-powered serial I/O module, but then decided to start designing something around the ATmega1284 to handle I/O in general. This would be my version of their PIO; at first, I didn't like this idea and wanted to do everything with the Z80, and then realized this is basically how everyone who makes computers does it. It's not incompatible with my goal of a system that I can more or less completely understand, so I'm going forward with it.
- Instead of coming up with some crazy dual clock system to support single stepping, I realised I could just use an Arduino and a push button; I also switched to an oscillator to save space and avoid having to add the extra bulk of the crystal + resistors + 7400.
- There was a lot of physical layout prototyping, mostly by way of paper cutouts in the shapes of the dev boards and LCDs. I've discovered that my paper notebook that I'm tracking all of this in is pretty close to the perfect size: 25x19cm (9.8x7.5in). The biggest unknown right now is the keyboard (more on that later). This also led to me messing around with FreeCAD (I think I can get by with 3D printing the case) and realising I have no clue what I'm doing. I did a little bit of SolidWorks in university as part of a class, but that was over a decade ago. I'm particularly not looking forward to figuring out the hinge.
- I did a lot of thinking about the keyboard; I could build my own using a 16-bit I/O expander and an 8-bit I/O expander. While looking around on eBay for keyboard switches, I found a replacement IBM 5140 keyboard that I'm going to see if I can get to fit.
- I realised that the SD card is going to require a 3.3V power rail, so I added an appropriate regulator to the power supply. Right now, it's an LM1117, but I'm looking into whether I can get by with an MCP-1700 regulator. It's smaller, it should produce less heat, but it can only drive 250mA. I think this should be enough, considering I'm only using it for signaling and not driving anything that needs a ton of current, but I'd like to be sure. I have a few ideas about doing full-disk encryption using some Atmel secure memory chips (I've used the AT88SC in the past, but I'm sure there's newer/better options); another idea is add some basic cryptographic primitives to the I/O firmware, e.g. as an I/O device. That's all pretty far down the road.
- In a memory layout writeup, I'd mentioned that the outputs need to be buffered. I added in some 74545 line drivers for the address pins (a pair on the mainboard and a pair on the I/O board) and a 74245 bus transceiver for the data pins (again, on both boards); it looks like it works out such that tying the direction pin on the transceiver to the Z80's works as intended. I'm still waiting on parts to arrive, so I haven't been able to physically verify this.
- I finished a preliminary schematic (sheet 1, sheet 2) and board layout for the main board; this has the Z80, associated support hardware, and the memory. I've got a checklist of things to verify before I have it fabricated as the boards will cost a decent chunk of money and I'd like to get it right before sending them off to be fabricated. This is also several orders of magnitude more complex than any board I've previously done, so I did the layout using the autorouter; eventually, I'd like to hand route it but that's going to take an incredible amount of time to do. I'm also not happy with the large number of vias; I can't do 4-layer boards in my EDA software, which would help (while doubling the cost of the board). I don't have experience designing a board this complex and I don't really have a community of hardware engineers I can ask, so I don't really have a good intuition for how this will affect the system. I'm trying to read up a lot on the subject to make up for that.
- I’ve also been thinking about moving the clock to the power board to support using an external clock for debugging. The power board is pretty bare right now, so it’d simplify things somewhat. Again, I’m not sure of the implications or impact of doing this.
- I was supposed to have a book on programming in Z80 assembly show up this week but it appears to have been lost in the mail. I have some others that are coming when they get here.
- I bought a logic probe (~$20) to help debugging, and I’m unreasonably excited to use it.
So the project is coming along; I'll get some dev boards this week to verify specific subsystems and I'm going to keep working on designing the I/O board. My EEPROM programmer Arduino shield should arrive from OSHPark late this week or early next week, and there's firmware to be written for that in the meantime.
I also bought an RC2014 that should show up sometime this week.