Тёмный

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

AddOhms
Подписаться 219 тыс.
Просмотров 24 тыс.
50% 1

The Apple II's CPU clock has jitter or a glitch. This issue is not new-it has been present since its original design in 1977! Bald Engineer uses an oscilloscope to show how often the glitch occurs and how to correlate that jitter to its source-which is useful when you are not testing 40-year-old devices.
The device under test (DUT) in this video is the Mega IIe project. It's a fully compatible Apple IIe built around the Mega II chip.
Watch the Mega IIe video here: • Mega IIe: First Fully ...
Related Links: www.addohms.com/measuring-app...
#appleii #electronics #oscilloscope
Chapters
00:00 Stretch, Glitch, Jitter
00:28 Apple II Clocks
02:44 Analog Video Signals
04:26 Clock and Video Means Jitter
06:20 kthxbai
Patreon: / baldengineer
Discord: bald.ee/discord
Instagram: / baldengineer
X: X.com/addohms
Workbench Wednesdays: bald.ee/wbw
Video produced by James Lewis (@baldengineer):
baldengineer.com

Наука

Опубликовано:

 

7 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@AddOhms
@AddOhms 2 месяца назад
Come discuss electronics, oscilloscopes, and retro computers in the AddOhms Discord: bald.ee/discord
@thermostance1815
@thermostance1815 2 месяца назад
What o scope do you use?
@KlodFather
@KlodFather 2 месяца назад
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 2 месяца назад
i am a simple man. i see fancy scope, i click
@beryllium1932
@beryllium1932 2 месяца назад
Yup!
@James_Knott
@James_Knott 2 месяца назад
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 2 месяца назад
Engineer? Wizard! That guy never ceases to amaze me!
@deang5622
@deang5622 2 месяца назад
Most electronic engineers are wizards... You'd understand why when you see how hard they work on their degree courses.
@makerspace533
@makerspace533 2 месяца назад
The idea of taking advantage of the two phase clock to run the video was ingenious.
@johnsonlam
@johnsonlam 2 месяца назад
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 2 месяца назад
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.
@klausfortschbeck8369
@klausfortschbeck8369 2 месяца назад
Such cool Videos James. Keep on going:) Greetings from Germany
@ralphmunoz4582
@ralphmunoz4582 2 месяца назад
Wow! A complex subject and you made it easy to understand!! 😊
@grahamornstein
@grahamornstein 2 месяца назад
That scope is incredible!
@KlodFather
@KlodFather 2 месяца назад
Scope envy... Kinda like Tractor Envy or Truck Envy... But for NERDS ha ha
@edgeeffect
@edgeeffect 2 месяца назад
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.
@VideoNOLA
@VideoNOLA 2 месяца назад
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.
@C3Cooper
@C3Cooper 2 месяца назад
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 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 2 месяца назад
@@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.
@guyejumz6936
@guyejumz6936 2 месяца назад
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 2 месяца назад
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.
@trudnai
@trudnai 2 месяца назад
Great video, thanks! And yes, absolutely, WOZ was (is) genius.
@toboldlygo
@toboldlygo 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 2 месяца назад
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 2 месяца назад
⁠Thanks for responding! Any idea who might?
@AddOhms
@AddOhms 2 месяца назад
This project is capturing RGB video and sending it over Ethernet. Its creator might have better insight: github.com/jtflanagan/AppleTini/
@toboldlygo
@toboldlygo 2 месяца назад
@@AddOhms Thanks so much!
@wackowacko8931
@wackowacko8931 2 месяца назад
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 2 месяца назад
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.
@rdson1621
@rdson1621 2 месяца назад
That scope 🤩 and KiCAD 🤩
@isaacwingfield4321
@isaacwingfield4321 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 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.
@raysoucie489
@raysoucie489 2 месяца назад
Subscribed
@saxtant
@saxtant 2 месяца назад
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 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 2 месяца назад
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).
@RensePosthumus
@RensePosthumus 2 месяца назад
Did you really write those numbers in the palm of your hand? ;-)
@AddOhms
@AddOhms 2 месяца назад
4:26 Maybe ...
@89elmonster
@89elmonster 2 месяца назад
Videos like this I wouldn’t mind if they were 20+ minutes
@AddOhms
@AddOhms 2 месяца назад
That’s good to know! That will probably happen with future retro/Apple topics. Also, this Mega IIe project video is almost 30: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gFCD4s_hsb4.html
@ccshello1
@ccshello1 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 2 месяца назад
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 2 месяца назад
The whole video signal is "fudged" if I remember correctly...
@raysoucie489
@raysoucie489 2 месяца назад
Let's "Re-cap"?? Good pun
@KyleGP
@KyleGP 2 месяца назад
When you realise that scope is worth $23K.
@Alpine_flo92002
@Alpine_flo92002 2 месяца назад
Sooo...how much is that scope...
@AddOhms
@AddOhms 2 месяца назад
About the same as any 8-channel scope in its class. A 5-digit number.
@Alpine_flo92002
@Alpine_flo92002 2 месяца назад
@@AddOhms To be fair...5 digit is quite a big range from "reasonable" to "selling a kidney"
@AddOhms
@AddOhms 2 месяца назад
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.
@Alpine_flo92002
@Alpine_flo92002 2 месяца назад
@@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 2 месяца назад
Those are all great general purpose scopes.
@toxicore1190
@toxicore1190 2 месяца назад
until you posted a short video, your channel was shadow banned for me although I am a long time subscriber
@trevoro.9731
@trevoro.9731 2 месяца назад
I find the Apple one big glitch.
Далее
The Madness of Z80 I/O
22:52
Просмотров 66 тыс.
ЛЕТО 2024:
00:21
Просмотров 642 тыс.
2000000❤️⚽️#shorts #thankyou
00:20
Просмотров 4,4 млн
yenga na solratha kelunga
0:55
Просмотров 2,2 тыс.
5 Ways To Generate A Sine Wave (Analog)
13:16
Просмотров 78 тыс.
The Insane Engineering of the Gameboy
17:49
Просмотров 1,5 млн
What's wrong with this Apple IIgs motherboard?
41:37
Просмотров 82 тыс.
The iPhone Forever Changed the RF Filter
22:22
Просмотров 186 тыс.
Forget WiFi! This Wireless Method is WAY Better?
12:14
Просмотров 415 тыс.
СТОИТ ЛИ БРАТЬ IPHONE 13 В 2024?
13:53
Просмотров 20 тыс.
Где раздвижные смартфоны ?
0:49
Просмотров 540 тыс.