Re: [cc65] Atari DIO

Date view Thread view Subject view

From: Christian Groessler (cpg_at_aladdin.de)
Date: 2002-11-05 01:39:37


Hi,

On 10/31/2002 12:23:58 PM PST "Shawn Jefferson" wrote:
>
>>>Couldn't I just write into the sectsizetab * 4 * drive number?  That
>>>would be easy enough.  Is there some way to reference the sectsizetab
>>>from my source code?
>>
>>This would be what my "small assembler function" would have done. You
>>cannot do it since the sectsizetab variable is invisible to C (no
>>starting '_').
>
>Here is what I have:
>
>; unsigned char __fastcall__ dio_set_sectsize(dhandle_t handle,
>;                                             unsigned int sectsize);
>
>	.export     _dio_set_sectsize
>;        .include    "atari.inc"
>	.importzp   ptr1,tmp1
>	.import     popax, __oserror
>
>.proc   _dio_set_sectsize
>
>	sta     tmp1                ; save sector size
>	stx     tmp1+1
>
>	jsr     popax
>	sta     ptr1
>	stx     ptr1+1              ; pointer to dhandle
>
>	ldy     #1                  ; offset into sst_table
>	lda     tmp1
>	sta     (ptr1),y
>	iny
>	lda     tmp1+1
>	sta     (ptr1),y
>
>	lda     #0
>	sta     __oserror
>	rts
>
>.endproc

This routine works fine here with my xf551. What error do you get?

Also there lurk some more problems for a general solution of the
sector size issue: If I read sectors 1 to 3 on a 256 byte formatted
disk, I still have to specify sectorsize 128. So sectors 1-3 are
always 128 bytes on the xf551.

I've read the 256byte sectors formatted disk on a pc (possible since
it's MFM), and for the sectors 1-3 the first 128 bytes are duplicated
in the 2nd 128 bytes.

Are sectors 1-3 on any medium always 128 bytes? How is this handled
e.g. in the SmartIDE code?

regards,
chris

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-11-05 01:40:33 CET