Earlier this summer, on a cloudy afternoon with thunderstorms coming, I was out for a quick walk around the neighborhood. The area recently had suffered from some devastating rainstorms with severe flooding, and many homes had flood-damaged furniture and other items piled up on the curbs out front. I gave most of the piles a wide berth, but one such pile immediately caught my eye.
Inside the Apple IIe
- The PAL/HAL, which contained high-speed logic that generated the various clock signals used by the rest of the board.
- The MMU, which performed some complex address remapping to allow the CPU to access the full available memory space (128K of RAM on most machines, plus ROM and memory-mapped registers) with only a 16 bit address bus.
- The IOU, which managed the clocks and counters for the display, the audio output, and various other input and output functions.
Fixing the power supply
One online order later and I had a new part to swap out for the damaged one. This should be good for another few decades.
Cleaning the case and keyboard
The power light on the keyboard is actually a tiny incandescent light bulb, which was still intact and working. Some people replace these with a green LED, but since it was still working I decided to leave the original bulb in there for now.
The floppy disk drive
Though slightly battered and dirty, the floppy disk drive looked mechanically intact. I gave it a similar treatment to the computer, opening it up, cleaning and inspecting all the parts. There was no significant corrosion, everything moved freely, and all of the capacitors looked good. The weird spiral cam that moves the head had some hairline cracks at the end stop, but they didn't look like they would interfere with normal operation.
Testing and troubleshooting
A glorious 16 colors. This may not look like much now, but at the time it was amazing, considering that many of the computers of the day were monochrome only, or used the really quite ugly and limited CGA color palette.
White lines down the screen while in text mode, extending from the top of the screen downward before breaking up halfway down. These would creep up and down the screen as the computer warmed up, sometimes vanishing entirely. Switching to 80 column mode would not fix the problem, but the white lines would become twice as dense. In color mode, the white lines would go away, but instead there would be lines of shifted and changed colors, in vertical bars creeping up from the bottom of the screen.
I wrote a quick test program to make horizontal bars of colors repeating across the screen. This should have shown solid horizontal bands of each color, but graphical glitches were present, creeping up from the bottom of the screen. The pattern was strange, with some colors being shifted to other colors, or going black entirely. This was also visible when playing games, with bars of shifted colors creeping up the screen. The effect was happening on every other pixel, although the nature of the color shift changed in a regular repeating pattern across the screen.
Each character used in text mode is a 7x8 pixel bitmap, which are stored in the video rom UF4. To display a character, 6 bits of data indicating which character to show are loaded from RAM, the lower 6 data bits going to address bits A3 to A8 on the video rom to select the character. Address bits A0-A2 are used to select which vertical line of the character is being displayed, and are generated from a counter in the IOU chip. The ROM provides 7 bits of pixel data on its outputs O0-O6 (O7 being unused in text mode) which go to the shift register at UF5. That shift register then hands those bits one at a time to the analog circuitry that drives the video output.
The problem could have been in either the video ROM, the LS166 shift register, or possibly even the pull-up resistor network, or maybe even a bad connection in the sockets. I removed both chips and cleaned their pins and those in the sockets, but this made no difference to the graphical glitches. The resistor network also checked out with proper resistances on all pins, so I was pretty sure this was a failure either of the outputs on the ROM, or the inputs on the shift register.
The replacement ROMs and CPU completely fixed the problem, and now my IIe has been upgraded to the Enhanced version, which offers a handful of new kernel ROM features that I probably won't use.
Back to the floppy drive
How about the printer?
Unlike the Apple IIe, the inside of the printer is filthy. Full of mouse droppings, and with severe corrosion on many of the circuit boards. Someday when I'm feeling very ambitious I'll completely tear this down to bare parts and deeply clean it, but for now it's going into storage.
Bonus: Making a joystick
Unfortunately it's not as easy as just wiring a joystick to the inputs on the IIe's game port. While a modern game system would look for a variable voltage input and resolve it with an ADC, the Apple IIe uses a timed charge-discharge circuit to detect the joystick position. It actually uses a quad 555 chip to generate a square wave with the pulse width determined by a RC circuit involving the joystick potentiometers. This was specifically designed to work with a joystick that uses 150K potentiometers, while the ones I had on hand were 10K potentiometers.
There was just enough room in the case near the pushbuttons to fit in several caps in parallel to give the 0.31uf capacitance needed to make the circuit work. I also decided to use illuminated pushbuttons powered by the 5V from the joystick port, mostly because they were what I had on hand, but also to look fancy.
A purist would probably sneer at this, as it looks and feels nothing like the original Apple joysticks, but it works well enough for gaming, and is comfortable in my adult-sized hands.