Tuesday, November 7, 2017

Drives, Partitions, and Subdirectories

Working with the hard disk, Ive run into a few issues - nothing major, but they do set a precedent that will be important as we go forward.

Disks


So the 64 has up to four drives, numbered 8-11.  In order to access a CD-ROM, other disks etc, I think we will enumerate physical drives using those numbers.  There can be up to four IDE drives, which maps nicely to 8-11.  (The current code only deals with the primary-master as drive 8).


Partitions


Older dual drives, such as the 4040 used a drive number when accessing them such as:

LOAD"0:Filename",8

or

OPEN 15,8,15,"S1:filetodelete"

I think I may use this scheme to access different partitions. 


Subdirectories


For subdirectories,  I thought about doing things the way the 1581 did them.  But that probably wouldnt work out so well and would be less intuitive (as intuitive as any of this is).  So Im thinking instead that the drive...being "intelligent"... maintains its current directory unless changed:

OPEN 15,8,15,"CD0:subdirectory1" : CLOSE 15

CD= change directory
0 = first partition

The other option is to do it in the LOAD/SAVE string:

LOAD"somedir/someotherdir/myprogram",8

Maybe a combination of both would work.  Will have to test out and see what works best. 

No comments:

Post a Comment