I found what's wrong with the Z80 motherboard!

Sdílet
Vložit
  • čas přidán 20. 10. 2022
  • This is part one of the Z80 Big Update series where I explain all aspects of this project as it is now. This video covers a brief explaination about the bug in the Z80 motherboard circuit, and why it is so difficult to diagnose.
    The bug has been fixed by replacing the LS chip with a HCT one and the firmware/BIOS/MONIKA development is back in full swing!
  • Věda a technologie

Komentáře • 20

  • @sparthir
    @sparthir Před rokem +2

    I love these videos so much. It's sometimes the smallest things that can trip us up but it's great to find the problem. :)

  • @TSteffi
    @TSteffi Před 3 měsíci

    I am currently coding on John Winans Z80 SBC, and he did the ROM/RAM switching differently. On his board, ROM and RAM are both enabled at power up. But there is a FlipFlop on one of the IO ports. Once you access that port, the FlipFlop turns on and permanently pulls the CS line for the ROM high.
    So what you do is, after powerup you just copy all the code "in place". In practice, you set BC,DE and HL all to zero and then do LDIR. That causes the whole of ROM to be copied over to RAM. Then you access the special port address, that disables the ROM and everything works normally from there.

  • @rodneyknaap
    @rodneyknaap Před rokem +1

    Hi Andy, when I saw this video I remember my own experiences with pull-up and pull-down resistors. Some ICs need a really low resistance value to stop them from doing things we don't want to happen. I think it gets better with HC and HCT logic. Sometimes I use combinations of LS, HC and HCT to influence timing in my projects. I don't own a scope which is able to show delicate timings so I must go on instinct and experimentation to solve timing problems. Regarding the bank switching, it reminds me of ROMWBW (also for Z80) which uses a 74LS670 to select the bank addresses. It sounds a little like what you are doing, but your idea seems more elaborate because it uses more memory to store bank address data I think.
    Regarding your many hand soldered wires, I can identify with that as well. With hand soldering, basically anything is really possible, no limits in connections really. What I did before is keep some loops in the wiring so you can shift it away when you need to solder underneath later. There is one caveat I want to tell you. When you hand solder a project with loose wires, you must keep in mind that this circuit will be much more unstable and unreliable than an actual PCB with solid ground planes etc. The most definitive proof of this was when I made my own version of a XT-IDE board. It looks pretty simple to do in concept, but when testing, I had to change the IC types a lot to make the timing work finally. When I designed and ordered a PCB from JLCPCB, and soldered the PCB, I found that suddenly all harddisks functioned properly, when previously only some of them worked! So it's really best to design a good and stable PCB, and start testing further from there. This can prevent some delicate problems from happening in the first place. When I remember how long I took to debug the hand soldered XT-IDE project, not to mention the frustration! When after soldering the proper PCB, I found it works 10 times better and much more reliable. When you design a system where you plan to add more things to the bus later, I really also recommend to use 245 bus driver ICs I have done several mainboard designs which include a ATX Z80 PC, and an ATX 8088 XT PC.
    you can find the projects at:
    www.knaapic.nl/wordpress/hobby/rc2014-modulaire-z80-computer
    www.knaapic.nl/wordpress/893-2
    www.knaapic.nl/wordpress/my-ibm-compatible-xt-clone-pc-mainboard-design
    At the first link you can see my hand soldering work, all in one colour wire. Actually I have done many such PCBs, maybe more than 10. One of them is now inside my Amstrad PPC640 to add a laptop IDE harddisk inside.
    What I did for hand wired projects was to make the schematic in KiCad, then move to a PCB, place the components in a reasonable configuration, and then solder them into the experimenting PCB, next the PCB program can serve as a reference to easily show and double check where all the connections need to go. When finished you can use the netlist to check all the connections. And remember to examine for shorts using strong magnification, just look closely at all the pins one by one and if there is a short, you can visually spot it with good lighting.
    What you are doing is great and you can learn a lot from your efforts. So I want to tell you, don't give up, your idea is worth it to develop it further. I know the feeling of having ideas and because you know it's a really good idea that deserves to be realised, the urge to make them in reality can be a great motivator. Same for me.
    You had better consider moving to a real PCB. What you want to do really merits a PCB. KiCad can be learned with patience and you can gain more experience. Even if the circuits are not finalized, you can also modify a PCB when needed, and it's much more stable generally speaking.
    Usually it will require at least one revision for final modifications to get a final PCB concept anyway.
    If you want to exchange ideas, you can email me if you want.
    Kind regards,
    Rodney

  • @ITGuyinaction
    @ITGuyinaction Před rokem +1

    👍 👍 👍 You have really interesting videos! I keep my fingers crossed for your channel quick growth! P.S. I'm also doing first steps in video creation so you can keep for mine. 🤪

  • @JohnnyWednesday
    @JohnnyWednesday Před rokem

    Great news! can't wait to hear more :D

  • @tiporari
    @tiporari Před rokem +2

    At least you have a direction to search now.
    With clocks in the mhz range, you are in the RF domain. Switching DC on and off at RF frequencies in a circuit that has capacitance and inductance will create interference, inductive coupling between parallel wires, radiation at sharp points and bends, etc.
    There's a reason there are bypass caps everywhere on modern PCBs, careful routing of address and data lines, and on board power conditioning. As soon as you started describing the problem, I thought about resistor packs. You could adjust that value to keep the bank select from driving the floating bus, or try a different chip. They have different operating characteristics and variations from chip to chip can be significant.

    • @rodneyknaap
      @rodneyknaap Před rokem

      Exactly right, bypass caps are super important and can't be omitted. When using a resistor pack as pull-up or pull-down resistors, I wanted to comment, it's better to use a cut IC socket on the PCB so you can test by plugging in several different resistor packs and get the best stable result with the least necessary resistance load on the circuits. When experiencing quirky operation, usually it can pay off to first try selecting other logic family equivalents with better expected behaviour for that specific circuit area. That's also my experience and absolutely critical to observe when testing larger systems made with TTL chips.

    • @rodneyknaap
      @rodneyknaap Před rokem

      Indeed, now I also saw there are practically no bypass caps on the PCB. Andy you really need to add a bypass cap to every IC on the PCB before doing further testing. For me it's so obvious, I even didn't notice the bypass caps are missing! It's not only theory, it's really necessary, even more so on hand wired projects.

  • @SeanBZA
    @SeanBZA Před rokem +4

    Yes you can see from the datasheets the max input current flow out of the chip is 200uA, and yes is voltage dependent, as the inputs are clamped to a roughly 3 diode drop reference internally, so as the input goes above roughly 1V5, 2 silicon diodes plus the schottky diode, it changes dramatically, as the diode starts to turn off, and the PNP input as well starts to turn off. Would work with 1k to ground instead of 10k, though the recommended 330R resistor to ground works better, though losing the fan out and also hurting the ability of an unbuffered Z80 CPU to drive it, as most are barely able to drive more than around 5 LSTTL loads, though the datasheet guaranteed 4. HCT works better there, at least it keeps the bus loading to zero, and still works with TTL logic levels rather than the broader CMOS levels. HC would have had the opposite problem, with the Z80 normally having the ability to drive the bus, but sometimes the decoder not quite being able to get to the threshold before the clock period finishes, leaving the odd runt pulse in there that crashes decoding.

    • @alexanderstohr4198
      @alexanderstohr4198 Před 3 měsíci

      the TTL load count is few - and i also found that doing TTLs for a signal with many consumers is not feasible. and leave alone bi-directional bus setups...

  • @subg9165
    @subg9165 Před rokem

    the g-man is a character from the game half-life 2. one of his few lines in the game, right at the beginning, is "the right man in the wrong place can make all the difference in the world", so i assume that's what the thing about g-man means

  • @christianvitroler5289

    Pull down resistors only work wit tri-state outputs :-)

  • @alexanderstohr4198
    @alexanderstohr4198 Před 3 měsíci

    Not sure if that will be of help:
    some folks did custom chips like FPGA/PAL/GAL for doing address decoders (like Commodore spent such a unit for the C64).
    it might be a reasonable solution for such a complex system to have address decoding _not_ built from standard logic just for complexity reasons that you don't want to deal with in discrete gates for timing and signal level reasons. inside such programmable logic device both of those aspects are much less of an issue. - its definitely up to you and your understanding when its needed or possible to go either the one or the other solution.

    • @andyhu9542
      @andyhu9542  Před 3 měsíci

      Address decoding using TTL chips is fairly simple (if you don't need to select a few registers from 64K address space, in that case a GAL is the way to go). The hard part is capturing instructions on-the-fly. I do that with a GAL16v8.

  • @sparthir
    @sparthir Před rokem

    I don't have enough experience with it but KiCAD might be some good PCB design software.

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR Před rokem +1

    If only the ZILOG Z80A was compatible with the motherboard you are developing.

  • @MarquisDeSang
    @MarquisDeSang Před rokem

    I am surprized that a guy intelligent and knowlegable as you is not making videos about Risc-V. My favorite CPU (architecture) are Z80 (beacuse of the alternate registers) and Risc-V (pure beauty and difficult simplicity)

    • @rodneyknaap
      @rodneyknaap Před rokem +1

      After building computers with Z80 CPUs and 8088 CPU's, definately the Z80 is a winner in my opinion. It's much more design friendly and stable than the 8088, and needs practically no support logic like the 8088 does. However the Intel chips are much more developed thanks in part to IBM. What I love about 8088 is the software available, and more address lines. Nothing else really, if not for those, and the nostalgic feeling of old PCs, I would stick to Z80 and similar projects. It's a great pity that Z80 architecture didn't have more strong and solid development by Zilog to keep it suitable for more modern real systems like PCs. When I discovered the RC2014 and ROMWBW, I found that indeed such a system is starting to resemble a PC and also supports CP/M in much detail. A really important aspect of any system is it's software development potential. That can draw in programmers and make the platform more attractive. Today there is much more collaboration on the internet, and it pays off just to look at other systems, it may inspire you for many new ideas. Designing computers is a bit like art, and often can benefit from inspirational ideas, to develop an instinct about what direction you want and need to move towards. A bigger perspective always pays off even for ideas that start out small.

    • @alexanderstohr4198
      @alexanderstohr4198 Před 3 měsíci

      @@rodneyknaap - i am just reminding those old times - where 6800 and 68k were said to be the most direct designs. and all the world went otherwise because the hoped for the short term savings whilst missing the mid (or even near) term ramp up to big computing solutions. with this i am now more talking with embedded systems in mind than PC systems.
      i once had hands on a scrap bin provided Honeywell Bull terminal (might it be some VT200 or whatever) and it was having maybe tube power or general power supply issues so that it did not make it to fully do a start up. but it did for a lucky short time in the beginning. unable to understand or resolve that at those old times it went to just removing parts and repurposing or just collecting them like the z80 it was based upon. i maybe had the ROMs pulled and i might have had the chance but did not use it to find the chip select wires measured for a high to get address bus layout identified. - i think i have to say, it's long gone for sort of a reasonable sake and will never see re-assembly.