On Wednesday, March 8, 2017 at 2:36:29 PM UTC-6, Michael J. Mahon wrote:
> I hear you.
>
> Since you are precisely looking for interesting Apple-related projects, I
> understand your desire to stay in the hardware domain.
Yeah, and I do software all day so the hardware is a nice change of direction. I could just stay with more modern stuff like the Arduinos and Raspberry Pis, but the nostalgia aspect of the Apple II is pretty cool since for me that was the machine that ignited my whole interest in computers to begin with.
> I'm probably not the best judge, since I'm more interested in old hardware
> for the hobby and new hardware for the convenience. ;-)
For this kind of thing for me it is about the making it. It being a challenge is part of the thrill of it all.
> I suggested the "easy" or "prototype" approach because I don't know the
> requirements you want.
>
> It would be cool to hear more about what the SPI world has to offer the
> Apple II user.
Go to some of the places that sell parts for Arduinos and Raspberry Pis and you'll see the vast array of peripheral devices that are out there. It is a pretty incredible ecosystem. For hardware and software hobbyists right now is in my opinion the most exciting time since the heyday of the 8-bit micro.
In addition to the things I've mentioned there are LCD displays and all kinds of sensors and input/output devices that use either the SPI or i2C interfaces. Oh and things like SATA interfaces (2 TB drive on your Apple II ?), BlueTooth, etc. A driver for wireless mice and keyboards on an Apple II could be cool.
> It sounds like you're in this for the fun, so more power to you!
Thanks. I think I'm kinda going through a mid-life crisis lately and this whole thing has been a way for me to re-connect with my childhood. That and last year I traded my big full sized luxury car for a Corvette...
> > There is not a good real hardware implementation of SPI on the Apple II.
> > For the applications where the bit banging approach falls short there
> > currently is no good solution. That is an interesting problem. I don't
> > understand why people keep trying to get me to take the easy way out.
>
> No problem--what data rates are you planning? Is DMA useful? Most
> software-data-transfer routines will require about 13 cycles per byte, plus
> whatever handshaking is required--that's about 125kBytes max. I'm guessing
> that some on-board buffering may also help data rates. Pretty soon it
> starts to look like a microcontroller would be a good way to
> go...hmmm--another software solution. ;-)
DMA would be great, but probably not going to be reasonable to implement with the solution I am working on. Data rates for many of the peripherals will be as fast as possible. It is more trying to see what is possible than having a target in mind up front. I am thinking that whatever cycles a bit banging approach takes a hardware based approach ought to be at least 4-8x as fast because of whole bytes being sent and received at a time instead of having to manually shift out or shift in bits and write them one at a time.
Actually one potential use for a high speed SPI interface on an Apple II might be connecting to something like an Arduino or maybe a full fledged NodeMCU version of the ESP8266 and using it to offload tasks that the Apple II may struggle to do on its own. David Schmenk already has a game port SPI based solution for attaching an Arduino to an Apple II, but a hardware one would offer considerably higher throughput. Another idea... the Raspberry Pi has both i2C and SPI interfaces... David's Apple 2 Pi card uses serial with a 6551... but i2C or SPI should be way faster.
> > Of course the Disk II controller and analog board is cool... Aren't you
> > glad that Woz didn't say "hey, I could just hook that all up by the game
> > port" and build some kind of bastard contraption like the Commodore 154x
> > where they cheaped out and bit banged it off the 652x instead of putting
> > in real GPIB like the PET had. I'm no Woz. I am sure he could build an
> > SPI card for the Apple II with 1/2 the chips it will take me. I'm an old
> > geezer but I've been more of a software guy over the years so there is a
> > lot about hardware I'm still learning. That's a whole lot of why I want
> > to try this -- to learn something.
>
> I get it. That's terrific!
>
> FWIW, I think Woz was always get the most he could from as little as
> possible. I've always found the Disk ][ Controller to be an elegant
> example of that: faster, denser, and cheaper than the industry standard--by
> quite a lot.
I agree... however it is also a different world today than it was back then and hardware that was unobtanium back then is cheap today. I imagine he is a super busy guy but it would be interesting if Woz were to re-discover his Apple II heritage and start designing hardware and/or software for it again.
> > Also as I said before, I might not want to have to pop the cover and
> > unplug my joystick every time I wanted to do something like read an SD
> > card. There is only one game port, but there are several slots.
>
> Indeed. But you can "stack" things on the 16-pin game port (the only one
> with outputs) by using a machined-pin socket for the connector. That only
> leaves the question of interference between uses. Not knowing the intended
> applications, I can't be sure, but for many the SPI adapter might not be in
> use when the game port is otherwise in use.
That does go both ways though... there may be just as many applications where someone might want to use both at once.
> I usually run with NadaNet and a game-port-connected clock/calendar, and
> even they both use some signals, they never interfere with each other. (Of
> course, if I hit Open-Apple or a game controller pushbutton, NadaNet
> requests time out after several seconds, but that's a handy way for me to
> test. ;-)
There are SPI and i2C devices for most of those kind of peripherals... clock
calendars, Ethernet, storage devices, radio transmitters, cell/gsm modems, etc.
I'd be worried about things like the Apple keys interfering with a lot of those devices.
> I encourage you to continue your hardware efforts. I think it will be fun,
> enlightening, frustrating, enlightening, fun, etc.! I especially applaud
> your cross-discipline approach. Designs would be better if hardware
> engineers learned software engineering, and vice versa.
I agree. At one time I wasn't sure what direction I wanted to go and ended up going the software route. I was glad I did that because after the 8 bit micro days faded out the clock speeds and complexity got to be too much for hobbyist experimenters. A couple years ago I got aquainted with first the Raspberry Pi and then the Arduino type boards. That has sort of brought me full circle to the old days.