Re: Got IEC code working

From: Marko Mäkelä (marko.makela_at_hut.fi)
Date: 2004-05-26 18:24:18

On Wed, May 26, 2004 at 09:14:00AM -0500, Jim Brain wrote:
> True, my command can be repeated:
> 
> LISTEN 4
> LISTEN 5
> LISTEN 8
> etc.

True.  I confused your LISTEN directive with the LISTEN command of the
serial bus.  But I still think that it's cleaner to list all device numbers
in a single atomic command.

> I'm still trying to decipher your protocol.  How does it deal with a 
> resynchronization of the serial line (to prevent interpreting commands 
> as data or vice versa?

In my protocol, $00 is the escape command.  A $00 data byte is escaped
as $00 $00.  If an ATN interrupt arrives, it'll send some $00 xx escape
(see the comments).  There are also $00 xx responses for indicating EOI,
end of ATN transmission, or talk-attention turn around.

> I also want to support higher level commands (get file, let the AVR deal
> with the IEC commands)

I didn't want to do that, because I thought you would need a custom
application on the other end of the serial line anyway.  Besides, the
Flash ROM of the 2313 was getting a little tight (especially if support
for burst mode transfers or JiffyDOS is going to be added later).  It
would be a different matter if all protocols for the cassette port were
removed.  Of course, as you have a bigger controller, the design constraints
are different.

> I've got routines working, and I have a state diagram (had to generate 
> one for my state machine in the AVR.

Could you represent the diagram in an easily editable format?  I'd start
with the input language of GraphViz, but maybe someone knows a better
approach that has been implemented in an open source or free software tool.

	Marko

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.