Asmusr Posted Friday at 07:16 PM Share Posted Friday at 07:16 PM In sector dump (dsk) DSSD format, how are sectors on side 2 ordered? Are they starting from side 2, track 0, sector 0 or backwards from track 39? Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/ Share on other sites More sharing options...
Asmusr Posted Friday at 07:26 PM Author Share Posted Friday at 07:26 PM I think I found the answer: tracks on side two are ordered from track 39 down to track 0, but the order of sectors within each track is still increasing. 2 Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5575090 Share on other sites More sharing options...
JasonACT Posted Friday at 09:43 PM Share Posted Friday at 09:43 PM https://www.unige.ch/medecine/nouspikel/ti99/dc2.txt Quote *--------------------------------------- * Sector read/write *--------------------------------------- A40E8 LI 4,>000A try ten times A40EC MOVB @A4630,@>0050(9) no error BL @A4496 select drive BL @A45F0 point to # of last track CLR 0 MOVB @>FBFE(15),0 get # of last track accessed CI 0,>D700 JH A410C too high: drive was reset BL @A4524 seek track 0 SETO 0 inverted data bus" >FF will be >00 A410C MOVB 0,@>5FFA place >00 in track register MOV @>004A(9),1 sector # SBZ 7 side 0 CLR 7 CI 1,>02D0 max 720 (DS/SD) JHE A41B6 error 7 CI 1,>0168 on which side is it? JL A413E 0-359: on side 0 AI 1,-719 on side 1: sector # grow from in to out ABS 1 719 - sector # CLR 0 DIV @A4632,0 sect/track (=9) AI 1,-8 invert: 8=0, 0=8, 7=1, etc ABS 1 SBO 7 side 1 LI 7,>0100 side number = >01 JMP A414E A413E CI 1,>0001 is it sector 0 or 1? JH A4148 no BL @A4524 yes: seek track 0 A4148 CLR 0 DIV @A4632,0 R0=track #, R1=sector # Yes. 1 Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5575183 Share on other sites More sharing options...
Tursi Posted yesterday at 02:13 PM Share Posted yesterday at 02:13 PM 18 hours ago, Asmusr said: I think I found the answer: tracks on side two are ordered from track 39 down to track 0, but the order of sectors within each track is still increasing. Yeah. Since sector dump images don't include the track information, it's just a straight run of incrementing sectors. Confusion over how that was discussed in the original V9T9 docs had me include an option to invert it in Classic99, but I never saw such an image and I believe I disabled it. I've not tried analyzing a track dump image to see if that track information really is stored that way there. Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5575606 Share on other sites More sharing options...
+mizapf Posted yesterday at 04:38 PM Share Posted yesterday at 04:38 PM Yes, the sector dumps use a logical sector order, so sector n comes before n+1. No track information is retained. Different to that, the track dumps (aka PC99 format) keep the track information, including the sector placement. See https://www.ninerpedia.org/wiki/Sector_Dump_Format https://www.ninerpedia.org/wiki/Track_Dump_Format Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5575661 Share on other sites More sharing options...
Asmusr Posted yesterday at 06:49 PM Author Share Posted yesterday at 06:49 PM (edited) The thing I don't understand is where the logical sector order comes from? I can see that for a real FDC it's faster to switch from side 0 track 39 to side 1 track 39, but that doesn't mean that sectors in a disk image should be ordered like that. For me it would be more logical if we could simply calculate the sector index as side * 360 + track * 9 + sector. Anyway, no problem once I found out how it works. Edit: The aim is to calculate where on the disk image a sector exists, which would be sector index * 256. Edited yesterday at 07:05 PM by Asmusr Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5575762 Share on other sites More sharing options...
+mizapf Posted 22 hours ago Share Posted 22 hours ago By "logical order" I mean that subsequent sectors have increasing numbers. You could also call it linear block addressing. The sector dump is a sequence of contents of sector 0, 1, 2, 3, 4 ... 1439 (for DSDD). There are no sides in this format, neither are there tracks. The offset of sector n from the beginning is n*256. 1 Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5575844 Share on other sites More sharing options...
+MarkB Posted 7 hours ago Share Posted 7 hours ago This is my implementation for FDD h/w emulation. It works with any sector dump files I have tested: static void seekDisk (void) { int sector = fdd.sector; if (fdd.side) { /* Add the offset for the first side */ sector += sectorsPerTrack * tracksPerSide; /* For double sided disks saved in a sector-dump (.dsk file), the track * number is "inverted" so track 39 is the first track on the second * side and track 0 is the last track. */ sector += (tracksPerSide - 1 - fdd.track) * sectorsPerTrack; } else sector += fdd.track * sectorsPerTrack; mprintf (LVL_DISK, "DSK - access sector %d [T:%d Sec:%d Side:%d]\n", sector, fdd.track, fdd.sector, fdd.side); if (driveHandler[fdd.unit].seek) driveHandler[fdd.unit].seek (sector); } 1 Quote Link to comment https://forums.atariage.com/topic/376662-order-of-sectors-in-sector-dump-format/#findComment-5576199 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.