+bf2k+ Posted April 2, 2021 Share Posted April 2, 2021 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?? Quote Link to comment Share on other sites More sharing options...
phaeron Posted April 2, 2021 Share Posted April 2, 2021 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. Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted April 2, 2021 Author Share Posted April 2, 2021 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? Quote Link to comment Share on other sites More sharing options...
+Stephen Posted April 2, 2021 Share Posted April 2, 2021 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. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted April 2, 2021 Share Posted April 2, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted April 3, 2021 Author Share Posted April 3, 2021 Thanks!!! Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted April 28, 2021 Author Share Posted April 28, 2021 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? Quote Link to comment Share on other sites More sharing options...
sanny Posted April 28, 2021 Share Posted April 28, 2021 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. Quote Link to comment Share on other sites More sharing options...
drac030 Posted April 28, 2021 Share Posted April 28, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted April 29, 2021 Author Share Posted April 29, 2021 That's perfect. Thanks. Quote Link to comment Share on other sites More sharing options...
drac030 Posted April 29, 2021 Share Posted April 29, 2021 Atarians at their finest. Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted April 29, 2021 Author Share Posted April 29, 2021 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. Quote Link to comment Share on other sites More sharing options...
drac030 Posted April 29, 2021 Share Posted April 29, 2021 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. Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted April 29, 2021 Author Share Posted April 29, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.