Apple ][ Europlus repairs.

Afternoon all.
I stumbled upon these forums recently during my recent nostalgia binge, during which I picked up an original Apple ][ Europlus, which was the second computer I ever used (the first one being a TRS-80 Model 1). I remember being fascinated by this thing back in the early 80s during my few months of exposure to it.
This Apple ][ works, though as you can imagine it hasn't lived through 34 years without some injury. Because it didn't come with a Disk ][ expansion card (even though it came with a Disk ][ drive!), I decided to hook up the cassette ports to another computer to record and playback memory dumps so I can save any work I do on it. Thanks to the large complement of books that came with this thing (including Apple's own amazing Apple ][ Reference Manual which has schematics and ROM listings and detailed descriptions of the hardware), I quickly came to terms with how to use the tape dumping commands from the built-in monitor.
I managed to get recordings of the Apple ][ outputting its screech onto the computer, but I couldn't get the Apple ][ to recognise the played-back recording as valid data. I spent a good few hours experimenting with different volumes, and processing the sound to try and get it to work but to no avail. After reading some things online about how this hasn't been a problem for others I started to suspect a hardware issue.
I wrote a small machine code program (a pity they got rid of the assembler in the Pluses, because typing in instructions one byte at a time is not very fast) to output the signals the Apple ][ is detecting on its cassette port. It was definitely detecting pulses. But after reading up more on how the cassette interface worked I realised it was detecting the pulses badly.
Let me explain...
From a technical perspective, the Apple ][ writes out square waves to tape. Every time you access the write-bit it flips the output between phases, so writing it twice with a suitable delay gives you a square wave. A 1 is written as a 1000Hz square wave, and a 0 as a 2000Hz square wave. To read data the hardware detects phase transitions. There's a 741-based op-amp circuit that detects when the phase changes from positive to negative, or vice versa and sets a bit that can be read by the processor. You wait for two phase changes and based on how long it took you have a 1 or a 0.
That's all well and good. But by sending some square waves built up in Audacity to the Apple ][ it seems that every time the phase changes the read-bit would flip several times. The monitor code has no instructions for compensating for this, so it seems like this should not normally happen and that the op-amp is very good at detecting the phase transition only once.
So I've established that there's something not right with the cassette input hardware. I've tried modifying the monitor ROM code to compensate for these multiple flips, but wasn't successful. I suspect this will be a problem that won't get fixed, but I figure I'd throw this out there in case it's an easy fix and someone has an idea what would cause this - I'm hopeless with electronics so have no clue. At the end of the day it's no biggie, as I have a couple of Disk ][ interfaces on the way and I have a project in mind using a Raspberry Pi (also on it's way) to interface with the disk controller to simulate the disk hardware (I know of the CFFA3000, btb, but it seems there's a large wait for that, and I'm curious if I can pull it off doing it this way), but it seems a shame to have a broken cassette interface if it can be fixed.
This is the schematic for the cassette in hardware if it helps:

Anyone got any ideas what would cause the multiple phase crossing detection?
The only other hardware issues I encountered was bad RAM. Running a simple machine code memory tester highlighted there was a bad bit 3 in the second RAM bank, and a bad bit 0 in the third RAM bank (the first bank being fine was why the computer was usable). Looking on the board I discovered the reason for the bad bit on bank 3 immediately: a missing 16K x 1 DRAM. D'oh! The bad DRAM chip in the second bank I pulled out and cleaned but it was still faulty, so I've put it aside. I swapped some other chips from the third bank into the second bank and the bit 0 slot on the third bank to make sure the sockets worked and that was all good. I noticed there's some places in the States that still sell these chips but I've got a working bank 1 and 2 now, so not urgent. I guess I'm lucky this Apple ][ has only minor problems.
If you've made it thus far, thanks for your time. I have a few other computers (mostly all bought brand new over the years and kept), so I've got plenty of fuel for nostalgia!
I stumbled upon these forums recently during my recent nostalgia binge, during which I picked up an original Apple ][ Europlus, which was the second computer I ever used (the first one being a TRS-80 Model 1). I remember being fascinated by this thing back in the early 80s during my few months of exposure to it.
This Apple ][ works, though as you can imagine it hasn't lived through 34 years without some injury. Because it didn't come with a Disk ][ expansion card (even though it came with a Disk ][ drive!), I decided to hook up the cassette ports to another computer to record and playback memory dumps so I can save any work I do on it. Thanks to the large complement of books that came with this thing (including Apple's own amazing Apple ][ Reference Manual which has schematics and ROM listings and detailed descriptions of the hardware), I quickly came to terms with how to use the tape dumping commands from the built-in monitor.
I managed to get recordings of the Apple ][ outputting its screech onto the computer, but I couldn't get the Apple ][ to recognise the played-back recording as valid data. I spent a good few hours experimenting with different volumes, and processing the sound to try and get it to work but to no avail. After reading some things online about how this hasn't been a problem for others I started to suspect a hardware issue.
I wrote a small machine code program (a pity they got rid of the assembler in the Pluses, because typing in instructions one byte at a time is not very fast) to output the signals the Apple ][ is detecting on its cassette port. It was definitely detecting pulses. But after reading up more on how the cassette interface worked I realised it was detecting the pulses badly.
Let me explain...
From a technical perspective, the Apple ][ writes out square waves to tape. Every time you access the write-bit it flips the output between phases, so writing it twice with a suitable delay gives you a square wave. A 1 is written as a 1000Hz square wave, and a 0 as a 2000Hz square wave. To read data the hardware detects phase transitions. There's a 741-based op-amp circuit that detects when the phase changes from positive to negative, or vice versa and sets a bit that can be read by the processor. You wait for two phase changes and based on how long it took you have a 1 or a 0.
That's all well and good. But by sending some square waves built up in Audacity to the Apple ][ it seems that every time the phase changes the read-bit would flip several times. The monitor code has no instructions for compensating for this, so it seems like this should not normally happen and that the op-amp is very good at detecting the phase transition only once.
So I've established that there's something not right with the cassette input hardware. I've tried modifying the monitor ROM code to compensate for these multiple flips, but wasn't successful. I suspect this will be a problem that won't get fixed, but I figure I'd throw this out there in case it's an easy fix and someone has an idea what would cause this - I'm hopeless with electronics so have no clue. At the end of the day it's no biggie, as I have a couple of Disk ][ interfaces on the way and I have a project in mind using a Raspberry Pi (also on it's way) to interface with the disk controller to simulate the disk hardware (I know of the CFFA3000, btb, but it seems there's a large wait for that, and I'm curious if I can pull it off doing it this way), but it seems a shame to have a broken cassette interface if it can be fixed.
This is the schematic for the cassette in hardware if it helps:

Anyone got any ideas what would cause the multiple phase crossing detection?
The only other hardware issues I encountered was bad RAM. Running a simple machine code memory tester highlighted there was a bad bit 3 in the second RAM bank, and a bad bit 0 in the third RAM bank (the first bank being fine was why the computer was usable). Looking on the board I discovered the reason for the bad bit on bank 3 immediately: a missing 16K x 1 DRAM. D'oh! The bad DRAM chip in the second bank I pulled out and cleaned but it was still faulty, so I've put it aside. I swapped some other chips from the third bank into the second bank and the bit 0 slot on the third bank to make sure the sockets worked and that was all good. I noticed there's some places in the States that still sell these chips but I've got a working bank 1 and 2 now, so not urgent. I guess I'm lucky this Apple ][ has only minor problems.
If you've made it thus far, thanks for your time. I have a few other computers (mostly all bought brand new over the years and kept), so I've got plenty of fuel for nostalgia!
