A Z80 laptop

Similar projects worth following
I'm trying to build a Z80-based laptop.

I've long wanted to build my own laptop. I have a project to create a custom laptop, which is currently stalled due to trying to figure out some hardware questions. However, I was recently watching Halt and Catch Fire, and it really just made me want to build my own 8-bit computer and write some assembly. My first thought was doing something with the 6502s I have sitting at home, but as I poked around, I figured I'd start with the Z80. The experience building this will definitely be useful later on.

A while ago I built part of a CPU from transistors, but that became tedious, so I decided to build them out of 7400s. The upside is now I have a ton of 7400s (and others in the series), and there's this awesome company called OSHPark that manufactures perfect purple PCBs for you. I guess the question is, why not build a computer?

Tbe goal for this project is to build a computer that I can completely understand with hardware that's easily replaceable. As such, the logic boards will have all through-hole components and use IC sockets for all logic chips.

Eventually, I'd like it to be solar charged with both WiFi and LoRa modems; the first step is getting a working basic machine first.

  • Hardware update

    Kyle Isom3 days ago 0 comments

    I've been unemployed since late last month (intentionally so), and I don't start working again until the 4th. That means my funds are limited to order PCBs, so I won't be ordering new boards until the middle of November, most likely. I've got the latest revision of AEPROs incoming, so given that I have an RC2014 backplane for the KZ80 and a serial I/O card, I can at least start working on a serial interface and initial monitor.

    On the plus side, this gives me time to think through the interface parts, and work towards a design that will fit in the case.

    I'd also like to sort out the power board, and perhaps add some LiPo charging to it. That's sort of a passive, background task for now.

  • On I/O

    Kyle Isom4 days ago 0 comments

    The biggest challenge right now is I/O into the system. I'd eventually like to support

    • Keyboard
    • LCD
    • Serial / UART for attaching modems and other such things
    • Compact flash drive
    • A Counter/Timer Circuit (CTC)

    Last night, I realised I could use a handful of PIO chips to do the bulk of the work. The LCD, which is 8 data pins and 4 control pins, could be controlled by a single PIO; the keyboard probably needs to be connected to a small microcontroller to handle strobing the entire keyboard (which is necessary to pick up modifier keys). Serial I/O is done with a separate chip, the SIO/2 that provides a pair of ports. I think the compact flash could be done with a pair of PIO chips, maybe connected to a microcontroller but maybe not. My compact flash is an IDE <-> dual CF interface with an ATA-44 connector, so that'll need some thinking. The CTC would be used for threading as well as a general counter and timer. Tentatively, I'm designing around the following addressing scheme:

    D0 D1 D2 D3   A  B  C  D
    A7 A6 A5 A4  A3 A2 A1 A0
     1  0  0  0              | SIO/2 (BASE $80)
     0  1  0  0              | DIRECT INTERFACE (KBD+LCD) (BASE $40)
     0  0  1  0              | CTC (BASE $20)
     0  0  0  1              | ATA (BASE $10)
    A: ENABLE ON 0
    B: 0
    C: C/D (CONTROL=0, DATA=1)
    D: A/B (PORT A=0, B=1)
    SIO A/C: $80
    SIO A/D: $81
    SIO B/C: $82
    SIO B/D: $83
    A: ENABLE ON 0
    C: C/D (CONTROL=0, DATA=1)
    D: A/B (PORT A=0, B=1)
    KBD A/C: $40
    KBD A/D: $41
    KBD B/C: ---
    KBD B/D: ---
    LCD A/C: $44
    LCD A/D: $45
    LCD B/C: $46
    LCD B/D: $47
    A: 0
    C: CS0
    D: CS1
    CTC0: $20
    CTC1: $21
    CTC2: $22
    CTC3: $23

    I still need to figure out the addressing and interfacing for the IDE/CF drives (as well as figure out what the file system is going to be).

    I think the interrupt priority is going to be:

    • keyboard (always give the user priority control)
    • CTC
    • SIO/2
    • IDE
    • LCD (I don't actually anticipate any LCD interrupts, but I'm building this in case it becomes useful later)

  • ALMO: an Arduino LoRa modem

    Kyle Isom5 days ago 0 comments

    I wanted a LoRa modem to go along with my computer, so I've created a shield for the Arduino. The thought is that Arduinos are pretty easy to come by, and the RFM95 breakouts also seem to be easy to come by. I've got a set of boards on order from OSHPark, so in about a week, I'll find out.

  • Status update

    Kyle Isom5 days ago 0 comments

    Though quiet, I've been plugging away.

    I'm currently working on a serial I/O board that can be used for some of the initial work; it's based on the RC2014's dual SIO/2 card with modifications and adaptations for my purposes.

    The real bugger right now is the display and keyboard. I'm thinking of using PIO chips for this, though I was previously considering an atmega1284-controlled I/O board.

    I also got a compact flash to IDE adapter, so I think I' going to use that for a disk drive.

    Importantly, I'm also waiting on the EEPROM program (hey, revision 7 now) to show up. I can't do much until it gets here, as the Z80 doesn't know what to do.

  • Schematics and boards → GitHub

    Kyle Isom09/19/2019 at 16:40 0 comments

    I've put the schematics and PCB layouts on GitHub. There's the boards I've built so far and a few tooling boards I'm still waiting to get back from OSHPark. Almost none of it has been tested, though. Note that all of these are Eagle files, and you probably need the Adafruit and Sprakfun libraries too.

  • RC2014 board

    Kyle Isom09/19/2019 at 14:54 0 comments

    I've gotten an (really, another) RC2014 [1], and it's up and running. While I didn't design the hardware, it's nice to have a test platform for Z80 development. I'm using a Raspberry Pi as the serial terminal, which isn't so great (that's another project for another day), and it all works together nicely. I've got mine set up with the RomWBW and a Compact Flash card (that isn't working yet), so it should be a nice little dev platform.

    [1] I have an RC2014 Pro, but it spews garbage on the console. All signs point to an issue with the serial board; while I have a replacement on order, I wanted something that works now.

  • Finishing rev1 of mainboard and power board

    Kyle Isom09/19/2019 at 14:46 0 comments

    The terminal blocks are in, so I finished assembling the mainboard and power board. I realized that I'd put the wrong part in the first power board (LD333V instead of an L7805), so I had to assemble a second power board (I guess this is why they send you three ;)). It passes the output checks (4.96 and 3.35V), and look at that clock signal!

View all 7 project logs

Enjoy this project?



Kyle Isom wrote 5 days ago point

An old IBM 5140 keyboard - you can find them on eBay for about $50, but you also need switches for them (~$50 for 200 from Matias).

  Are you sure? yes | no

Starhawk wrote 3 days ago point

Pardon my asking, but why does one need switches for what amounts to a box of switches atop an 8042 and some cabling?

  Are you sure? yes | no

Kyle Isom wrote 2 days ago point

Sorry, I mean you can get the switchless keyboard case and PCB for $50.

  Are you sure? yes | no

Starhawk wrote 5 days ago point

Just curious, what is the keyboard shown in the most prominent Gallery image there...?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates