Uncovering the Apple II's Mysterious (and Intentional) Clock Glitch

Поділитися
Вставка
  • Опубліковано 8 вер 2024

КОМЕНТАРІ • 56

  • @AddOhms
    @AddOhms  5 місяців тому +4

    Come discuss electronics, oscilloscopes, and retro computers in the AddOhms Discord: bald.ee/discord

    • @thermostance1815
      @thermostance1815 5 місяців тому

      What o scope do you use?

    • @KlodFather
      @KlodFather 5 місяців тому

      Which is exactly why there are man RGB and weird video formats in Arcade games of the time. They were pushing the abilities of the chips so far, that outputting NTSC or PAL was not a thing in coin cabinets. They did stay close to standards but the color and luminance information as well as the sync was sent separately to the monitor as in computer displays. Many old CRT monitors for computers make great replacement displays in arcade cabinets. This stuff was definitely Elfin Magic. (arcade and video poker tech of the 80's)

  • @ExplodingWaffle101
    @ExplodingWaffle101 5 місяців тому +61

    i am a simple man. i see fancy scope, i click

  • @James_Knott
    @James_Knott 5 місяців тому +14

    Back in the mid 70s, which is when the Apple II dates from, hardware was still expensive and designers would resort to various tricks to reduce costs. Steve W. was a genius at that.

  • @der.Schtefan
    @der.Schtefan 5 місяців тому +9

    Engineer? Wizard! That guy never ceases to amaze me!

    • @deang5622
      @deang5622 5 місяців тому

      Most electronic engineers are wizards... You'd understand why when you see how hard they work on their degree courses.

  • @johnsonlam
    @johnsonlam 5 місяців тому +5

    It's really useful since I love my Apple II but too many books to read and not too easy to understand without graph and picture, thank you James.

    • @AddOhms
      @AddOhms  5 місяців тому +1

      You're welcome! I am considering doing more videos on the Apple II like this: showing how the hardware works. I think it's interesting to use modern test equipment to understand this clever computer.

  • @makerspace533
    @makerspace533 5 місяців тому +5

    The idea of taking advantage of the two phase clock to run the video was ingenious.

  • @grahamornstein
    @grahamornstein 5 місяців тому +3

    That scope is incredible!

    • @KlodFather
      @KlodFather 5 місяців тому

      Scope envy... Kinda like Tractor Envy or Truck Envy... But for NERDS ha ha

  • @ralphmunoz4582
    @ralphmunoz4582 5 місяців тому +1

    Wow! A complex subject and you made it easy to understand!! 😊

  • @klausfortschbeck8369
    @klausfortschbeck8369 5 місяців тому +4

    Such cool Videos James. Keep on going:) Greetings from Germany

  • @VideoNOLA
    @VideoNOLA 5 місяців тому

    The Apple ][ provided COUNTLESS hours of joy for me as a youth, in the form of learning, entertainment and comradery. I literally traveled the far corners of my hometown to copy, share, play and learn how to crack all the popular and lesser-known software titles.

  • @isaacwingfield4321
    @isaacwingfield4321 5 місяців тому +2

    That extra half line is to do interlace. One field of NTSC color video is comprised of 262.5 lines. Woz is indeed a brilliant engineer.

    • @AddOhms
      @AddOhms  5 місяців тому +2

      I'm not sure what you mean by "extra half line." Everything I covered was related to the horizontal timing. Vertically, the Apple's video circuit only outputs for 192 of the 262 NTSC lines.

  • @edgeeffect
    @edgeeffect 5 місяців тому +1

    You talking about doing more videos on the Apple video system is well timed with my own "needs"... I just found out about NTSC artefacts giving more colours the other day.... and I'm still at the "what??? huh??????" stage at the moment.

  • @C3Cooper
    @C3Cooper 5 місяців тому +1

    I'm sure that one of your next videos will mention the time needed for the vertical transition between raster lines and the DRAM video refresh rate. Our drawing routines always had to use a raster offset tables to index the updates to the right memory. Yes, Woz is a pretty darn smart guy (as long has he isn't organizing rock festivals).

    • @AddOhms
      @AddOhms  5 місяців тому +2

      If I wasn't already bald, I think fully understanding how (the Apple II's) DRAM refresh and sharing RAM between the CPU and Video cycles works, would get me there.

    • @C3Cooper
      @C3Cooper 5 місяців тому +1

      @@AddOhms Back in the 80's I worked for the company that did all of the procurement and repair for Apple systems for the school districts in the state of Minnesota (as well as software development). I've forgotten more than I remember. Between 1977 and 1990 there were huge leap-frogs of DRAM technology and speed of CRT response - this probably explains the exposed clock cycle differences that you're seeing. We saw bunches of generation revisions from the 2/2e/2c. If I remember, the speed of the electron guns going from end to the beginning of the next raster line offered window for DRAM refresh and CPU access. The vertical raster line interleave was also tied to this timing.

  • @trudnai
    @trudnai 5 місяців тому +1

    Great video, thanks! And yes, absolutely, WOZ was (is) genius.

  • @Starlite4321
    @Starlite4321 2 дні тому

    Love your videos, thanks ! Question: did R&S ever release the rumored f/w update to fix the things you mentioned in your MXO reviews (like the non-functional "Zone" button, etc) ?

    • @AddOhms
      @AddOhms  2 дні тому

      Most of what I addressed has been fixed now. Zone Trigger was enabled a couple of months ago. Finally!

  • @wackowacko8931
    @wackowacko8931 5 місяців тому

    The origination of the phrase "It's not a bug (or glitch), it's a feature".
    The noisy sinusoidal wave on the top and bottom of every square wave is called Gibbs phenomena, and it is present in any square wave to a lesser or greater extent depending on how much money you spend on design. They knew how to suppress it back then in analog circuits, they probably just didn't bother. The resetting of the pulse width was likely a lazy and cheap way of fixing a problem in an effort to get the product out the door.

    • @rich1051414
      @rich1051414 5 місяців тому +1

      Even if you have a perfect square wave, if you low pass filter that square wave, you get the 'gibbs phenomena'. Studying Fourier transforms makes it apparent what is going on.

  • @guyejumz6936
    @guyejumz6936 5 місяців тому +1

    Did you find a way to disable the stretch cycle of the Mega II? I've wondered what it would be like to disable the stretch on systems which don't need it, like the IIgs.

    • @AddOhms
      @AddOhms  5 місяців тому +1

      No. Gemini (the follow-on to Mega-II) has a register to run PH0 at 2 MHz. However, Mega-II does not seem to support it. I wonder if that mode uses stretch.

  • @ccshello1
    @ccshello1 5 місяців тому +2

    If you read "composite artifact colors" from that what i know place, you can find apple took advantage of the fairly loose tolerance of consumer grade analog ntsc color monitor to mimic the more stringent standard (and got away from it.)
    In reality, those numbers used in color ntsc have perfect relationships:
    - 4 times color subcarrier 3579545 Hz = 14.318 MHz, a common X'tal freq
    - field rate of 59.94 (frame rate 29.97) mimic B&W era's 60Hz
    - 59.94 x 525 /2 (525 lines per frame, 262.5 per field due to interlaced format) = 15734.25 lines/sec
    - While 3579545Hz color burst frequency divided by 15734.25 yield 227.5. Double it becomes 455, which is a product of 3 prime numbers 5x7x13. It all carefully designed to avoid aliasing and human visible artifacts.
    Call it the magic of year 1953.

    • @AddOhms
      @AddOhms  5 місяців тому +1

      Yup. I didn't get into Wozniak's idea of an "average" horizontal scan rate being close enough. I'd prefer to cover that in a different context. Here, I focused on the PH0 clock because during my work on the Mega IIe, I kept seeing it and never explained to myself (or anyone else) why.

    • @jnharton
      @jnharton 5 місяців тому +1

      The whole video signal is "fudged" if I remember correctly...

  • @toboldlygo
    @toboldlygo 5 місяців тому +2

    Great video! I have a somewhat related comment on a difference I’ve noticed between Apple II Rev 4 mobos (and earlier) and Rev 7 mobos (and later). I’ve been testing RGB cards that convert the composite signal to RGB signals and notice I only get the correct color palette on Rev 7 and later. For Rev 4 and earlier, in the RGB output red and blue colors are swapped and magenta and green are swapped. For example the castle in the Castle Wolfenstein is blue (not red) on the title splash screen on a Rev 4 Apple II using an RGB card. Reviewing schematics there certainly was an update to the video circuit in the Rev 7 but I don’t know how it would influence the color swapping in RGB. Some kind of phase shift or delay in the clock cycle perhaps. RGB cards were popularized only after the Rev 4 MoBo was replaced by Rev 7 ones. I’m keen to understand what the source of the RGB color swap is?

    • @AddOhms
      @AddOhms  5 місяців тому

      I don't know the Apple II revisions well enough to comment. Nor do I know how RGB cards work. (I have never looked at them.)

    • @toboldlygo
      @toboldlygo 5 місяців тому

      ⁠Thanks for responding! Any idea who might?

    • @AddOhms
      @AddOhms  5 місяців тому +1

      This project is capturing RGB video and sending it over Ethernet. Its creator might have better insight: github.com/jtflanagan/AppleTini/

    • @toboldlygo
      @toboldlygo 5 місяців тому

      @@AddOhms Thanks so much!

  • @rdson1621
    @rdson1621 5 місяців тому

    That scope 🤩 and KiCAD 🤩

  • @RensePosthumus
    @RensePosthumus 5 місяців тому +4

    Did you really write those numbers in the palm of your hand? ;-)

    • @AddOhms
      @AddOhms  5 місяців тому +4

      4:26 Maybe ...

  • @raysoucie489
    @raysoucie489 5 місяців тому

    Subscribed

  • @saxtant
    @saxtant 5 місяців тому

    So, the clocks are reset on every scan line? I'm not sure how to interpret the colour clock.
    I recall that the raster lines mapped to memory with a large offset, so that in graphics mode the continuation of the next raster line in memory is halfway down the screen, cycling around to fill the entire screen.
    I wish I knew why that was necessary, as a software dev, that was quite annoying.
    I was only 12, so a lot of it was beyond me, I did write a decent assembler for 6502 though.

    • @AddOhms
      @AddOhms  5 місяців тому +2

      No, the clocks run continuously. That's why the Stretch pulse is needed. It re-aligns the phase of the clocks for the next scan line.
      Regarding how screen lines are mapped, I am still learning that myself. However, a lot of the video memory mapping was to simplify the DRAM refresh. Great solution for hardware but it made it a nightmare for programmers!

    • @dale116dot7
      @dale116dot7 5 місяців тому

      The display memory skipping is needed to adhere to the memory refresh timings. The video scan was also used to read and rewrite memory lines and Steve Wozniak saved a bunch of gates and logic by scrambling the video scan addresses this way. DRAM refresh actually only requires a read cycle (pre charge or rewrite time after a read accomplished the write or refresh).

  • @89elmonster
    @89elmonster 5 місяців тому

    Videos like this I wouldn’t mind if they were 20+ minutes

    • @AddOhms
      @AddOhms  5 місяців тому

      That’s good to know! That will probably happen with future retro/Apple topics.
      Also, this Mega IIe project video is almost 30: ua-cam.com/video/gFCD4s_hsb4/v-deo.html

  • @AlpineTheHusky
    @AlpineTheHusky 5 місяців тому +1

    Sooo...how much is that scope...

    • @AddOhms
      @AddOhms  5 місяців тому +1

      About the same as any 8-channel scope in its class. A 5-digit number.

    • @AlpineTheHusky
      @AlpineTheHusky 5 місяців тому

      @@AddOhms To be fair...5 digit is quite a big range from "reasonable" to "selling a kidney"

    • @AddOhms
      @AddOhms  5 місяців тому +1

      I don't have exact pricing on it. But based on bandwidth, (maybe memory depth), channel count, and software options I saw prices from the $18k to $60k. So you're right, it's quite a big range.

    • @AlpineTheHusky
      @AlpineTheHusky 5 місяців тому

      @@AddOhms Yeaaahhhhh Imma stay with my Siglent SDS1104X-E. Still pissed I bought it a year early before the Rigol DHO800 and DHO900 series came out :c

    • @AddOhms
      @AddOhms  5 місяців тому

      Those are all great general purpose scopes.

  • @raysoucie489
    @raysoucie489 5 місяців тому

    Let's "Re-cap"?? Good pun

  • @KyleGP
    @KyleGP 5 місяців тому

    When you realise that scope is worth $23K.

  • @toxicore1190
    @toxicore1190 5 місяців тому

    until you posted a short video, your channel was shadow banned for me although I am a long time subscriber

  • @trevoro.9731
    @trevoro.9731 5 місяців тому

    I find the Apple one big glitch.