When life gives you a broken Apple card, make ... it work again?
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
The logic from the ProFile card is half the story. My other half - the emulator side - would be better if I could nail down how it's supposed to work.
Which we can! The exact ROM from my (v4.04) ProFile drive is online thanks to Patrick Schäfer's teardown work a decade ago. It's Z8 code, and after the same sort of disassembly and analysis, here's my take on what's happening:
The ProFile Z8 side is a lot simpler than the card - it sits in a loop waiting for the Apple to pull /CMD low, then puts $01 on the bus and waits for the Apple to answer $55. That's the resp=1 ack=55 line in my logs.
Then 6 command bytes - which the Z8 never touches. It points a hardware address counter at its own RAM ($13F0), lets go of the bus, and the Apple's strobes push the bytes straight into memory. When the Apple pulls /CMD again, the Z8 copies the 6 bytes out and *then* looks at the command. The response should be "the command plus 2". A read is command $00, so the expected answer is $02.
If the Apple answers $55, the drive goes off and reads the block. If it answers anything else, the Z8 sets a "bad $55" bit in its status bytes and goes back to listening for the next command. It doesn't reset; it doesn't retry. Very early Apple philosophy: the computer has the intelligence, not the hardware.
So... we have more of the picture, but not more of the answer.
We know that the ROM is expecting a $02. The drive (emulator) is sending a $02. And the bus sniffer sees the $02. But it's being NAK'd by the Apple side. And when I plug this all in to the ProFile reader circuit, it ACKs the same transaction. And this is where we invent "The Ritual."
The Ritual is a set of actions on the Apple //e that we perform to tickle parts of the card's firmware. This is a combination of the ROM disassembly and the card's schematic:
* C0D3:00 <-- unlock the '279 * C503 <-- Q3=0, set the '374 to drive the bus * C0D0:FF <-- load $FF into the '374 * C0D1 --> should reply $FF, as read from the '374 * C507 <-- Q3=1, tell the '374 to let go of the bus * C0D1 --> should reply $02, the drive's byte * C503 <-- Q3=0 again * C0D1 --> should reply $FF, from the '374
And, indeed, we get FF / 02 / FF; nothing is wrong per this test. Which makes no sense.
We've got the drive, bus, card, and computer all agreeing: "I give you the correct data, and you reply that it's wrong." Something is listening, but not really paying attention. So what's the difference?
The Ritual is a static test. I type one line, the card does its thing, I look at the result. The boot is the ROM running at full speed, with real bus timing, doing things in its own order.
So the ritual becomes a program:
LDA #$02 JSR $CDAC RTS
... the same two instructions the ROM runs at $CBAB; running them from the monitor, the emulator answers $02, the card ACKs it. The same compare routine. The same drive. The same card. The same $02, which only fails in the actual boot process.
ARGH.
Warning - this is a deep dive page, getting into the weeds of how the software and hardware work.
My problem is this: I'm fighting two different wars. I'm both trying to understand what's wrong with the ProFile card, and trying to find and fix the bugs in my emulator so that I can properly exercise the ProFile card and find its problems.
So let's start with the logic. How does this work? What is it *supposed* to do? Well, let's disassemble the ProFile card's ROM and see.
C800: "(C) APPLE COMPUTER INC. 1984" C81C: 08 PHP C81D: 78 SEI C81E: 20 29 C8 JSR $C829 C821: 90 03 BCC $C826 C823: 28 PLP C824: 38 SEC C825: 60 RTS C826: 28 PLP C827: 18 CLC C828: 60 RTS ...
... plus another 2k of dump. (If you want to dump it yourself, have at it - between the asimov hardware repo and the Apple II documentation project you'll find a lot of information, including full ROM images.)
From there, we untangle its mysteries - most of which I'll spare you from, at least initially. Let's talk about the parts of the flow that we need. First, how do calls enter the ROM? Data at the end of the ROM tells us that the "entry point" is at $C5EA (while the card is in slot 5), and here's that code's graph:
Good news, then - we're getting past "no device connected" and getting down to the "STATUS" path that ultimately returns an err. Let's pop down to follow the dispatch process for reading a block so we can figure out why we're getting the mystery '2 / AA' error I reported a couple log entries ago:
That's... a bit dense, but in the middle you can find the $CBAB box where we load #$02 and send it, in the confirm phase, which the emulator picked up as "resp=2" and then sent its "ack=AA".
And what does that tell me?
Not a lot, but that's enough for this time...
This is the DB25 connector on a ProFile drive.
Notice anything in particular out of the ordinary?
It's that Pin 7 - not connected. That's all well and good, but it's more than just "not connected." The hole in the female DB25 is actually blocked, and the pin cut in the male half. This digital circumcision was intentional, and semi-documented:
Ah, right. Back in the early 80s, serial was commonly a DB25 cable; not the DB9 that I mostly used, nor the USB that everyone knows today. So blocking that one pin gave them a layer of physical safety, where someone wasn't plugging an RS232 cable in to the control line of a very expensive hard drive, where the RS232 -15v to +15v swing would almost certainly fry some 74-series logic circuits. These classic TTL chips only run up to about 5.25v before they start to break down. Over 5.5, you're probably causing some issues. Over 7v, there's no guarantee the device doesn't literally explode. But worse is the -15v: run that in to a TTL input and the protection/clamping part of the circuit will do its thing. And probably die in the process.
But I wasn't paying any attention to pin 7. I was jamming connectors together, seeing that they at least mostly mated, and leaving it at that. When in fact, my cables *had* a pin 7 and it didn't really fit in hole 7; it was close enough that it looked kinda okay, but caused the pins at one far end or the other to be slightly ajar.
Sigh. Another few hours wasted. It's starting to feel like I should be singing Alice's Restaurant. "Remember Alice? This is a song about Alice."
Just to recap: Claude built me a schematic from all my trace notes, and suggested something useless. So I'm running traces and trying to figure out what's failed.
This is where I spent a lot of time tweaking code - with three programmable devices in a line, two of which were actively connected to the Apple //e's ProFile card most of the time, I kept asking more questions. "What if I could see the timing?" or "Maybe it would be helpful if I looked at all of the pins as a time-base trace."
And eventually I uncovered my first of many problems with the drive emulator. It was spending 16uS in pinMode before byte 0 was on the bus, so the card missed byte 0. Sometimes it caught up by byte 2.
Now, that wasn't a problem when I was reading it from a slow reader - from a protocol perspective, it worked fine for that use case. But when I ran it against a full speed card it was just running too slowly. My slow reader was deliberately waiting 16uS after PR/-W before its first strobe, just an initialization sequence step. The ProFile card is not. So: stage byte 0 while the pins are inputs, then flip direction of the ports so they're outputs all at once. Not a problem with the card, just a problem with my emulator.
And related: a bunch of Serial.println() statements inside transaction loops was also slowing things down. I spent some good time pulling all the logging out; storing state in RAM so I could print it after loops had completed. Also not a problem with the card, just the drive emulator.
So it was at this point that I pulled the actual ProFile out of storage. Sure, it may be magnetically failing, but I really need some insight as to the real behavior of the device. Pull it from the box, plug it in to power, turn it on, and ... nothing. No power light. No spinning hard drive noise. Just nothing.
After taking apart the ProFile, I narrowed it down to a hard short on that interface board. I'm bringing that back up any time soon. I guess I'm going to have to keep working out issues in the emulator, while I also debug what's wrong with the card...
In 2021, when I built the ProFile Hard Drive reader to suck the contents off of a ProFile 10, I knew there was a problem somewhere. The reader I built was a troubleshooting step to cut the problem in half: was the problem with the drive, or the card (or Apple itself)? But once I got the image sucked off of the drive reliably and reproducibly, it was no longer a problem for me - the card does nothing without the drive, and the drive was showing signs that it was magnetically failing, which left it as an afterthought. I'd salvaged the data; I had the artifact rebuilt to its best operating condition (without a Z80 service ROM or the requisite Apple /// and software to low-level reformat the drive, which would refresh the aging flux on the platters).
So when I pulled everything out of storage and decided it was time to figure out what the actual failure was - maybe with the hope of using it for something, but more likely just clearing an old project off my backlog - I had a simple plan. Take a known-good drive (well, a Teensy 4.1 pretending to be one - I built it in 2021 as part of the triad of reader / bus sniffer / drive emulator) and, using that tech stack, see what happens on boot. A simple starting point to be sure.
And what happened? Nothing. The sniffer showed the drive reset held low forever. It never tried to send a command, or ask for state. Just... nothing.
From here, there's not a lot of information about what's going on. I decided it was time to spend several evenings following every trace on the card to recreate the schematic. And several days later, I've got something like this:
... now, let me say it clearly here: yes, I used Claude. It generated that pile of boxes and wires. Its first version was just a set of boxes and netlists, where it was impossible to visualize the connections; this is better, but still ... inhuman. But I didn't have to draw it, and for something that was throwaway for a one-time debugging session, I was very willing to take that trade-off.
So what does one do with that?
Not much, at first. In 2021, when the card wasn't working, I bought modern replacements for basically every IC on the board. And replacing all of them made no difference. So I knew, going in to this, that what I was looking for was going to be either subtle, or not the card itself. And this is, exactly, where I thought Claude might be of some help. In what precise way, I was not sure.
"Claude, given the symptoms, what's the likely source of trouble?"
<Brrzt> <grrp> <frrrrmmm> "Could be a broken control latch, the '259 or '368."
Not useful at all, since I'd already replaced them. So it was time to start instrumenting with all the tools I had.
== command phase resp=1 ack=55 cmd6: 0 FF FF FF A 3 op=0 blk=0xFFFFFF intent=2 (get-status read) == confirm phase resp=2 ack=AA == abort
okay, I see the request here. Something is asking for block FFFFFF, which is a status block on the drive. With the sniffer in place, I got that; but without the sniffer, nothing. So the sniffer stayed for the rest of testing, regardless of whether it was being actively used or not.
But the "ack=AA" is a problem. "The drive answered 2, the card replied AA". The card's "2" means "that's not expected"; and this loops forever.
Chasing that one byte? That's about three weeks.
This is the repair log for an Apple II ProFile Interface Card (820-5006-B, ROM 341-0299-B), the card that lets an Apple //e boot from an Apple ProFile hard drive. Mine stopped working. Apple published a schematic for the Apple /// version of this card in the ProFile service manual, but not for the Apple II one, which meant taking the time to draw up my own.
The tools I used, most of which came out of my earlier ProFile 10MB Hard Drive Reader project:
What was actually wrong, in the order I found it:
As of August 21, 2026 the //e boots from the card. A day later it passed a write and read-back of 64,950 blocks with zero errors. The repair methodology is the interesting thing here, because I actually used GenAI (Claude) to help out; with a serial card in slot 1 and a camera trained on the monitor, it was very helpful. If not smart.
Credit where it's due: the Apple ProFile Level II service manual (the Apple /// card schematic on page 546 was my reference for how this kind of card is put together), and the 341-0299-B ROM image from the Asimov archive that I used to check my own chip.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates
About Us Contact Hackaday.io Give Feedback Terms of Use Privacy Policy Hackaday API Do not sell or share my personal information
Jorj Bauer
James Ots
Michael Wessel