PART OF THE PATH TOWARDS ROCK SOLID APPLE-1 BUILDS

3 posts / 0 new
Last post
Offline
Last seen: 16 hours 47 min ago
Joined: Apr 1 2020 - 16:46
Posts: 52
PART OF THE PATH TOWARDS ROCK SOLID APPLE-1 BUILDS

After figuring out by myself that the Apple-1 needs additional power supply bypass capacitors to ever work reliably (in the sense of "rock solid"), which did cost me just a few months :-(Of course I had tried to find info on it when my build did not work, I did not find any, until I spotted this post by "wsander" here on Applefritter:

https://www.applefritter.com/content/apple-1-mimeo-filtering

which appears to be a pretty complete solution as far as bypassing is concerned. But I wanted to do more perfect ;-) and made this:

 

You can see I use 10 different kinds of sockets with hidden components, mostly 100nF capacitors with one exception: the socket for the keyboard on location B4 has a 2K resistor from STROBE (pin 14) to GND (pin 9). The reason for this is that I use an 1990s subnotebook running DOS as keyboard which I don't trust to run unobserved due to age, so I like to unplug the keyboard cable and switch the notebook off while the Apple-1 build runs 24/7 with test programs. Having a PC faking the keyboard is really cool as it can also automatically "type in" said test programs once the DRAM works stable enough so as not to crash WOZMON all too often. Adding bypass capacitors is a necessary, but not sufficient condition to get a rock solid build. But this is another topic.

 

If there is enough interest from other builders lurking on this forum, I will spend some time to describe these sockets and where they go. I just don't want to waste my time on documenting things I found out nobody cares about, like my DRAM address line hammer program I published on this list.

 

As a proof, here is a photo of my most recent build based on a Newton NTI PCB which has NONE of the unsual 100nF bypass capacitor locations populated and still runs rock solid:

 

 

This means that the hidden capacitors can do a complete job in terms of power supply bypassing. This is cool because it enables us to use whatever value, style and color of bypass capacitors we can find or want to populate the usual bypass capacitor locations. Even 100pF would do as long as they have the desired looks ! This added degree of freedom should allow us to "cheat" a bit with the elusive capacitors used in the originals.

 

You also might note that this build only has 470uF electrolytic capacitors in lieu of the 2400uF/25V ones used in the originals. I proposed the use of the much safer and more abundant 2000uF/50V which I offer on Ebay but got a lot of sceptic messages saying they won't work. These fears are unfounded.Given enough interest, I can elaborate on that topic, too, and why using 25V types may be unsafe, but again, only if there is enough interest in such a discussion here on this forum.

 

Comments invited !

Uncle.Bernie

Offline
Last seen: 16 hours 47 min ago
Joined: Apr 1 2020 - 16:46
Posts: 52
Another little bit of info towards rock-solid Apple-1 builds ...

... despite of zero interest from the builders lurking on this list so far.

 

(Maybe there are no builders, just owners of Originals, here ... )

 

The lab experiment

 

I have been doing some timing margin testing on the build seen in the above photo, using a trim pot in lieu of the 27K timing resistor on the B3 oneshot and the results so far are:

 

* with a 6502B (rated for 3 MHz) the timing margins on the 74123 oneshot on location B3 are quite wide. Systems runs rock solid.

* with a 6502A (rated for 2 MHz) the timing window narrows. A position of the trimmer can be found where system still runs rock solid.

* with a 6502    (rated for 1 MHz) the timing window is super narrow, very hard to hit, even with the trimmer. Occasional memory faults, maybe one per day or so running Mike Willegal's memory test. Lisa Loop syndrome or better ?

 

Conclusions

 

Apple-1 DRAM timing is tricky and the faster the 6502 is, the wider is the timing window you need to hit by properly adjusting the 74123 oneshot. (wider = easier to hit)

I think with the 27K resistor as specified in the original schematic it's quite hopeless to ever hit the narrow timing window for robust operation.

 

Recommendation from Uncle Bernie

 

I recommend to use a 6502B in your builds and initially have a 50K trimmer potentiometer in lieu if the 27K resistor, then find out the go/nogo margins and adjust into the center between these margins. Measure the resistance (easily done after the 74123 is unplugged, measure between pin 16 and pin 15). Then replace trimmer with resistor of appropriate value. Beware that carbon composite resistors are junk (always have been): they are both unstable and have a terrible tempco. After soldering them in, they won't be the same value anymore as they had before, although they tend to slowly creep back, but only so much. This is probably the one place in your Apple-1 build where you want a metal film resistor. The ancient mica cap is fine, though. Silver mica capacitors are known to be very stable, tight tolerances, low tempco, great long term stability. Proper choice here, Woz (if you ever read this). But modern builders be aware that the silver electrodes of your 50+ years old mica capacitors may be corroded or otherwise compromized. At least measure it before you solder it in. It should be very close to the 47pF, any larger tolerance than +/- 2% already is suspect, as these capacitors always have been of tight tolerances (and were expensive). If one particular, old mica cap is off from its value by much more than that, it probably has internal rot and should not be used as a timing capacitor in your Apple-1 build.

 

Future prospects

 

I'm still trying to write a memory test program that can discern between read and write failures but so far no success. While a write failure caused by an too early write (before the 6502 has the data ready) causes a permanently wrong byte written to that address, which is easy to detect, there should be a read pattern to find out if repeated reads yield different data (DRAM /CAS too late and hence the 6502 grabs yet unstable data), but so far this has been elusive, although there is still hope.

 

The failure mechanism explained

 

If the oneshot pulse width is set too short, /CAS falling edge comes too early and the 6502 may not have set up the write data properly yet, so writes fail.

 

If the oneshot pulse width is set too long, /CAS falling edge comes too late and the DRAM access time counting from this edge may not meet the read data setup time requirement of the 6502.

 

Uncle Bernie's ecommendation for Apple-1 builders

 

Using a faster 6502 version (6502A or 6502B) widens the timing margin as the faster CPU will present the write data earlier (which allows a sooner /CAS for writes which helps to relax the read timing) and, during reads, the faster CPU needs less read data setup time, relaxing the read timing even further. Hence, using a 6502B (or at least a 6502A) in your build is desirable.

 

Caveat

 

Just plugging in a faster version of the DRAM chips may or may not help. It may make things worse.  There is severe ringing on the too long and non-terminated multiplexed address lines emanating from the 74S257 drivers. This ringing may have enough amplitude even after the falling edge of /CAS to toggle the internal address lines of the DRAMs, violating the address set up time referenced to /CAS falling edge, which, fortunately, for many first generation 4K x 1 DRAMs  is zero or even negative. Alas, the ringing seen lasts longer than this added leeway. Not adding lots of power supply bypass capacitors to the DRAM banks and the 74S257 will exacerbate this problem as  the DRAM's input buffers derive the logic thresholds from the voltage between VCC (+5V )and GND. Without adequate bypass capacitors, the VCC and GND will not be "tied together" AC wise and may ring independently from each other, so the logic threshold of the DRAM input buffer will bounce around, in an unpredictable way, as the ringing of VCC/GND and the ringing of the multiplexed address bus lines are NOT correlated. There is NO HOPE to ever find a timing oneshot setting for /CAS which mitigates this ringing problem. Only adding bypass capacitors can help. I see one further solution towards more robustness but this involves cutting traces and I won't do that on my valuable NEWTON PCBs - - - Newton Mike (the guy from Hong Kong) has announced he will stop making them due to the recent appearance of the "cheap" open-source-Gerber-file based ones made by JLCPCB in China. Once Mike runs out of the last NEWTON brand PCBs, there will be no more, gone, forever, and the prices for unmolested Newton PCBs most likely will go through the roof. So get 'em as long as you can ! 

 

 

Offline
Last seen: 14 hours 38 min ago
Joined: Aug 29 2010 - 18:51
Posts: 52
I am interested.  Thank you

I am interested.  Thank you for sharing, and I'm interested in any other tidbits you mgith have.

 

You might not get responses right away, but you can be confident that others will read your information, benefit from it, and be glad you shared.

 

As Shrek's mother always says, "Better out than in."

 

Dave

 

 

Log in or register to post comments