[comp.sys.atari.8bit] Need information on double-density SIO commands

charles@c3pe.UUCP (Charles Green) (06/04/89)

Now that I have an Atari drive that can read and write 256-byte sectors, I'd
like to try accessing floppies from a CP/M machine in our office, which can
write 40-track, single-sided, double density 256-byte sectors.  However, I
haven't been able to successfully use SIO to read the sectors.

I have a BASIC program with machine language assist which can read/write the
standard 128-byte sectors via SIO calls, stuffing 'R' into DCOMND and filling
in the other fields of the DCB for sector number and buffer.  I hoped that by
putting 256 into DBYTLO/HI I would be able to read the sectors, but I only got
data for the first three sectors, which leads me to believe I'm still only
giving the "single-density" read command, and the drive is being tolerant in
case I'm trying to boot from PROM.

So, can anyone shed some light on this issue?  Thanks for any information...
-- 
{decuac.dec.com,cucstud,sundc}!c3pe!charles	ex::!echo Boo:

chasm@killer.DALLAS.TX.US (Charles Marslett) (06/05/89)

In article <7097@c3pe.UUCP>, charles@c3pe.UUCP (Charles Green) writes:
> Now that I have an Atari drive that can read and write 256-byte sectors, I'd
> like to try accessing floppies from a CP/M machine in our office, which can
> write 40-track, single-sided, double density 256-byte sectors.  However, I
> haven't been able to successfully use SIO to read the sectors.

> So, can anyone shed some light on this issue?  Thanks for any information...
> -- 
> {decuac.dec.com,cucstud,sundc}!c3pe!charles	ex::!echo Boo:

You should be able to do that (I once wrote an ATR8000 "driver" that allowed
it to read/write 128-byte 1050-double-density disks, and another than read
1024-byte CP/M disks).  The major gotchas are (1) use $E459, not $E453 (the disk
handler), since $E453 code resets the length to 128 bytes before doing anything,
and (2) make sure you set the drive to double-density mode (if you need to) --
this depends on the type and generation of the drive . . . they're all different

Charles Marslett
chasm@killer.dallas.tx.us

rcbamw@eutrc3.UUCP (m.waucomont) (06/06/89)

In article <7097@c3pe.UUCP> charles@c3pe.UUCP (Charles Green) writes:
>Now that I have an Atari drive that can read and write 256-byte sectors, I'd
>like to try accessing floppies from a CP/M machine in our office, which can
>write 40-track, single-sided, double density 256-byte sectors.  However, I
>haven't been able to successfully use SIO to read the sectors.

>So, can anyone shed some light on this issue?  Thanks for any information...

Yep, the sources to read/write 256 bytes from/to a modified drive are on
its way to you, Charles. Anybody else interested in these sources can drop
a line (I don't want to blow that much info over comp.sys.atari.8bit). I
will mail them then :-)

Michel 'Mikki' Waucomont

slackey@bbn.com (Stan Lackey) (06/06/89)

In article <7097@c3pe.UUCP> charles@c3pe.UUCP (Charles Green) writes:
>Now that I have an Atari drive that can read and write 256-byte sectors, I'd
>like to try accessing floppies from a CP/M machine in our office, which can
>write 40-track, single-sided, double density 256-byte sectors.  However, I
>haven't been able to successfully use SIO to read the sectors.
>
>I have a BASIC program with machine language assist which can read/write the
>standard 128-byte sectors via SIO calls, stuffing 'R' into DCOMND and filling
>in the other fields of the DCB for sector number and buffer.  I hoped that by
>putting 256 into DBYTLO/HI I would be able to read the sectors, but I only got
>data for the first three sectors, which leads me to believe I'm still only
>giving the "single-density" read command...

It sounds like you have the XF551.  I have hacked around doing exactly what
you are doing.  I believe that the way the density is selected is by using
'R' with the number of bytes; 128 selects single density (which is what the
first three sectors are written in) and 256 selects double density.  That's
all.  Note: the standard SIO entry (the address escapes me) resets the byte
count to 128!  If you have the OS listing, you should be able to figure out
the proper address; that is, the routine that is called after SIO sets byte
count to 128.  I can look it up if you need it.

My mission was to transfer files from IBM PC to Atari.  A kind soul on the
net came to my aid with a program to r/w Mydos 256-sector files with a
PC, and as it turns out Spartados can r/w Mydos disks.  I was prepared
to write all that stuff myself!  It all works beautiful now.

-Stan