From: Pete Rittwage (peter_at_rittwage.com)
Date: 2008-01-05 19:38:50
Ruud@baltissen.org wrote: > Hallo allemaal > > > As I already mentioned I have a problem with formatting the disk: the first > time ends fine, the second format ends with a write error. No explanation > at all :( > Yesterday I stumbled into something that makes the problem even weirder. I > did a move towards the 16 MB disk and decided to format all 256 sectors of > a track. See below, Y=sector, X=track: > > ldy #0 > > ;@@00 > ; Fill sector with zeros > FormatTrack01 tya > > jsr SetTSparms3 > > lda #$30 ; write sector > jsr SendCommand > > lda #0 > tax > > FormatTrack02 sta IDEdata > inx > bne FormatTrack02 > > dey ; next sector? > ; bne FormatTrack01 ; yes, -> > > ; ldy #0 > ; dey > bpl FormatTrack01 > > jmp L_FD8B > > > Rest of source: > http://www.baltissen.org/files/idejd4.asm > > If you ommit the lines starting with ';', you get my first try. Which is > wrong as only track 0 will be formatted. BPL is an inheritance of > formatting from track 21 (or less) downwards (see: > http://www.baltissen.org/files/idejd4.asm and look for !&&12). But in this > case, after only formatting sector zero, I can format the disk as many > times without any error. So I thought, had it to do with the BPL command? > > Finding no reasonable explanation at L_FD8B and further, I just tried to > copy the circumstances by first inserting the BNE (as it should be) and > then adding this LDY #0 (in fact not needed) and DEY. Still got my error :( > > So I restored things and tried formatting the track starting with sector 1 > instead of 0 (LDY #1 instead of LDY #0 just above ;@@00), same result. Only > then when I only format sector zero, I have no error. > > Why ???? > > > -- > ___ > / __|__ > / / |_/ Groetjes, from a very puzzled Ruud > \ \__|_\ > \___| http://Ruud.C64.org > > > > > > > > Message was sent through the cbm-hackers mailing list X is just being used as a scratch register here, it is always reset to zero each time around. Y is the track, not the sector like in the comments? It looks like this code should format sector zero only on tracks 0-255 if I am reading the SetTSparms3 code correctly? -- - Pete Rittwage http://rittwage.com Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.