Jump to content

Recommended Posts

Back in the mid 80's... I wrote my own SpartaDOS disk directory sorting utility out of sheer necessity having some fairly large drives and dirs on my BBS system.

While playing with this program the other night, I accidentally sorted a DOS 2 disk... oops.  My brute force sorter trashed the disk as I suspected it would. 

 

So I need to be able to detect a SpartaDOS disk before sorting.

 

I know the SDFS version is stored at offset $20 in sector 1 of the Sparta disk.  This would be easy enough to check but I feel I need something additional.

 

It looks like offset 8 in sector 1 = $80 on the SpartaDOS disk but I am not sure if this is definitive enough.  I have checked a few different disks and so far I have only seen $80 in offset 8 on the Sparta disks.

 

Any other ideas?? 

Share this post


Link to post
Share on other sites

Offset 8 should help a lot if not suffice completely. Altirra detects SDFS by the JMP instruction there, which will be to $xx80 for a SD/ED/DD disk and $xx40 for a DD 512 disk. On a DOS 2 or MyDOS disk it will jump around the BCB to a low $07xx address. You could also cross-check the first few bytes after that since they have defined meaning for both SDFS and DOS 2 disks.

 

Share this post


Link to post
Share on other sites

Sounds good.  I've been using the old DISKRX to sniff around in these disks but it won't touch a DD 512 disk.  What's out there these days to do that?

Share this post


Link to post
Share on other sites
32 minutes ago, bf2k+ said:

Sounds good.  I've been using the old DISKRX to sniff around in these disks but it won't touch a DD 512 disk.  What's out there these days to do that?

There's a utility on the SDX toolkit called EDDY.  It's a really nice hex editor for partitions, disks, and even single files.  Requires an 80 column driver of some sort, but the SDX software 80 column works fine with it.

Share this post


Link to post
Share on other sites

EDDY runs in 64 columns by default using a built-in display driver, but will run in 80 columns and use additional colours where S_VBXE.SYS is present.

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Another question along these lines... As I understand, the DD512 disk format has 512 bytes in secs 1, 2, 3 and all the rest.  This is unlike other 128byte and 256byte formats.

 

If I want to detect a DD512 disk and am using SpartaDOS 4.4x, what's the best way to proceed?

 

.  First attempt to read sector 1 at 128 bytes?

.  Trap the resulting error and then attempt to read sector 1 at 512 bytes?

 

Or is there some shortcut I am missing?

Share this post


Link to post
Share on other sites

I don't kow about the DD512 format. But in order to be able to boot, the first (3?) sectors have to be 128 bytes.

Share this post


Link to post
Share on other sites
On 4/2/2021 at 8:26 PM, bf2k+ said:

While playing with this program the other night, I accidentally sorted a DOS 2 disk... oops.  My brute force sorter trashed the disk as I suspected it would. 

What is wrong with the built-in command SORTDIR?

 

19 hours ago, bf2k+ said:

Or is there some shortcut I am missing?

I guess so: XIO 47 aka GET DISK INFO or CHKDSK, section 6.3.17 of the SpartaDOS X User's Manual has some description.

Share this post


Link to post
Share on other sites

And to answer your other question...  I wrote mine out of necessity in 1985... before SDX even existed. 

 

Now it is a hobby (and much fun) to make it work properly with the new stuff you have so graciously given us.  Thank you.

 

Share this post


Link to post
Share on other sites

SORTDIR is a tool written by ICD in 80s (and yup, current SORTDIR is the same - quite slow - code exactly). Anyway, a directory sorting utility does not need to know the size of bootsectors, or the size of any sectors for that matter, because in SpartaDOS you can open a directory read/write the same way you open a file with binary contents. Then you read it all out to the memory, sort, do SEEK to the beginning, write back, then close.

Share this post


Link to post
Share on other sites

I was wondering about SORTDIR... Keith wrote that one (I think before he started working at ICD).  But he helped me get mine started back then by encouraging me to read the command line for parameters which I did.  I have some of his ICD SpartaDOS Con set books with his notes in them. 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...