1541IDE, found the problem

1541IDE, found the problem

From: Ruud_at_baltissen.org
Date: Mon, 18 May 2009 19:59:05 +0200
Message-ID: <4A11BE09.8747.C30DB7@Ruud.Baltissen.org>
Hallo allemaal,


The idea checking my very first try worked out: that one worked fine. Then 
it was just a matter of checking newer versions until things went bad. 

At $F423 you find something that is called " Job optimalisation". Roughly 
it checks all jobs to see if there is another job programmed and if so, it 
checks if it is for the same drive and track. If so, it can be handled as 
well. 
This is what I understood. Not hindered by slowly moving heads I thought I 
could permit the DOS all jobs. Apperantly I was wrong. Under the text 
you'll find my version between /* .... */ and a previous one. This previous 
one is my first improvement of the original one, but one that seems to 
works.

I can understand a lot but I completely cannot understand how my change 
causes the DOS to behave as it did. So if someone is interested to study my 
two versions of the Job Optimalisation, please do!

/*
		ldx	#$05
		stx	JOBN

		ldx	#$FF
t_F43A
		jsr	InitPntr2Buf	; set buffer pointer for disk controller
					;				[F393]
		bpl	t_F483		; no job, ->

		lda	JOBN
		tax

		adc	#$03
		sta	BUFPNT+1
t_F483
		dec	JOBN
		bpl	t_F43A

		txa
		bpl	t_F48D

		jmp	LoopDiskCntrl	; to job loop
*/
		lda	#$7F
		sta	CSECT
		
		lda	HDRSEC
		clc
		adc	#$02
		cmp	SECCNT		; max. sectors/track
		bcc	t_F432

		sbc	SECCNT
t_F432
		sta	NEXTS

		ldx	#$05
		stx	JOBN
		
		ldx	#$FF
t_F43A
		jsr	InitPntr2Buf	; set buffer pointer for disk controller
		bpl	t_F483		; no job, ->

		sta	WORK		; save job code
		
		and	#$01
		cmp	CURDRV		; momentary drive?
		bne	t_F483		; no, ->

		ldy	#$00
		lda	(HDRPNT),Y	; get track #
		cmp	TRACC		; same as from momentary job?
		bne	t_F483		; no, ->

		lda	JOB		; command code
		cmp	#$60		; execute program in buffer?
		beq	t_F461		; yes, ->

		ldy	#$01
		sec
		lda	(HDRPNT),Y	; get sector #
		sbc	NEXTS
		bpl	t_F461

		clc
		adc	SECCNT
t_F461
		cmp	CSECT
		bcs	t_F483
t_F473
		sta	CSECT
		lda	JOBN
		tax
		adc	#$03
		sta	BUFPNT+1
		bne	t_F483
t_F47E
		pla
		cmp	#$06
		bcc	t_F473
t_F483
		dec	JOBN
		bpl	t_F43A

		txa
		bpl	t_F48D

		jmp	LoopDiskCntrl	; to job loop

t_F48D
		jmp	B_F48D


--
    ___
   / __|__
  / /  |_/     Groetjes, Ruud Baltissen
  \ \__|_\
   \___|       http://Ruud.C64.org







       Message was sent through the cbm-hackers mailing list
Received on 2009-05-18 20:13:02

Archive generated by hypermail 2.2.0.