You're mistaken. By "writing drivers for it" they basically mean "porting drivers for it".
The drivers are already written and, for something like this, likely 98+% identical across platforms, since they're all talking to the same hardware.
Not quite.
It gets complicated when you try to get the machine to boot from the IDE device. You have to plan the memory map out, then write a 2 stage boot loader. For example, on the Superbrain, at boot:
- Stage 1: Boot ROM loads sector 0 on the IDE device to C780h and jumps to it.
- Stage 2: Code loads entire OS (CCP, BDOS, BIOS) from sector 1 to memory at C800 (CBASE, start of CCP on the Superbrain), then jumps to the BIOS cold boot vector.
This is typical of CP/M cold boot techniques.
The problem is that while you may have the driver source, you will need to do a lot of reverse engineering of the existing machine's CP/M in order to understand where to load stuff at boot time. Undoubtedly you will need to reverse engineer the boot ROM and add the 1st stage loader to it, then burn a new ROM. This is quite time consuming and you may find there isn't enough space for floppy and IDE boot code. On the Superbrain, it asks you to choose between floppy and IDE boot at startup. You'll also need to write a PUTSYS program, to copy the boot code to the IDE device.
There is an alternative which I have implemented for the TRS80 Model II. Use MOVSYS.COM to open up a bit of space above the BIOS, then save that with SYSGEN. Then boot with that image and load the drivers into the new space, patching the BIOS vector table for the IDE device. Again, you have to understand what's going on in the BIOS (it is all in the CP/M Alteration Guide) and you need to write a loader program to do all this for you. But it is less complex than having the machine cold boot from IDE.
If you look on my yoooootuuuubez channel, you can see demos of all these systems, which show you their capabilities.
https://www.youtube.com/channel/UCdH2u50ocnjPxPmEOyNVLsg/videos
I even wrote a technical demonstration for the Superbrain, that loads the drivers
below the CCP and allows you to have a look at what's on the IDE drive. The disadvantage of that, of course, is that whenever the machine warm boots it kills the drivers off, but as a proof of concept it works. The program only needs to know where CBASE (start of your CCP) is and the address of a 512 byte sector buffer (on the Superbrain the buffer already exists as the floppies use 512 byte sectors too). I'm actually wondering if I can make it fully automatic so it figures this stuff out for itself. Should be possible.. if the floppy sector buffer is 512 bytes...
Another thing you'll want to do if you plan on booting from IDE is reverse engineer and patch the system's configuration utility (assuming it has one; most do, to set such things as serial port baud rates/protocol, etc). These programs normally save the updated configuration data to a specific place on the floppy disk; you'll need to alter it so it writes to the corresponding location on the IDE device. This location will be somewhere in the BIOS code so it loads automatically at boot.
You can also add features if you want. For example, all of my CP/M 2.2 drivers feature a mapping table to enable you to associate an actual drive (actually, a partition) on the IDE device to a logical CP/M drive letter. This is useful if you have limited memory perhaps due to a large BIOS. Every IDE drive you access uses ~260 bytes of memory for a buffer (it's called the Allocation Vector or ALV and it keeps track of which parts of the drive are in use), so if you wanted all 16 CP/M drives accessible you'd need just over 4K of RAM (plus the driver code itself of course). However, with mapping you can have fewer simultaneously accessible drives, saving RAM, and switch them as needed. Also, as my drivers support a slave drive, you have 32 x 8MB partitions to choose from, assuming you have connected a slave. You can see these features in the demo vids.
So, lots to think about. It's definitely not as easy as a "cut & paste, then reassemble". However it's do-able and enjoyable, and you will learn an awful lot about how CP/M actually works, which gives you a great feeling of mastery over it.
Start here, at the CP/M Alteration Guide:
http://www.gaby.de/cpm/manuals/archive/cpm22htm/ch6.htm