I managed to get a bit of experimenting in last night, and the first thing I learned was that my decision to crib the cassette input circuitry from the Apple II was not going to work.
Here’s the relevant bit of the Apple II schematics:
This is a very simple op-amp configuration called a Zero Crossing Detector. Unfortunately, this kind of circuit relies on the op-amp having both a positive voltage and a negative voltage source (pins 7 and 4, respectively) in order for it to work. The Apple II has a -5V supply, but my 6502 SBC does not. I only have +5V available.
So, scratch that. I can’t just use a zero crossing detector. But I can do something very close to that, and use an op-amp as a comparator. And it turns out there’s a vintage 6502 system that did exactly that, the Synertek SYM-1. Here’s how Synertek did it:
At first glance this looks more complex than the Apple II circuit, but in reality there’s not much more going on. The part before the primary decoupling capacitor (C16) is just a low-pass filter composed of R128 and C15, presumably to try to reduce tape hiss and high frequency noise from the cassette. Following that, R95 and R126 form a voltage divider that provide a reference voltage of +2.5V to the non-inverting input of the LM311 comparator, and (through R93) a +2.5V biasing for the audio input. CR28 and CR29 are just protection diodes to prevent too great a differential voltage from being applied to the LM311 inputs. When the inverting input is above 2.5V, the output of the comparator will be held low (close to ground). Conversely, when the inverting input is below 2.5V, the output of the comparator will be high (close to 5V). That’s really all there is to it.
I don’t happen to have an LM311 handy, but I do have a bunch of LM358s in my junk box. I did a little breadboarding tonight, and found that these should work just fine as comparators in this application. Tomorrow I’ll throw a circuit together onto a little protoboard and wire it up to the 6522 on my SBC. I think that will largely take care of the hardware side of this project.
Happy New Year! It’s January 1st, and that means it’s the first day of the 2013 Retrochallenge Winter Warmup!
This year I’m going to be tackling a small project, something I know I can finish in a month. I want to add cassette mass storage to a 6502 Single-board computer that I built about a month ago. It’s a nice little computer, but without any kind of storage system for programs it’s kind of useless.
Naturally, the project will require both hardware and software. Today I’ve been doing research into how cassette storage worked on a few classic systems: The TRS-80 model 1, SYM-1, the AIM-65, the Apple I, and the Apple II. After briefly evaluating all of these, I think I’m going to just
steal from take inspiration from the Apple II Cassette Interface. It has two big advantages: It’s very well documented, and both the hardware and software are extremely simple. Of course it has some drawbacks, too. In part due to its simplicity, the Apple II Interface was finicky and required careful setting of the tape audio level on playback for everything to work right. I think I’m OK with that trade-off.
On the hardware side, the cassette interface should require very little. For I/O, I’ll only need one pin on my 6522 VIA. Writing will be done directly, and reading will use an LM741 Op-Amp as a zero-crossing detector, just like the Apple II. Software will use polling and a counter to determine whether two logic level transitions are a one or a zero, just like the Apple II.
I suspect the hardest part of all of this will be getting the tape record and file format right. My goal here is NOT to be 100% Apple-II compatible, so that gives me some leeway.
Wish me luck!
In the spirit of fairness, I’m not going to start work on the Retrochallenge Winter Warm-Up until January 1st, but I did want to start laying the groundwork so I can hit the ground running on the first of the year. I took my first step in preparation today by buying the all-important cassette player, an old-school Panasonic RQ2102.
I chose the RQ2102 specifically because of its historical accuracy. Apple used to recommend this very model as the preferred cassette recorder for the Apple II — and yet, it’s still made today. Remarkable!
Of course I don’t strictly need a cassette recorder. Sure, I could use a PC or an iPad or something as an MP3 recorder. But honestly, where’s the fun in that? So I want to use the real thing.
Following the rather disastrous non-completion of my PDP-11 restoration project for the Summer 2012 Retrochallenge, I have decided to bite off a much more realistic and completable project for the 2013 Retrochallenge Winter Warm-Up.
Last month, I built this small 6502-based single board computer to play with. It is nothing special, but I learned a lot while putting it together and had quite a lot of fun.
It’s a super minimalist setup: R65C02 CPU, 32KB SRAM, 16KB EPROM, R6522 VIA, R6551 ACIA, a couple of oscillators, and a couple of 74HC00s and an 74HC14 for address decoding and reset. I wire-wrapped it, and I was thrilled when I got it working and running Enhanced 6502 BASIC.
But it’s really just a toy, you can’t do very much with it. My biggest gripe by far is that there’s no mass storage, you can’t SAVE or LOAD anything, so you’d better hope your BASIC program isn’t very long.
In the spirit of 1970s computer home-brewing, I’d like to fix that problem by adding an audio cassette I/O system for mass storage. I think this would be a good, small Retrochallenge project. And it’s a great unknown to me, certainly something I’ve never done before, so it should be very educational as well!