From: Jim Brain (brain_at_jbrain.com)
Date: 2004-05-25 23:50:08
ncoplin@orbeng.com wrote:
>Hi Jim,
>
>
>
>>Why send UNTALK over the wire? Can;t the peripheral just assume that
>>when it completes sending data? I figure the answer has something to do
>>with FILE reads, but I have not gotten there.
>>
>>
>
>In most cases the peripheral does know when it finishes, afterall it sends
>an EOI (tells the C64 the next byte is the last). In this case the UNTALK is
>almost a confirmation. More importantly however, imagine this. You are
>"loading" a program, then press RUN/STOP. The C64 has to tell the drive to
>stop sending data. It signals ATN, with an UNTALK.
>
>- Nick
>
>
>
That's fine. My code switches back into IDLE state when ATN goes low.
I just wanted to make sure that switching to IEC_CMD_STATE_IDLE after a
successful data transfer would not cause issues.
Now, I am stumped for a good RS-232 protocol to support data transfers.
Obviously, the serial port doesn;t really have an ATN line (I gave some
thought ot using DTR, but that won't work on all environments, cannot be
read by all OS's (without IOCTLs and such)), so I need to way to
deliniate commands, data, and EOI on the serial port... (Yes, I could
write a higher level set of code in the controller, and I will, but I
assume some people will want essentially RAW data....
I came up with this, but it's just a stab at something, comments are
appreciated:
(all data in hex)
FF is "command" char. If it appears in data stream, replace with FF FE
FF 00 reset interface
FF 01 X listen as device X
FF 02 X unlisten as device X
FF 03 X <data> configure virtual device X
FF 04 end of cmd/sync
FF 10 reset IEC bus
FF 11 IEC CMD
FF 12 IEC Data
FF 13 IEC EOI
FF 14 X Turn ON error LED (if just one device, X is unimportant, just
discard it.)
FF 15 X Turn OFF error LED
I have some other higher level commands, but wondered what folks thought
of these. I tried to decipher Marko's format, but I can;t figure it out...
Jim
--
Jim Brain, Brain Innovations
brain@jbrain.com http://www.jbrain.com
Dabbling in WWW, Embedded Systems, Old CBM computers, and Good Times!
Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.