My image writing software appears to be correct. I’ve looked over the code, and everything seems to make sense. And yet, my program fails to write a bootable CP/M disk. As mentioned earlier, I suspected problem might be the actual RX50 floppy drive on the Rainbow. I decided on a two-part check:
- Attempt to use the program on another known working Rainbow
- Swap out the suspected floppy drive for another mechanism
The first step, using the software on another Rainbow, proved to be problematic. I planned to use my tower-mounted Rainbow, which was used in this summer’s Retrochallenge. However, I quickly realized that I didn’t have the necessary disk space (400kB) to store an image to write. Luckily, that Rainbow has a 720kB 3.5 inch floppy drive attached. After moving an image over to the other system, the image writing took forever because it was reading the image from one floppy and writing to another drive, a slow process. Once the image was written, it suffered the same problems as the image written on the original Rainbow.
Swapping the RX50 floppy drive on my Turbow box led to the same results: the CP/M directory was slightly mangled and the disk would not boot. The CP/M boot disk contained a text file, so I booted into CP/M from the hard disk and printed the text file to the screen. Sure enough, the contents were incorrect. I compared the contents to an original, and it became clear something was wrong.
The final variable was the actual disk image in use. I was using a CP/M-86/80 Version 2.1 boot disk in Teledisk image format. The image was converted to a RAW format using wTeledisk, which is based solely on reverse engineering the Teledisk file format. The image appeared to be the correct size, but I couldn’t personally attest to its integrity.
Rather than attempt to further debug my image writing software (which was so simple I was convinced it was functioning correctly), I decided to write an image creation program. By imaging floppies directly, the final unknown, the integrity of the image file itself, would be eliminated. I extended my floppy access routines to include the ability to directly read sectors from the drive, and I wrote a simple program to create images.
I fired up the image creator on an MSDOS 3.10b boot disk, and the image was generated in about 2 minutes, slightly faster than recreating floppies from images. The first pass failed because one sector turned out to be bad, creating a missized image. After a quick modification to write zeros to the image if a sector fails to read, an image of the proper size was generated. A subsequent writing of the image to another floppy resulted in success. The new floppy was readable!
I then attempted to boot the Rainbow off the new floppy, and I was greeted (eventually) by a DOS prompt. All programs on the floppy appeared to run, meaning that the disk write was actually sucessful.
The above success, however, is still incomplete as it requires new images for all OSes to be created on an actual Rainbow. I’m torn at this point as to whether I should continue pursuing the Teledisk images or whether I should just generate new images from scratch.
The software is also far from done. First, the programs are quite ugly and ungainly. Both the creator and the writer could use some serious polish to make them appear Rainbow-y. Also, I’m concerned that the image program won’t be usable in most circumstances. I think a serial version, where the image is read from a serial port, might be more advantageous. Finally, I hope to create an image of a boot disk containing the software itself.