Re: Question about writing to 1541

From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2005-05-04 15:34:47

Hello,

* On Tue, May 03, 2005 at 01:35:01PM +0200 Baltissen, GJPAA (Ruud) wrote:
 
> Regarding the two BVC's were the discussion started with: the first
> one starts the proces of writing the last $55 and the second one makes
> sure it is written and not dumped like the databyte during the proces
> mentioned by Andre. I'm just wondering why the programmer cared so
> much for this $55 byte and neglected this databyte. Only one thing
> comes to my mind: two different programmers. One that likes to see
> things neatly closed and a sloppy one who knew that the 1541 didn't do
> anything with the last byte and so didn't care about it. It even can
> be a programming error but as it had no visible result, nobody noticed
> it.

Well, I would think this is a programming error in conjunction with two
different programmers. Or, it is just one programmer, but it was some
time between writing one routine and writing the other one.

> 
> For Patryk:
> 
> >	LDA #$55
> >	LDX $45
> > L784:
> >	BVC L784
> >	CLV
> >	STA $1C01
> >	DEX
> >	BNE L784
> 
> Where do you initialise $45?

$45 is obviously the number of bytes for the inter-sector GAP.

> Anyway, your routine also proofs the statement I made above. I also
> question the use of 'STA $1C01' here; it doesn't add anything.

This is right. Interestingly, again, although the 1541 ROM code almost
always uses the form with STA $1C01 like above, on $FDA3 and $FE0E, it
is used without that additional STA $1C01. This lets me conclude that
the formatting routine and the "normal" writing routine are written by
different people, or, at least, there was some time in between the both.

From the schematic (of the 2031 write logic), it is obvious that this
STA does not add anything to the routine.

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
http://cbm4win.sf.net/

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.