• Please review our updated Terms and Rules here

Creating 'Phantom' disk drives?

MykeLawson

Experienced Member
Joined
Mar 21, 2014
Messages
396
I had a thought about this last night. How can I add more disk drives, without fiddling with the CP/M system files or designing more hardware. My thinking was to be able to have two identical disk drive interfaces, and just toggle their ports back and forth; somewhat like what is done with banked memory. Then I remembered, my CPU card already does something similar in being able to swap between RAM and ROM, both of with start at address 0000. My CPU card does this with a 74LS74. When the device is reset, through a POR or the reset switch, the Q output goes low, and the ROM is enabled. Writing any null value to Port 1 flips the Q & /Q outputs, causing the RAM to be seen below the 2K the ROM takes up. Write a null to Port 0, and the ROM is active again.

I could do the same thing with two identical disk interfaces; one enabled by the Q output, and the other by the /Q output. Assuming CP/M is installed on both, then CP/M would never know whether or not is was using the A, B, C, & D drives, or the A', B', C', & D' drives. Sounds good on paper anyway. Not sure about in practice.... Maybe another project to build out.
 
Oh, I am assuming a re-boot for sure. Maybe a program to swap the drive array, and then re-load CP/M. I'm not sure, just one of my late night mental musings about a project for the future....
 
It's easy enough to create real disk drives under CP/M. It's all through BIOS hooks.

You can forge the check vectors if you need, but it's easier to call the initialization code to do it automatically.

To this extent, I think this is the thing you're looking for - Switching disks out is OK as long as;
The DPH/DPB are correct for the new disk ( or both are the same ) and you call the initialization routine to rebuild the tables post-swap.
 
Seems like if you're going to the trouble of building two complete ramdisks you might as well just have two drives active in CP/M at the same time. If you don't want to replicate the I/O ports for both, then the FF makes sense as a "drive select" - which is the same way the "multiple drives problem" was solved back in the old days (usually a latch of several bits, since several drives were supported).
 
Back
Top