Experimental DRAM challenge program

12 posts / 0 new
Last post
Last seen: 2 days 1 hour ago
Joined: Apr 1 2020 - 16:46
Posts: 90
Experimental DRAM challenge program

Hi Apple-1 owners -

this is a little experimental RAM diagnostics program I wrote and I'd like to kindly ask you to run it on your Apple-1, original or clone does not matter, although originals would tell us more, having the elusive original chip sets.

The program expects 4K of RAM at $E000-$EFFF however, which it challenges.

If everything is OK, it just produces dots at a rate of one per 1.6 seconds, but if the issue it looks for is found, it produces a message in the form XX@HHLL in which XX is the syndrome, and HHLL is the address, and then the program continues.


0280: A9 00 85 00 A8 49 FF A2

: E0 86 01 91 00 C8 D0 FB

: E8 E0 F0 90 F4 49 FF 8D

: 3F E0 8D C0 EF 8D 6A E5

: 8D 95 EA CA D0 F1 88 D0

: EE 49 FF 8D 3F E0 8D C0

: EF 8D 6A E5 8D 95 EA A2

: E0 86 01 D1 00 D0 11 C8

: D0 F9 E8 E0 F0 90 F2 AA

: A9 AE 20 EF FF 8A B0 B5

: 51 00 20 DC FF A9 C0 20

: EF FF 8A 20 DC FF 98 20

: DC FF A9 A0 20 EF FF 4C

: 80 02



If you change the last line (80 02) to 1A FF it returns to the monitor in case of an error found, which may be preferred if you let run it over more than 25 minutes unattended - you might miss an error message otherwise.

On most Apple-1 expect only dots. And I hope that actually, NO Apple-1 out there ever produces any error message.But if we find at least one, my hypothesis I seek to test with this experiment is verified, and we need to talk.

You are invited to contribute to the greatest experiment ever done on the Apple-1, and if you participate, please comment on this thread, type of machine (original or clone, which type of PCB), type, manufacturer and date code of ICs in locations B5 and B6, and type, manufacturer and date code of the DRAMs in Bank W, and which error messages encountered, and how many, after which runtime, if any. Please also send a short comment if you only see dots - which is fine, you should have a robust machine then.



Last seen: 1 hour 5 min ago
Joined: Jun 18 2010 - 13:54
Posts: 343
I don't have an Apple-1, but

I don't have an Apple-1, but I'm curious about your program here. Is it expected to test the ONLY RAM in a 4K system? If so, then your JSR's are sure to fail...

Last seen: 2 days 1 hour ago
Joined: Apr 1 2020 - 16:46
Posts: 90
Be assured the program works on an Apple-1...

... what eludes me is why you think the JSRs will fail ?  Please explain ?


The program will run on any Apple-1 with memory in the low 4K bank ($0000-$0FFF) and memory in the high 4K bank ($E000-$EFFF), which it challenges, because it is the bank that has the worst signals on the multiplexed address bus to the DRAMs.  This mostly is due to a known layout issue. All Apple-1 should have these poor signals, originals or clones. No other 6502 based computer should be affected. The open question is whether the bad signals ever cause the DRAM to write to a wrong location, or not.


On my own build I can't get any error message from this program unless I pull one of the DRAMs in the high bank out.  Plenty of power supply bypass capacitors were put in, which may mitigate the problem, and I don't want to remove them again.




Last seen: 1 hour 5 min ago
Joined: Jun 18 2010 - 13:54
Posts: 343
Sorry, I read your post too

Sorry, I read your post too quickly. I thought you were trying to test the low bank at $0000-0FFF.

Last seen: 2 days 1 hour ago
Joined: Apr 1 2020 - 16:46
Posts: 90
Anyone out there willing to participate ?

Hi Apple-1 (original or clone) owners on this list:


So far nobody has given any feedback about the results running the above diagnostics program.


Shame on you !


I continued working on the subject of these multiplexed address line ringing and I have some evidence now the problem is real and does cause DRAM errors.


If you don't trust my program then try Mike Willegal's DRAM test program on your $EOOO-$EFFF bank.


I bet you may see the occasional error message at location $E237: binary 1110 0010 0011 0111 so:


Multiplexed    row   address:  110111

Multiplexed column address:  001000


See a certain bit pattern here ? With lots of multiplexed address bits toggling ? Do you still think it's a hoax ?


So please participate in my experiment !


Of course your results will depend on your CPU type, DRAM type, pulse width of the CAS timing oneshot, but the problem definitely is out there in the field. And this means: it's lurking in your Apple-1 build.


Last seen: 5 days 19 hours ago
Joined: Feb 25 2014 - 23:19
Posts: 58
Can you relocate the code?

If you post this code relocated at $F000, I can include it on my PROM replacement adapter board...

fingerz's picture
Last seen: 1 week 4 days ago
Joined: Aug 10 2017 - 13:40
Posts: 130
I'll try it on my Apple-1 and
I'll try it on my Apple-1 and Mimeo-1 next week...just haven't had time to set them up recently.
Last seen: 2 days 1 hour ago
Joined: Apr 1 2020 - 16:46
Posts: 90
Oscilloscope screenshot showing the problem

Just to incite your curiosity, here is a snapshot showing the problem:



The lower trace is the /CAS signal on the same DRAM, location W7. The middle trace is the multiplexed address line A5, which has the worst ringing, but the other five multiplexed address lines are not much better.  The top trace is multiplexed address line A6. Stimulus provided by the above program which I internally call "MAdHammer": Multiplexed Address Hammer. (it does what the name implies, without the program these worst case conditions happen to rarely to be visible and even if I would break out my Tektronix Storage Scope, triggering on these rare events won't be easy)


The bottom trace is the /CAS signal with a reduced resolution of 5V/div, used as a timing reference to to trigger the oscilloscope. The A5 signal is 1V/div. Follow the middle cursor from the left side to identify the first peak of the ringing 30-40ns after the falling edge of /CAS. The cursor readout indicates that this peak is at +2.14V, definitely not the “low” signal it should have been. The next peak of the ringing occurs 60-70ns after the falling edge. This peak is already half has high, 1V or so, which is less bad than the first one. The following peaks are even lower.

The distance between the two first peaks is roughly 30ns. This is the time the signal “shock wave front" needs to travel along the transmission line (for laymen: the PCB trace).

In the upper part of the picture the A5 signal being “high” rings, too. The bottom of the first negative peak (a “valley”) also touches the cursor, although a bit earlier than the first positive going peak from the “low” signal, about 10ns after the falling edge of /CAS.


Now, the question is what these less-than-perfect signals may do to the DRAM.  As a thought experiment, assuming everything else  is quiet and perfect (especially the +5V / GND power supply from which the DRAM input buffers derive their logic thresholds), then only the first peak has the potential to toggle the internal A5 signal going to the dynamic column decoder within the DRAM, clearly violating the column address setup and hold time specifications of the DRAM (column addresses are supposed to be stable beginning with 10ns after the /CAS falling edge, and not bounce around as in the picture). Is the duration of this internal glitch long enough to discharge the wrong column select line within the DRAM ? Can't say. I don't have the SPICE decks for that ancient process and  no GDS to run parasitic extraction on the layout.  But based on my experience I dare a guess it won't do that, at least not for the slower, older 1Kx1 DRAMs made in the mid 1970s.  But keep in mind that we did assume everything else being perfect. Which is not the case in an Apple-1: the DRAM power supply lines and the ground also bounces around, although with a different pattern. I think it's quite possible that the bouncing +5V and GND could set up the whole thing such that maybe even the 2nd peak could toggle the input buffer again, and then the total integrated discharge of the column select line might  just be large enough so as to activate a second (unwanted) internal column select line, and then the DRAM would read (or write) two bits at once, only one of which is the wanted one.


Note that this argumentation is somewhat hand-waving and speculative. I can't probe internal signals of the DRAM. But would I sign off such a product with these signals for production ?

No way ! They look far too dangerous to me. And I do have solid evidence that in the Apple-1, sometimes, there is a DRAM fault, a wrong bit gets written or read. It does not happen too often, understand that. According to my experiments and observations, it may happen maybe once an hour or so, if Mike Willegals RAM test is running on bank $E000-$EFFF, which is the worst one, signal integrity wise. This is for the unmodified Apple-1. If lots of bypass capacitors are added to "silence" the +5V supply, then the error rate may drop to maybe once every few days. Then, as a further step, if six termination resistors are added on the appropriate places, the DRAM errors go away entirely. I ran the same A-1 build which initially had the "approx once per hour" DRAM fault for months 24/7 with Mike's DRAM test program, with not one bit error.


I'm still investigating and documenting this problem and the remedies I found, but at the moment this is somewhat on the back-burner as I need all my three builds to run burn-in procedures for the 100% complete and tested Apple-1 IC sets I offer on Ebay. This, of course, is not for profit, but I want to recover some of the vast sums of money I have sunk into buying these ICs in large quantities from greedy chip brokers with their large minimum order sizes.

I had to go that route because despite needing only a few for my own builds, I refuse to buy from the price gougers. Professional chip brokers typically don't gouge prices, but you have to buy lots and lots of one IC type, otherwise, no deal.  A conundrum also known as "wholesale prices" vs. "retail prices". I have no problem if the latter contain a reasonable profit for honest merchants who buy wholesale and then sell retail. But supporting the price gougers on Ebay who ask moon prices for Apple-1 ICs, no way, never !  They are a bane for the whole hobbyist scene and should be weeded out. I'm in the process of doing this by offering various kinds of Apple-1 IC sets at the best possible prices, essentially at cost. And I have enough in stock to support every Apple-1 builder in the world !

Last seen: 2 days 1 hour ago
Joined: Apr 1 2020 - 16:46
Posts: 90
More proof for the reflection problem being real ...

I now do have more evidence that the reflection issue described above in this thread is not only real (the oscillogram above in my previous post proves it already), but now I can prove it also does cause DRAM errors under certain circumstances.


Over the weekend, I have built my first Apple-1 clone based on the cheap "Replica-1" PCBs. Partly out of curiosity, how cheap we can get, and also to get hands-on experience to properly criticize these cheap PCBs vs. the more expensive, but higher quality "Newton" PCBs. To make it short, the Replica-1 PCB has some issues, but unless you buy it from one of these price gougers on Ebay for $75 plus $25 shipping, but at a more realistic price (no more than $39 with free shipping perhaps ?) it seems to be a fair deal any builder on a tight budget can embrace, but always keep philosopher John Ruskin in mind, see my posts on the Replica-1 thread here:




I will post a more detailed, hard but fair, criticism of the Replica-1 PCBs later, and on the above thread, one if I have time to do so. In the following, I will focus on the ringing issue:


To make a long story short, I configured the new build with all reliability mods known to me, except for the one that mitigates the ringing, and this omission was done on purpose. I also populated it with a burned-in and tested chip set that has run on a Newton PCB based build for many weeks, without fail, so I could be sure that if something would not work as expected, the culprit can't be an IC. When I turned the new build on, instant success, everything worked, and I could load Mike Willegal's DRAM test program and run it. This is when all the troubles began: almost instantly, a DRAM error message popped up. And using the same chip set and the same timing components for the /CAS oneshot, I knew I can't be a timing issue inadvertently introduced by some component being different.

Then I ran my MAdHammer program (see first post in this thread). It reported  DRAM errors almost instantly:


Then I put in my current reflection mitigation mod:



(Note: the capacitors are 100nF. They are part of a "team" of added power supply bypass capacitors. These were already present in the previous experiment with no termination resistors. Normally I hide them in the sockets, as originally proposed by "wsander" here on Applefritter:


But for this build I want to be able to remove them one by one. But this is another story to be told.)


After adding these termination resistors (6 x 390 Ohm from the multiplexed address lines to +5V, which critically depends on a bypass capacitor of 100nF from +5V to GND nearby), I ran MAdHammer and Mike's DRAM test again, with no faults so far. The following picture shows how MAdHammer looks if it detects no DRAM errors, just an ever increasing string of dots (showing it's still alive and has not crashed yet):



I don't declare victory yet as my criteria for a "rock-solid" Apple-1 build is two weeks running memory test programs 24/7 without a single fault. Kind of snobbish, but that's me. I don't like stuff that does not really work, regardless how cheap it was. John Ruskin conspiring against me again. Please allow me to deviate briefly from the Apple-1, so you can understand me better: I must admit I'm a terrible cheapskate, too. Except for certain joys of life, where I insist on top quality. Food, wine/booze, clothing, women. With all the sensous joys, I accept only top quality.  Which always comes at a high price - sticker shock ! Especially true for the latter ones. Always rare and always very expensive. And I don't mean hookers.  I'm divorced so I know how much that kind of joy costs. But it was worth every penny. Got my divorce cheap, too. $5800 total including lawyer ($1200), court fees, flight to Guam, hotel and rental car. And she paid half of that but forced me to fly coach, not business class as usual, otherwise she would not pay her 50% share of  the airline ticket. Her "revenge". But I was nice to the lady at check-in and got three seats for me alone all the way to Tokio. Compare that awesome result with the typical American divorce where greedy, price-gouging lawyers get rich and even millionaires are broke afterwards. But enough of this. Just wanted to show you that I'm a terrible cheapskate, too. 

Nice sub-story with a happy end. I kept my dough so I can work on Apple-1 and not waste my skills and my time for the profit of greedy capitalists who make millions of profit with my IC designs and never gave me my fair share.  Now everybody smile ! Feel happy ? You, as an Apple-1 builder, get all this wealth of information from me for free !


Now back to the Apple-1 ailments and remedies:


In any case it should be evident by now that the Replica-1 PCB suffers more from reflections / ringing on the DRAM's multiplexed address bus lines than the Newton PCBs. But even the Newton PCBs have this disease.  All Apple-1 PCBs known so far, originals and all clones, have it. It's rooted in the terrible layout and that's it.

We have to live with it !


As for the possible differences between PCBs, there may be subtle differences in PCB board trace width, spacing and thickness. All these play a role in how bad this disease may get, but unless exotic materials are used, the differences between boards in terms of RF / transmission line characteristics should be small. The catch is that all Apple-1 without mods are marginal and almost work most the time. The subtle little differences just may make the suffering a little bit harsher in some cases. If you are unlucky and get a particularly unfortunate combination of PCB, ICs and capacitors, then it may make you mad. Call it the Lisa Loop syndrome. 


As for the Replica-1 PCB I have used for this study,  vs. the Newton NTI, the base material of the Replica-1 is a bit thinner, 1.5 mm (0.060") vs. the 1.75 mm (0.066") thickness of my Newton NTI board. I would like both to be thicker. Maybe 2.0 mm or so.  All Apple-1 PCBs I ever had in hand gave me the impression of inherent flimsyness.  Inserting and removing an ACI daughter card from its slot can make you fear disaster when you see how the PCB flexes. I never had a Mimeo PCB, though. Some people told me it's more rigid. 


All the differences in the PCBs mentioned change the RF characteristics and transmission line characteristics of the PCB, guaranteed, this is inevitable as it is rooted in Laws of Physics. In case of the Replica-1 PCB, we now have evidence at hand that these changes are not to the better, compared to a Newton NTI . Still, we do know a remedy, and this is, adding a few termination resistors to mitigate the reflections.


Despite this so-called "parallel termination" cannot use the theoretically optimum resistor value for technical reasons deeply rooted in Schottky TTL circuitry, so some reflections inevitably will remain, even the 390 Ohms per resistor I recommend is efficient enough to bring significant relief from the problem. I'm of course always trying to find better mods. As a final note, and as a sort of riddle, what happens if the 390 Ohm termination resistors are tied to GND, as in a textbook termination example ? (There is a reason why Schottky TTL was slammed as being the worst and most temperamental logic family ever).


Comments invited ! 

Last seen: 1 month 1 week ago
Joined: Sep 4 2009 - 21:04
Posts: 104
Another Fix

This note describes another solution to the ringing that works well.

The ringing problem on the DRAM pins is caused by the high capacitance on these pins (4 to 8pF depending on the pin) coupled with inductance of the long PC board line from the driver to the array.  With 16 DRAMs the capacitance being driven can be as high as 128 pF.  The DRAM array actually looks more like a low impedance transmission line than a single capacitor due to the periodic loading  but the solution is to damp or terminate the network.  The Mostek Designers Guide reccomends source termination, adding a small resistor in series with the line at the source.  

The photos show /RAS and A3 with and without a 47Ω resistor in series with the line at the signal source running the Willegal memory test on EXXX. The other photos show the type of socket stack used to insert the resistors and a socket with a resistor added with one of the socket pins replaced by a resistor lead to show how to hide the resistors in sockets on the board.




Last seen: 2 days 1 hour ago
Joined: Apr 1 2020 - 16:46
Posts: 90
Comment on wsander's "another fix"

Thanks, wsander, for posting #10 in this thread. You just proved I'm not barking up the wrong tree   ;-)


From a plain technical / engineering standpoint, the "series termination" is the way to go. We can find series termination on the DRAM address and control lines in almost every 1970s and 1980s vintage computer. (They knew what they are doing, but I don't want to slam Woz... there are clues he knew it, too). The problem was so common and pressing that some semiconductor companies made driver / multiplexer ICs which had the series termination resistors built-in. Since typical IC process technologies back in the day typically permitted only +/- 40% tolerances on integrated resistors,  and these ICs still solved the problem, and were successful, this proves that the value of the resistors is not that critical. Alas, AFAIK, there is no equivalent IC to the 74S257 having built-in series termination resistors.


The problem with series termination for the Apple-1, of course, boils down - again ! - to authentic looks: adding them would involve cutting PC board traces, or, these stacked sockets proposed by wsander. I'd think the latter are a great idea if you suspect the ringing problem is affecting your Apple-I build or original. You can try them without any mod to the PCB itself. Although for the originals with these terrible TI sockets, I would recommend to use DIL16 headers with small diameter pins that don't over-stretch the lousy contact springs of these terrible sockets ... there is a reason why these TI sockets are so rare and expensive nowadays. They were unreliable, cheap junk from the beginning, much like the guts of the keyboards of the early TI calculators, and once word was out nobody in the industry wanted to use them anymore. TI always has been a very aggressive company when it comes to lowest cost prices and cheapest possible manufacturing. The competition hated them for that as they could never match the TI prices. Just look at the 1970s vintage TI 74XXX TTL ICs. Most of them have terribly tarnished leads nowadays. John Ruskin at work, again. But make no mistake, TI always had great semiconductor processes in their wafer fab. And, being the cheapskates they were, they were able to give us the cheap - but crappy - TI30 LED "school" calculator of the 1970s. Every family could afford those. I came from an engineer family and my dad insisted on his missile propulsion design team using only HP, so me, too, ended up with the only HP-21 in the whole class, or maybe the whole school, of 2000+ pupils. You could get about 20 TI-30 for the price of one HP-21. So the TI-30 was a fair deal ! Still, never forget John Ruskin ! But I always envied the TI-30 owners for the nice "spinning" effect when that thing was doing trig functions and logarithms.


To conclude, let's criticize Woz for not having any termination resistors. But let's be fair. Was Woz a lousy engineer not knowing what he was doing ? 


I don't think so. First, look at the picture of the hand-wired Apple-1 prototype on this thread:




It was very compact, so it had short wire runs. Even with Schottky TTL, if the PCB trace or wire length is below a critical threshold, no termination resistors are required, and no competent engineer would add any if they are not needed.


If we apply the ancient rules of thumb how long the critical length threshold for Schottky TTL is, you will arrive at 11 inches. Sorry, I have this number  in my head, but can't find the formula at the moment. Now take your ruler to your Apple-1: how long is the distance from the farthest 74S257 at location B5 to the 44 pin edge connector ?


The answer, of course, is: 11 inches. This is evidence that Woz knew exactly what he was doing, and possibly he had instructed the guy who did the PCB layout to adhere to this number. Alas, the layouter ran the multiplexed address bus lines all the 11 inches to near the connector, then forked the traces near the connector, splitting them into two forks, which then run back, in each DRAM bank, to the X7 / W7 DRAMs at locations A11 and B11, for a maximum length of 16.8 inches, which exceeds the critical threshold by far. And this is the root of the problem. This is also the reason why any attempt to plug extension PCBs into the Apple-1 edge connector is inviting trouble. Woz probably had in mind to put some bus transceivers and buffers right near the edge connector on any "mother board" he might have designed for the Apple-1, but never did. He went on and designed the Apple-2. The rest is history.


(Anyone familiar with the product development process would ask how this layout made it past layout review. I dare a guess they spotted the problems. But as Steve Jobs already had committed to sell  many units to Byte Shop, I think they decided to push ahead, risks be damned. The Apple-1 prototypes worked just well enough to be sold. Any problems with customers demanding less MTBF like Lisa Loop would be sorted out later.  And, as far as we have been told, Woz did his best to take phone calls and offer help to Apple-1 customers, which kept him from devoting 100% of his time to the design and development of the Apple-2. This problem was solved by offering Apple-1 customers a discount on the upcoming Apple-2 if the Apple-1 was turned in. And this, Ladies and Gentlemen, is the very reason why there are so few Apple-1 originals left. Most were turned in, and unless they were "rescued" by daring early Apple employees from the "junk pile" in Steve Jobs' office, they were destroyed. Which is good. This forum would not exist if the Apple-1 had been without its quirks, and I would not have the welcome opportunity to spend my - otherwise boring - post-retirement time on sorting out its issues).

Last seen: 1 month 1 week ago
Joined: Sep 4 2009 - 21:04
Posts: 104
Apple 1 Mimeo source termination.


I was able to embed the DRAM source terminator resistors in the sockets. The first figure shows a socket with 4 source terminators where socket pins have  been replaced by Resistor leads.  The next figure shows two sockets installed on the Mimeo board with replaced Pins circled.  The last two photos show DRAM waveforms on an unmodified Mimeo board and on a Mimeo board with added filter capacitors and terminating resistors embedded in the sockets.  All Mimeo modifications are virtually invisible to the user.



Log in or register to post comments