UNCLE BERNIE'S APRIL FOOLS' DAY APPLE-1 RIDDLE !

10 posts / 0 new
Last post
Offline
Last seen: 2 days 15 min ago
Joined: Apr 1 2020 - 16:46
Posts: 174
UNCLE BERNIE'S APRIL FOOLS' DAY APPLE-1 RIDDLE !

 

Here is a photo of an "impossible" Apple-1 daugther card under development in my lab:

 

 

The riddle - and the challenge to y'all - is to answer 3 questions, by commenting in this thread:

 

Q1: Which kind of peripheral card is it ?

 

Q2: Why is it believed to be "impossible" (for the Apple-1) ?

 

Q3: What does the screen contents mean ?

 

If there are at least three answer posts, each with at least two of the three questions above correctly answered, I will post more information about this development. And everybody who did answer at least two of the three questions correctly, will enter a sweepstake from which one winner is drawn.

 

This winner might receive the first production version of this daughter card from me as a gift - but no guarantees are made that this will ever happen. So you may get nothing even if you "win". The reason for this disclaimer is that I don't know yet if it ever can be made to work well enough to be a viable "product" - I don't want any marginally working gadget on an already quirky host system. And the next obstacle is whether there ever will be enough interest among the worldwide Apple-1 crowd to justify any PCB layout effort.

 

(BTW, it's not meant to be a money maker ... I just sought another "mission impossible" to keep my skills with various CAD tools and digital circuit design techniques sharp. These mental skills are like muscles ... use them or lose them. A real danger for retired people ... I've seen once brilliant engineers turning into dummies within a few years after their retirement. And this was not due to Alzheimer or such. It was due to mental sloth and rotting their brain away in front of the TV. The human brain quickly adapts to the abysmal IQ level found in there. Be warned ! (No April fool's joke, this warning !)).

 

But now back to our riddle. See, I want to keep your brain healthy, too !

 

Here is a proposed format for your answers (with a few hints, as I want to be fair):

 

A1: It's a ______  ______ peripheral card.

 

A2: It's "impossible" because Apple-1 has _______ DRAM _______.

 

A3: The screen shot shows ______  ______ from _____  _____.

 

You see ... very easy ! ... just fill in the blanks !

 

Good luck solving the riddle !

 

Your "Uncle Bernie"

Offline
Last seen: 2 weeks 4 days ago
Joined: Feb 25 2014 - 23:19
Posts: 65
Impossible?

Hello Uncle Bernie,

 

Two 20-pin connectors... A GAL  array... glue logic ... Could it be a Floppy Disk controller?

More clues would be good.

 

Also, theoretically almost anything is possible, even if it means building a whole new computer on a card and using the A1 as a terminal only...

Offline
Last seen: 9 hours 53 min ago
Joined: Feb 27 2021 - 18:59
Posts: 38
Hi Uncle Bernie, and thanks

Hi Uncle Bernie, and thanks for the brainteaser.

I think this is a Disk II interface card. The two, 20-pin ribbon cables are pretty distinctive, aren't they? And, the chips are consistent with that (a multivibrator for pulse width, a shift register for data in/out, some NAND gates for stepper control(?), an addressable latch for bit swizzling).

Something about the DRAM refresh circuit on the Apple I is supposed to make it impossible to do precise timing loops, as is used in the DOS RWTS and ProDOS READ_BLOCK routines.

As for the data on screen, I do not know, but it doesn't seem to be valid 6502 code. Is it a nibble decoding table?

Macintosh_nik's picture
Offline
Last seen: 4 hours 54 min ago
Joined: Jan 8 2021 - 05:18
Posts: 73
Hi Uncle Bernie!

I also think that this is an Apple Disk II Interface Card only for A1, you can see two stubs and the layout of the elements is very similar.

 

This is not possible because A1 has maximum 8kb memory and Apple Disk Drive II needs at least 16.

 

What is on the screen is not even a guess. But very much want to know!

Offline
Last seen: 2 days 15 min ago
Joined: Apr 1 2020 - 16:46
Posts: 174
The riddle contest is open until 1st of May !

Hey - this riddle was not meant to be solved just on 1st April.

 

It was posted on 1st April because it's kind of a joke ... sort of ... because it is like the Apple-1 itself: it almost works ! Oh the irony ! So I used it as an April Fool's joke.

 

You still have a chance to win such a card. I just need to find out why the green light goes off indicating that the 6502 software and the various state machines got out of sync. This no bug in my design ... I do have a complete hardware / software co-simulation which proves that it has no such flaws.

 

In one of my latest Apple-1 builds the green light stays on for hours so it works perfectly there ... until I power cycle the monitor. On other Apple-1 I have built it dies earlier but sometimes lasts for several minutes. It's obviously a signal integrity problem. This is where the most elaborate system simulations meet the real world. Which is rotten, nasty and it stinks ! No "ideal" signals to be found anywhere. System simulations can't emulate all that nastyness and all the bouncy "grounds". But they sure can help weeding out fundamental design errors. For instance, I found a very rare case constellation that was not covered in my original design so one state machine had to be extended to cover that case, too. In total there are more than 17 million distinct state trajectories in this system. And only a few would have done the wrong thing under very specific circumstances. This is the kind of bug you can only find by exhaustive system simulation. Which in this case has 12000+ lines of code.

 

There is a chance to make it work ! So don't give up and continue posting answers !

 

I'll keep this riddle contest open until 1st of May. And then I will give you the correct answers.  

Offline
Last seen: 2 days 15 min ago
Joined: Apr 1 2020 - 16:46
Posts: 174
Found the root cause of the erratic behaviour ...

...it's the lousy signal on the CL clock line. So it's no April Fool's joke anymore. It can be made to work as designed.

Offline
Last seen: 16 hours 37 min ago
Joined: Sep 4 2009 - 21:04
Posts: 117
My Guess

1 I think it is a Floppy Interface

 

2 I don't think it is impossible, it's how much hardware it takes

 

3 I think the values are representing the time between magnetic peaks on the disk??

 

Don't forget many Apple 1's have no ROR!

DrZ
Offline
Last seen: 2 months 2 weeks ago
Joined: Apr 22 2020 - 18:04
Posts: 12
You FDC

Hello Uncle Bernie,

 

i like to be a Part of your challenge.

I also assume FdC since it was always said to be difficult because of the Ram Refresh interrupting the CPU.

You have used some Gals, so a bit of the logic is hidden from us. But- as all other stated - the two ribbon cables are looking pretty like fdc cables..

 

And the listig suggest you may have printed a nibblized content of sector 0 of a Apple ii disk.

 

i assume its the first nibbles, 10 bit GCR Code.

to represent a single byte  you need two bytes.

used for one byte represented on the disk

i tried to reconstruct your representation via the GCR Codes on Wiki, but was unlucky...

 

So maybe it is a dump of something totally different - and you like to fool us with the  two ribbons...? Who knows-

but as always - great work !

 

 

Very nice.

Dr.Z.

 

 

 

DrZ
Offline
Last seen: 2 months 2 weeks ago
Joined: Apr 22 2020 - 18:04
Posts: 12
Hello again, since i could

Hello again,

 

since i could not interprete the output, i got a bit deeper into your selection of chips.

 

 

i can identify

74LS74 FlipFlop

74Ls05 inverter

74Ls259 8 bit latch

74ls299 8 bit adressable storage

74ls123 one shot multivibrator

74ls132 shift

74ls132 schmitt trigger

8 pin chip - unreadable

 

the 299 seems to be a very interesting part. it is an adressanle 8 bit register, which allows to store each bit individually. in combination with the shift it may help to decouple the strict timing necessary for the disk ii data coming in, if your cpu is interrupted by refresh...

 

just a guess . maybe someone can read the numbers on the 8 bin chip. 

uncle bernie - i have two drives Ii in my shelf waiting ....

Dr.Z

 

Offline
Last seen: 2 days 15 min ago
Joined: Apr 1 2020 - 16:46
Posts: 174
THE TIME IS UP ! AND HERE ARE THE ANSWERS:

 

Time's up ! No more new entries in the sweepstake accepted. Here are the answers:

 

Q1: It's a ______  ____ peripheral card.

A1:          floppy    disk  

 

Q2: It's "impossible" because Apple-1 has _______________ DRAM _______.

A2:                                                         non-transparent                refresh.

 

Q3: The screen shot shows ______  _____ from ______  ____.

A3:                                     sector  reads           floppy    disk

 

 

Alas, there have been only 5 people in the world (from 7.9 billion) who dared to respond:

 

post

 #2   mi2k                        A1 correct. A2 not properly answered.

 #3   robespierre               A1 correct. A2 correct. Good analysis, BTW.

 #4   Macintosh_nik           A1 correct.

 #7   wsander                   A1 correct. A2 dodged, does not count as correct answer, sorry.

 #8   Dr.Z                         A1 correct. A2 correct.

 

None of the participants got A3 right. Despite it should be obvious once you have figured out it's a floppy disk controller. After the program start, there are 16 lines seen with the 16 sectors from a DOS3.3 track #00. The numbers are the CRC-CCITT of the sector contents (to verify the integrity of the data without having to provide 4 KBytes of tables). But I would not have required any such details, just "sector reads" had been enough as an accepted answer.

 

So we have two candidates qualified for the sweepstake (Robespierre and Dr. Z). But if nobody ever makes a PCB for a kit, which now is highly likely, due to the overwhelming response, there probably will be no such sweepstake, as I did explain in my first post, and if so, nobody will get anything. Even I, myself, would never get a nice PCB for my pet project :-(

 

... but maybe I'll change my mind, if we can stir up more "wants". (And with "we" I mean you: please spread the word among the Apple-1 crowd !)

 

My target of three entries, each with at least two correct answers, as a trigger to post more information about this peripheral was reached neither (we ended up one such entry short).

But I decided to open such a thread anyways, hoping that the resonance would get better:

 

https://www.applefritter.com/content/uncle-bernies-woz-machine-based-apple-1-floppy-disk-controller

 

So far the conclusion of my "April Fool's" riddle thread.

 

For those who want to waste even more time, here are some more detailed comments of mine (Danger: long read ! Full of nasty drivel !)

 

P.S.: about the Apple-1 "marketplace" / Apple-1 "world population" and my (disappointed) expectations

 

I expected at least a dozen responses, based on my estimate of at least 500 (!) Apple-1 clones which certainly exist out there, somewhere in this world. Since the "Open Source Gerbers" became available in September 2020, at least another 10 clones get built per month, month after month after month, estimated from keeping track of PCB sales on Ebay. This is a very healthy growth of the planet's Apple-1 "population". There sure are even more new clones than my lower bound estimate, built by people who order their own PCBs based on these Open Source Gerbers. Which came out of Russia, BTW. Well done, dear Russians ! I'd really like to get in touch with whoever has done that work, to do a few mods.

 

About 40% of these newer clones, worldwide, use my 100% tested and burned-in IC sets I began to offer on Ebay, soon after the Open Source Gerbers became available, and so far every builder using one of my ICs kits (of those who gave me any feedback at all) has achieved 100% success at first power up, and never had to debug anything. But alas, only about half of the buyers of these kits contact me at all. It seems they are not even interested in getting my "Tips & Tricks" for builders, and my technical counsel, which they paid for with the kit. I always wonder why they are so shy. And I also wonder if my assumption is correct that they for sure would complain if they would have had no success with their build. This is an unfortunate situation because I can't get reliable success statistics from my experiment - half of my test subjects turned out to be Schroedinger Cats. So, sorry, no scientific numbers yet, no standard deviations, no statistics at all.

 

Anyway, based on these numbers, which are a reliable lower bound on the number of Apple-1 in this world, less than 1% of the Apple-1 owners did respond to my riddle. And this, Ladies and Gentlemen, is very, very pathetic and lame ! There seems to be no interest among the Apple-1 owners in turning their Apple-1 "toy" computer into a serious and capable small computer system by adding a floppy disk drive. But what do I know. Maybe most owners use their Apple-1 just as a wall hanger. Or as a dead display in a museum.

 

P.P.S: A few more detailed comments on certain opinions stated by some responders:

 

In post #2, mi2k suggests that "almost anything" is possible, such as building a new computer (who would not suffer from the non-transparent DRAM refresh) and using the Apple-1 only as a terminal. This is funny / hilarious, and probably was meant as a joke, wasn't it ? But if the problem at hand would have been handed over to the Government, such a "solution" may have been the most likely outcome. And that new computer probably would cost no less than half a million USD each, would be built by Raytheon or Lockheed Martin to exacting MIL SPECs, from the finest parts sourced from China, but would have no more capabilities than the Apple-1 itself, except for not having those nasty DRAM refreshes anymore, because at that price tag they can afford to use a SRAM. A mil-spec SRAM, of course ! (/sarc)

 

In post #4, macintosh_nik opines that the small 8K RAM of an Apple-1 is the reason why it's "impossible". This is a good guess, because DOS3.3 is known to be a terrible memory hog. But I think that a DOS could be written that can reside in a 2732 EPROM (period correct for the year 1979) and use almost no RAM for itself. Other than his own data buffers the caller has to provide anyways, all file management system (FMS) operations could be done with only one "private" sector buffer of 256 bytes for the FMS, some smaller intermediate data stream buffers, and a small table keeping track of the state of the open files. Such a minimum RAM solution however could be slow, because whenever an intermediate data stream buffer would get empty (on reads) or full (on writes), the FMS would need to swap in and out the current sector of the file in question to fill (on reads) or empty (on writes) the small intermediate buffers. If we make these intermediate buffers of variable size, however, the caller could choose an optimized configuration for the task at hand that minimizes these swaps. Now, any critic would see that this appears to be some hand-waving skullduggery of your "Uncle Bernie" because in the configuration of three full size intermediate buffers able to hold a full sector of 256 bytes each, we are back to tie up some 256 + 3 * 256 + 3 * 16(?) = 1072 bytes of buffer RAM, but this is still better than the 1792 bytes DOS3.3 wants to possess with MAXFILES=3 serving the same purpose. My approach would consume only 60% of total buffer RAM compared to DOS3.3 ! But do we need three files open at the same time with full size intermediate buffers ? On some tasks, maybe, sure, so any DOS should have the ability. But imagine a typical Apple-1 task of loading and saving machine language programs to and from floppy disk. This would require only the minimum configuration with the one "private" buffer of the FMS itself, and one table entry for the state of the file (the 16(?) bytes from above, but note that this is an estimate, hence, the question mark). I think it can be done, and floppy disk operation even with a meager 8K of RAM should be possible without any penalties. How can I be so confident ? Well, in the mid-1980s I wrote my own EPROM resident FMS which used only very little RAM, for all of its operations, including LOAD and SAVE of machine language programs, but it also had FORMAT, DIRECTORY, RENAME, DELETE, the whole shebang. So I already did it. It could be done again. For the Apple-1 this time. But not by me. My RQLT is too valuable to do that. Writing an Apple-1 DOS should be done by younger people whose RQLT is abundant and cheap. It's a very nice project certainly worth pursuing. You can learn a lot. But to succeed, you need to be fluent in 6502 assembly language. Beginners need not apply. 

 

In post #7, wsander opines that it's not "impossible", it's just "how much hardware it takes". Not as funny as mi2k's solution, and a indisputable technical tautology, but it's not a valid answer my question Q2. Perhaps wsander was distracted by him knowing all too well how many pipeline registers and associated control logic they had to add to the Disk-II controller to turn it into the IWM (Integrated Woz Machine). However, I do not consider this to be a correct answer. First, there are no pipeline registers anywhere to be seen in my photo of the mystery peripheral card. Second, the real reason for a Floppy Disk Controller being considered to be "impossible" on the Apple-1 by many "experts" is the non-transparent DRAM refresh, and not the lack of the phantom read cycle in the 65C02. Which was one of the many motivations to develop the IWM. I think the obsolescence of some of the parts in the original Disk-II controller also may have been a factor. This is why I avoided the obscenely rare and expensive 256x8 PROM when I re-implemented the Woz Machine for my Apple-1 floppy disk controller. But the 74LS323 also is a scarce part nowadays:

 

In post #9, Dr.Z opines that the 74LS299 could be the solution (to the strict timing issues he correctly stated as the "impossible" part), but this is wrong. The 74LS299 just replaces the 74LS323 which nowadays is much harder to find. These are much the same thing, a "8-bit universal shift register" with tristate I/Os to read and write the register contents from a data bus, and they are pin compatible, except that the '323 has a synchronous reset input pin, and the '299 has an asynchronous reset input pin, at the same physical pin number 9. There is no other difference except for price and availability. The 74LS323 is almost impossible to buy today, and if you can find them, they are much more expensive than the 74xx299, which unlike the 74xx323 are still in production, even as 74HC(T)299. There is an even rarer equivalent AMD part with a weird type number, AM25LS23, easily confused with their PROMS (AM27Sxx, this is how I got the mine, poor eyesight contributed), and other than in the Disk-II controller the 74LS323 wasn't very popular, so they stopped making them decades ago, at least this is what I was told. I have a hunch that this lack of popularity, if this was in fact the case, may have come from their reset input being synchronous. So these registers may only be initialized when the clock is already up and running. Which may be unwanted in most applications. The advantage of an asynchronous reset input is that can be turned into a synchronous reset by putting a D-Flipflop in front of it (which, BTW, is what I have done in this floppy disk card). But not vice versa. You can't turn a synchronous reset input into an asynchronous reset. Hence, the 74LS323 is less flexible than the 74LS299, and the latter can replace both.So why would a company put the 74LS323 in their list of stocked and recommended parts ? See, this is how the digital design world worked back in the day. Most designers had no free choice of parts, and you simply could not choose any part you wanted from the TI Pocket Guide (I still have mine from 1975 or 1976, can't tell the year because its cover is long gone, and the 74323 is not in it, but the 74299 is, announced as a "new device"). You had to take the parts your employer had recommended and in stock. And depending on which company that was, the list of recommended parts may have been longer or shorter. A lot of apparently poor and inefficient digital designs from the TTL and LSTTL era can be explained by this handicap.

 

Log in or register to post comments