Close
0%
0%

The Homebrew Handwired Z80 Computer - H2Z80

A 64K Z80 computher that you cand build by yourself only with perfboards, wires and some components

Similar projects worth following
This little computer idea was born from my desire to better understand how computers really works and how they can do everything they actually do. The things started very slow... as anyone can imagine, understending how to build it from zero is quite defficult and I don't have any training to do that.
At that momment, the computer is already working, running Small Computer ROM Monitor and CP/M 2.2, has a usable videocard and a almost good Compact Flash card. The controller and PS/2 keyboard card is unfinished yet, even the schematic isn't finished.

  • Main Board - The Motherboard:  It's contains the Z80 processor running at 4 MHz, 32K ROM and 64K RAM (two 65256 with 32K each), the Z80 SIO chip witch interfaces the serial up to 19200 baud rate by a RS2323 adapter, the clock generators for the Z80 CPU, and for the Z80 SIO, the I/O decoder with a 74HC154, this one supports up to 16 I/Os, the LM7805 regulator, three expansions slots with 31 2.54mm pins each one, a 10 LEDs bar that help to monitore some CPU control pins and a simple reset circuit. I can easily modify the baud by selecting from 2400 to 19200 in the dipswitch and the CPU crystal clock can be exchanged by hands;
  • Expansion Slot 0 - The VDP: This board is basically a TMS9918 VDP, 16K RAM and some glue logic to uses a 62256 instead of multiple 4116 SRAMs chips. This board also provides the connections for stereo audio and power to a small RCA monitor that I have here. This board has it's own 5 volts regulator due the high VDP consumption;
  • Expansion Slot 1 - The CF card: This one is a Compact Flash card interface to allow the computer to run CP/M and provides much more space than the 32K ROM, Its also has a 10 LEDs bar that is mapped to I/O 0x00h and acts as a status monitor. In the future, I want to wire up the seccond PATA connector to be able to connect a IDE cable and a hard drive directly to the computer in addition to the CF card;
  • Expansion Slot 2 - The Keyboard and Controllers interface: This board is on development yet, its will provide a PS/2 keyboard interface directly for the computer and two NES/SNES compatible controllers interfaces to play some games like the colecovision library. I would like to turn H2Z80 indeppendent from my computer terminal, using this board to interface the keyboard and the CP/M to uses the VDP as a terminal;
  • Display: It's not more than a simple 4,3 inch display that works with RCA video, I modified a little to add a sound output with one PAM8403 amplifier and two speakers opering on mono;
  • Frame: A 3D printed frame that I make on Fuzion360 to match with the boards and add some structure sopport to then.

Coleco and H2Z80 IO Maps.txt

ColecoVision and H2Z80 I/O Maps and Coleco controller RAM Map

plain - 2.91 kB - 05/21/2024 at 02:37

Download

H2Z80.com

Compiled loader with the modified BIOS

octet-stream - 8.22 kB - 05/21/2024 at 02:03

Download

H2Z80_coleco_bios.asm

Modified ColecoVision BIOS to work with NES H2Z80 controller interface

plain - 66.58 kB - 05/21/2024 at 02:02

Download

COLECOVISION CODING GUIDE.pdf

ColecoVision Coding Guide - With The Absolute Coleco Bios Listing

Adobe Portable Document Format - 721.72 kB - 05/21/2024 at 02:01

Preview

H2Z80 Schematic 13MAIO2024.pdf

Schematic for the Maind Board and all the Expansion boards

Adobe Portable Document Format - 152.90 kB - 05/13/2024 at 22:39

Preview

  • Modified ColecoVision BIOS - Now working with NES controllers!

    Jorisclayton05/21/2024 at 01:54 0 comments

        Now I'm ready with the modified Coleco Vision BIOS to the H2Z80. This BIOS version replace all the original coleco controller routines like read, decode, debounce memory clear, etc... I rewrite it from zero as my controller interface is much more simple than the Coleco ones, all the 8 data bits, corresponding to all 8 controller buttons, can be accessed at one time, just by read the controller ports (0E0h for player 1 and 0E1h for player 2). 

        It's was a little difficult, as I'm not much familiarize with assembly, I already write some code to interface some stuff like a 16x2 LCD and a PS/2 keyboard but understand all the Coleco controller routines take some time untill i ccould start to rewrite then. First I try to interpretate the BIOS with help of COLECOVISION CODING GUIDE book and do some little adjust to decode the NES protocol instead of the Coleco controllers, but it do not worked for me, so I mapped the RAM addresses used by the controllers with the BIOS code and a emulator that can show the RAM while runnig to check if it's really what I'm thinking that occours when the game is running.

         After read and map the RAM used by the controllers, I wrote this code that handle the NES controllers and interprets then to act like the ones expected by the system, I need to stay whith the BIOS size, 8192 bytes for this one that I'm using, to it continues to work for the direct addressed calls makes by the ROMs and by the own bios that I have. Also the controller interface part takes up to 532 bytes, my new version only needs 188 bytes so all the difference is filled by NOPs. 

        I do not found a workable BIOS with comments so I disassembled one with Z80DAS and interprated it with the coleco book mentioned above, I only used the controller Interface part, so all the other stuff like sound, VDP interfaces, logos, etc... stay as it was before. This BIOS works with the loader.asm program, written by J.B Langston, who I need to thanks for share his project and for direct help me when I'm stuck in some parts of my project. Here is a link for the loader.asm program page:
        https://hackaday.io/project/159057-game-boards-for-rc2014/log/156298-running-colecovision-games

        Now the next step is interface a PS/2 keyboard to work with CPM 2.2 and TMS9918 directly in the 4.3" display, all indeppendent from terminal emulator on my PC, I wish to make my H2Z80 don't need more to be conected on my desktop/notebook, just like a real computer that works by itself.

        PS: As the controllers needs the modified BIOS to work with the Coleco Vision games, they, obviously, just work with games that uses the BIOS to interface the controllers and, yes, there are much games that do all the I/O stuff by itself, so they will not work with this project. For me it's not a problem as my goal isn't to run all ColecoVision library, it's just to learn a little more, and I learn a lot doing this little shit work, while having fun and do some eletronics!

  • Now workable Controller interface and Sound board!

    Jorisclayton05/13/2024 at 21:10 0 comments

            Today I started working with the controller board and, after some headacha, I came with this workable design. At first, I thought the the clock and the latch signals would be send by the controller (something like the PS/2 protocol) and until understand that I need to send it to the joystick I lost some time... As I'm using a pseudo SNES controller that, in practice, works like a NES controller with turbo A and B mapped to X, Y R and L buttons, this also give me some pain, as I was waiting 16 bits and the controller only send 8 to me with a "strange noise" on some buttons. Its was what I thought until realize that it is a NES not a SNES protocol. My controllers also came with Start and Select button inverted for some reason but it wasn't a problem.
            Finally, after much tests, there is the result, a board that get the 8 bits serial informatin from the controller and shows it as one byte, all the 8 bits at a time, for the Z80 CPU at the ports E0h and E1h, the Z80 just need to read it and all the pressed keys will be there. I will update the schematic with some other changes, like IO addresses and some expansion slots pins changes.

View all 2 project logs

Enjoy this project?

Share

Discussions

Peabody1929 wrote 05/09/2024 at 18:31 point

Check out Small Computer Central SC131.

  Are you sure? yes | no

Jacob David C Cunningham wrote 05/08/2024 at 15:26 point

very compact nice

  Are you sure? yes | no

Jorisclayton wrote 05/08/2024 at 19:16 point

Thanks, I like to well use the board space

  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