To follow on from Porter: if you build a device that looks to the OS like a supported Macintosh device, you don't need to write your own driver. Indirectly, those driver specifications are part of Inside Macintosh.
Take the proliferation of ethernet adapters on the market in the 1990s. Manufacturers who chose to use the Sonic chipset could rely on their devices working straight out of the box. No drivers were required unless the manufacturer diverged from the spec (eg by adding extra cache), but even those cards would still work at sub-optimal speed.
If you build a device that is not directly supported by Mac OS, you have two choices:
1. Create your own software driver for Mac OS. And separate drivers for A/UX and Basilisk, or anything that emulates Mac OS.
2. Write a shim (a "translator") that sits between the Mac OS driver and your device. With luck, it'll work with an emulator.