Midwest Gaming Classic Single Board Computer Part 2

Sdílet
Vložit
  • čas přidán 7. 02. 2020
  • In this video we generate a Z80 clock using the Atmel's high speed timer and do some tricks to access the Atmel as a peripheral device. www.midwestgamingclassic.com/...
  • Hry

Komentáře • 119

  • @BenHeckHacks
    @BenHeckHacks  Před 4 lety +14

    RE: selling these. I will have the files on Github so people can order their own PCB's if they wish. I got the I2C OLED screen scrolling text now so that's cool. Getting pretty close to a finalized design.

    • @rikbeattie
      @rikbeattie Před 4 lety

      Hey Ben,
      I dont know the best place to send a message so hoping you get this. This is more of a request for a new video idea so I'm sorry its not related to this video.
      I have often thought that the positioning for the right analog stick on the XBOX One controller to be un-natural position especially for FPS shooting games as the natural biomechanics of our thumb for aiming straight up and down would be to have the thumb in a more vertical position similar to the left analog stick. I feel by swaping the right analog stick and A B X Y buttons into opposite locations would make for an ultimate FPS Mod that in theory sounds simple but I would be really keen to see how to do this to see if it is even possible.
      I am completely amateur at modding, so amateur I have never done anything like this, but I have had this mod idea playing in my mind for years and found your page when researching. Seeing what you do makes me feel like this could potentially be something that is doable and I would love to see this in a step by step - dissasemble>full rebuild tutorial.
      I hope to hear from you soon.

    • @farhanyousaf5616
      @farhanyousaf5616 Před 4 lety

      Can't wait for the finished product. I wish you'd sell these as a package, I'd buy a few.

  • @BigDaddy_MRI
    @BigDaddy_MRI Před 4 lety +1

    I’ve been writing assembly for the Z80 for about 15 years. I love the clock change in hardware, it’s elegant and works well.
    I’ll have to remember that.
    I’m really enjoying this series. Thanks for taking the time to video and post this.
    I’m an old guy, and I love the Z80. Sounds corny, but I’ve done about 60 Z80 projects and it never fails to amaze me how much one can do with that old, venerable processor. And I love the Mode 2 interrupt structure. But, then again, I’m old. 😂😂
    Thanks for the great videos. 👍👍

  • @devjock
    @devjock Před 4 lety

    We've got you doing a really ace Z80 build, Ben Eater's doing the 6502 side, now we just need someone to pick up the 8051 side, and someone to do the FPGA side of things to increase things an order of magnitude once we're all familiar with the oldschool trifecta. What a time to be alive!

  • @cocusar
    @cocusar Před 4 lety +18

    "It's certainly semiconducting", amazing.

  • @mohinderkaur6671
    @mohinderkaur6671 Před 3 lety

    Excellent episode of the Atmel z80 SBC! Great work!

  • @sirflimflam
    @sirflimflam Před 4 lety +5

    Man watching your channel has frequently made me want to get back into physical hardware... I made a choice when I was a young teen to focus on software opposed to hardware... That was a long time ago, and I've spent some 15 years slinging code now. Might be a time for a change.

  • @justovision
    @justovision Před 4 lety +40

    "90% of coding is copying."
    The other 90% is pasting.

    • @SpeccyMan
      @SpeccyMan Před 4 lety

      To a real programmer, 90% of programming is preparation!

    • @BigDaddy_MRI
      @BigDaddy_MRI Před 4 lety +2

      So coding is 180%? No wonder I’m tired all the time.

    • @muh1h1
      @muh1h1 Před 4 lety +2

      @@BigDaddy_MRI Don't blame him. he probably coped and pasted this off some website

    • @williamsquires3070
      @williamsquires3070 Před 4 lety

      You forgot the remaining 10% is swearing. 😎

    • @JesusisJesus
      @JesusisJesus Před 4 lety

      The other 10 is Binary for yes or no....

  • @DaveCurran
    @DaveCurran Před 4 lety +5

    Lots of neat solutions going on there, I'm hoping a kit version might be an option, or the design files will be published so I can build my own once it's complete.

  • @tristshapez
    @tristshapez Před 4 lety +4

    'Imagine every molecule in your body exploding at the speed of light"
    Ghostbusters :D

  • @Dechristian3
    @Dechristian3 Před 4 lety

    Absolutely loving the way you made this!

  • @TomStorey96
    @TomStorey96 Před 4 lety +1

    WAIT can simply be left low for as long as you need wait states inserted. The CPU samples it each falling edge of the clock, so you don't have to keep toggling it high/low.

  • @a1nelson
    @a1nelson Před 4 lety

    +1 for the simple, but effective “red” AI / timing diagram visualization trick.

  • @higg873
    @higg873 Před 4 lety +15

    I understand 0% of what's going on here but I enjoy watching nonetheless

  • @stevejennings3960
    @stevejennings3960 Před 4 lety +1

    Absolute genius work Ben... I prefer the use of a zed80 chip rather than the zee80 ;) amazing watching and sets me up for this Sunday morning storm!

  • @LimbaZero
    @LimbaZero Před 4 lety +7

    Love this "This is Arduino coding but no we deep dive to low level stuff".

  • @Pancreaticdefect
    @Pancreaticdefect Před 4 lety +2

    Thanks for the OCD trigger with that dusty PC Ben. Appreciate it.

  • @waltercomunello121
    @waltercomunello121 Před 4 lety +2

    "Obviously, we don't wanna put a 48MHz signal into a Z80, because that would be baaaad. Imagine every molecule in your body exploding at the speed of light."
    Oh yeah, that's the stuff.

  • @paulstubbs7678
    @paulstubbs7678 Před 3 lety

    Quite interesting, I would like one of these, even though I'll never be coming anywhere near your show.

  • @TheTurnipKing
    @TheTurnipKing Před 4 lety +1

    20:27 The z80 has some wonderful instructions that allow it to blast through a lot of data on the stack with a bare minimum of setup and minimum clock cycles, for precisely this kind of task.
    (it's pretty useful on the Spectrum, for example, for maintaining a screen buffer and copying it to screen memory as quickly as possible)

    • @TomStorey96
      @TomStorey96 Před 4 lety

      There's nothing that works with the stack except push and pop, but there are instructions like INIR and LDIR etc, but these are pretty heavy in terms of cycles per character, and only read/write from memory or IO addresses. But they are just a single instruction that only needs a couple of values loaded into some registers and it can be let loose. A bit like a poor man's DMA. Back in the day when memories were expensive a single instruction that could copy up to 64k of data would have been a god send vs individual instructions to achieve the same thing.

    • @TheTurnipKing
      @TheTurnipKing Před 4 lety

      @@TomStorey96 also very useful if the z80 is used as a coprocessor, which is probably why the 68k and z80 combo was very common in arcade boards

  • @aw34565
    @aw34565 Před 4 lety +3

    As a suggestion, reduce the chip count by replacing the two 32K SRAM chips with a single 128K SRAM chip. 128K SRAM chips are widely available. The address space of the Z80 is only 64K so either half the SRAM will be unreachable, or you may have some spare pins on the micro-controller for bank switching!

  • @jonathanmblair
    @jonathanmblair Před 4 lety +1

    I luv that you said, "Hold my Spotted Cow!"

  • @Mightor67
    @Mightor67 Před 4 lety

    Totally agree about T3 Ben. I knew someone out there would be with me on that. Glad it's you.

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety +1

      Yup. It's still the best sequel after T2, though the new one is fairly decent (but didn't need to exist)

  • @drgusman
    @drgusman Před 4 lety +4

    I'm doing something really similar these days xD. I have a "shield" that connects an Arduino to the ZX Spectrum expansion port and they can share memory, act as a ROM and/or as a peripheral. With it I have connected the speccy to Internet and also can load programs from my pc and test ROMS (I have some videos on my channel and it's also published on Github as ZXShield) and I'm thinking something about a sound card.
    My approach is a bit different because I can't control the speccy's clock, I handle the WAIT line, with a bit of discrete logic I decode the IOREQ' ests and MREQ'ests to certain addresses and it automatically holds the WAIT line low, that gives time to the Arduino to respond to interrupts and do it's job. In ROM mode I got the process to take less than 10uS.
    Life is full of coincidences :D

  • @scm3184
    @scm3184 Před 4 lety +2

    This is Awesome, please keep it up!

  • @ingmarm8858
    @ingmarm8858 Před 4 lety +1

    Great stuff. You are so much better in your natural habitat than you were in the E14 zoo.

  • @obiwanjacobi
    @obiwanjacobi Před 4 lety

    This is turning into a very nice project!
    (Tip: move the crystal (and C's) closer to the MCU.)

  • @asagk
    @asagk Před 3 lety

    My personal suggestion is this: Have two software ringbuffers in the SRAM of the Z80. Then connect an output pin from the atmega connected to an interrupt pin of the Z80. If the atmega wants to send data as pseudo-serial device, it performs a bus request, writes data into the receiving ring buffer of the SRAM and the releases the bus. Afterwards it triggers an interrupt to the Z80 to tell it that there is new data in the pseudo-serial (ring buffer).
    In reverse, if the Z80 wants to send data, it writes data into the send buffer, and performs any io-write, where if no else peripherals present, the _IORQ is connected without any additional logic directly to an input pin of the ATmega, triggering an interrupt telling the atmega that there is new data from the Z80. Then the ATmega performs a busrequest and reads the data from the ring buffer in the Z80th SRAM.
    All of this does not need any new peripherals are additional logic, besides the already existing one to write and read from the SRAM by the Atmega.
    Perhaps this comes with less effort for the whole design, as well as high performance whenever lots of data is moved through the pseudo serial emulation (message passing through SRAM buffers)?
    Something like 64bytes send & and 64 send + ring buffer pointers placed perhaps at above the stackpointer of the Z80 might just cost less thans 256 bytes for the pseudo serial io buffer space (+ some status and debugging data space for applications + RTC data from ATmega and else stuff that matches a 256 or even 512 bytes io-buffer space).

  • @DanelonNicolas
    @DanelonNicolas Před 4 lety

    plz I don't want to wait a month for the next video haha, awesome work!!

  • @nicholasmeibaum5090
    @nicholasmeibaum5090 Před 4 lety

    Interesting project! Cant wait for part 3.
    I'd also love to see a video on your arduboy game, as I am also developing one. There seems to be a lack of arduboy content on CZcams.

  • @xotmatrix
    @xotmatrix Před 4 lety

    Really good. Answers some questions about my MCU interfaced 6502 project. You make it look easy but it ain't!

  • @MisterMorcus
    @MisterMorcus Před 4 lety +1

    32:21 This sounds like the start of a great new series: "Ben Heck's Old House"

  • @LilyBloomVee
    @LilyBloomVee Před 4 lety

    Using TASM in 2020. That's a goal.

  • @RobertFabiano
    @RobertFabiano Před 4 lety

    I've heard it called RTFM (Read the Friendly Manual).

  • @yorgle
    @yorgle Před 4 lety

    Awesome!

  • @genghisbunny
    @genghisbunny Před 4 lety +1

    Loved your little comment about multichannel networks whitelisting swearing on CZcams.

  • @naikrovek
    @naikrovek Před 4 lety

    god dammit you seem like the coolest person ever.

  • @kirknelson156
    @kirknelson156 Před 4 lety

    thats very cool, wish i could go :)

  • @BenHeckHacks
    @BenHeckHacks  Před 4 lety

    Registration now open! www.midwestgamingclassic.com/workshops/ 15 spots left as of 2-20-20

  • @judgebeeb1967
    @judgebeeb1967 Před 4 lety +4

    Did I miss something? OCR4A=1 and OCR4C=2 gives an output of 94kHZ. They you say you can go faster. Then you talk about slowing the waveform down a bit. So you then make OCR4A=2 and OCR4C=4 and suddenly the waveform is 6MHZ. That doesn't make any sense to me.

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety +3

      Yeah something got skipped, may have forgotten to screen cap it. Basically timer runs at 48MHz and by setting the A and C values at a division of that you can dial in the output wave frequency.

    • @MrWaalkman
      @MrWaalkman Před 4 lety +1

      Missing step: www.sciencecartoonsplus.com/pages/gallery.php

  • @leachim66
    @leachim66 Před 4 lety +1

    Is that a 0 ohm thru-hole resistor you're using to clip the scope on to? I knew there was a reason my resistor packs included them!

  • @leisergeist
    @leisergeist Před 4 lety +3

    Neat! You could also optimize the code more by reducing more function calls
    Also, replacing the simple clockOn and clockOff functions with compiler macros would help, since their contents are simple and static (no i/o)
    edit: stuff like dataOut and dataHiZ, and whatever other static functions, could also be replaced with compiler macros

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety +2

      Agreed. Minimizing jumps will help.

    • @davefiddes
      @davefiddes Před 4 lety +2

      Changing functions to static will achieve all of that without messing up the modularity. Modern C++ compilers are *really* good at optimising.

    • @leisergeist
      @leisergeist Před 4 lety +1

      @@davefiddes Really! That's great, thanks for the info!

    • @MrSapps
      @MrSapps Před 4 lety

      @@BenHeckHacks If you mark them all static inline the compiler should murder most of them?

  • @codebeat4192
    @codebeat4192 Před 4 lety

    Very interesting Ben! I want that scope mhuuh, mhuuh........ Do you make the design open source/available?

  • @jasonsphone8039
    @jasonsphone8039 Před 4 lety +1

    For those of us unable to attend the MWGC will there possibly be an option to procure one of you boards and components used for this badge?

  • @TMilner
    @TMilner Před 4 lety

    When this is complete is there any chance of you releasing the design files for this? Or even selling some? I’d quite like to build one of these. It’s like a more useful version of Ben Eaters 6502 computer.

  • @JamesPotts
    @JamesPotts Před 4 lety

    The cost would be a little high*, but it would be cool to see this done with a Pocket Beagle. Its PRUs would slice and dice it.
    *Compared to an ATmega MCU

  • @sprinter768
    @sprinter768 Před 4 lety

    I wish I knew enough about coding and electronics to get any of that...

  • @InkCityClothing
    @InkCityClothing Před 4 lety

    #ItsCertainlySemiconducting that should go on a T-shirt!

  • @DaveCurran
    @DaveCurran Před 4 lety +1

    Any chance the Z80 could try another write to the IO address whilst the Atmel is still doing Serial.Write?

    • @zacharyherfkens7902
      @zacharyherfkens7902 Před 4 lety

      In that case, the Atmel wouldn't detect the IO request until its done, but the fast clock is still disabled by the IORQ signal, so its fine.

  • @RoamingAdhocrat
    @RoamingAdhocrat Před 3 lety

    Is there any deep secret to designing circuits on prototyping boards like this?

  • @adamhemming540
    @adamhemming540 Před 4 lety

    If you do another controller mod you should try to incorporate a hard drive so that your controller can store your games.

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR Před 4 lety

    What about replacing the whole of the Z80A based computer with a FPGA or a FPGA/CPLD based solution.

  • @kulicher
    @kulicher Před 4 lety

    and really good idea is make CP/M compatible SBC

  • @blueskin1978
    @blueskin1978 Před 4 lety

    F stands for flippin'

  • @vanhetgoor
    @vanhetgoor Před 5 měsíci

    I could not find the schematics, where have they been hiding?

  • @jonmance8596
    @jonmance8596 Před 4 lety +1

    hello i saw your video "PS4 Single Handed Controller Part 2" and was very impressed. I only have 1 hand because of a accident and never thought i could use a controller again. I am very interested in this concept and would like to work with you to produce a product like the one in your video. please contact me if you can help.

    • @xDeltaF1x
      @xDeltaF1x Před 3 lety

      Probably better to look for an email address on his website, CZcamsrs don't always read all of the comments

  • @SpeccyMan
    @SpeccyMan Před 4 lety

    Eighty hex? ARRRRRGGGGHHHH!

  • @Eli_Kennemer
    @Eli_Kennemer Před 4 lety

    SHENZHEN I/O lets play when?

  • @UpcycleElectronics
    @UpcycleElectronics Před 4 lety

    30:28
    All hail Emperor Snowflake

  • @seshpenguin
    @seshpenguin Před 4 lety

    Hmm, What makes digitalread and digitalwrite so slow?

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety +2

      Cross board compatibility, range checking, pin to port mapping, etc.

  • @eimparas
    @eimparas Před 3 lety

    Is this project "opensource"?

  • @foulchild
    @foulchild Před 4 lety

    wait. So what is this thing again?

  • @dan_loup
    @dan_loup Před 4 lety

    I prefer WLA for my obscure buggy Z80 assembler choice.

  • @refactorear
    @refactorear Před 4 lety

    1:40 I die a little every time I hear the bullshitman say "You know what's BS?" in that channel. Yeah, it reached him too :-(

  • @EricStringer
    @EricStringer Před 4 lety +1

    I also picked the I2C bus chips for the development of my Z80 project in which I use 3 of them allowing me to take full control of the Z80 bus. I use a cheap Raspberry PI-Zero to drive them. I wrote software to use the I2C bus chips to dump my compiled test code into RAM on my Z80 board. Have a Z80 DIY page on FB
    My Z80 page
    sites.google.com/view/erics-projects/z-80-projects-page
    Have a Z80 DIY page on FB: "Zilog Z-80 DIY"

  • @ConanRider
    @ConanRider Před 4 lety

    Are you planning on selling these?

  • @costa_marco
    @costa_marco Před 4 lety

    When the Z80 is writing data to the MCU, why do you need to manually pulse the clock? Can't you just resume directly after reading the data?

    • @MrSapps
      @MrSapps Před 4 lety

      look at the timing digram, 3 clocks are needed to finish the cycle while we've turned the fast clock off

    • @costa_marco
      @costa_marco Před 4 lety

      @@MrSapps I saw that, but after the MCU reads the value on the data line, just resuming the clock will give the pulses anyways. The MCU doesn't care at the state of the Z80 after that point. It is not the same for the write, as the MCU has to set the data lines in High Impedance before enabling the clock again.

  • @yobb89
    @yobb89 Před 4 lety

    what are we making ben heck hacks?

  • @OverUnity7734
    @OverUnity7734 Před 4 lety

    0:27
    Needs more USB ports .

  • @mtecmedia7865
    @mtecmedia7865 Před 4 lety

    RTFM Read the friendly manual

  • @Blacklab412294
    @Blacklab412294 Před 4 lety

    To bad we cant use the z-80 DUART.

  • @MrSapps
    @MrSapps Před 4 lety

    Isn't it a bit of a cheat using the arduino? Shouldn't the z80 just boot an eeprom that can be optionally externally flashed or something? :P

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety

      Well yeah its a cheat! But now you can load ROMs off SD card into RAM and execute without using a burner. You could also send HEX files right over the serial port.

  • @BlizzetaNet
    @BlizzetaNet Před 4 lety

    Your tower, corsair Obsidian 750?

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety +1

      That sounds right. Basically had to get a huge case to fit the water cooler radiator for my first gen Thread ripper.

    • @BlizzetaNet
      @BlizzetaNet Před 4 lety

      @@BenHeckHacks I'm all air-cooled with my i7-6700k. Got the Obsidian 750D. What a wonderful case.

  • @williamsquires3070
    @williamsquires3070 Před 4 lety

    Now, hook up a sound chip so it can make irritating noises as well. 🤣

  • @nukeevry1
    @nukeevry1 Před 4 lety

    Just start up the AVGN RTFM ASMR network. It's all CZcams thinks I watch anyway

  • @lily_anatia
    @lily_anatia Před 4 lety

    if the goal is to reduce hardware cost and you're using the Atmel chip anyway, why not just emulate the Z80 on the Atmel?

    • @BenHeckHacks
      @BenHeckHacks  Před 4 lety

      Because this is more fun :)

    • @lily_anatia
      @lily_anatia Před 4 lety

      @@BenHeckHacks but wouldn't it be more fun without the Atmel?

  • @aw34565
    @aw34565 Před 4 lety

    This chip could make a nice addition to Ben's SBC, an 8-Bit Parallel Bus SRAM with integrated Video Display Controller. www.vlsi.fi/en/products/vs23s010.html

  • @FurEngel
    @FurEngel Před 4 lety

    I think this is a really bad idea (using the PLL from ATEMGAU2/U4) to clock the Z80. MCU outputs a clock domain, not a passthrough clock. For example, if you were trying to connect sync memory to a MCU, you want to use a clock domain instead of a constant clock (i.e. 16MHz), and if you use a high frequency analyzer you will see why: not all AVR instructions are executed at precisely the same time and int. will affect clock stability. IF you were only going to use U2/U4 for that purpose, you could minimize this by disabling all interrupts, watchdog, USB port, etc. But then why? You would be better off just using a programmable oscillator chip.

  • @clockwood12000
    @clockwood12000 Před 4 lety

    That USB connection sound is triggering me

  • @mjc0961
    @mjc0961 Před 4 lety

    I can say it though: *READ THE FUCKING MANUAL*

  • @mangobot232
    @mangobot232 Před 4 lety

    Are you for hire

  • @kulicher
    @kulicher Před 4 lety

    Or you can order from ALI this chips for 1$ each =) they can be unsoldered and 84 year of production, but price is to good. Of course for education make arduino substitute is good. I now make from arduino disk drive for my 8085 SBC and CP/M

  • @edabean007
    @edabean007 Před 4 lety

    so much want..

  • @inerlogic
    @inerlogic Před 4 lety

    Jesus christ man..... blow that machine out......
    I need a surly heck's editor for cp/m

  • @GigAHerZ64
    @GigAHerZ64 Před 4 lety

    Use STM32, you get everything like arduino, but in quantities of many multiples... In same or lower price!

  • @reddcube
    @reddcube Před 4 lety

    Whitelist? That assumes you actually make money off this channel.

  • @uwezimmermann5427
    @uwezimmermann5427 Před 4 lety

    sorry and no offense, but you should really RTFM then you don't have to do the trial-and-error method you used.
    a) you were in the "non PWM" part of the datasheet when trying to figure out the pin functions
    b) TIMER0,1,2 which are present in any ATmega can be uses in various kinds of CTC-like pwm modes which give you control over pwm frequency and duty cycle.
    c) same is true for the additional timers in the ATmega32U-family

    • @uwezimmermann5427
      @uwezimmermann5427 Před 4 lety

      However, using an ATmega as a peripheral for a vintage processor is a cute idea!