I decided to look at the problem from the other end, and made a little progress there. While the Mac still returns error -17 for everything, I'm now able to receive HD20 commands on the Floppy Emu and display them on its screen. It looks like the Mac keeps sending an HD20 status command, and because it gets no reply, it shows error -17.
The format of the status command mostly matches what's described in the HD20 doc, but with the inclusion of two extra "mystery bytes". With help from dougg3, we studied the ROM routines to determine that those bytes are probably the size of the output data and the size of the expected reply. Those were likely added as some kind of future-proofing feature, so drives could gracefully handle commands they don't know about, if the Mac and the drive are using different version of the API.
If I can figure out how to construct and send a proper status reply, I'm hoping it will be enough to get past error -17.
The format of the status command mostly matches what's described in the HD20 doc, but with the inclusion of two extra "mystery bytes". With help from dougg3, we studied the ROM routines to determine that those bytes are probably the size of the output data and the size of the expected reply. Those were likely added as some kind of future-proofing feature, so drives could gracefully handle commands they don't know about, if the Mac and the drive are using different version of the API.
If I can figure out how to construct and send a proper status reply, I'm hoping it will be enough to get past error -17.