[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ADTPro with fast Disk II reads released



On Aug 14, 10:16 pm, A2Pro <a...@wilserv.com> wrote:
> But if try to (S)end or
> (R)eceive, ADTPro.1.0.2 begins by asking for a file name.  It then
> sends that file name as a byte stream to my A3000, preceeded by the
> letter "Z".  But the protocol page you refer to (see above) has NO
> mention of the "Z" command in the description of how Get (Receive)
> disk or Put (Send) disk work.
Oops!  You're right.  I'll have to fix that.

The sequence to start the extended protocol send (Z+P) on the client
end is this:
	lda #CHR_Z	; Ask host for file size
	jsr PUTC
	jsr SENDFN	; Send file name
	jsr GETC	; Get response from host: file size lsb
	sta HOSTBLX
	jsr GETC	; Get response from host: file size msb
	sta HOSTBLX+1
	jsr GETC	; Get response from host: return code/message

Where HOSTBLX holds the 16-bit size (in blocks) of the file in
question, if it exists.  A return code $02 means the file doesn't
exist, $00 means it does.  After querying for permission to overwrite
if appropriate, the client would continue with the "P" protocol as
documented on the site.

The driver logic is in sr.asm (for send/receive):
http://adtpro.cvs.sourceforge.net/adtpro/adtpro/client/src/sr.asm?revision=1.21

The nuts and bolts of the protocol is in serproto.asm (for serial):
http://adtpro.cvs.sourceforge.net/adtpro/adtpro/client/src/serial/serproto.asm?revision=1.6

>     I've been messing with the "C" source for the Amiga server but not
> having much luck given that I don't know what ADTPro.1.0.2 expects
> after sending the "Z" command and file name.

One thing that's different between the standard ADT Send/Receive
protocol and the ADTPro Put/Get protocol is the addition of block
numbers to each packet: 2 bytes for the 16-bit block num, then a whole
'nuther byte to say if it's the first or second half of a block.  The
ADTs of the world send data in 256 byte chunks, and a block takes
512.  So to keep in the spirit of retrofitting... that's how it worked
out.