Slightly OT: Amiga serial port programming question

From: Marko Mäkelä (marko.makela_at_hut.fi)
Date: 2004-01-23 20:57:51

Hi all,

Today, I spent some time debugging a development version of c2nload,
the 38400 bps auto-starting fastloader for the C2N232 adapter.  The
program displays a progress meter.  It has to be implemented differently
for each major platform:

- On POSIX termios, I set up alarm(2) and catch SIGALRM.  The write(2)
  system call will be interrupted after the predetermined timeout, and
  it will report the number of bytes sent until the interrupt.

- On Win32, a write timeout is specified with the SetCommParams function.

- On AmigaOS, I haven't figured out a solution.  When a CMD_READ
  operation is aborted, the field io_Actual reports the number of bytes
  read so far.  However, with CMD_WRITE, no matter if I do AbortIO and
  WaitIO, or CheckIO, or nothing, the field remains zero.  Is there a
  solution?  I tried Google, but didn't find any applicable code.

Another thing is that the Amiga we used for testing occasionally crashed
when the program was executed several times.  It could be a hardware
problem, but I'm not sure.  Are there any Amiga and C2N232 owners who
could help?

	Marko

PS: I've implemented a KIM-1 tape decoder in "c2n", which already encodes
and decodes Commodore and Oric tapes.  Once I complete the encoder, I'll
release the program.

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.