Re: D64 with IDE64 and a parallel connected 1541... record beaten!?

silverdr_at_inet.com.pl
Date: 2005-11-23 16:31:14

On 2005-11-23, at 12:12, MagerValp wrote:

>>>>>> "S" == silverdr  <silverdr@inet.com.pl> writes:
>
> S> I use the (faster) 1571 routine inlined and without temporary BIN
> S> storage - the decoded BIN quartets go directly to output bufffers
> S> rather than ZP locations.
>
> Since the rom disassembly is missing the vital tables: what does the
> table layout and the inner loop look like? I'm about to write a table
> based decoder myself, and this would give me a head start :)

Since I couldn't find them in the ROM sources, I took them directly  
off the 1571, starting at $9f0d. I think they're too big to post here  
but I may send you the disassembly if you like.

As for the innermost routine (5GCR24BIN) it is in the "LCCGCRBN.SRC"  
file of the said sources. After my recent changes it looks like the  
following:

; GCR conversion routine entry
	lda (gcr_buffer_vector),y
	sta gtab
	and #mask2
	sta gtab + 1
	iny
	bne fast_gcr_same_page10
	inc gcr_buffer_vector + 1

fast_gcr_same_page10:
	lda (gcr_buffer_vector),y
	sta gtab + 2
	and #mask2x
	ora gtab + 1
	sta gtab + 1
	lda gtab + 2
	and #mask4
	sta gtab + 3
	iny

	lda (gcr_buffer_vector),y
	tax
	and #mask4x
	ora gtab + 3
	sta gtab + 3
	txa
	and #mask5
	sta gtab + 4
	iny

	lda (gcr_buffer_vector),y
	sta gtab + 5
	and #mask5x
	ora gtab + 4
	sta gtab + 4
	lda gtab + 5
	and #mask7
	sta gtab + 6
	iny
	bne fast_gcr_same_page11
	inc gcr_buffer_vector + 1

fast_gcr_same_page11:
	lda (gcr_buffer_vector),y
	sta gtab + 7
	and #mask7x
	ora gtab + 6
	sta gtab + 6
	iny

	sty gcr_pointer
	ldy bin_pointer

	ldx  gtab
	lda  LA00D,x  		;  a
	ldx  gtab+1
	ora  L9F0D,x  		;  b
	sta (bin_buffer_vector),y
	iny
	beq end_of_sector

	ldx  gtab+2
	lda  LA10D,x    	;  c
	ldx  gtab+3
	ora  L9F0F,x    	;  d
	sta (bin_buffer_vector),y
	iny

	ldx  gtab+4
	lda  L9F1D,x    	;  e
	ldx  gtab+5
	ora  LA20D,x    	;  f
	sta (bin_buffer_vector),y
	iny

	ldx  gtab+6
	lda  L9F2A,x    	;  g
	ldx  gtab+7
	ora  LA30D,x    	;  h
	sta (bin_buffer_vector),y
	iny
; end of GCR conversion routine

where

mask1	= $f8	; %11111000
mask2	= $07	; %00000111
mask2x	= $c0	; %11000000
mask3	= $3e	; %00111110
mask4	= $01	; %00000001
mask4x	= $f0	; %11110000
mask5	= $0f	; %00001111
mask5x	= $80	; %10000000
mask6	= $7c	; %01111100
mask7	= $03	; %00000011
mask7x	= $e0	; %11100000
mask8	= $1f	; %00011111

and gtab is a 5 byte ZP buffer, which I also plan to partially  
eliminate.
-- 
BSD is for people who love Unix. Linux is for people who hate Microsoft.


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.